The discussion of answer set programming in this book is incomplete in three ways. First, it says almost nothing about the algorithms that answer set solvers use to find stable models, about what happens “under the hood.” Section 3.4 is, in fact, the only place where the operation of answer set solvers is discussed in any detail. The algorithms implemented in Smodels are described in Chaps. 3 and 4 of the doctoral dissertation of one of its designers [112]. You can learn about the operation of clingo from Chaps. 4 and 6 of the book [45] written by members of the Potassco team.

Second, there are several useful answer set programming constructs that we did not have a chance to mention. Some of them are available in the language of clingo—conditional literals, external functions, and multi-shot solving . They are described in the Potassco User Guide, which can be downloaded from the website of the Potassco project, https://potassco.org. One other interesting construct, intensional functions, is motivated by the fact that ASP definitions of functions are somewhat cumbersome. Compare, for instance, the definition of the predicate fac/2 in lines 5 and 6 of Listing 2.6 (page 19) with the definition of factorial in Haskell (page 2). Incorporating intensional functions is an attempt to overcome this defect by merging ASP with functional programming [6, 11, 17]. We did not talk about the use of external information sources [29], about rules with ordered disjunction [14], ASP with sorts [4], ASP with consistency-restoring rules [5, 7], constraint ASP [8, 9, 47, 67], ASP with preferences [15], and probabilistic ASP [21].

Third, most examples of programs here are “toy examples” chosen for the purpose of illustrating the possibilities of the language. Serious applications of answer set programming are discussed in recent surveys [31, 36], and studying them will help the reader appreciate the value of the programming paradigm described in this book.