SAT, CP, SMT (대부분의) ASP는 모두 동일한 조합 최적화 문제를 처리합니다. 그러나 그들은 다른 각도와 다른 도구 상자에서 이러한 문제에 직면합니다. 이러한 차이점은 각각의 접근 방식이 어떻게 검색 공간 탐색에 대한 정보를 구성하는지에 있습니다. 필자의 작업 비유는 SAT가 기계 코드이고 다른 언어는 고급 언어라는 것입니다.
CSPs의 구조 이론에 관한 논문 연구에 기초하여 , 나는“절 구조”라는 개념이이 모든 패러다임을 통합하고 그것들의 차이점을 이해하는 데 필수적이라고 믿게되었다. SAT 인스턴스의 각 절은 금지 된 부분 할당을 나타냅니다. 같은 절엑스1∨ x2¯¯¯¯¯∨ x삼 부분 할당을 금지 { ( x1, 0 ) , ( x2, 1 ) , ( x삼, 0 ) } 동시에 설정 엑스1 과 엑스삼 거짓으로 엑스2사실로. 조합 최적화 문제의 절 구조는 적절한 인코딩을 사용하여 SAT 인스턴스로 표현됩니다. 그러나 조항 구조에는 다음이 포함됩니다. 하는 모든 the forbidden partial assignments, not just the ones given at the start.
The clause structure is therefore usually too large to manipulate directly: typically it has at least exponential size in the number of variables, and may be infinite.
Hence, the clause structure has to be approximated with a limited amount of space.
SAT/CP/SMT/ASP maintain and update a more-or-less implicit representation of an underlying clause structure.
This is possible because if one partial assignment is known to be in the clause structure, then this implies that many other clauses are also present.
For instance, the SAT clause above also forbids any partial assignment that contains it as a subset, so clauses like x1∨x2¯¯¯¯¯∨x3∨x4 and x1∨x2¯¯¯¯¯∨x3∨x4¯¯¯¯¯∨x5 are all in the clause structure of that instance.
An approximation of the clause structure is kept to narrow down the set of solutions, and to help determine whether this set is empty.
During search some partial assignments may turn out not to be contained in any solution (even if they individually satisfy each of the constraints in the instance).
These are known as nogoods, a term introduced by ("Mr GNU") Stallman and Sussman.
A nogood clause is therefore in the clause structure and can be included in an approximation of the clause structure, as a compact representation of many clauses that can be pruned from the search for solutions.
Adding nogoods to the approximate clause structure retains all the solutions, but better approximates those solutions.
So the approximate clause structure usually changes as search progresses.
Further, the way the problem is modelled in one of the combinatorial optimisation approaches affects the clause structure, often quite significantly.
For instance, propositional variables can represent intervals such as x≤5 or points such as x=5.
Hence there isn't a single general clause structure but one associated with each choice of representation, depending on what the singletons (literals) of the clause structure represent.
Constraint programming (CP) was traditionally an AI discipline, with a focus on scheduling, timetabling, and combinatorial problems, and therefore has a central role for variables that can take more than just two values (but usually only finitely many).
CP has emphasised efficient search and, motivated by the traditional applications, has given a central role to the all-different
(injectivity) constraint, but has also developed efficient propagators for many other kinds of constraints.
The formal definitions of CP have been around since at least Montanari's 1974 paper Networks of constraints, with precursors going back even earlier.
This weight of history may have contributed to CP lagging behind other approaches in raw performance over the last decade.
CP classically maintains an approximation of the complement of the clause structure, via a set of active domains for the variables.
The aim is to eliminate values from the active domains, exploring the clause structure by trying to assign candidate values to variables and backtracking when necessary.
Satisfiability modulo theories (SMT) came out of the verification community.
Each theory in an SMT solver forms an implicit representation of potentially infinitely many SAT clauses.
The theories used with SMT and the constraints used in CP reflect their different historical applications.
Most of the theories SMT considers have to do with integer-indexed arrays, real closed fields, linear orders, and suchlike; these arise from static analysis of programs (in computer aided verification) or when formalising mathematical proofs (in automated reasoning).
In contrast, in timetabling and scheduling the injectivity constraint is central, and although the standard SMTLIB language has had an injectivity constraint since its inception in 2003 (via the distinct
symbol), until 2010 SMT solvers only implemented distinct
via a naive algorithm.
At that stage the matching technique from the standard CP propagator for all-different
was ported across, to great effect when applied to large lists of variables; see An Alldifferent constraint solver in SMT by Banković and Marić, SMT 2010.
Moreover, most CP propagators are designed for problems with finite domains, whereas standard SMT theories deal with infinite domains (integers, and more recently reals) out of the box.
SMT uses a SAT instance as the approximation of the clause structure, extracting nogood clauses from the theories as appropriate.
A nice overview is Satisfiability Modulo Theories: Introduction and Applications
by De Moura and Bjørner,
doi:10.1145/1995376.1995394.
Answer set programming (ASP) came out of logic programming.
Due to its focus on solving the more general problem of finding a stable model, and also because it allows universal as well as existential quantification, ASP was for many years not competitive with CP or SMT.
Formally, SAT is CSP on Boolean domains, but the focus in SAT on clause learning, good heuristics for conflict detection, and fast ways to backtrack are quite different to the traditional CSP focus on propagators, establishing consistency, and heuristics for variable ordering.
SAT is usually extremely efficient, but for many problems huge effort is required to first express the problem as a SAT instance.
Using a higher level paradigm like CP can allow a more natural expression of the problem, and then either the CP instance can be translated into SAT by hand, or a tool can take care of the translation.
A nice overview of the nuts and bolts of SAT is On Modern Clause-Learning Satisfiability Solvers by Pipatsrisawat and Darwiche, doi:10.1007/s10817-009-9156-3.
이제 일반에서 현재의 세부 사항으로 넘어 갑시다.
지난 10 년 동안 CP의 일부 사람들은 게으른 조항 생성 (LCG)에 집중하기 시작했습니다. 이는 본질적으로 다소 엄격한 활성 도메인 추상화가 아닌보다 유연한 SMT 유사 기술을 사용하여 CP 전파자를 결합시키는 방법입니다. 이것은 많은 종류의 문제를 효율적으로 표현하고 해결하기 위해 발행 된 CP 전파자들의 오랜 역사가 있기 때문에 유용합니다. (물론, SMT 솔버에 대한 새로운 이론을 구현하려는 공동 노력으로도 비슷한 효과를 얻을 수 있습니다.) LCG는 SMT와 경쟁이 치열한 성능을 가지고 있으며, 일부 문제에서는 우수 할 수 있습니다. 간단한 개요는 Stuckey의 CPAIOR 2010 논문 Lazy Clause Generation : SAT와 CP (및 MIP?)의 기능 결합 .: 10.1007 / 978-3-642-13520-0_3. 또한의 CP 중심의 비전 페인트 가르시아 드 라 반다, 스 터키, 반 Hentenryck와 월러스의 위치 용지 읽는 가치가 최적화 기술의 미래 : 도이 10.1007 / s10601-013-9149-Z를 .
내가 알 수있는 한, 최근 SMT 연구의 초점의 많은 부분이 공식적인 방법과 공식화 된 수학의 응용으로 옮겨 간 것으로 보입니다. 예를 들어 Isabelle / HOL 전술을 SMT 증거 추적에 추론 규칙을 반영하도록 구축 하여 Isabelle / HOL 과 같은 증거 시스템 내부에서 SMT 솔버가 찾은 증거를 재구성하는 것이 있습니다. ITP 2010에서 Böhmer와 Weber의 Z3 용 빠른 LCF 스타일 증명 재구성을 참조하십시오 .
The top ASP solvers have over the last few years been developed to become competitive with CP, SMT and SAT-only solvers.
I'm only vaguely familiar with the implementation details that have allowed solvers such as clasp
to be competitive so cannot really compare these with SMT and CP, but clasp explicitly advertises its focus on learning nogoods.
Cutting across the traditional boundaries between these formalisms is translation from more abstract problem representations into lower level efficiently implementable formalisms.
Several of the top ASP and CP solvers now explicitly translate their input into a SAT instance, which is then solved using an off-the-shelf SAT solver.
In CP, the Savile Row constraint modelling assistant uses compiler design techniques to translate problems expressed in the medium level language Essence' into a lower level formalism, suitable for input to CP solvers such as Minion or MiniZinc.
Savile Row originally worked with a CP representation as the low-level formalism but introduced SAT as a target in version 1.6.2.
Moreover, the even higher-level language Essence can now be automatically translated into Essence' by the Conjure tool.
At the same time, low level SAT-only solvers like Lingeling continue to be refined each year, most recently by alternating clause learning and in-processing phases; see the brief overview What's Hot in the SAT and ASP Competitions by Heule and Schaub in AAAI 2015.
The analogy with the history of programming languages therefore seems appropriate.
SAT is becoming a kind of "machine code", targeting a low-level model of exploration of the clauses in the clause structure.
The abstract paradigms are becoming more like higher level computer languages, with their own distinct methodologies and applications they are good at addressing.
Finally, the increasingly dense collection of links between these different layers is starting to resemble the compiler optimisation ecosystem.