Fact-checked by Grok 2 weeks ago

Answer set programming

Answer set programming (ASP) is a form of oriented towards difficult, primarily NP-hard, search problems. It focuses on specifying the properties of solutions rather than algorithmic steps, using logic-based rules to model knowledge and compute answer sets that represent valid solutions. ASP is grounded in the stable model semantics for logic programs, a declarative framework for handling negation as failure introduced by Michael Gelfond and Vladimir Lifschitz in 1988, which defines stable models as fixed points that capture nonmonotonic reasoning. The development of as a distinct began in the late , building on earlier work in programming. Key formalizations appeared in 1999, including Marek and Truszczyński's identification of ASP's computational foundations and Niemelä's introduction of the Smodels system, one of the first practical ASP solvers. Early applications demonstrated its potential, such as decision support for NASA's using A-Prolog, an early ASP variant. Over the following decades, ASP evolved with advancements in solver technology, including lazy grounding techniques for scalability and integration with problems. ASP programs consist of facts, rules, and constraints expressed in a syntax akin to , extended with choice rules and strong negation to handle uncertainty and preferences. Modern solvers like Clingo and DLV compute stable models efficiently, supporting disjunctive rules and optimization objectives. The paradigm excels in tasks, including automated planning, where answer sets model sequences; product , as in industrial variant management systems; and , such as in intra-logistics. Ongoing research, including as of 2024, addresses challenges like explainability, hybrid integrations with and large language models, and distributed solving for large-scale applications.

Fundamentals

Definition and Principles

Answer set programming (ASP) is a declarative programming paradigm oriented toward , particularly for solving combinatorial search problems. It is based on the stable model semantics of logic programs, where programs are collections of logical rules that encode problems such that their solutions correspond to stable models, also known as answer sets. In ASP, answer sets represent the possible worlds or solutions to a problem encoded by the program. Each answer set is a minimal set of atoms that is consistent with the program's rules under the stable model semantics, capturing the intended interpretations without extraneous assumptions. This semantics ensures that answer sets are stable fixed points, meaning the set justifies itself through the program's reduct—a transformed version of the program that removes rules involving negated atoms in the set. The foundational principles of ASP include nonmonotonic reasoning, which allows conclusions derived from incomplete information to be retracted upon the arrival of new facts, enabling default assumptions and handling of uncertainty in a natural way. Another key principle is the guess-and-check methodology, where the solver generates candidate interpretations (guessing possible truth assignments) and verifies them against the program's definitions and constraints (checking for consistency). This approach supports efficient exploration of the search space for NP-hard problems. Basic components of an ASP program consist of facts, which are ground atoms asserting true propositions; rules, which are implications of the form "head if body," where the head is a literal or and the body is a of literals including as failure; and constraints, which are rules with empty heads that forbid certain combinations by eliminating incompatible answer sets.

Relation to Logic Programming

Answer set programming (ASP) emerged as an extension of traditional paradigms, such as those embodied in , by providing a declarative framework where programs are designed to compute stable models—collections of answer sets that represent possible solutions to a problem—rather than deriving proofs or substitutions through goal-directed search. Unlike 's based on SLD-resolution, which focuses on finding a single successful derivation for a query, ASP emphasizes the computation of all stable models, enabling the representation of multiple possible worlds or solutions in a nonmonotonic setting. This shift allows ASP to handle knowledge representation tasks where defaults and exceptions play a central role, inheriting the rule-based syntax of while redefining its semantics to prioritize equilibrium models over procedural execution. A key distinction from standard lies in ASP's support for expressive constructs like disjunctive rule heads and choice rules, which permit the generation of multiple candidate interpretations without the need for explicit search strategies embedded in the program. Traditional , constrained to clauses, relies on monotonic reasoning and closed-world assumptions via negation as failure, but ASP extends this by fully integrating negation as failure into its model semantics, enabling true nonmonotonic behavior where conclusions can be retracted upon new information. Thus, while ASP programs superficially resemble code in their use of facts, rules, and queries, the order of rules and literals is irrelevant, ensuring a purely declarative focused on the set of models as output. ASP inherits the foundational syntax of Horn clauses from but augments it with features that facilitate nonmonotonic reasoning, such as stratified negation and disjunction, making it particularly suited for combinatorial search problems. In comparison to (CLP), which integrates solving with for numerical domains, ASP provides advantages in declaratively encoding complex, knowledge-intensive search tasks through uniform rule-based representations that avoid explicit or specifications. This leads to more compact and elaboration-tolerant programs, especially for problems involving , disjunction, or qualitative reasoning, where ASP's grounding and stable model computation scale effectively without the procedural overhead of CLP solvers.

Historical Development

Origins in Nonmonotonic Reasoning

Answer set programming traces its conceptual foundations to the development of nonmonotonic reasoning in during the late 1970s and 1980s, which addressed the need to handle incomplete information and default assumptions in knowledge representation. Nonmonotonic logics allow conclusions to be retracted upon acquiring new information, unlike classical monotonic logics where adding facts only expands the set of derivable statements. Key precursors include Raymond Reiter's default logic, introduced in 1980, which formalizes reasoning by defaults through extensions that incorporate applicable default rules while avoiding contradictions. Similarly, John McCarthy's circumscription, proposed in the same year, minimizes the extension of certain predicates to capture the commonsense assumption that abnormal situations are rare unless specified otherwise. A foundational element in this evolution was the introduction of negation as failure in during the 1970s, enabling procedural interpretation of logical negation based on proof failure rather than classical falsity. pioneered this concept in the context of procedural interpretation of Horn clauses, laying groundwork for nonmonotonic behavior in early systems like . Keith Clark formalized negation as failure in 1978, defining it as an inference rule where a literal is negated if all attempts to prove it fail within the program's completion, thus providing a semantics for in databases and programs. This mechanism introduced nonmonotonicity into by allowing assumptions of non-existence for unprovable facts, influencing subsequent formalisms for handling uncertainty. The pivotal advancement linking these ideas to answer set programming came in 1988 with Michael Gelfond and Vladimir Lifschitz's introduction of stable model semantics for logic programs, which provided a declarative foundation approximating nonmonotonic theories. Their work showed that stable models correspond to the stable expansions of associated autoepistemic theories, where negation as failure is interpreted epistemically as "not believed," offering a precise approximation to autoepistemic logic for reasoning about knowledge. Furthermore, stable models align with minimal models under circumscription for certain programs, bridging Reiter's and McCarthy's frameworks by selecting preferred models that minimize unfounded assumptions. This theoretical synthesis marked a transition from abstract nonmonotonic logics to a practical in knowledge representation, enabling logic programs to model while maintaining computational tractability for specific classes of problems. By grounding stable models in established nonmonotonic concepts, Gelfond and Lifschitz's approach facilitated the evolution of answer set programming as a declarative tool for complex search and optimization tasks rooted in commonsense inference.

Key Milestones and Evolution

In 1991, Michael Gelfond and Vladimir Lifschitz formalized the answer set semantics for disjunctive logic programs, extending the earlier stable model semantics to handle disjunction in rule heads and enabling more expressive knowledge representation in nonmonotonic reasoning. This foundational work laid the groundwork for answer set programming (ASP) as a by defining answer sets as minimal models that satisfy the program's reduct, distinguishing it from prior semantics like well-founded models. In 1999, key formalizations established ASP as a distinct computational : Marek and Truszczyński identified its foundations in stable models as an alternative to traditional , while Niemelä presented logic programs under stable model semantics as a form of for search problems. This coincided with Vladimir Lifschitz coining the term "answer set programming." During the , practical advancements accelerated with the development of early ASP solvers. Ilkka Niemelä introduced smodels in the mid-1990s, an efficient implementation supporting the stable model semantics for normal (non-disjunctive) ground logic programs without function symbols, emphasizing backtracking search with strong techniques. Concurrently, Vladimir Lifschitz and collaborators at the and developed the DLV system starting in the late 1990s, providing full support for disjunctive programs under answer set semantics, including front-ends for advanced knowledge representation formalisms and optimization capabilities. These solvers marked a shift from theoretical foundations to computable tools, demonstrating ASP's viability for NP-hard search problems. The 2000s saw ASP evolve toward broader applications, particularly in automated planning, where translations between ASP encodings and the (PDDL) enabled the reuse of planning benchmarks and techniques. A key innovation was the introduction of in solvers, exemplified by clasp in 2007, which integrated satisfiability (SAT) checking principles like nogood learning and restart policies to improve scalability on large-scale combinatorial problems. This period solidified ASP's role in industrial and academic settings through enhanced solving efficiency and integration with . In the 2020s, ASP has increasingly incorporated hybrid systems that blend declarative reasoning with , particularly for explainable , where ASP generates interpretable rules to justify black-box model decisions or provide counterfactual explanations. For instance, frameworks like xASP extend ASP solvers to produce explanation graphs for answer sets, aiding transparency in domains such as optimization and . Ongoing research, highlighted at the 18th on Answer Set Programming and Other Computing Paradigms (ASPOCP 2025), continues to explore such integrations alongside applications in tracking and cybersecurity, fostering advancements in hybrid paradigms.

Formal Semantics

Stable Model Semantics

Stable model semantics provides a declarative foundation for normal logic programs, capturing nonmonotonic reasoning through the concept of stable models. A normal logic program P is formally defined as a finite set of rules of the form a \leftarrow b_1, \dots, b_m, \text{not } c_1, \dots, \text{not } c_n, where a, b_i, and c_j are atoms over a fixed , and "not" denotes negation as failure. The semantics is defined relative to candidate interpretations S \subseteq HB_P, where HB_P is the of P. For a candidate set S, the Gelfond-Lifschitz reduct P^S (also called the GL-transformation) is constructed as follows: first, delete from P every rule that contains a subformula "not c" with c \in S; second, delete from the remaining rules all occurrences of "not". The result P^S is a positive (definite) program without . A set S is a stable model of P if and only if S is the least Herbrand model of P^S. This least model condition admits a fixpoint characterization using the immediate consequence operator T_{P^S}, defined for a positive program Q and interpretation I by T_Q(I) = \{ a \in HB_P \mid \exists \text{ ground rule } a \leftarrow b_1, \dots, b_m \in Q \text{ s.t. } \{b_1, \dots, b_m\} \subseteq I \}. The least fixpoint \textit{lfp}(T_{P^S}) is obtained by transfinite iteration starting from the empty set: \textit{lfp}(T_{P^S}) = \bigcup_{n=0}^\infty T_{P^S} \uparrow n (\emptyset), with T_{P^S} \uparrow 0 (\emptyset) = \emptyset and T_{P^S} \uparrow (n+1) (I) = T_{P^S}(T_{P^S} \uparrow n (I)). Thus, S is a stable model if S = \textit{lfp}(T_{P^S}), the least fixpoint obtained by iteratively applying T_{P^S} starting from \emptyset. The stable model semantics extends naturally to disjunctive logic programs, where rules take the form a_1 \vee \dots \vee a_k \leftarrow b_1, \dots, b_m, \text{not } c_1, \dots, \text{not } c_n with k \geq 1. The reduct P^S for a disjunctive program P is defined analogously: delete rules containing "not c" with c \in S, then remove all "not" literals, yielding a positive disjunctive program. A set S is a stable model if S is a minimal model of P^S, meaning S satisfies P^S under classical semantics and no proper subset of S does. In the disjunctive setting, multiple stable models may exist, leading to two primary modes of inference: brave reasoning, where an a is entailed if there exists some stable model S such that a \in S, and cautious reasoning, where a is entailed if a \in S for every stable model S.

Computing Stable Models

Computing stable models in answer set programming (ASP) begins with the grounding process, which translates a non-ground logic program into an equivalent propositional program by instantiating variables with all relevant ground terms from the Herbrand universe. This instantiation ensures that the stable models of the ground program correspond exactly to those of the original program, preserving the semantics while enabling efficient computation on propositional structures. Grounding algorithms, such as those implemented in systems like GrinGo, employ semi-naive evaluation to iteratively generate ground rules while avoiding redundant computations, starting from facts and propagating through rule bodies via substitutions that satisfy conditions like variable bindings. For programs with aggregates or function symbols, grounding involves additional translations, such as rewriting aggregates into normal rules and checking termination to produce finite propositional instances. Optimizations like dynamic magic sets and body reordering further reduce the grounding size by focusing on relevant instantiations. Once grounded, the propositional program is solved using search algorithms that explore candidate models while enforcing constraints from the stable model semantics. These solvers perform unit propagation to deduce forced truth assignments from current partial models and use (CDCL), adapted from SAT solving, to record nogoods—constraints representing learned impossibilities—that guide future search and prevent repeated conflicts. In ASP-specific extensions, integrates with core computation phases, where atoms are guessed and propagated, followed by unfounded set elimination to detect and falsify cycles of unsupported atoms that violate . For instance, in approaches like those in Clasp, the solver alternates between core solving (guessing and propagating literals) and unfounded-set checks, using source pointers to identify minimal unfounded sets and immediately falsifying one atom per set to prune invalid branches. Nogoods are learned via techniques such as the First-UIP scheme, prioritizing short constraints for efficiency, and are managed with activity-based deletion during restarts to balance learning and forgetting. The overall algorithm for computing stable models can be outlined as follows: (1) ground the input to obtain a propositional instance; (2) perform a search by non-deterministically assigning truth values to atoms (guessing), applying unit propagation on nogoods and rules; (3) upon conflict or , check for unfounded sets to verify ; (4) if valid, output the model and backtrack or project as needed; (5) learn from conflicts to add nogoods and resume search. This process supports parallelization through message-passing between solver components for distributed unfounded-set detection. Seminal contributions include the ASSAT solver's use of and loop formulas for checking via SAT calls, and subsequent nogood-based methods that avoid full SAT encodings. The computational complexity of deciding the existence of a stable model is NP-complete for normal (disjunction-free) programs and \Sigma_2^P-complete for disjunctive programs, reflecting the nested search required to guess a model and verify its stability against unfounded sets. These bounds arise from reductions to and from known problems like SAT and QBF, underscoring the challenge for large-scale instances despite practical efficiencies from CDCL and grounding optimizations.

Language Features

Syntax of AnsProlog

AnsProlog, also known as answer set , is a language whose syntax extends that of traditional languages like to support nonmonotonic reasoning via stable model semantics. The basic building blocks of AnsProlog are terms, which include constants (symbolic constants denoted by lowercase letters, such as a, or numeric constants like 65), variables (uppercase letters, such as X), and structured terms formed by function symbols applied to terms (e.g., f(a,X)). Atoms are s applied to terms, written as p(t_1, \dots, t_n) where p is a predicate symbol and the t_i are terms; atoms represent positive propositions without . Literals extend atoms to include : a positive literal is an atom, while negative literals incorporate operators applied to atoms. AnsProlog programs consist of rules, which are implications of the form head :- body, where the body is a conjunction of literals (possibly empty) and the head determines the rule type. Facts are rules with an empty body and a single atom head, written simply as p. (e.g., size(france,65).), asserting the truth of p in all models. Normal rules have a single atom as head and a body of literals (e.g., large(C) :- size(C,S1), size(uk,S2), S1 > S2.), meaning the head holds if the body evaluates to true. Constraints are rules with an empty head (written :- body.), such as :- p(1)., which eliminate any stable model in which the body is true; semantically, they act as rules with a false head (\bot :- body.), forbidding interpretations satisfying the body. Disjunctive rules feature a head that is a disjunction of atoms (e.g., p(X) | q(X) :- r(X).), allowing at least one head atom to be true when the body holds, with the disjunction denoted by | or ;. Choice rules, denoted by curly braces around the head (e.g., {p(a); q(b)} :- body. or simply {p}. for an unconditional choice), nondeterministically select any subset of the head atoms (possibly none or all) when the body is true, generating multiple candidate models. Negation in AnsProlog distinguishes between default negation (negation as failure, written not p) for expressing nonmonotonicity and strong (classical) negation (written ~p or -p) for explicit falsity akin to . Default negation not p in a body literal succeeds in an interpretation if p is false in that interpretation, enabling the nonmonotonic behavior central to stable models, whereas strong negation ~p treats p and ~p as complementary literals that cannot both be true. Strong negation can appear in both heads and bodies, allowing representation of contradictory information (e.g., ~abnormal(X) :- not broken(X).), and is eliminable via syntactic to preserve stable model semantics. In ground programs (variable-free instantiations of rules), bodies evaluate to true under an interpretation I if all positive literals hold in I and all default-negated literals fail in I. The syntax of AnsProlog maps directly to model semantics, where a model is a fixed point that minimally satisfies the program's after applying the Gelfond-Lifschitz reduct: for an I, the reduct removes rules with unsatisfied default negations in the body and simplifies satisfied ones, yielding a positive (negation-free) program whose least model must coincide with I. For instance, in a normal rule head :- body., the head is derived in a model only if the body literals are justified under that model, ensuring foundedness and avoiding unsupported atoms. constraints forbid models by ensuring no satisfies their body, while choice and disjunctive rules expand the space of potential models before minimization. This syntactic structure thus encodes search problems declaratively, with models corresponding to solutions.

Extensions and Dialects

Disjunctive Answer Set Programming (DAASP) extends the expressivity of core ASP by permitting rules with multiple atoms in the head, connected by disjunctions, which model nondeterministic choices or alternatives more naturally than rules. This feature allows representation of problems where multiple outcomes are possible without explicit choice constructs. The stable model semantics for disjunctive programs, known as GL-semantics, was originally defined by Gelfond and Lifschitz, who showed that it generalizes the semantics for programs while preserving nonmonotonicity. Under this semantics, an answer set must satisfy the program reduct and minimize unfounded sets appropriately for disjunctive heads. The of brave reasoning (existence of an answer set satisfying a query) for disjunctive programs is \Sigma_2^P-complete, surpassing the NP-completeness of programs and enabling modeling of higher-level reasoning tasks. Probabilistic extensions of ASP address uncertainty by assigning probabilities to facts, rules, or entire answer sets, facilitating over distributions of possible models. In LP^{MLN}, probabilities are defined via weights on formulas, inducing a distribution over answer sets akin to Markov logic networks, which supports weighted maximum inference. This dialect, introduced by Lee and Wang, extends AnsProlog to handle soft constraints and noisy data while maintaining the stable model semantics as the underlying structure. Another key approach, , originally for programming, has been adapted to ASP contexts to model discrete probability distributions through parameterized rules and success/failure probabilities. These extensions increase expressivity by incorporating continuous or discrete random variables, with complexity often reaching #P-hard or higher, depending on the probability model. Hybrid dialects integrate ASP with other formalisms to combine symbolic reasoning with domain-specific constraints or ontologies. For instance, combinations with enable ASP rules to query and extend ontologies, as in the framework merging answer set semantics with SHIF(D) and SHOIN(D), allowing bidirectional knowledge exchange between rules and terminological knowledge. This hybrid approach supports nonmonotonic extensions of ontologies for applications. Similarly, integrations with introduce arithmetic or linear constraints into rules, such as integer linear expressions in rule bodies, expanding ASP's applicability to optimization problems beyond pure combinatorial search. These hybrids preserve core stable model semantics but embed external theories. Recent research has explored integrations with large language models (LLMs) for translating into ASP programs, enhancing knowledge representation from unstructured text, and with mixed-integer programming (MIP) for tackling complex optimization in tasks. Recent developments up to 2025 have focused on multi-context systems and neural-symbolic hybrids to address distributed and learning-enhanced reasoning. Multi-context systems, formalized by Brewka and colleagues, allow ASP modules to form interconnected knowledge bases where contexts exchange beliefs via bridge rules, enabling modular nonmonotonic reasoning across heterogeneous sources. In neural-symbolic hybrids, ASP serves as the symbolic backbone for explainable , with dialects like SLASH integrating probabilistic neural predicates into logic programs to learn from data while grounding in stable models, achieving scalable inference for tasks like under . These extensions push expressivity toward higher complexity fragments by incorporating quantification or learning components, facilitating applications in dynamic environments.

Illustrative Examples

Graph Coloring

Graph coloring is a fundamental that involves assigning colors to the vertices of an undirected such that no two adjacent vertices receive the same color, with the objective of minimizing the number of distinct colors used. In the context of answer set programming (ASP), this problem is naturally encoded to determine whether a is k-colorable for a given k, where each valid coloring corresponds to a stable model of the program. The encoding begins with facts representing the graph structure and available colors. For instance, vertices and edges are declared as facts: vertex(a). vertex(b). vertex(c). edge(a,b). edge(b,a). edge(b,c). edge(c,b)., and colors are defined as color(1). color(2). color(3). for a 3-coloring instance. To generate possible color assignments, a choice rule is used: {col(V,C)} :- vertex(V), color(C)., which, for each vertex V and color C, nondeterministically decides whether to assign that color (as detailed in the syntax of choice rules). This rule embodies the "guess" phase of the guess-and-check paradigm in ASP, enumerating all potential assignments without immediate validation. Constraints then enforce the problem's requirements during the "check" phase. To ensure each vertex receives at most one color, the rule :- col(V,C1), col(V,C2), C1 != C2. eliminates assignments where a vertex has multiple colors. The core coloring constraint, :- col(U,C), col(V,C), edge(U,V)., forbids adjacent vertices from sharing a color, ruling out invalid models. Additionally, to guarantee each vertex is colored, :- vertex(V), not col(V,_). is included. For exactly k colors, cardinality constraints can limit the total colors used, such as #count {C : color(C), col(_,C)} = k., ensuring precisely k distinct colors appear in the assignment. Each stable model (answer set) of this program represents a valid k-coloring of the , with atoms col(V,C) indicating the color C assigned to V. The guess-and-check approach leverages the choice rules to propose candidate colorings and the constraints to filter only those satisfying the adjacency condition, yielding all proper colorings as distinct answer sets.
asp
% Facts for [graph](/page/Graph) and colors
[vertex](/page/Vertex)(a). [vertex](/page/Vertex)(b). [vertex](/page/Vertex)(c).
[edge](/page/Edge)(a,b). [edge](/page/Edge)(b,a).
[edge](/page/Edge)(b,c). [edge](/page/Edge)(c,b).
color(1). color(2). color(3).

% Guess: Assign colors nondeterministically
{col(V,C)} :- vertex(V), color(C).

% Check: At most one color per vertex
:- col(V,C1), col(V,C2), C1 != C2.

% Check: No adjacent vertices same color
:- col(U,C), col(V,C), edge(U,V).

% Check: Every vertex colored
:- vertex(V), not col(V,_).

% Optional: Exactly 3 colors used
#count {C : color(C), col(_,C)} = 3.
This program, when processed by an ASP solver, produces answer sets like {col(a,1), col(b,2), col(c,3)}, each denoting a feasible coloring.

Finding Large Cliques

The maximum clique problem in seeks to identify the largest subset of in an undirected such that every pair of vertices in the subset is connected by an . This NP-hard problem can be effectively encoded in (ASP) to leverage the declarative nature of the language for generating and optimizing candidate solutions. In an ASP encoding, the is represented by facts: vertex(V). for each V and edge(U,V). edge(V,U). for each undirected (symmetric). Subsets of are generated nondeterministically using choice rules, such as {in_clique(V)} :- vertex(V)., which allows each to be optionally included in the candidate (0 or 1 occurrence). To enforce the clique property, a constraint eliminates invalid subsets where not all pairs are adjacent: :- in_clique(U), in_clique(V), U != V, not edge(U,V). This syntax, as detailed in ASP language features, ensures completeness by ruling out models lacking full connectivity. Optimization for the maximum size is achieved through solver-specific directives. In systems like Clingo, the statement #maximize { in_clique(V) : vertex(V) }. selects the stable model with the highest of in_clique atoms, corresponding to the largest valid . Solvers supporting weak s, such as DLV, can alternatively use :~ not in_clique(V). [1@1, V]. to minimize exclusions and thus maximize inclusions, prioritizing levels for optimality. Each stable model of the program represents a valid , with the optimizing solver outputting the optimal one first (or all if enumeration is requested without optimization). To enumerate all cliques up to a fixed size k, the choice rule is bounded as {in_clique(V) : vertex(V)} = 0..k., generating all models satisfying the without maximization, allowing systematic exploration of smaller cliques before scaling to larger instances.
asp
% Input facts (example graph)
[vertex](/page/Vertex)(a). [vertex](/page/Vertex)(b). [vertex](/page/Vertex)(c).
[edge](/page/Edge)(a,b). [edge](/page/Edge)(b,a).
[edge](/page/Edge)(b,c). [edge](/page/Edge)(c,b).
[edge](/page/Edge)(a,c). [edge](/page/Edge)(c,a).

% Choice rule
{in_clique(V)} :- [vertex](/page/Vertex)(V).

% Constraint for clique property
:- in_clique(U), in_clique(V), U != V, not [edge](/page/Edge)(U,V).

% Maximization
#maximize { in_clique(V) : vertex(V) }.

#show in_clique/1.
This encoding produces an optimal answer set like { in_clique(a), in_clique(b), in_clique(c) } for the example triangle graph.

Hamiltonian Cycle

The Hamiltonian cycle problem seeks a in a that visits each exactly once before returning to the starting vertex. In answer set programming (ASP), this problem is encoded declaratively to generate stable models corresponding to valid cycles, leveraging non-monotonic rules to explore permutations of vertices while enforcing and coverage constraints. A standard position-based encoding assigns each to a unique position in the sequence, ensuring the forms a valid . The input consists of facts defining vertices and edges, such as vertex(v). for each vertex v and edge(u,v). for each directed edge from u to v. Positions are generated up to the number of vertices n, typically via a rule like pos(P) :- P = 1..n. The core choice rule assigns vertices to positions exactly once:
{ in_cycle(V,P) : vertex(V) } = 1 :- pos(P).
This uses a cardinality aggregate to ensure each position P is occupied by precisely one V, generating permutations in the stable models. Successor relations are implicitly defined by consecutive positions: for positions P and P+1, the vertex at P must connect via an to the vertex at P+1. This is enforced by integrity constraints:
:- pos(P), P < n, in_cycle(U,P), in_cycle(V,P+1), not edge(U,V).
Cycle closure requires an from the last position back to the first:
:- in_cycle(U,n), in_cycle(V,1), not edge(U,V).
These constraints eliminate invalid paths, ensuring only models with adjacent edges in the sequence are stable models. Each set of the encodes a valid Hamiltonian cycle as a of vertices ordered by their positions, where the sequence V_1, V_2, \dots, V_n satisfies \text{edge}(V_i, V_{i+1}) for i = 1 to n-1 and \text{edge}(V_n, V_1). To generate all cycles, an ASP solver like clingo computes all stable models; for existence checking, reasoning determines if at least one set exists, confirming the graph has a Hamiltonian cycle. This encoding scales to moderate sizes, with performance depending on solver optimizations for the generated ground .

Dependency Parsing

Dependency parsing in natural language processing involves assigning dependency labels to words in a sentence to form a tree structure that represents grammatical relations, where each word except the root has exactly one head (parent) and the arcs form a projective tree without crossings. In Answer Set Programming (ASP), this problem is encoded declaratively to enumerate or optimize valid parses. Facts represent the words in the sentence and possible dependency arcs: word(i). for each word position i, and arc(i,j,l). indicating a possible dependency from head i to dependent j with label l (e.g., nsubj, det). A choice rule allows selecting arcs to form the tree: {dep(i,j,l)} :- arc(i,j,l)., where dep(i,j,l) means the arc is chosen in the model. Introduce a dummy root at position 0: word(0).. Constraints ensure the structure is a valid . For a single head per non-root word: 1 { dep(H, i, L) : H, L } 1 :- word(i), i != 0., requiring exactly one incoming for each non-root word i. A constraint selects exactly one outgoing from the : 1 { dep(0, i, L) : i, L } 1.. Projectivity, preventing crossing , can be enforced with additional such as :- dep(i,k,l1), dep(j,m,l2), i < j < k < m. to forbid interleaved dependencies, though simpler non-crossing formulations may approximate it for efficiency. To find the best parse, optimization statements incorporate arc scores, often derived from probabilistic models or features: #maximize {score(i,j,l) : dep(i,j,l)}., where higher scores indicate more likely . This selects the highest-scoring stable model among valid . Each answer set corresponds to a valid parse, with the atoms dep(i,j,l) defining the tree. For ambiguous sentences, multiple answer sets capture ambiguities, such as attachment preferences (e.g., in "I saw the man with the telescope," multiple for prepositional phrase attachment), allowing ASP to model and resolve uncertainty in via enumeration or optimization. For illustration, consider the sentence "The cat sleeps." (positions: 0=dummy , 1=The, 2=cat, 3=sleeps). Possible facts include arc(2,1,det). arc(3,2,nsubj). arc(0,3,[root](/page/Root))., with constraints yielding answer sets like {dep(0,3,root), dep(3,2,nsubj), dep(2,1,det)} representing the .
asp
% Facts (example: "The cat sleeps.")
word(0). word(1). word(2). word(3).
arc(2,1,det).
arc(3,2,nsubj).
arc(0,3,[root](/page/Root)).

% [Choice](/page/Choice)
{dep(H,D,L)} :- arc(H,D,L).

% Exactly one incoming per non-root
1 { dep(H, D, L) : H, L } 1 :- word(D), D != 0.

% Exactly one outgoing from root
1 { dep(0, R, L) : R, L } 1.

% No cycles or other tree constraints (simplified)
% Projectivity example (partial)
:- dep(I,K,L1), dep(J,M,L2), I < J, J < K, K < M.

% Optional maximization (assume scores)
% #maximize { score(H,D,L) : dep(H,D,L) }.

#show dep/3.

Applications

Knowledge Representation and Reasoning

Answer set programming (ASP) enables the representation of incomplete knowledge through default rules, which allow tentative conclusions unless contradicted by evidence. For instance, the rule flies(X) :- bird(X), not abnormal(X). encodes that birds fly by default, unless an abnormality is observed, capturing non-monotonic reasoning where beliefs can be retracted upon new information. This approach draws from stable model semantics, originally proposed by Gelfond and Lifschitz, to handle defaults in a declarative manner without explicit exception handling. In reasoning tasks, ASP supports entailment under stable models, where a query is cautiously entailed if true in all stable models and bravely entailed if true in at least one, providing a spectrum from conservative to optimistic inference. For , ASP models problems by identifying minimal sets of abnormalities that explain observations, such as in model-based diagnosis where components are assumed normal unless faults are hypothesized to account for discrepancies. in ASP involves updating programs to incorporate new facts while preserving consistency, often by minimizing changes to the set of stable models, as formalized in frameworks that extend AGM postulates to non-monotonic settings. The advantages of in lie in its declarative style, where domain axioms are specified directly as rules and queries leverage stable models for computing consequences, facilitating modular and maintainable knowledge bases compared to imperative approaches. This allows for efficient handling of defaults, exceptions, and incomplete information in complex domains. A representative case is , where hypotheses about diseases serve as potential abnormalities, and observations (symptoms) constrain stable models to minimal explanations; for example, given symptoms like fever and , ASP can generate answer sets identifying likely infections while assuming normal organ function unless otherwise indicated. In recent applications during the 2020s, ASP has been employed in the semantic web for ontology debugging, particularly through axiom pinpointing to identify causes of unintended entailments in description logics, enabling targeted repairs in large-scale knowledge bases.

Planning and Optimization

Answer set programming (ASP) is widely applied in automated planning, where planning domains are encoded to describe actions, their preconditions, and effects, while specific problems specify initial states, goals, and constraints. Actions are typically represented using predicates such as occ(A, T) to indicate the occurrence of action A at time step T, with choice rules like {occ(A, T) : action(A)} = 1 ← time(T). enabling the selection of exactly one action per step to generate valid sequences. Preconditions ensure executability, encoded as rules such as possible(A, T) ← time(T), holds(ϕ, T). where ϕ represents the required state literals, and integrity constraints like ← occ(A, T), not possible(A, T). prevent invalid applications. Initial states are defined as facts holds(F, 0). for fluents F true at time 0, and goals are enforced via constraints ensuring desired literals hold at the final time step, such as ← not goal, time(N). where goal ← holds(G1, N), ..., holds(Gk, N).. This declarative approach leverages ASP's non-monotonic reasoning to handle frame axioms implicitly and generate plans as stable models. In , ASP extends planning by incorporating weak constraints to minimize or maximize objective functions, such as costs in scheduling or tasks. Weak constraints, introduced in the DLV system, take the form ∼ body. [weight@level] and impose a partial order on answer sets, selecting those with minimal total weight violations; for instance, #minimize {C : cost(C)}. optimizes cumulative action costs C. This facilitates natural encodings for problems like , where hard constraints define feasibility and weak constraints prioritize low-cost solutions. ASP solvers compute optimal models efficiently, supporting multi-level priorities for hierarchical objectives. ASP has been applied to product , encoding component compatibilities and customer requirements as rules and constraints to generate valid configurations as stable models. Early work in 1998 demonstrated its use for product configuration problems. Tools like the plasp translator enable seamless integration of ASP with classical by converting PDDL domains and problems into ASP facts and rules, which can then be solved using Clingo. Plasp supports PDDL 3.1 features, including numeric fluents and conditional effects, generating encodings compatible with Clingo's multi-shot solving for incremental plan refinement. This translation bridges planning standards with ASP's expressiveness, allowing planners to leverage ASP for temporal and conditional reasoning. Industrial applications of ASP in planning include robotics, where it supports path planning and coordination; for example, ASP encodings in action language AL have been used to compute collision-free trajectories for robotic platforms navigating dynamic environments. In logistics robotics, ASP-based systems with Clingo enable time-bounded planning for multiple agents, optimizing routes under uncertainty and improving cooperation metrics in simulated warehouses. For supply chain optimization, ASP models constraints on inventory and distribution to minimize costs. Recent advancements as of 2025 emphasize hybrid ASP systems that integrate components for multi-agent planning, enhancing scalability in uncertain environments. These hybrids combine ASP's declarative reasoning with ML-driven approximations for numeric constraints and agent coordination, as explored in foundational frameworks for numeric optimization and learning weak constraints. Such approaches enable robust multi-agent path planning in by learning action costs from data while maintaining ASP's guarantee of optimal stable models.

Community and Standardization

Language Standardization

The ASP-Core-2 standard, developed by the ASP Standardization Working Group comprising Francesco Calimeri, Wolfgang Faber, Martin Gebser, Giovambattista Ianni, Roland Kaminski, Thomas Krennwallner, Nicola Leone, Marco Maratea, Francesco Ricca, and Torsten Schaub, was adopted in 2013 as the official input language for (ASP) systems participating in the ASP Competition series. This standard defines a precise syntax for core ASP constructs, including normal rules of the form h \leftarrow b_1, \dots, b_n. where h is a classical atom and each b_i is a literal; disjunctive rules h_1 \lor \dots \lor h_m \leftarrow b_1, \dots, b_n. allowing multiple atoms in the head; and rules expressed via constructs such as l \{ b_1, \dots, b_k \} u \leftarrow b_{k+1}, \dots, b_n. to bound the number of true body literals. The semantics align with the stable model semantics originally introduced by Gelfond and Lifschitz, ensuring that answer sets correspond to stable models while incorporating extensions for aggregates as formalized in subsequent works. In the 2020s, the ASP-Core-2 framework has seen refinements through community-driven extensions that incorporate aggregates—such as #count, #sum, #min, and #max—and weak constraints, which take the form \leftarrow b_1, \dots, b_n. [w@p] to prioritize optimization objectives with weights w and levels p. These elements, while part of the core syntax, are subject to safety conditions (e.g., non-recursiveness for aggregates and domain restrictions) to maintain computational tractability, reflecting ongoing efforts to evolve the standard without introducing a full ASP-Core-3 revision. The community, including contributions from solver developers like those behind WASP, has focused on harmonizing these features across implementations to support advanced reasoning tasks. The ASP Standardization Working Group and related community efforts have also defined standardized input and output formats to facilitate interoperability, with ASP-Core-2 serving as the input specification and competition-specific output formats—such as enumerating answer sets in the form "Answer: k" followed by atom lists—ensuring consistent solver behavior. For instance, the ASPARTIX format (APX) exemplifies domain-specific adaptations built atop ASP-Core-2 for tasks like abstract argumentation, where frameworks are encoded as facts and rules compliant with the standard. These formats promote portability by allowing programs to run across diverse solvers without modification. The primary benefits of these standardization efforts include enhanced portability of programs across solvers and streamlined in competitions, where unified enables fair evaluation of solving efficiency on large-scale problems. However, challenges persist in balancing expressivity—such as supporting disjunctive heads and aggregates for complex knowledge representation—with decidability, addressed through syntactic restrictions like finiteness and conditions that guarantee finite grounding and enumerable answer sets.

Competitions and Benchmarks

The Answer Set Programming (ASP) Competition series, initiated in 2006, serves as a key driver for advancements in ASP solver technology by systematically evaluating systems on complex, real-world-inspired problems drawn from domains including planning, knowledge representation, graph theory, and configuration tasks. The inaugural edition featured prominent early solvers such as smodels and DLV, establishing a benchmark for comparing declarative problem-solving approaches under stable model semantics. The format has evolved to include distinct that assess different capabilities: the solving focuses on model computation and optimization using a standardized language like -Core-2, the reasoning evaluates and cautious entailment tasks, and additional sub-tracks address multi-shot solving and hard combinatorial instances via a "Marathon" category for resource-intensive problems. This structure, refined since the third edition in 2011, accommodates both dedicated ASP systems in a and open declarative approaches in a model-and-solve , promoting fair and reproducible evaluations. Subsequent editions, such as the sixth in 2017 and seventh in 2019, introduced emphases on tasks integrating with external solvers for numerical or constraint-based reasoning, reflecting the growing need for versatile systems in applications like and decision support. In these events, the Clasp family of solvers, particularly Clasp and its variants, achieved dominance across multiple tracks, solving over 90% of instances in optimization categories and outperforming predecessors by orders of magnitude on suites. These outcomes highlight iterative solver improvements, such as enhanced conflict-driven learning and parallelization techniques, spurred directly by competition feedback. Standardized benchmarks from the competitions, including planning domains like and problems, graph , and finding, provide reusable testbeds for performance evaluation and have influenced broader ASP research by establishing objective metrics for scalability and correctness. For instance, the adoption of these benchmarks has enabled consistent comparisons, revealing that modern solvers like Clasp resolve instances with millions of variables in seconds, a feat unattainable in early editions. Overall, the series fosters community progress by identifying gaps in current technology and incentivizing innovations that extend ASP's applicability to NP-hard problems.

Implementations

Major ASP Solvers

Most major Answer Set Programming () solvers follow the ground-and-solve , in which a high-level logic program is first transformed into a propositional ground program by instantiating its rules with relevant facts from the domain, and then the resulting ground program is solved to compute its stable models. This two-phase approach enables efficient handling of declarative specifications while leveraging advanced propositional solving techniques. Smodels, developed in the late by Ilkka Niemelä, was one of the first practical ASP systems, implementing the stable model semantics for normal logic programs without function symbols. Smodels served as a foundational influence for subsequent solvers, inspiring techniques in systems like Clasp for efficient model computation. DLV, an ongoing project originating in the and maintained by researchers at , provides comprehensive support for disjunctive logic programs, including aggregates, weak constraints, and non-ground queries. Its architecture features a with the I-DLV grounder for efficient using optimizations like dynamic body reordering and subsumption checking, paired with advanced reasoning modules for aggregates, magic sets, and integration with external databases via ODBC. Clingo, developed by Martin Gebser and colleagues since the 2000s under the Potassco project, integrates grounding (via ) and solving (via Clasp) into a unified supporting full , including disjunctions and constraints. A key unique feature is multi-shot solving, which allows incremental updates to programs and solutions without full re-grounding, enabling dynamic applications like stream reasoning. It offers a for embedding and scripting, facilitating integration with frameworks through libraries built on this interface. Among other notable solvers, WASP focuses on optimization in disjunctive programs under stable model semantics, incorporating constraint learning and source pointers to enhance unfounded set computation and efficient model checking. For embedded use in external applications, frameworks like EmbASP provide lightweight integration of ASP solving across platforms, allowing developers to embed logic programs without full solver overhead. Recent developments in 2025 include hybrid solvers such as asp-fzn, which extend ASP with linear constraints via translation to FlatZinc, supporting more expressive numeric reasoning in ground-and-solve workflows.

Comparison of Implementations

Answer set programming (ASP) solvers are evaluated primarily through standardized that measure solving time, usage, and the number of instances solved within limits. In a comprehensive suite for in processes (BRANCH), consisting of 70 instances with varying scales (8-64 activities, 1-64 resources, 1-32 roles), the combination of the I-DLV grounder with the CLASP solver (part of the Clingo ) outperformed others by solving 41 instances within a 2-hour and 20 GB limit, compared to 16 instances for +CLASP and 15 for +WASP. consumption also varied significantly: -based configurations used less (e.g., 22 MB for a mid-sized instance) but generated larger ground programs (up to 16 GB), while I-DLV produced smaller groundings (4.5 GB) at the cost of higher peak (4.4 GB). Clingo configurations generally excel in optimization , solving complex combinatorial problems faster due to integrated techniques like unsatisfiable core analysis, whereas DLV-based show strengths in reasoning tasks involving disjunctive programs. Feature support across solvers differs notably in handling advanced ASP constructs. Full support for disjunctive rules, which allow multiple atoms in rule heads to enhance expressivity for non-monotonic reasoning, is provided natively by DLV and Clingo, enabling the computation of stable models for disjunctive logic programs. In contrast, earlier solvers like Smodels are limited to normal logic programs without disjunctive heads, restricting their applicability to simpler, non-disjunctive scenarios. Probabilistic extensions, which incorporate uncertainty via probability distributions over rules or facts, remain limited in core ASP solvers; standard implementations like Clingo and DLV do not natively support them, though specialized frameworks such as LP^{MLN} (for Markov logic networks integrated with ASP) or Hybrid Probabilistic ASP handle discrete and continuous random variables through extensions. Aggregates (e.g., #count, #sum) are widely supported in modern solvers like Clingo, inherited from predecessors such as Smodels and DLV, facilitating concise encoding of counting and summation constraints. Usability and integration capabilities influence solver adoption in practical applications. Clingo offers extensive in , C++, and , enabling seamless embedding in multi-language environments; for instance, its allows programmatic control over grounding, solving, and model inspection, making it suitable for hybrid systems combining ASP with or other paradigms. DLV provides a C++ for similar integration but lacks the breadth of language bindings, positioning it as more suited for standalone or low-level applications. Smodels, emphasizing , relies on command-line invocation without , which limits its use in scripted or embedded workflows but eases initial prototyping for normal programs. Trade-offs between speed and expressivity are inherent in ASP solver design, with more expressive features like disjunctions increasing (from NP-complete for normal programs to Σ₂ᴾ-complete for disjunctive). Solvers optimized for speed on normal programs, such as Smodels, sacrifice disjunctive support, while full-featured systems like Clingo balance this through advanced heuristics, achieving superior performance on optimization but at higher preprocessing costs for large inputs. Recent approaches, blending grounding with techniques, outperform pure ground-and-solve systems like Clingo on non-groundable or large-scale instances in 2024 benchmarks, highlighting ongoing efforts to mitigate expressivity penalties in AI-integrated tasks.
SolverStrengthsWeaknessesSupported Dialects
ClingoFast optimization; low memory for grounding; multi-language APIsLarger ground programs on complex inputs; no native probabilistic supportFull ASP (disjunctive, aggregates, weak constraints); extensions for ,
DLVEfficient for disjunctive reasoning; compact groundingsHigher peak memory; limited API bindingsFull ASP (disjunctive, aggregates); strong in non-monotonic extensions
SmodelsSimplicity for normal programs; quick prototypingNo disjunctive heads; command-line only logic programs; basic aggregates
WASPGood for weighted satisfaction; integrates with multiple groundersSlower solving times; higher memory in benchmarksFull ASP (disjunctive, optimization); weighted extensions

References

  1. [1]
    [PDF] What Is Answer Set Programming? - UT Computer Science
    Abstract. Answer set programming (ASP) is a form of declarative pro- gramming oriented towards difficult search problems. As an.
  2. [2]
    [PDF] The Stable Model Semantics for Logic Programming
    THE STABLE MODEL SEMANTICS. FOR LOGIC PROGRAMMING. Mi hael Gelfond. University of Texas at El Paso. El Paso, Texas, U.S.A.. Vladimir Lifs hitz. Stanford ...
  3. [3]
  4. [4]
    Answer Set Planning: A Survey | Theory and Practice of Logic ...
    Apr 1, 2022 · This paper surveys the progress made during the last two and a half decades in the area of answer set planning, from its foundations to its use in challenging ...<|control11|><|separator|>
  5. [5]
  6. [6]
    [PDF] the stable model semantics for logic programming
    We propose a new de larative semanti s for logi programs with nega- tion. Its formulation is quite simple; at the same time, it is more gen- eral than the ...
  7. [7]
    [PDF] The Answer Set Programming Paradigm - AAAI Publications
    Answer set programming (ASP, for short) is a declarative programming paradigm for solving search problems and their optimization variants.
  8. [8]
    Classical negation in logic programs and disjunctive databases
    Classical Negation in Logic Programs and Disjunctive Databases. 369. -~ Q ... If II is contradictory, then,. Page 14. 378. M. Gelfond, V. Lifschitz by ...
  9. [9]
    [PDF] An Experimental Comparison of Constraint Logic Programming and ...
    The two paradigms considered are Answer Set Programming (ASP). (Baral 2003) and Constraint Logic Programming over Finite. Domains (CLP(FD)) (Marriott & Stuckey ...
  10. [10]
    [PDF] CIRCUMSCRIPTION—A FORM OF NONMONOTONIC REASONING
    5 DOMAIN CIRCUMSCRIPTION. The form of circumscription described in this paper generalizes an earlier ver- sion called minimal inference. Minimal inference ...
  11. [11]
    A logic for default reasoning - ScienceDirect.com
    In this paper we propose a logic for default reasoning. We then specialize our treatment to a very large class of commonly occuring defaults.
  12. [12]
    [PDF] A Logic for Default Reasoning - John Horty
    In this paper we propose a logic for default reasoning. We ... A few results relating the two will be contained in a forthcoming paper (Reiter (1980)).
  13. [13]
    Negation as Failure | SpringerLink
    The negation as failure rule only allows us to conclude negated facts that could be inferred from the axioms of the completed data base.
  14. [14]
    The Justification of Negation as Failure - ScienceDirect.com
    This rule, the rule of negation as failure, allows denying a statement on the grounds that a certain attempt to prove it has failed. The rule is not classically ...
  15. [15]
    [PDF] The Stable Model Semantics for Logic Programming
    The Stable Model Semantics for Logic Programming · M. Gelfond, Vladimir Lifschitz · Published in ICLP/SLP 1988 · Computer Science, Mathematics.Missing: original | Show results with:original
  16. [16]
    [cs/0003033] Smodels: A System for Answer Set Programming - arXiv
    Mar 8, 2000 · The Smodels system implements the stable model semantics for normal logic programs. It handles a subclass of programs which contain no function ...Missing: 1990s | Show results with:1990s
  17. [17]
    DLV – DLVSystem
    Mar 8, 2022 · DLV is a deductive database system based on disjunctive logic programming, which offers front-ends to several advanced KR formalisms.
  18. [18]
    [cs/0003036] DLV - A System for Declarative Problem Solving - arXiv
    Mar 8, 2000 · Its core language is disjunctive datalog (function-free disjunctive logic programming) under the Answer Set Semantics with integrity constraints ...
  19. [19]
    [PDF] clasp: A Conflict-Driven Answer Set Solver
    We describe the conflict-driven answer set solver clasp, which is based on concepts from constraint processing (CSP) and satisfiability checking. (SAT). We ...
  20. [20]
    [2308.15901] Explainable Answer-set Programming - arXiv
    Aug 30, 2023 · Answer-set Programming (ASP) is used in many areas, among them are industrial optimisation, knowledge management or life sciences, and thus of ...Missing: 2020s | Show results with:2020s
  21. [21]
    [PDF] Advancements in xASP, an XAI System for Answer Set Programming
    Jun 23, 2023 · This article reports on the advancements in the development of the XAI system xASP by revising the main foundational notions and by introducing ...Missing: 2020s | Show results with:2020s
  22. [22]
    ASPOCP 2025 - Google Sites
    18th Workshop on Answer Set Programming and Other Computing Paradigms · September 12-13th, 2025 · ASPOCP 2025 is a workshop of ICLP 2025, hosted by the
  23. [23]
    Stable semantics for disjunctive programs
    Jul 11, 1991 · We introduce the stable model semantics fordisjunctive logic programs and deductive databases, which generalizes the stable model semantics.<|control11|><|separator|>
  24. [24]
    On the Foundations of Grounding in Answer Set Programming
    Jul 25, 2022 · We provide a comprehensive elaboration of the theoretical foundations of variable instantiation, or grounding, in Answer Set Programming (ASP).
  25. [25]
    [PDF] Grounding and Solving in Answer Set Programming
    Answer set programming (ASP) combines a high-level modeling language with effective grounding and solv- ing technology. Moreover, ASP is highly versatile by.<|separator|>
  26. [26]
    [PDF] On the Foundations of Grounding in Answer Set Programming
    Our main result shows that the stable models of a non-ground input program coincide with the ones of the ground output program returned by our grounding ...<|control11|><|separator|>
  27. [27]
    [PDF] Conflict-Driven Answer Set Solving - IJCAI
    We introduce a new approach to computing answer sets of logic programs, based on concepts from con- straint processing (CSP) and satisfiability checking.
  28. [28]
    Complexity and expressive power of logic programming
    This article surveys various complexity and expressiveness results on different forms of logic programming. The main focus is on decidable forms of logic ...
  29. [29]
    [PDF] Answer Set Programming (Draft) - UT Computer Science
    Apr 5, 2019 · Answer set programming is a programming methodology rooted in research on artificial intelligence and computational logic.
  30. [30]
    [PDF] Classical negation in logic programs and disjunctive databases
    Classical negation in logic programs and disjunctive databases · M. Gelfond, V. Lifschitz · Published in New generation computing 1 August 1991 · Computer Science, ...
  31. [31]
    [PDF] Probabilistic Answer Set Programming with Discrete and ... - arXiv
    Sep 30, 2024 · Probabilistic Answer Set Programming (PASP) uses discrete probabilistic facts. Hybrid PASP (HPASP) extends this to include continuous random ...
  32. [32]
    Combining answer set programming with description logics for the ...
    We propose a combination of logic programming under the answer set semantics with the description logics SHIF ( D ) and SHOIN ( D ) , which underly the Web ...
  33. [33]
    Scalable Neural-Probabilistic Answer Set Programming
    Nov 16, 2023 · We introduce SLASH, a novel DPPL that consists of Neural-Probabilistic Predicates (NPPs) and a logic program, united via answer set programming (ASP).Missing: developments 2024
  34. [34]
    [PDF] Handout on Answer Set Programming
    For example, program Πgc in (11) is an example of such a uniform encoding for the 3-coloring problem GC, where any graph is an instance of this search problem. ...
  35. [35]
    [PDF] Notes on Answer Set Programming
    Sep 20, 2017 · Answer set programming, or ASP, is a technique based on logic programming that allows us to define a generative space in abstract terms, ...Missing: primary | Show results with:primary
  36. [36]
    Examples — ASPECT v0.2.1 documentation
    Graph Coloring . Graph coloring is a well-known problem that is often used as an example to introduce answer set programming to students.
  37. [37]
    [PDF] Answer Set Programming - mat.unical.it
    Example (Maximal Clique). Problem: Given an indirected Graph compute a clique of maximal size. Input: node(_) and edge(_, _). Natural Encoding: inClique(X) ...
  38. [38]
    [PDF] ANSWER SET PROGRAMMING - Computer Science
    Answer set programming is a new programming paradigm. It is introduced in the late. 90's and manages to attracts the intention of different groups of ...
  39. [39]
    [PDF] Using ASP for Model-based Diagnosis
    Reiter [3] formalized diagnosis as a non-monotonic reasoning problem where the fault mode, i.e., ab (standing for not abnormal), is explicitly used in component.
  40. [40]
    [PDF] Belief Revision of Logic Programs under Answer Set Semantics
    At its heart, ASP exploits negation as failure with respect to a fixed-point semantics; this enables the specification of a wide variety of problems.
  41. [41]
    Answer Set Programming at a Glance - Communications of the ACM
    Dec 1, 2011 · The motivation and key concepts behind answer set programming—a promising approach to declarative problem solving. By Gerhard Brewka, Thomas ...
  42. [42]
    [PDF] Diagnostic reasoning with A-Prolog ∗
    In Sections 4 and 5, we show how techniques of answer set programming can be applied to the computation of candidate diagnoses and of diagnoses. In Section 6 we ...
  43. [43]
    [PDF] Pinpointing Axioms in Ontologies via ASP⋆ - Rafael Peñaloza Nyssen
    Abstract. Axiom pinpointing is the task of identifying the axiomatic causes for a consequence to follow from an ontology. Different approaches.
  44. [44]
    [1911.04326] ASP-Core-2 Input Language Format - arXiv
    Nov 11, 2019 · In this document we present the ASP-Core-2 standard input language for Answer Set Programming, which has been adopted in ASP Competition events since 2013.
  45. [45]
    ASPARTIX: Implementing Argumentation Frameworks Using Answer ...
    Aug 7, 2025 · ASPARTIX [24] is the first work to compute Dung's acceptability semantics based on Answer Set Programming (ASP). It maps arguments and attack ...
  46. [46]
    [PDF] The Answer Set Programming Competition
    The ASP Competition format is consolidated into two tracks: the model and solve track, and the sys- tem track. Participating systems are compared on a selected ...Missing: output | Show results with:output
  47. [47]
    [PDF] The First Answer Set Programming System Competition
    Abstract. This paper gives a summary of the First Answer Set Programming. System Competition that was held in conjunction with the Ninth International.<|separator|>
  48. [48]
    The Sixth Answer Set Programming Competition
    Sep 13, 2017 · Answer Set Programming (ASP) is a well-known paradigm of declarative programming with roots in logic programming and non-monotonic reasoning.Missing: origins | Show results with:origins<|control11|><|separator|>
  49. [49]
    The third open answer set programming competition
    Sep 6, 2012 · This paper discusses the format of the competition and the rationale behind it, then reports the results for both tracks. Comparison with the ...Missing: outcomes | Show results with:outcomes
  50. [50]
    [1904.09134] The Seventh Answer Set Programming Competition
    Apr 19, 2019 · In this paper, we report on the design and results of the Seventh ASP Competition, jointly organized by the University of Calabria (Italy), the University of ...Missing: Tenth | Show results with:Tenth
  51. [51]
    The Seventh Answer Set Programming Competition: Design and ...
    May 31, 2019 · Answer Set Programming (ASP) is a prominent knowledge representation language with roots in logic programming and non-monotonic reasoning.
  52. [52]
    The Seventh Answer Set Programming Competition - ResearchGate
    In this paper, we report on the design and results of the Seventh ASP Competition, jointly organized by the University of Calabria (Italy), the University of ...
  53. [53]
    [PDF] Complex Preferences for Answer Set Optimization
    the most advanced among them being Smodels (Niemelä ... is a lexicographic ordering which considers the con- ... menting ordered disjunction using answer set ...
  54. [54]
    The DLV Project - A Disjunctive Datalog System (and more) - DBAI
    May 2, 2010 · dlvhex is a system for answer set programming with external computation sources. NLP-DL is a system for coupling nonmonotonic logic programs ...
  55. [55]
    clingo and gringo - Potassco
    clingo combines both gringo and clasp into a monolithic system. This way it offers more control over the grounding and solving process than gringo and clasp ...Clingo API documentation · Clingo C API · Python · Python module listMissing: PyAsp | Show results with:PyAsp
  56. [56]
    [1705.09811] Multi-shot ASP solving with clingo - arXiv
    May 27, 2017 · We introduce a new flexible paradigm of grounding and solving in Answer Set Programming (ASP), which we refer to as multi-shot ASP solving.Missing: Python | Show results with:Python
  57. [57]
    Wasp by alviano - GitHub Pages
    Wasp is an ASP solver handling disjunctive logic programs under the stable model semantics. Wasp implements techniques originally introduced for SAT solving.
  58. [58]
    A framework for easing the development of applications embedding ...
    Sep 5, 2016 · We show the use of the framework by illustrating proper specializations for some relevant ASP systems over different platforms, including the ...Missing: ezd | Show results with:ezd
  59. [59]
    ASP-FZN: A Translation-based Constraint Answer Set Solver - arXiv
    Jul 30, 2025 · Abstract:We present the solver asp-fzn for Constraint Answer Set Programming (CASP), which extends ASP with linear constraints.
  60. [60]
  61. [61]
    [PDF] A Hybrid Approach to Optimization in Answer Set Programming
    In this paper, we propose a new approach to solving optimization problems via ASP, i.e., to the problem of finding optimal solutions (in terms of optimal answer ...
  62. [62]
    [PDF] Evaluation Techniques and Systems for Answer Set Programming
    Application domains making use of ASP extensions as fur- nished by the CASP, ASPMT, BFASP, and HEX frameworks include, e.g., hybrid task and motion planning in ...
  63. [63]
    Probabilistic Answer Set Programming with Discrete and ...
    Nov 8, 2024 · In this paper, we extend the PASP framework to support continuous random variables and propose Hybrid Probabilistic Answer Set Programming.
  64. [64]
    clingo API documentation - Potassco
    This module provides functions and classes to control the grounding and solving process. If the clingo application is build with Python support,
  65. [65]
    [PDF] Blending Grounding and Compilation for Efficient ASP Solving
    Traditional ASP solvers em- ploy the Ground&Solve approach, which is based on two components, grounder and solver. The former takes as in- put a program P and ...