arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2208.10460cs.PLcs.LO
收藏

通过VarMonads实现小句学习

Towards Clause Learning à la Carte through VarMonads

Arved Friedemann, Oliver Keszocze

摘要:

越来越多的语言需要约束求解功能,例如错误检测或自动代码生成。想象一下,一种依赖类型的语言,只要给出它的类型,就可以立即实现一个程序。在SAT求解中,已经有几种技术来加速搜索过程,以满足可以用于程序合成的变量的分配。这些技术之一是子句学习,如果搜索分支遇到冲突,则分析冲突的原因并用于创建新子句,以便在冲突再次出现时使分支更早失败。我们提供了一个框架,这种技术可以来免费的布尔求解器,但任何约束求解器上运行的递归代数数据类型。我们通过跟踪变量赋值之前发生的读操作来实现这一点,并使用这些信息来创建冲突分析所需的依赖图。我们的结果在Agda中实现以获得最佳可读性,但它们也可以转移到其他函数式语言中。为了简洁起见,我们没有提供利用子句学习的整个搜索系统,但是从形式主义中可以清楚地看出,我们的技术确实能够构建子句学习搜索系统。

英文摘要:

More and more languages have a need for constraint solving capabilities for features like error detection or automatic code generation. Imagine a dependently typed language that can immediately implement a program as soon as its type is given. In SAT-solving, there have been several techniques to speed up a search process for satisfying assignments to variables that could be used for program synthesis. One of these techniques is clause learning where, if a search branch runs into a conflict, the cause of the conflict is analysed and used to create a new clause that lets a branch fail earlier if the conflict arises again. We provide a framework with which this technique can come for free not just for Boolean solvers, but for any constraint solver running on recursive algebraic data types. We achieve this by tracking the read operations that happen before a variable is assigned and use this information to create the dependency graph needed for conflict analysis. Our results are implemented in Agda for best readability, but they transfer to other functional languages as well. For brevity, we do not provide an entire search system utilizing the clause learning, but it will become clear from the formalisms that our technique indeed enables a clause learning search system to be built.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑