Skip to main content
Log in

Answer Set Programming from a Logical Point of View

  • Technical Contribution
  • Published:
KI - Künstliche Intelligenz Aims and scope Submit manuscript

Abstract

In this paper we provide an introductory explanation of the underlying semantics of answer set programming in terms of equilibrium logic. Rather than a thorough formal presentation of this formalism and its properties, we emphasize the intuitive meaning of its main logical definitions, explaining their effect on some example programs. We also overview some of the main extensions and relations to other logical approaches.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

Notes

  1. Notice that \(\lnot { fire}\) is, read as “we have no evidence on fire,” is either certain (when indeed \({ fire}\) is false) or false (when some evidence exists, i.e. \({ fire}\) is certain or weakly true).

  2. These sets are informally known as “here” and “there”. The reader familar with possible worlds semantics may think of them as the atoms verified at two worlds, ‘here’ and ‘there’.

  3. See [6], and also [7] for more detailed information and references.

  4. Using HT-logic we can only test the equivalence of ground rules and programs. In practice it makes sense to apply a first-order, quantified version of HT that captures the strong equivalence of programs with variables. For details, see [9, 10]. The complexity of strong equivalence for non-ground programs is analysed in [11].

  5. It is slightly unfortunate that [19] called it “classical” negation.

  6. Notice that the meaning of such a relation is still co-determined by the two components \(\mathcal {T}\) and \(\Pi\) because normally not all models of \(\mathcal {T}\) will be able to be enriched into equilibrium models of \(\mathcal {T} \cup \Pi\).

  7. The main references are as follows. For the complexity of satisfiability in many-valued logics such as HT, see [38]. For the complexity of reasoning tasks associated with disjunctive logic programs, see [39]. For the strong equivalence of logic programs, see [37] and also independently some results of [40] and [41]. For the full details of the reduction method sketched here, see [37, 42].

  8. Ie. logics captured semantically by possible worlds frames with a reflexive accessibility relation.

  9. See [48].

  10. Another modal embedding of HT can be found in [54].

References

  1. van Emden MH, Kowalski RA (1976) The semantics of predicate logic as a programming language. J ACM 23:733–742

    Article  MathSciNet  MATH  Google Scholar 

  2. Gelfond M, Lifschitz V (1988) The stable models semantics for logic programming. In: Proc. of the 5th intl. conf. on log. prog., pp 1070–1080

  3. Heyting A (1930) Die formalen Regeln der intuitionistischen Logik. Sitzungsberichte der Preussischen Akademie der Wissenschaften, Physikalisch-mathematische Klasse, pp 42–56

  4. Pearce D. (1997) A new logical characterisation of stable models and answer sets. In: Proc. of non monotonic extensions of log. progr

  5. Pearce D (1999) Stable inference as intuitionistic validity. J Log Program 38(1):79–91

    Article  MathSciNet  MATH  Google Scholar 

  6. Osorio M, Pérez JAN, Arrazola J (2005) Safe beliefs for propositional theories. Ann Pure Appl Logic 134(1):63–82

    Article  MathSciNet  MATH  Google Scholar 

  7. Cabalar P, Fandinno J, Fariñas del Cerro L, Pearce D, Valverde A (2017) On the properties of atom definability and well-supportedness in logic programming. In: Proc. of 18th Conf. on art. intell., pp. 624–636

  8. Lifschitz V, Pearce D, Valverde A (2001) Strongly equivalent logic programs. ACM Trans Comput Log 2(4):526–541

    Article  MathSciNet  MATH  Google Scholar 

  9. Lifschitz V, Pearce D, Valverde A (2007) A characterization of strong equivalence for logic programs with variables. In: Proc. of 9th intl. conf. of log. prog. and nonm. reas., pp. 188–200

  10. Mints G (2010) Cut-free formulations for a quantified logic of here and there. Ann Pure Appl Logic 162(3):237–242

    Article  MathSciNet  MATH  Google Scholar 

  11. Eiter T, Fink M, Tompits H, Woltran S (2005) Strong and uniform equivalence in answer-set programming: characterizations and complexity results for the non-ground case. In: Proc. of The 20th nat. conf. on artif. intell; and the 7th innov. apps. of artif. intell. conf., pp. 695–700

  12. Cabalar P, Ferraris P (2007) Propositional theories are strongly equivalent to logic programs. TPLP 7(6):745–759

    MathSciNet  MATH  Google Scholar 

  13. Cabalar P, Pearce D, Valverde A (2005) Reducing propositional theories in equilibrium logic to logic programs. In: Proc. of the 12th Europ. conf. on artif. intell., pp. 4–17

  14. Ferraris P (2011) Logic programs with propositional connectives and aggregates. ACM Trans Comput Log 12(4):25

    Article  MathSciNet  MATH  Google Scholar 

  15. Gelfond M, Zhang Y (2014) Vicious circle principle and logic programs with aggregates. TPLP 14(4–5):587–601

    MathSciNet  MATH  Google Scholar 

  16. Cabalar P, Fandinno J, Schaub T, Schellhorn S (2017) Gelfond-Zhang aggregates as propositional formulas. In: Proc. of the 14th intl. conf. on log. prog. and nonm. reas., pp. 117–131

  17. Pearce D, Wagner G (1989) Logic programming with strong negation. In: Proc. of extensions of logic programming, pp. 311–326

  18. Pearce D, Wagner G (1990) Reasoning with negative information, I: strong negation in logic programs. Language, Knowledge, and Intentionality ? Perspectives on the Philosophy of Jaakko Hintikka. Acta Philos Fennica 49:430–453

    Google Scholar 

  19. Gelfond M, Lifschitz V (1990) Logic programs with classical negation. In: Proc. of 7th Intl. conf. on log. prog., pp. 579–597

  20. Nelson D (1949) Constructible falsity. J Symb Logic 14(2):16–26

    Article  MathSciNet  MATH  Google Scholar 

  21. Vorob’ev N (1952) A constructive propositional calculus with strong negation. Doklady Akademii Nauk SSR 85:465–468 (in Russian)

    Google Scholar 

  22. Vorob’ev N (1952) The problem of deducibility in constructive propositional calculus with strong negation. Doklady Akademii Nauk SSR 85:689–692 (in Russian)

    Google Scholar 

  23. Gurevich Y (1977) Intuitionistic logic with strong negation. Studia Logica 36(1–2):49–59

    Article  MathSciNet  MATH  Google Scholar 

  24. Rosati R (2005) Semantic and computational advantages of the safe integration of ontologies and rules. In: Proc. of 3th intl. works. of principles and practice of semantic web reasoning, pp. 50–64

  25. Rosati R (2006) Dl+log: tight integration of description logics and disjunctive datalog. In: KR, pp. 68–78

  26. de Bruijn J, Pearce D, Polleres A, Valverde A (2010) A semantical framework for hybrid knowledge bases. Knowl Inf Syst 25(1):81–104

    Article  Google Scholar 

  27. Eiter T, Lukasiewicz T, Schindlauer R, Tompits H (2004) Combining answer set programming with description logics for the semantic web. In: Proc. of 9th intl. conf. of knowledge representation, pp. 141–151

  28. Fink M, Pearce D (2010) A logical semantics for description logic programs. In: Proc. of 12th Europ. Conf. of logics in artif. intell., pp. 156–168

  29. Kamp JA (1968) Tense logic and the theory of linear order. Ph.D. thesis, University of California at Los Angeles

  30. Cabalar P, Pérez G (2007) Temporal equilibrium logic: a first approach. In: Proc. of the 11th intl. conf. on computer aided systems theory, pp. 241–248

  31. Cabalar P (2015) Stable models for temporal theories. In: Proc. of the 13th intl. conf. on log. prog. and nonm. reas., pp. 1–13

  32. Cabalar P (2011) Functional answer set programming. TPLP 11(2–3):203–233

    MathSciNet  MATH  Google Scholar 

  33. Scott D (1979) Identity and existence in intuitionistic logic. Lect Notes in Math 753:660–696

    Article  MathSciNet  Google Scholar 

  34. Fariñas del Cerro L, Herzig A, Su EI (2015) Epistemic equilibrium logic. In: Proc. of the 24th intl. joint conf. on artif. intell., pp. 2964–2970

  35. Gelfond M (1991) Strong introspection. In: Proc. of the 9th nat. conf. on artif. intell., pp. 386–391

  36. Kleine Büning H, Karpinski M, Flögel A (1995) Resolution for quantified boolean formulas. Inf Comput 117(1):12–18

    Article  MathSciNet  MATH  Google Scholar 

  37. Pearce D, Tompits H, Woltran S (2001) Encodings for equilibrium logic and logic programs with nested expressions. In: Proc. of 10th Portuguese conf. on artif. intell., pp. 306–320

  38. Mundici D (1987) Satisfiability in many-valued sentential logic is NP-complete. Theor Comput Sci 52:145–153

    Article  MathSciNet  MATH  Google Scholar 

  39. Eiter T, Gottlob G (1995) On the computational cost of disjunctive logic programming: propositional case. Ann Math Artif Intell 15(3–4):289–323

    Article  MathSciNet  MATH  Google Scholar 

  40. Lin F (2002) Reducing strong equivalence of logic programs to entailment in classical propositional logic. In: Proc. of the 8th intl. conf. on knowledge representation, pp. 170–176

  41. Turner H (2003) Strong equivalence made easy: nested expressions and weight constraints. TPLP 3(4–5):609–622

    MathSciNet  MATH  Google Scholar 

  42. Pearce D, Tompits H, Woltran S (2009) Characterising equilibrium logic and nested logic programs: reductions and complexity. TPLP 9(5):565–616

    MathSciNet  MATH  Google Scholar 

  43. Ferraris P, Lee J, Lifschitz V (2007) A new perspective on stable models. In: Proc. of the 20th intl. joint conf. on artif. Intell

  44. Gödel K (1933) Eine Interpretation des intuitionistischen Aussagenkalküls. Ergebnisse Math Colloq 4:39–40

    MATH  Google Scholar 

  45. McKinsey JJ, Tarski A (1948) Some theorems about the sentential calculi of Lewis and Heyting. J Symb Log 13:1–15

    Article  MathSciNet  MATH  Google Scholar 

  46. Esakia L (1976) The modal logic of topological spaces. Georgian Academy of Sciences, Tbilisi, pp 1–22 (preprint)

    Google Scholar 

  47. Esakia L (2004) Intuitionistic logic and modality via topology. Ann Pure Appl Log 127:155–170

    Article  MathSciNet  MATH  Google Scholar 

  48. Marek W, Truszczynski M (1993) Nonmonotonic reasoning: context-dependent reasoning. Springer, Berlin Heidelberg

    MATH  Google Scholar 

  49. Przymusinski T (1991) Stable semantics for disjunctive programs. N Gener Comput 9:401–424

    Article  MATH  Google Scholar 

  50. Lifschitz V, Schwarz G (1993) Extended logic programs as autoepistemic theories. In: Proc. of intl. conf. on log. prog. and nonm. reas., pp. 101–114

  51. Marek W, Truszczynski M (1993) Reflective autoepistemic logic and logic programming. In: Proc. of intl. conf. on log. prog. and nonm. reas., pp. 115–131

  52. Chen J (1993) Minimal knowledge + negation as failure = only knowing (sometimes). In: Proc. of intl. conf. on log. prog. and nonm. reas., pp. 132–150

  53. Pearce D, Uridia L (2008) The Gödel and the splitting translations. In: Nonmonotonic reasoning. Essays celebrating its 30th anniversary. College Publications, pp. 335–360.

  54. Truszczynski M (2007) The modal logic s4f, the default logic, and the logic here-and-there. In: Proc. of the 22nd AAAI conf. on artif. intell., pp. 508–514

  55. Gödel K (1932) Zum intuitionistischen Aussagenkalkül. Anzeiger der Akademie der Wissenschaften Wien, mathematisch, naturwissenschaftliche Klasse 69:65–66

    MATH  Google Scholar 

  56. Łukasiewicz J (1941) Die Logik und das Grundlagenproblem. Les Entreties de Zürich sur les Fondaments et la Méthode des Sciences Mathématiques 6-9, (1938) 12:87–100

  57. Smetanich YS (1960) On completeness of a propositional calculus with an additional operation of one variable. Trudy Moscovskogo matrmaticheskogo obshchestva 9:357–372 (in Russian)

    Google Scholar 

  58. Umezawa T (1959) On intermediate many-valued logics. J Math Soc Jpn 11:116–128

    Article  MathSciNet  MATH  Google Scholar 

  59. Hosoi T (1966) The axiomatization of the intermediate propositional systems \(S_n\) of Gödel. J Facul Sci Univ Tokyo 13:183–187

    MATH  Google Scholar 

  60. Ono H (1983) Model extension theorem and Craig’s interpolation theorem for intermediate predicate logics. Rep Math Logic 15:41–58

    MathSciNet  MATH  Google Scholar 

  61. Pearce D, Valverde A (2004) Towards a first order equilibrium logic for nonmonotonic reasoning. In: Proc. of the 9th Europ. conf. on logics in artif. intell., pp. 147–160

  62. Pearce D (2006) Equilibrium logic. Ann Math Art Intell 47(1):3–41

    Article  MathSciNet  MATH  Google Scholar 

  63. Pearce D, Valverde A (2005) A first order nonmonotonic extension of constructive logic. Studia Logica 80(2–3):321–346

    Article  MathSciNet  MATH  Google Scholar 

  64. Cabalar P, Fariñas del Cerro L, Pearce D, Valverde A (2014) A free logic for stable models with partial intensional functions. In: Proc. of 14th Europ. conf. of logics in artif. intell., pp. 340–354

  65. Harrison A, Lifschitz V, Pearce D, Valverde A (2017) Infinitary equilibrium logic and strongly equivalent logic programs. Artif Intell 246:22–33

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Agustín Valverde.

Additional information

Partial support from Mineco (TIN2017-84453-P and TIN2015-70266-C2), Xunta de Galicia (GPC ED431B 2016/035 and 2016-2019 ED431G/01, CITIC), European Regional Development Fund (ERDF), UPM RP151046021.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cabalar, P., Pearce, D. & Valverde, A. Answer Set Programming from a Logical Point of View. Künstl Intell 32, 109–118 (2018). https://doi.org/10.1007/s13218-018-0547-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13218-018-0547-7

Keywords