DigitalCommons@UNO DigitalCommons@UNO

Propositional satisfiability (or satisfiability) and answer set programming are two closely related subareas of Artificial Intelligence that are used to model and solve difficult combinatorial search problems. Satisfiability solvers and answer set solvers are the software systems that find satisfying interpretations and answer sets for given propositional formulas and logic programs, respectively. These systems are closely related in their common design patterns. In satisfiability, a propositional formula is used to encode problem specifications in a way that its satisfying interpretations correspond to the solutions of the problem. To find solutions to a problem it is then sufficient to use a satisfiability solver on a corresponding formula. Niemel¨a, Marek, and Truszczy´nski coined answer set programming paradigm in 1999: in this paradigm a logic program encodes problem specifications in a way that the answer sets of a logic program represent the solutions of the problem. As a result, to find solutions to a problem it is sufficient to use an answer set solver on a corresponding program. These parallels that we just draw between paradigms naturally bring up a question: what is a fundamental difference between the two? This paper takes a close look at this question.

On the other hand, it has been shown that there are problems for which CDCL provides exponential speed up [4,63]. Extensions of CDCL also form the basis of state-of-the art answer set solvers [2,27,31,42]. Thus, the solving technology underlying the search for solutions is closely related in SAT and ASP.
Observed parallels between answer set programming and satisfiability naturally bring up a question: what is a fundamental difference between the two paradigms? This is the question that we address in this paper. A short answer that summarizes our discussion follows Answer set programming provides a declarative constraint programming language, while SAT does not.
Typically, to use a SAT solver to compute solutions of a search program, a specialized program implemented in an imperative programming language is designed to generate specific propositional formulas that encode an instance of a problem. Propositional formula is an artifact in spirit of declarative programming: it provides specifications or, in other words, constraints of a problem. In contrast to imperative programming, where we provide instructions on steps to be executed in order to achieve a solution. Yet, propositional language of SAT solvers itself is incapable to serve the role of a declarative programming language. Encoding practical problems often requires thousands to millions of propositional clauses. 1 Indeed, propositional clauses are constructed by means of propositional (Boolean) atoms so that knowledge must be encoded in these basic binary terms. As a result, one not only has to design a SAT encoding of a problem, but also find means to generate this encoding.
Answer set programming relies on dialects of a logic programming language in spirit of Prolog. Thus, its language allows first-order atoms with variables. Simple ASP programs look like Prolog programs, while more complex programs may contain specialized expressions that are convenient for modeling different kinds of constraints including aggregates.
To use an answer set solver to compute solutions of a search program, a logic program that captures specifications of a problem is designed. This way no imperative programming is required as a step in utilizing answer set programming technology. To draw a parallel to terminology used in programming languages, propositional CNF formulas of SAT can be viewed as a low-level programming language, whereas logic programs of ASP form a high-level programming language. The concept of elaboration tolerance was first mentioned in [52] as the ability of a computer program's representation of a problem to accept changes in problem specifications without need to rewrite an entire program. Answer set programming provides a general purpose modeling language that supports elaboration tolerant solutions for search problems. In contrast, SAT lacks this property.
Answer set programming can be seen as a convenient declarative programming frontend for SAT-like technology. It is used to declaratively model problems ' specifications. An answer set solver is only one of the two main building blocks of a typical ASP system. A grounder is another block. A grounder is a software system that takes logic programs with variables as its input and produces propositional programs (programs whose logic rules may only contain propositional atoms) as its output. Propositional programs are crucial in devising efficient solving procedures, yet it is the logic programming language with variables that facilitates modeling and effective problem solving by means of answer set programming. Modern languages supported by ASP technology also support additional constructs, e.g., aggregates [20,22], to facilitate concise modeling of problems. First-order logic is a counterpart of propositional logic that allows modeling with variables. In this paper we illustrate how a built-in closed world assumption (presumption that what is not currently known to be true is false) as well as an ability to express transitive closure makes logic programs a convenient modeling language for describing search problems that SAT and ASP commonly deal with. Classical first order formulas lack the closed world assumption and, more generally, are monotonic. Possibly this explains the fact that it is logic programs under answer set semantics -a nonmonotonic formalism -which built the basis for the declarative programming language utilizing SAT-like technology.
Before proceeding to the technical content of the paper we illustrate the effect of the built-in closed world assumption and the benefits of ASP as a nonmonotonic formalism on a toy bird-penguin domain. Consider the following knowledge:

birds normally fly penguins do not fly
The first statement is an example of default-a statement that includes a word such as normally or usually. We can use this default to draw conclusions as long as they do not contradict our knowledge. The second statement presents an exception to the default birds normally fly: although penguins are birds they do not fly. ASP provides means to encode defaults and exceptions. For example, the following logic programming rules capture the two statements above: fly(X) ← bird(X), not abnormal fly(X). abnormal fly(X) ← penguin(X). (1) The former rule states the default birds normally fly by saying that if an entity is a bird and not known to be abnormal with respect to the flying property, then this entity flies. The later rule states that if an entity is a penguin, then it is abnormal with respect to flying property. Adding bird(tweety).
as a fact to program (1) allows us to conclude that a bird named tweety flies, because the resulting program has a unique answer set consisting of atoms {bird(tweety), fly(tweety)}.
Indeed, there is no evidence for bird tweety to be abnormal with respect to the flying property. This illustrates the built-in closed world assumption in ASP.
On the other hand, consider treating these rules in (1) and (2) as classical logic formulas that seemingly encode the same knowledge: bird(X) ∧ ¬abnormal fly(X) → fly(X) penguin(X) → abnormal fly(X) bird(tweety) This set of formulas has several models: one suggesting that the bird named tweety flies; and another one suggesting that the bird tweety does not fly as it is abnormal with respect to the flying property. Now let us add the fact penguin(tweety) to the program constructed from the rules in (1) and (2). The new program will correctly identify tweety as abnormal with respect to the flying property and withdraw the earlier conclusion that tweety flies. Indeed, the only answer set of the resulting program is {penguin(tweety), bird(tweety), abnormal f ly(tweety)}.
This illustrates the benefits of ASP as a nonmonotonic formalism.
To demonstrate the elaboration tolerance of ASP, consider the case of learning more information about specific species of birds in bird-penguin domain. For example, in addition to the fact that penguins do not fly we learn that ostriches do not fly. We can extend program (1) with a new exception by adding the rule abnormal fly(X) ← ostrich(X).
to capture new knowledge.
To compare and contrast the SAT and ASP paradigms, we start the paper by introducing propositional satisfiability (Section 2) and propositional logic programs (Section 3). Section 4 introduces notion of completion. In Section 5, logic programs with variables are presented. We also discuss common modeling patterns used in SAT and answer set programming in Sections 2, 3, 6, and 7. We use graph coloring and Hamiltonian cycle search problems as runnings examples in this paper. Section 8 presents details on SAT and answer set solvers in the form that makes it easy to draw parallels between these systems. So-called effectively propositional logic is discussed in Section 9 as a counterpart to programs with variables of ASP for SAT formalism. Section 10 elaborates on related work and provides more links to literature.

Satisfiability and test modeling methodology
We consider atoms as customary in predicate logic. A literal is an atom or a negated atom. Ground literals and atoms are literals and, respectively, atoms that contain no variables. A clause is a non-empty disjunction of literals. We sometimes identify a clause with the set of its literals. We say that a clause is ground if it consists of ground literals. A formula is said to be in conjunctive normal form (CNF) if it is a conjunction of ground clauses (possibly the empty conjunction ). A set M of literals is called consistent if there is no atom a such that M contains a and its complement ¬a. A signature is a set of ground atoms. A set M of literals over signature σ is complete if for every atom a in σ either a or ¬a (possibly both) occurs in M. An interpretation over signature σ is a complete and consistent set of literals over σ . For a formula F , by σ F we denote the signature composed of atoms that occur in F . We also call σ F the signature of F . We say that a clause C is satisfied by a consistent set M of literals (over σ ), written M |= C, when M ∩ C = ∅. Let F be a CNF formula. Formula F is satisfied by an interpretation M over σ F , written M |= F , if M satisfies each conjunct (a clause) in F . We call such interpretations models. Formula F is satisfiable if it has models.
Consider a graph coloring problem GC : A 3-coloring of a directed graph is a labeling of its vertexes with at most 3 colors such that no two vertexes sharing an edge have the same color.
For instance, see two specific graphs G 1 and G 2 in Fig. 1. It is easy to see that there are six distinct 3-colorings for graph G 1 including the following: assigning color 1 to vertexes a and c, color 2 to vertex b, and color 3 to vertex d forms a 3-coloring of G 1 .

Fig. 1 Sample graphs G 1 and G 2
We denote this 3-coloring of graph G 1 by S G 1 . Graph G 2 has no 3-colorings. We now illustrate how the problem of finding a 3-coloring of a graph (V , E) can be encoded as a SAT problem. For every vertex v ∈ V and every color i ∈ {1, 2, 3}, we introduce an atom c vi that intuitively says that vertex v is assigned color i. The models of the formula 1≤i≤3 c vi (v ∈ V ), are in one to one correspondence with the 3-colorings of the graph (V , E). The first line in (3) intuitively says that each vertex is assigned some colors. The second line says that it is impossible that a vertex is assigned two colors. The third line says that it is impossible that any two adjacent vertexes are assigned the same color. The formula in spirit of (3) for graph G 1 consists of clauses given in Fig. 2. Horizontal lines separate the clauses that come from distinct "schematic formulas" in (3). This formula has six satisfying interpretations including {c a1 , c b2 , c c1 , c d3 , ¬c a2 , ¬c a3 , ¬c b1 , ¬c b3 , ¬c c2 , ¬c c3 , ¬c d1 , ¬c d2 }.
This model captures solution S G 1 . To encode the 3-coloring problem for graph G 2 one has to extend the set of formulas in Fig. 2 by the following clauses ¬c a1 ∨ ¬c c1 ¬c a2 ∨ ¬c c2 ¬c a3 ∨ ¬c c3 to account for a new edge. This formula is unsatisfiable, which says that it is impossible to color this graph in accordance with the constraints posed by 3-coloring problem.
A word TEST captures a common methodology to model a search problem using SAT. Interpretations over a signature of a CNF formula define space of possible solutions. Each clause of a CNF formula forms a constraint or, in other words, is part of a TEST that each solution to a problem has to satisfy. The specification (3) of the graph coloring problem is a fine example of this methodology. Indeed, each line in (3) corresponds to a group of constraints that an interpretation must satisfy in order to be a solution to the graph coloring problem.

Propositional logic programs and generate-and-test methodology
Answer set programming practitioners develop applications that rely on ASP languages, which go beyond propositional/ground atoms. Yet, common ASP solvers, SMODELS 2 [60,71], CLASP 3 [26,27], WASP 4 [1,2] to name a few, process propositional logic programs only. In this section we introduce such programs. Semantics of CNF formulas in earlier section is given by means of interpretations -sets of literals. Semantics of logic programs relies on the notion of answer sets, which are sets of atoms. A set X of atoms over some signature σ can be identified with an interpretation over σ : A (propositional) logic program is a finite set of rules of the form a 0 ← a 1 , . . . , a k , not a k+1 , . . . , not a m , not not a m+1 , . . . , not not a n , where a 0 is a ground atom or symbol ⊥; a 1 , . . . , a n are ground atoms. We call rule (4) normal when m = n. A program is normal when it is composed of normal rules. The left hand side expression of rule (4) is called the head. The right hand side is called the body. Expressions a 1 , . . . , a k and not a k+1 , . . . , not a m , not not a m+1 , . . . , not not a n constitute positive part and negative part of the body, respectively. We call rule (4) • a fact when its body is empty (we then drop ← from a rule); • a denial when its head is symbol ⊥ (we then drop ⊥ from a rule).
We call a program definite when it is composed of rules of the form a 0 ← a 1 , . . . , a k .
For instance, p r ← p, q and are both normal programs, where program (6) is also definite. We say that a set X of atoms is closed under a definite program if for all rules (5) in , a 0 ∈ X whenever a 1 , . . . , a k ∈ X. For example, sets {p}, {p, r}, and {p, q, r} are closed under definite program (6).
We say that a set X of atoms reduces rule (4), when X ∩ {a k+1 , . . . , a m } = ∅ and {a m+1 , . . . , a n } ⊆ X. For instance, sets {p} and {p, r} reduce the first rule p ← not q of program (7), while set {p, q, r} does not. Let be a program. The reduct X of with respect to a set X of atoms is the set of rules (5) for all rules (4) in such that X reduces (4). Note that X is a definite program. A set X of atoms is an answer set of the program if X is minimal among the sets of atoms that are closed under X . For instance, let 1 denote program (7) and X 1 denote set {q}. The reduct X 1 1 consists of a single fact q. Set {q} is the minimal set closed under X 1 1 . Consequently, X 1 is an answer set of 1 . Let X 2 denote set {p}. The reduct X 2 1 consists of two facts p and q. Set {p, q} is the minimal set closed under X 2 1 . Thus, {p} is not an answer set of 1 . To the set of atoms that occur in a program , we refer as the signature of . When convenient, we identify answer sets of with interpretations over the signature of . In these cases we refer to answer sets as stable models of .
We now consider several special case programs in order to illustrate some interesting properties of answer sets. Let a program consist of facts only. The set of these facts form the only answer set of such a program. Intuitively, each fact states what is known and an answer set reflects this information by asserting that each atom mentioned as a fact is true, whereas anything else is false. Thus answer sets semantics follows closed world assumption (CWA)presumption that what is not currently known to be true is false.
Consider a definite program. It is obvious that the reduct of a definite program with respect to any set of atoms coincides with . We can trivially simplify the definition of an answer set for a definite program : A set X of atoms is an answer set of if X is minimal among the sets of atoms that are closed under . Consequently, definite programs without denials have a unique answer set. For instance, set {p} is the only answer set of definite program (6).
It is intuitive to argue that answer set semantics for logic programs generalizes CWA. This is a good place to note that an atom, which does not occur in the head of some rule in a program, will not be a part of any answer set of this program.
Closed world assumption has been recognized important in design of knowledge representation languages, thus it is not surprising that logic programs under answer set semantics "found their home" in knowledge representation and reasoning community and answer set programming is often positioned as a prominent knowledge representation and reasoning formalism.
Let a program consist of the rule This program has two answer sets ∅ and {p}. This rule can be used to "eliminate" CWA for an atom p. Intuitively, it states that an atom p may be a part of an answer set. Denecker et al. [13] elaborate on this observation. The version of the language of logic programs that allows doubly negated atoms is a special case of programs with nested expressions introduced by Lifschitz et al. [46]. This extension of logic programs is essential. Choice rules [60] of the form {a 0 } ← a 1 , . . . , a k , not a k+1 , . . . , not a m , (9) are important constructs of common ASP dialects. Ferraris and Lifschitz [18] show that a choice rule (9) can be seen as an abbreviation for a rule with doubly negated atoms of the form a 0 ← a 1 , . . . , a k , not a k+1 , . . . , not a m , not not a 0 .
In this work we adapt this abbreviation. The simplest choice rule {p} corresponds to rule (8). Consider a denial ← p. Extending program (6) by this rule will result in a program that has no answer sets. In other words, denial ← p eliminates the only answer of (6). It is convenient to view any denial ← a 1 , . . . , a k , not a k+1 , . . . , not a m , not not a m+1 , . . . , not not a n , as a clause ¬a 1 ∨ · · · ∨ ¬a k ∨ a k+1 ∨ · · · ∨ a m ∨ ¬a m+1 ∨ · · · ∨ ¬a n .
Then, we can state the general property about denials: stable models of a program satisfy the CNF formula composed of its denials. Furthermore, for a program and a set of denials the stable models of ∪ coincide with the stable models of that satisfy [43]. Consequently, denials can be seen as elements of classical logic in logic programs.
We now present how a propositional logic program under answer set semantics encodes the graph coloring problem GC so that answer sets of this program are in one to one correspondence with the 3-colorings of a given graph (V , E). As in case of SAT encoding (3), we take atoms of the form c vi to stand for an assertion that vertex v is assigned color i. Consider a following program A collection of choice rules for each vertex v captured by the first line in (12) intuitively says that vertex v may be assigned some colors. The second line says that it is impossible that a vertex is assigned two colors. The third line states that it is impossible that any two adjacent vertexes are assigned the same color. The last line states that it is impossible that a vertex is not assigned a color. Recall graph G 1 in Fig. 1. In Fig. 2 we illustrated SAT encoding stated in (3) for this graph. Figure 3 presents a logic program in spirit of (12) for G 1 . Horizontal lines separate the clauses that come from distinct "schematic rules" in (12). This program has six answer sets including {c a1 , c b2 , c c1 , c d3 }, which captures solution S G 1 . To encode the 3-coloring problem for graph G 2 one has to extend the set of rules in Fig. 3 with rules This program has no answer sets, which captures the fact that this graph has no 3-colorings. Just as the SAT specification (3) of the graph coloring problem GC is a fine example of the TEST methodology by means of SAT, the ASP specification (12) illustrates the use of the so-called GENERATE and TEST methodology within answer set programming paradigm. The GENERATE part of the specification "defines" a collection of answer sets (interpretations) that can be seen as potential solutions. The TEST part consists of conditions that eliminate the answer sets of the GENERATE part that do not correspond to solutions. The first line in (3) corresponds to GENERATE, whereas the remaining lines correspond to TEST. Observe, how denials are used to formulate TEST. It is interesting to note how the GENERATE part is non-existent in SAT specifications. Any interpretation of the signature of a problem forms a potential solution in SAT: so in a sense the GENERATE part is implicit. CWA present in answer set programming poses a need for the explicit GENERATE part. Choice rules provide a convenient tool in ASP for formulating GENERATE.

Completion
The SAT and ASP formulations (3) and (12) look closely related. This is not by chance. Fages [17] showed that for a large syntactic class of "tight" programs, their stable models coincide with the models of programs' "completion" -a propositional formula defined by Clark [10]. It turns out that i. the completion of program (12) is equivalent to formula (3) (in fact, a simple equivalent transformation on the completion of program (12) will result in formula (3)), and ii. program (12) is tight.
We now recall the definitions of tightness and Clark's completion. For any propositional program , the dependency graph of is the directed graph that • has all atoms occurring in as its vertexes, and • for each rule (4) in has an edge from a 0 to a i , where 1 ≤ i ≤ k.
We say that a program is tight if its dependency graph is acyclic. (6) and (7) Sample programs (6) and (7) are tight. Figure 4 presents the dependency graph for these programs. The encoding (12) of the graph coloring GC problem is also a tight program as its dependency graph has no edges. Many practical logic programs are tight.

Fig. 4 Sample dependency graphs for programs
The simple non-tight program follows Indeed, its dependency graph consists of a single vertex p that has an edge from this vertex to itself. Let us identify the rule (4) with the clause As before, in case if the rule is denial (10), then we identify this rule with the clause (11). This allows us to view a program as a CNF formula. It is also convenient to identify the body a 1 , . . . , a k , not a k+1 , . . . , not a m , not not a m+1 , . . . , not not a n , of a rule (4) with the conjunction If a body is empty (for a rule that is a fact), we identify it with the empty conjunction .
The completion of a program , comp( ), is a conjunction of (i) equivalences of the form for each atom a that occurs in and (ii) the clauses that correspond to denials of .
If there is an atom a in a program that never occurs in the head of any rule then we view (15) as the clause ¬a. Process of completion captures the intuition that the collection of rules in a program that share the same atom in their head defines this atom or, in other words, provides complete list of specifications under which this atom holds. Thus, the fact that a clause ¬a is added for any atom a that does not occur in any head of a program captures CWA explicitly: if there is no reason to deduce an atom a, it is then false.
Recall sample programs (6) and (7). The completion of the former program is while the completion of the latter is p ↔ ¬q q ↔ ¬r ¬r.
(17) answer sets ASP Solver program logic program grounded Grounder

Fig. 5 Common Architecture of ASP Systems
Consider another sample program The only model of (16) is set {p, ¬q, ¬r}. The only model of (17) is set {¬p, q, ¬r}. There are two models of (19): sets {p, q, ¬r, ¬s} and {p, q, ¬r, s}. These models are also stable models of respective programs. This is not by chance. Programs (6), (7), and (18) are tight and hence their models of completion and stable models coincide. The completion of program (13) consists of a single equivalence This formula has two models {p} and {¬p}, while program (13) has only one stable model {¬p}. It is a general fact that any stable model of a program is a model of comp( ). The converse does not hold generally (but in case of tight programs the converse also holds). Recall program (12). Its completion is composed of (3) and equivalence This formula is a tautology in propositional logic and can be safely dropped form the completion.

Programs with variables
As mentioned earlier, ASP practitioners develop applications that rely on languages, which go beyond propositional/ground atoms. Figure 5 presents a typical architecture of an answer set programming tool that encompasses two parts: a system called grounder and a system called solver. The former is responsible for eliminating variables in a program. The latter is responsible for finding answer sets of a respective propositional (ground) program. Systems LPARSE [74] and GRINGO 5 [23,29] are two well known grounders that serve as front-ends for many solvers including SMODELS [71], CLASP [27], and WASP [2].
In this section we refer to non-ground atoms that are constructed as customary in predicate logic: they may contain variables, object constants, and function symbols.
A logic program with variables is a finite set of rules of the form (4), where a 0 is symbol ⊥ or a non-ground atom; and a 1 , . . . , a n are non-ground atoms. Grounding a logic program replaces each rule with all its instances obtained by substituting ground terms, formed from the object constants and function symbols occurring in the program, for all variables. For a program , by ground( ) we denote the result of its grounding. (We use the convention common in logic programming: variables are represented by capitalized identifiers.) For example, let be a program (2). The answer sets of a program with variables are answer sets of ground( ) [30]. For instance, there are eight answer sets of program (20) including ∅ and set {a (1) Given a program with variables, grounders often produce a variable-free program that is smaller than ground( ), but still has the same answer sets as ground( ); we call any such program an image of . For example, program is an image of (20).
When a program with variables has at least one function symbol and at least one object constant, grounding results in infinite ground( ). Yet, even for an input program of this kind, grounders often find an image that is a finite propositional program (finite image). For instance, for program grounding results in infinite program outlined below A finite image of program (21) follows ) is another image of (21). In fact, given program (21) as an input grounders LPARSE and GRINGO will generate the latter image.
To produce images for input programs, grounders follow techniques exemplified by intelligent grounding [9]. Different grounders implement distinct procedures so that they may generate different images for the same input program. One can intuitively measure the quality of a produced image by its size so that the smaller the image is the better. A common syntactic restriction that grounders pose on input programs is "safety". A program is safe if every variable occurring in a rule of also occurs in positive body of that rule. For instance, programs (20) and (21) are safe. The safety requirement suggests that positive body of a rule must contain information on the values that should be substituted for a variable in the process of grounding. Safety is instrumental in designing grounding techniques that utilize knowledge about the structure of a program for constructing smaller images [9]. The GRINGO grounder and the grounder of the DLV system expect programs to be safe. For programs with function symbols, to guarantee that the grounding process terminates, grounders pose additional syntactic restrictions (in other words, to guarantee that a grounder is able to construct a finite image). For example, grounder LPARSE expects given programs to belong to a so-called ω-restricted class [73]. Calautti et al. [8] defined a class of programs that is more general than ω-restricted class and for which bottom-up approaches for grounding implemented in DLV and GRINGO are guaranteed to terminate.
Often a set of propositional rules that follow a simple pattern can be represented concisely by means of logic programs with variables. We support this statement by an example. Recall program (12). We now capture atoms of the form c vi by expressions c(v, i), where c is a predicate symbol and v, i are object constants denoting a vertex v and color i respectively. Atom of the form vtx(v), intuitively, states that an object constant v is a vertex, while atom e(v, w) states that there is an edge from vertex v to vertex w in a given graph. Atom color(i) states that an object constant i represents a color. Recall graph coloring problem GC for an input graph (V , E). We now present a program with variables that encodes a solution to this problem. First, this program consists of facts that encode graph (V , E): Second, facts enumerate three colors of the problem. The following rules conclude the description of the program: These rules are the counterparts of groups of rules in propositional program (12). Indeed, rule (24) states that every vertex may be assigned some colors; rule (25) says that it is impossible that a vertex is assigned two colors; rule (26) says that it is impossible that any two adjacent vertexes are assigned the same color; and the last rule (27) states that it is impossible that a vertex is not assigned a color. Programs with variables permit for a concise encoding of an instance of a search problem. Indeed, size of a program composed of rules (22)(23)(24)(25)(26)(27) is almost identical to the size of a given graph (V , E). There are |V |+|E|+7 rules in this program. On the other hand, the line of program (12) alone encapsulates 3|E| rules.

Modeling of search problems in ASP
Answer set programming provides a general purpose modeling language that supports elaboration tolerant solutions for search problems. We follow the lines of [7] in defining a search problem abstractly. A search problem P consists of a set of instances with each instance I assigned a finite set S P (I ) of solutions. In answer set programming to solve a search problem P , we construct a program P that captures problem specifications so that when extended with facts D I representing an instance I of the problem, the answer sets of P ∪ D I are in one to one correspondence with members in S P (I ). In other words, answer sets describe all solutions of problem P for the instance I . Thus solving of a search problem is reduced to finding a uniform encoding of its specifications by means of a logic program with variables.
For example, an instance of the graph coloring search problem GC is a graph. All 3colorings for a given graph form its solutions set. Consider any graph (V , E). By D (V ,E) we denote facts in (22) that encode graph (V , E). By gc we denote a program composed of rules in (23)(24)(25)(26)(27). This program captures specifications of 3-coloring problem so that answer sets of gc ∪ D (V ,E) correspond to solutions to instance graph (V , E) of a problem. Recall graphs G 1 and G 2 presented in Fig. 1. Facts D G 1 representing G 1 follow

vtx(a) vtx(b) vtx(c) vtx(d) e(a, b) e(b, c) e(c, d) e(d, a) e(b, d).
Program gc ∪ D G 1 has six answer sets, including which captures solution S G 1 . Similarly, we can use encoding gc to establish whether 3colorings exist for graph G 2 . Facts D G 2 representing G 2 consists of facts in D G 1 and an additional fact e(a, c). Program gc ∪D G 2 has no answer sets suggesting that no 3-colorings exist for graph G 2 .
It is important to mention that the languages supported by ASP grounders and solvers go beyond rules presented here. For instance, GRINGO versions 4.5+ support such constructs as aggregates, cardinality expressions, intervals, pools [20,22]. It is beyond the scope of this paper to formally discuss these constructs, but it is worth mentioning that they generally allow us more concise, intuitive, and elaboration tolerant encodings of problems. Also, they often permit to utilize more sophisticated and efficient procedures in solving [24]. It is interesting to mention pseudo-Boolean solvers [68] -systems closely related to SAT solvers. These systems implement specialized solving techniques for processing an extension of propositional CNF logic that supports expressions in spirit of cardinality constructs. Thus, it is well recognized that these constructs bring modeling and solving advances into formalisms.
For instance, a single rule can replace two rules (25) and (27) in program gc . This shorter program will result in smaller groundings for instances of the GC problem paving the way to more efficient solving. Cardinality construct 1{c(V , I ) : color(I )}1 intuitively suggests us to count, for a given value of V the atoms of the form c(V , I ) that belong to the answer set. Number 1 to the right and to the left of this aggregate expression tells us a specific condition on the count, in particular, that it has to be exactly 1. Cardinality expressions form only one example of multitude of constructs that GRINGO language offers for effective modeling of problem specifications.
In this section, we illustrated one essential difference between ASP and SAT. Propositional SAT language does not allow variables and thus for each considered graph a separate complete SAT encoding must be formulated. In case of ASP, it is possible to formulate a logic program in a way that to solve graph coloring problem it is sufficient to only specify details of a new graph in question. In introduction, we mentioned that typically to use a SAT solver to compute solutions for an instance of a search problem a specialized program in imperative language is written to generate specific propositional formula that encodes given instance as a CNF formula. Answer set programming provides another way to utilize SAT technology. For example, constructed logic program gc with variables for solving graph coloring problem GC can be used to invoke a SAT solver for solving GC as follows. Consider some instance graph (V , E) encoded by means of the facts D (V ,E) . Applying a grounder on the union gc ∪ D (V ,E) results in a tight propositional program. Applying a SAT solver on a clausified completion of this propositional program allows us to enumerate the solutions to graph coloring problem for graph (V , E). In Section 8, we present details behind several modern answer set solvers. It is remarkable that several systems including CMODELS 6 [31] and CLASP compute answer sets of tight programs in a described fashion. In particular, for a tight program these systems start by computing a clausified completion. System CMODELS then invokes a SAT solver (e.g., SAT solver MINISAT [15]) to find models of a computed formula. System CLASP has an internal implementation of a SAT solver that is invoked on computed completion.

The generate-define-and-test modeling methodology of ASP
Section 3 presented how the GENERATE and TEST methodology is applicable within answer set programming. Yet, an essential feature of logic programs is their ability to elegantly and concisely "define" predicates. Denecker [12] argues that normal logic programs provide a convenient language for expressing inductive definitions. He considers normal logic programs under parametrized well-founded semantics. Truszczyński [76] illustrates that for practical subset of logic programs answer set semantics and parametrized well-founded semantics coincide. Thus, logic programs under answer set semantics can be seen as a formalism that allows one to combine classical logic (recall our discussion about denials) with inductive definitions. Denecker et al. [13] elaborate on this subject and provide a detailed account on intuitive readings of connectives in logic programs. We direct interested readers to Denecker et al. work for the presentation of Tarskian informal semantics of logic programs.
The GENERATE, DEFINE, and TEST is a typical methodology used by ASP practitioners in designing programs. Lifschitz [44] coined this term. It generalizes the GENERATE and TEST methodology discussed earlier. The roles of the GENERATE and TEST parts of a program stay the same so that, informally, GENERATE defines a large collection of answer sets that could be seen as potential solutions, while TEST consists of rules that eliminate the answer sets of the GENERATE part that do not correspond to solutions. The DEFINE section expresses additional, auxiliary concepts and connects the GENERATE and TEST parts.
To illustrate the essence of DEFINE, consider a Hamiltonian cycle search problem: Given a directed graph (V , E), the goal is to find a Hamiltonian cycle -a set of edges that induce in (V , E) a directed cycle going through each vertex exactly once. This is an important combinatorial search problem related to Traveling Salesperson problem.
We now formalize the specifications of Hamiltonian cycle problem by means of GENERATE, DEFINE, and TEST methodology. As in the encoding gc of the graph coloring problem, we use expressions of the form vtx(v) and e(v, w) to encode an input graph. To formulate the GENERATE part, we introduce a predicate symbol in so that the expression in(v, w) states that edge (v, w) is part of found Hamiltonian cycle. Choice rule forms the GENERATE part of the problem. This rule states that any subset of edges of a given graph may form a Hamiltonian cycle. Answer sets of a program composed of this rule and a set of facts encoding an input graph will correspond to all subsets of edges of the graph. For instance, program composed of facts D G 1 that encode directed graph G 1 introduced in Fig. 1 extended by rule (29) has 32 answer sets each representing a different subset of its edges. In order to state the TEST part, an auxiliary concept of reachable is required so that we can capture the restriction that a found subset of edges of the graph is also a cycle. The DEFINE part follows The former two rules state that no two selected edges start or end in the same vertex, respectively. The last rule states that it is impossible for a pair of vertexes not to belong to a transitive closure of the predicate in. In other words, a cycle formed by in-edges must include every vertex. Rules (29), (30), and (31) form a program hc that captures specifications of Hamiltonian cycle search problem. Extending hc with facts representing a directed graph results in a program whose answer sets describe all Hamiltonian cycles of this graph. For example, program hc ∪ D G 1 has only one answer set. Set

{in(a, b) in(b, c) in(c, d) in(d, a)}
contains all in-edges of that answer set stating that edges (a, b), (b, c), (c, d), and (d, a) form the only Hamiltonian cycle for graph G 1 .
Concise encoding of transitive closure is a feature of answer set programming that constitutes an essential difference between ASP and SAT or effectively propositional logic -first-oder generalization of pure propositional satisfiability (discussed in more detail in Section 9). For instance, to solve Hamiltonian cycle problem, known encodings of reachability lead to propositional logic representations of larger size than these of respective propositional logic programs. East and Truszczyński [14] demonstrated that the performance of SAT solvers on propositional encodings of the Hamiltonian cycle problem lags dramatically behind that of the answer set solver ASPPS. Lierler and Lifschitz [41] say that effectively propositional logic reasoning can be described as the common part of classical first-order logic and logic programming under the answer set semantics. Transitive closure is not expressible by first-order formulas. Thus any subset of first-order logic taken as the language with variables for modeling search problems declaratively will fail at defining (directly) concepts that rely on transitive closure.

Satisfiability and answer set solving
Most modern answer set solvers are close relatives to SAT solvers based on the CDCL algorithm [51]. The CDCL algorithm can be seen as an enhancement of classical DPLL procedure [11]. Clause learning and backjumping are features that distinguish CDCL from DPLL. These techniques proved to be truly essential in building effective solvers. Yet, here we avoid describing these features and instead direct interested readers to [51,61] for more details on learning and backjumping in SAT and to [27,40] for more details on learning and backjumping in ASP. In practice, key ideas in learning and backjuming are identical for both SAT and ASP solvers. Thus, for our purposes it is sufficient to present DPLL and then extend DPLL to a procedure that can be used for finding answer sets of a program. We call this procedure ASET. An ASET algorithm is in the same relation to modern answer set solving algorithms as DPLL to CDCL. By contrasting and comparing the DPLL and ASET algorithms we are able to point out key difference between SAT and ASP solving methods.
Answer set solvers, such as SMODELS [60], SMODELS cc [78], and DLV [38], are socalled native systems. They are based on specialized search procedures in spirit of the DPLL algorithm. The core of DPLL consists of performing three basic operations: decision, unit propagate, and backtrack. Unit propagate operation is based on a simple inference rule in propositional logic that given a CNF formula F allows to utilize knowledge about unit clauses (clauses that consist of a single literal) occurring in F or being inferred so far by the DPLL procedure, in order to conclude new inferences. Native answer set solvers replace (or augment) unit propagate of DPLL by specialized operations based on inference rules suitable in the context of logic programs. For example, SMODELS implements four propagators Unit Propagate , All Rules Cancelled , Backchain True , and Unfounded that we discuss in detail later in this section. Solver SMODELS cc extends the algorithm of SMODELS by backjumping and learning. Clause learning is an advanced solving technique that originated in SAT [51,56] and proved to be extremely powerful in practice. The distinguishing feature about the answer set solver DLV is its ability to handle disjunctive answer set programs. In rules of such programs a disjunction of atoms in place of a single atom is allowed in heads. The problem of deciding whether a disjunctive program has an answer set is P 2 -complete [16]. Native answer set solvers form one core group of ASP systems. Another group is formed by so-called SAT-based answer set solvers. To explain intuitions behind the latter we present some auxiliary terminology.
In this section we use terms an atom, a literal, and a clause to refer to ground instances of these objects. For a set M of literals, by M + we denote atoms that occur positively in M. There exists a number of transformations from logic programs under answer set semantics to SAT. Given a propositional logic program , there are two kinds of transformations: • transformations that form a formula F , which may contain "new atoms" so that Answer set solver LP2SAT 7 [34,35] is an example of a system that relies on a transformation of the former kind. It starts its computation by producing a SAT instance based on a given normal logic program. The length of the SAT instance as well as the transformation time are of order || || × log 2 |σ |, where || || is the length of the program . System LP2SAT then invokes a SAT solver to compute models' of the SAT instance that are in one to one correspondence with the answer sets of a given program.
Completion [10] is a remarkable transformation of the later kind for the large class of tight programs. As mentioned earlier, for these programs the models of program's completion coincide with the stable models of a program. This fact is exploited in several state-of-the-art answer set solvers including CLASP [27], CMODELS [31], IDP 8 [80]. For tight programs these solvers apply off-the-shelve SAT-solvers "as is" to clausified program's completion. 9 Nontight logic programs can be translated into propositional formulas preserving their vocabulary only with exponential blow up in general case [45] (assuming P NC 1 /poly, a conjecture from the theory of computational complexity that is widely believed to be true). One such transformation relies on extending program's completion with so-called loop formulas [48]. Loop formulas play essential role in many modern answer set solvers, including CLASP, CMODELS, and IDP, in case of non-tight programs. They are directly related to the concept of unfounded sets presented later [37].
The major benefit of the first approach exemplified by LP2SAT is in the fact that it immediately benefits from any advances in SAT technology as it considers any SAT solver as a "black box". In other words, it communicates with a SAT solver via its input-output interface without interacting with any internal components of the system. Thus any new SAT solver can easily be integrated into the LP2SAT framework. The second approach exemplified by CLASP, CMODELS, and IDP requires development of specialized procedures. Systems CMODELS and IDP are implemented as extensions of the SAT solver MINISAT [15]. Although, these systems are able to utilize the sophisticated features of MINISAT, an appearance of any novel SAT solver does not translate into immediate advances for them. Yet, the inference related to loop formulas (or unfounded sets) implemented in these solvers proved to play an essential role in the success of the second approach. The answer set solver ASSAT [47] is a proponent of a third intermediate approach. Similarly to the LP2SAT framework, ASSAT utilizes a SAT solver as a black box. Similarly to CLASP and its peers, ASSAT utilizes the concepts of completion and loop formula in its search. An execution of ASSAT can be visualized as a sequence of calls to a SAT solver so that at each call completion of a program is extended with additional loop formulas, which permits a more precise description of the original problem. In the worst case scenario, it is possible that exponential number of loop formulas have to be added in this process and, respectively, a SAT solver must be called an exponential number of times.
In the rest of this section we present the DPLL algorithm [11], a classical SAT procedure. We then provide an extension of this algorithm that captures the basis of modern answer set solvers including such solvers as SMODELS, CMODELS, and CLASP. We conclude by drawing a parallel between SAT and answer set solvers. DPLL Nieuwenhuis et al. [61] described DPLL by means of a transition system that can be viewed as an abstract representation of the underlying DPLL computation. This transition system captures what "states of computation" are, and what transitions between states are allowed. In this way, a transition system defines a directed graph such that every execution of the DPLL procedure corresponds to a path in this graph. Some edges may correspond to unit propagation steps, some to decision, some to backtracking. We follow this approach for describing search algorithms. We now review the abstract DPLL in the form convenient for our purposes.
For a set σ of atoms, a record relative to σ is a sequence M of distinct literals over σ , some possibly annotated by , which marks them as decision literals. A state relative to σ is either a distinguished state FailState or a record relative to σ . For instance, the states relative to a singleton set {p} are Note how a sequence of literals such as p p or p p does not form a record. Frequently, we consider M as a set of literals, ignoring both the annotations and the order among its elements. If neither a literal l nor its complement, written l, occurs in M, then l is unassigned by M. We say that M is inconsistent if both an atom a and its negation ¬a occur in it. For instance, states p ¬p and p q ¬p are inconsistent. Also both q and ¬q are unassigned by state p ¬p, whereas both of them are assigned by p q ¬p.
If C is a disjunction (conjunction) of literals then by C we understand the conjunction (disjunction) of the complements of the literals occurring in C. In some situations, we will identify disjunctions and conjunctions of literals with the sets of these literals.
Each CNF formula F determines its DPLL graph DP F . The set of nodes of DP F consists of the states relative to the signature of F . The edges of the graph DP F are specified by four transition rules: Backtrack : P l Q ⇒ P l if P l Q is inconsistent, and Q contains no decision literals.
A node (state) in the graph is terminal if no edge originates in it.
The following proposition gathers key properties of the graph DP F . Thus, to decide the satisfiability of a CNF formula F it is enough to find a path leading from node ∅ to a terminal node M. If M = FailState, F is unsatisfiable. Otherwise, F is satisfiable and M is a model of F .
For instance, let F 1 = {p ∨ q, ¬p ∨ r}. Below we show a path in DP F 1 with every edge annotated by the name of the transition rule that gives rise to this edge in the graph: The state p r q is terminal. Thus, Proposition 1(b) asserts that F 1 is satisfiable and {p, r, q} is a model of F 1 . Another path in DP F 1 that leads us to concluding that set {p, r, q} is a model of F 1 follows We can view a path in the graph DP F as a description of a process of search for a model of a formula F by applying transition rules of the graph. Therefore, we can characterize an algorithm of a SAT solver that utilizes the inference rules of DP F by describing a strategy for choosing a path in DP F . A strategy can be based, in particular, on assigning priorities to some or all transition rules of DP F , so that a solver will never apply a transition rule in a state if a rule with higher priority is applicable to the same state. The DPLL algorithm can be captured by the following priorities: Note how path (32) in the graph DP F 1 respects priorities above, while path (33) does not. Thus DPLL will never explore the latter search trajectory given input F 1 .

Answer set solving
We are now ready to present an extension to the DPLL algorithm that captures a family of backtrack search procedures for finding answer sets of a propositional logic program.
For a program , we call an interpretation M over σ a classical model of if it is a model of the set of rules in seen as clauses. For example, program (6)  We are now ready to restate the result from [39,Theorem 4.6] that relates the notions of unfounded set and stable models. 10 This result is crucial for understanding key inference rules used in propagators of modern answer set solvers.

Proposition 2 For a program and an interpretation M over σ , M is a stable model of if and only if M is a classical model of and no non-empty subset of M + is an unfounded set on M with respect to .
This proposition gives an alternative characterization of stable models. For example, it asserts that (i) classical models of program (6) are the only interpretations that may be stable models of (6) and (ii) classical models {p, ¬q, r} and {p, q, r} are not stable models of the program due to unfounded sets {r} and {q} respectively, while classical model {p, ¬q, ¬r} is a stable model (since {p} is not an unfounded set on {p, ¬q, ¬r} with respect to program (6)).
By f : → F we denote a function from a propositional logic program to a CNF formula F . We say that function f approximates program when results in a graph that captures the computation procedure of answer set solver SMODELS. We denote the resulting graph by SM . Similar statement to Proposition 4 holds for the graph SM [40]. The system SMODELS assigns priorities to the inference rules of SM as follows: Backtrack From the point of view of actual execution of the SMODELS algorithm, singular edges of the graph SM are inessential: SMODELS never follows a singular edge. By SM − we denote the graph obtained from SM by removing all singular edges.
It is easy to see that the completion of program can also be seen as a conjunction of clauses in and implications a → a←B∈ B (34) for each atom a that occurs in . Formulas (34) can be written as for every atom a in . CNF − Comp is a function that maps program into its completion converted to CNF using straightforward equivalent transformations. In other words, CNF − Comp consists of clauses of two kinds: 1. the rules of the program seen as clauses, and 2. formulas (35) converted to CNF using the distributivity of disjunction over conjunction. 11 The following result from [40] illustrates that applying the SMODELS algorithm to a tight program essentially amounts to applying DPLL to its clausified completion CNF − Comp . A similar relationship, in terms of pseudocode representations of SMODELS and DPLL, was also established in [32].

Proposition 5
For any tight program , the graph SM − is equal to DP CNF−Comp . 11 It is essential that repetitions are not removed in the process of clausification. For instance, CNF − Comp p←not p is the formula (p ∨ p) ∧ (¬p ∨ ¬p).
For instance, let be the program p ← q, not r q.
This program is tight. Its completion is Proposition 5 asserts that, for this formula F , SM − coincides with DP F . Proposition 5 conveys that combination of completion of a program and unit propagate capture propagators All Rules Cancelled and Backchain True unique to the graph SM − . In a sense, these propagators are present implicitly in DP CNF−Comp .
Truszczyński and Lierler [42] generalize Proposition 5 to the case of arbitrary programs:

Proposition 6
For any program , the graph SM − is equal to ASET CNF−Comp, .
As mentioned earlier several answer set solvers, including CMODELS and CLASP, start their computation by forming program's completion. It is clear that CNF − Comp can be exponentially larger than Comp( ). Systems CMODELS and CLASP define an EDtransformation procedure that converts implications (34) into a CNF formula by means of explicit definitions and avoids exponential growth. It is a special case of the Tseitin procedure [77] that efficiently transforms any given propositional formula to CNF form by adding new atoms corresponding to its subformulas. It does not produce a CNF equivalent to the input formula, but it gives us its conservative extension. The ED-transformation procedure adds explicit definitions for the disjunctive terms in (34) whenever they contain more than one atom. In other words, it introduces auxiliary atoms as abbreviations for these disjunctive terms. It then applies equivalent transformation to resulting formula and replaces these disjunctive terms by their corresponding auxiliary atoms. At last, the ED-transformation procedure converts this formula to CNF using straightforward equivalent transformations.
For instance, consider the program For atom p, the implication (34) is First, ED-transformation introduces following explicit definitions Second, ED-transformation turns implication (36) into the formula that contains two auxiliary atoms aux 1 , aux 2 . Third, ED-transformation clausifies these formulas (37) and (38) as follows: We now define for a program , a function ED − Comp that maps into a CNF formula that is the completion Comp( ) converted to CNF using the ED-transformation: It consists of clauses of two kinds 1. the rules of the program seen as clauses, and 2. formulas (34) converted to CNF using the ED-transformation.
The graph ASET ED−Comp, can be used to capture basic ideas behind such answer set solvers as CMODELS and CLASP. These solvers also implement backjumping and learning that are not captured by the graph ASET ED−Comp, . Yet, Nieuwenhuis et al. [61] and Lierler and Truszczyński [42] demonstrate how transition systems DP and ASET, respectively can be extended to capture these features. Here we focus on basic variants of CMODELS and CLASP based on backtracking. Basic CMODELS is modeled by the graph ASET ED−Comp, and the priorities: Basic CLASP is captured by ASET ED−Comp, and the priorities: Proposition 6 asserts that systems SMODELS is characterized by the graph ASET CNF−Comp, . Furthermore, its priorities coincide with these of CLASP. In this sense, system CLASP is closer than CMODELS to answer set solver SMODELS as CLASP and SMODELS both apply inference rule Unfounded eagerly (unlike CMODELS that uses this rule only on states that correspond to interpretations). Despite the similar look of graphs ASET CNF−Comp, and ASET ED−Comp, (indeed, ED − Comp and CNF − Comp serve a similar purpose), they are substantially different. Anger et al. [3] illustrated theoretically and experimentally that DPLL applied to ED − Comp is superior to DPLL applied to CNF − Comp .
Lierler and Truszczyński [42] provide a comprehensive account of major answer set solvers by means of transition systems. (Proposition 4 follows immediately from their work.) They use transition systems to contrast and compare various solvers in detail and include an account on such techniques as learning. Here we present a glimpse to these results that is sufficient to illustrates key differences between DP-based SAT solvers and ASET-based ASP solvers, in particular, presence of additional propagators in answer set solvers: • presence of a propagator Unfounded is unique to ASP technology. Propagator Unfounded is responsible for taming recursive definitions, such as transitive closure, in solving.
• explicit or implicit presence of propagators All Rules Cancelled and Backchain True in answer set solvers is a mechanism for effective processing of inductive definitions encoded in programs.

Effectively propositional logic (or direct first-order extension of SAT) for modeling search problems
Effectively propositional logic [70], also known as Bernays-Schönfinkel class and EPR, provides a generalization of pure propositional satisfiability. An EPR formula is the universal closure of a conjunction of clauses. The EPR language can be seen as an alternative to the language of logic programs with variables for developing concise formulations of search problems. For example, recall SAT representation (3). The EPR language allows us to generalize (3) as a set of the EPR clauses as follows. Consider any graph (V , E). Ground clauses consisting of single literals presented in (22) and a collection of ground clauses encode the graph (V , E). We denote the collection of clauses in (22) and (39) by D EPR (V ,E) . Three ground clauses (23) enumerate three colors of the problem. The following EPR clauses conclude the description of the EPR encoding of GC problem: By gc , we denote the EPR formula composed of clauses (23,(40)(41)(42)(43)(44)(45). EPR formula gc captures specifications of graph coloring problem GC so that given a graph (V , E), Herbrand models of gc ∪ D EPR (V ,E) correspond to 3-colorings of (V , E). The three clauses (40-42) of the EPR encoding gc are the counterparts of groups of clauses in propositional formula (3). Clause (40) says that each vertex is assigned some colors. Clause (41) states that it is impossible that a vertex is assigned two colors. Clause (42) says that it is impossible that any two adjacent vertexes are assigned the same color. The clauses (43)(44)(45) in gc intuitively say that (i) a set of object constants representing colors is disjoint from a set of object constants representing vertexes and (ii) edges are only possible between object constants that stand for vertexes. These clauses together with clauses (39) in D EPR (V ,E) explicitly encode close world assumption for predicates color, vtx and e. Note how logic programming encoding gc ∪ D (V ,E) of graph coloring problem incorporated this assumption implicitly.
Software systems called EPR solvers or model builders can be used for finding models of EPR theories. The annual CADE ATP System Competition [72] contains the EPR division track promoting advances in such systems. Navaro-Perez and Voronkov [57,58] illustrate how EPR theories can be used for modeling search problems in various domains including planning. Many of the EPR systems rely on two computational stages: grounding and solving by means of SAT.
In this paper we illustrate how answer set programming can be seen as a convenient declarative programming language for utilizing SAT and SAT-like technology. It can be used to declaratively model problem's specifications and allows for elaboration tolerant solutions that follow the GENERATE, DEFINE, and TEST modeling methodology. We paid attention to essential component of answer set programming tool-set, namely, grounding. We also presented key accounts in design of answer set solvers and draw a parallel to the DPLL procedure of SAT solvers. We believe that this comprehensive account on ASP versus SAT helps to understand the similarities and differences between these research directions and research concerns that fields pose. For instance, since answer set programming provides a programming language to their users, large body of research in the field concerns language features that go beyond logic programs discussed here. Such concerns are nonexistent in SAT.
Logic programs under answer set semantics is not the only formalism that serves a role of declarative programming front-end for SAT-like technology. For instance, East and Truszczyński [14], Ternovska and Mitchell [55,75], Wittocx, Mariën, and Denecker [79,80] introduce other formalisms. The aim of the efforts by Ternovska and Mitchell is to devise a declarative constraint programming framework that (i) takes the problem specification of a search problem formulated in classical first-order logic, (ii) performs the grounding and then (iii) uses a SAT solver to solve the ground formula. This framework implements model-expansion task introduced in [55]. Efforts by East and Truszczyński were inspired by answer set programming. They introduce a language that syntactically is closer to classical first-order logic than the language of logic programs. They then show how theories in this language can be (i) grounded, (ii) transformed into a propositional formula, and (iii) solved by means of SAT solvers. Systems by Wittocx, Maarten, and Denecker support the language called FO(ID) that extends classical first-order logic with inductive definitions [12]. Truszczyński [76] illustrates that despite syntactic and semantic differences between logic FO(ID) and logic programs under answer set semantics these frameworks are closely related and can be seen as different dialects of the same formalism. One property that all these languages share in common: they implement close world assumption -presumption that what is not currently known to be true is false. This observation hints that close world assumption is essential in design of logic-based declarative programming formalisms, in particular it allows effective grounding techniques. Also, Gebser et al. [21] propose another declarative approach, where the intended SAT clauses are specified in terms of logic rules with variables. This allows the user to write first-order specifications for intended clauses in a schematic way by exploiting term variables. They define the semantics of such specifications and provide an implementation harnessing ASP grounders to accomplish the grounding step of clauses. As we have seen grounding is an essential component of so far mentioned formalisms. Metodi and Codish [54] argue for another alternative declarative front-end for utilizing SAT technology. They propose to, first, use a general purpose constraint programming language BEE for formulating a problem. Second, these BEE specifications are translated into propositional CNF formulas so that SAT solvers are used to find solutions to a given problem.
The relation between propositional logic programs and propositional formulas in terms of expressiveness has been studied earlier in [35,45,69]. For example, Janhunen shows that translations from logic programs under answer set semantics to propositional formulas in classical logic cannot be done modularly. This is further underpinned by a complexity result given in [45]. In contrast, this paper focuses on key features of answer set programming that go beyond propositional logic programs. It highlights aspects of ASP, which form the basis for this prominent declarative programming paradigm. In particular, we note how the presence of first-order language enriched with numerous constructs enables effective modeling of search problem specifications. Also, an ability to express transitive closure by means of logic programs further enriches this modeling tool. Then, the language of logic programs is supported by two distinct processing tools: one responsible for grounding and another responsible for solving. Last but not least, we highlight the crucial role of a built-in closed world assumption that proved to be crucial not only in concise and intuitive modeling of problems, but also in the development of effective grounding and solving procedures.