Skip to main content
QUICK REVIEW

[Paper Review] DATALOG with constraints - an answer-set programming system

Deborah East, Mirosław Truszczyński|ArXiv.org|Mar 24, 2000
Logic, Reasoning, and KnowledgeComputer Science16 references12 citations
TL;DR

This paper introduces DATALOG with constraints (DC), a nonmonotonic logic system that combines propositional constraints and Horn rules to enable concise, efficient encodings of search problems in AI and combinatorics. DC achieves performance competitive with both propositional SAT solvers and stable model logic programming, particularly excelling in problems requiring transitive closure, such as Hamilton cycles and N-queens, due to its compact encodings and efficient reasoning engine.

ABSTRACT

Answer-set programming (ASP) has emerged recently as a viable programming paradigm well attuned to search problems in AI, constraint satisfaction and combinatorics. Propositional logic is, arguably, the simplest ASP system with an intuitive semantics supporting direct modeling of problem constraints. However, for some applications, especially those requiring that transitive closure be computed, it requires additional variables and results in large theories. Consequently, it may not be a practical computational tool for such problems. On the other hand, ASP systems based on nonmonotonic logics, such as stable logic programming, can handle transitive closure computation efficiently and, in general, yield very concise theories as problem representations. Their semantics is, however, more complex. Searching for the middle ground, in this paper we introduce a new nonmonotonic logic, DATALOG with constraints or DC. Informally, DC theories consist of propositional clauses (constraints) and of Horn rules. The semantics is a simple and natural extension of the semantics of the propositional logic. However, thanks to the presence of Horn rules in the system, modeling of transitive closure becomes straightforward. We describe the syntax and semantics of DC, and study its properties. We discuss an implementation of DC and present results of experimental study of the effectiveness of DC, comparing it with CSAT, a satisfiability checker and SMODELS implementation of stable logic programming. Our results show that DC is competitive with the other two approaches, in case of many search problems, often yielding much more efficient solutions.

Motivation & Objective

  • To design an answer-set programming system with semantics close to propositional logic but with the expressive power and conciseness of nonmonotonic logics.
  • To address the limitations of propositional logic in encoding transitive closure efficiently, which leads to large, unwieldy theories.
  • To bridge the gap between the simplicity of propositional logic and the efficiency of stable model logic programming.
  • To develop a system that yields intuitive, small-size encodings while maintaining strong computational performance.
  • To evaluate DC’s effectiveness against established systems like csat (propositional SAT) and smodels (stable logic programming) on standard search problems.

Proposed method

  • DC combines propositional clauses (constraints) and Horn rules in a single formalism, extending propositional logic semantics with nonmonotonic reasoning via Horn rules.
  • The system uses a simple, intuitive semantics based on models of the combined theory, avoiding the complexity of stable model semantics.
  • Encodings in DC are designed to be compact, especially for problems requiring transitive closure, such as Hamilton cycles and path existence.
  • The implementation, named dcs, uses a dedicated reasoning engine that efficiently computes answer sets by leveraging the structure of DC theories.
  • Experiments compare dcs with csat (propositional SAT) and smodels (stable logic programming) on benchmark problems using consistent hardware and input encodings.
  • Performance is measured via CPU user time and number of choice points, with results reported on log-scale plots for clarity.

Experimental results

Research questions

  • RQ1Can a nonmonotonic logic system be designed with semantics as simple as propositional logic but with the expressive power to handle transitive closure efficiently?
  • RQ2Does combining propositional constraints with Horn rules in a single formalism yield significantly more concise encodings than propositional logic alone?
  • RQ3Can such a system outperform both propositional SAT solvers and stable model logic programming systems in terms of runtime and scalability?
  • RQ4To what extent does the size of the encoding impact the performance of answer-set programming systems?
  • RQ5Is there a practical middle ground between the simplicity of propositional logic and the expressiveness of stable model logic programming?

Key findings

  • For the Hamilton cycle problem, dcs outperformed both smodels and csat, with csat becoming impractical for graphs with more than 40 vertices due to large propositional encodings.
  • In the N-queens problem, dcs and csat were significantly faster than smodels, with dcs requiring only about one-fifth the number of rules as smodels.
  • For Schur number problems, dcs computed S(3)=13 and S(4)=44 efficiently, outperforming both csat and smodels, especially on larger instances like N=45.
  • In 3-coloring problems, dcs and csat performed better than smodels, with dcs showing a performance advantage due to compact encodings.
  • The pigeonhole problem showed similar performance across systems, with csat slightly ahead and dcs slightly better than smodels, indicating dcs is competitive even in less favorable cases.
  • The results consistently show that smaller encodings in DC lead to faster execution, confirming that encoding size is a critical factor in solver performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.