We are interested in proving satisfiability of Constrained Horn Clauses (CHCs) over Algebraic Data Types (ADTs). We propose to prove satisfiability by building a tree automaton recognizing the Herbrand model of the CHCs. If such an automaton exists then the model is said to be regular, i.e., the Herbrand model is a regular set of atoms. Kostyukov et al. have shown how to derive an automaton when CVC4 finds a finite model of the CHCs. We propose an alternative way to build the automaton using an encoding into a SAT problem using Clingo, an Answer Set Programming (ASP) tool. We implemented a translation of CHCs with ADTs into an ASP problem. Combined with Clingo, we obtain a semi-complete satisfiability checker: it finds a tree automaton if a regular Herbrand model exists or finds a counter-example if the problem is unsatisfiable.
翻译:本文研究在代数数据类型(ADTs)上证明约束Horn子句(CHCs)可满足性的问题。我们提出通过构建识别CHCs的Herbrand模型的树自动机来证明可满足性。若此类自动机存在,则称该模型为正则的,即Herbrand模型是原子的正则集合。Kostyukov等人已证明当CVC4找到CHCs的有限模型时如何推导自动机。我们提出一种替代方法:使用答案集程序设计(ASP)工具Clingo,通过编码为SAT问题来构建自动机。我们实现了将含ADTs的CHCs转换为ASP问题的翻译方法。结合Clingo,我们获得了一个半完备的可满足性检验器:若存在正则Herbrand模型则输出树自动机;若问题不可满足则生成反例。