并查集公理库并查集Disjoint-set union · Union-find维护不交集合划分并支持合并与代表元查询的数据结构。适合维护不断合并的等价类,但它本身不知道 term DAG 和函数 signature。把 DSU 的 摊还界直接写成完整同余闭包复杂度会漏掉父应用重检、哈希表与 explanation 维护;精确界必须指定 Nelson–Oppen、Downey–Sethi–Tarjan 或后续哪一种实现。
在 SMT 中,当前 trail 新增等式会增量触发合并;新增 disequality 若落在同一类中就产生 theory conflict。若 Boolean 层已登记原子 ,参数类合并还可把它作为 theory propagation 返回。回溯要求撤销合并或使用分层持久状态,普通路径压缩 DSU 不能直接无日志回滚。
EUF 常用于把复杂函数暂时抽象为纯函数符号。若验证目标依赖库函数的单调性、内存副作用或异常行为,必须另加公理或更精确模型;否则 SAT 模型可能选择任意符合同余性的函数。Nelson–Oppen 组合可让 EUF 与算术 theory solver 通过共享等式协作,但组合正确性还需要签名互不相交和稳定无限等额外条件。
参考资料
Greg Nelson and Derek C. Oppen, “Fast Decision Procedures Based on Congruence Closure,” Journal of the ACM 27(2), 1980, pp. 356–364。
Peter J. Downey, Ravi Sethi, and Robert E. Tarjan, “Variations on the Common Subexpression Problem,” Journal of the ACM 27(4), 1980, pp. 758–771。
Daniel Kroening and Ofer Strichman, Decision Procedures: An Algorithmic Point of View, 2nd ed., Springer, 2016, Chapter 4。