구속 만족도 문제 (CSP) 대 만족도 모듈로 이론 (SMT); 제약 조건 프로그래밍에 대한 코드


30

누군가이 연구 분야의 관계가 무엇인지 명확히하려고하거나 도전 수준에서 좀 더 구체적으로 답변하려고합니까? 어느 것이 널리 받아 들여진 일부 제형을 가정 한 것을 포함한다. 내가 이것을 올바르게 받으면 SAT에서 SMT로 갈 때 기본적으로 CSP 필드에 들어갑니다. 반대로 CSP를 부울로 제한하면 기본적으로 SAT와 #SAT와 같은 몇 가지 관련 문제에 대해 이야기하는 것입니다. 나는 (이 정도는 분명하다 생각 예를 들어, CF Kolaitis과의 Vardi의 장 "제약 조건 만족에 대한 논리적 인 접근" 유한 모델 이론과 그 응용Grädel et al.에 의해), 덜 분명한 것은 제약 조건이 언제 "모듈로 이론"이고 그렇지 않은가? SMT는 항상 이론이 평등만을 사용하고 불평등 제약이 CSP의 더 넓은 영역에 있다는 것을 의미합니까? 내가 알 수있는 한, 종종 느슨한 변수를 도입 할 수 있으므로 [있는 경우] 구별이 명확하지 않습니다.

비교적 최근의 "만족도 핸드북"(IOP Press 2009) 은 광범위한 "만족도"우산 아래에서 SMT 및 CSP 문제를 모두 수집하지만, 구성 방식 (다양한 저자가 쓴 챕터)을 고려할 때이를 이해하는 데 실제로 도움이되지는 않습니다. .

제약 프로그래밍에 대해 이야기 할 때 용어가 혼동되지 않기를 바랍니다. 제약 조건 프로그래밍에 대한 Wikipedia 기사는 매우 모호 하므로이 프레임이 발생하는지 실제로 말할 수는 없습니다. Frühwirth와 Abdennadher (56 페이지) 의 Constraint Programming의 필수 요소 에서 수집 할 수 있는 것은 "제한 솔버"는 일반적으로 만족도 검사기 이상의 기능을 제공하며 실제로 단순화 등이 중요하다는 것입니다.

이것이 실제 CS 이론 연구 질문은 아니지만 https://cs.stackexchange.com/questions/14946/distinguish- 에서 본 것을 고려할 때 학부 CS.SE 사이트 에서이 질문에 대한 좋은 대답을 기대하지는 않습니다. 의사 결정 절차-vs-smt-solver-vs-theorem-prover-vs-constraint-sol (많은 단어가 포함되어 있지만 실제 답변으로 간주되는 것은 아닙니다).


이 ASP에 추가하십시오. SMT / ASP 비교적 최근 개발. 이전에 분리 된 필드가 혼합됩니다. 예를 들어, 참조 블랙 박스에서 클리어 박스 통합 : 하이브리드 자동 추론 도구 / Balduccini, 거친 최근 설문 조사로 Lierler을.
vzn

답변:


47

SAT, CP, SMT (대부분의) ASP는 모두 동일한 조합 최적화 문제를 처리합니다. 그러나 그들은 다른 각도와 다른 도구 상자에서 이러한 문제에 직면합니다. 이러한 차이점은 각각의 접근 방식이 어떻게 검색 공간 탐색에 대한 정보를 구성하는지에 있습니다. 필자의 작업 비유는 SAT가 기계 코드이고 다른 언어는 고급 언어라는 것입니다.

CSPs의 구조 이론에 관한 논문 연구에 기초하여 , 나는“절 구조”라는 개념이이 모든 패러다임을 통합하고 그것들의 차이점을 이해하는 데 필수적이라고 믿게되었다. SAT 인스턴스의 각 절은 금지 된 부분 할당을 나타냅니다. 같은 절엑스1엑스2¯엑스 부분 할당을 금지 {(엑스1,0),(엑스2,1),(엑스,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 x1x2¯x3x4 and x1x2¯x3x4¯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 x5 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.


Tks for this very useful answer.
Xavier Labouze

2
Note: in the FOCS/STOC community a narrower definition of CSP is used. These CSPs are of the form CSP(L), "all CSP instances that can be expressed using a fixed set L of constraint relations". The all-different constraint doesn't fit into this framework, nor do problems that have tree-like structure.
András Salamon
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.