Circumscriptive Event Calculus as Answer Set Programming
Proceedings of the Twenty-First International Joint Conference on Artificial Intelligence. Pages 823-828.
© 2009 International Joint Conferences on Artificial Intelligence
Abstract
Recently, Ferraris, Lee and Lifschitz presented a general definition of a stable model that is similar to the definition of circumscription, and can even be characterized in terms of circumscription. In this paper, we show the opposite direction, which is, how to turn circumscription into the general stable model semantics, and based on this, how to turn circumscriptive event calculus into answer set programs. The reformulation of the event calculus in answer set programming allows answer set solvers to be applied to event calculus reasoning, handling more expressive reasoning tasks than the current SAT-based approach. Our experiments also show clear computational advantages of the answer set programming approach.Tae-Won Kim, Joohyung Lee, Ravi Palla
- [Doherty et al., 1998] Patrick Doherty, Joakim Gustafsson, Lars Karlsson, and Jonas Kvarnström. TAL: Temporal ac- tion logics language specification and tutorial. Linköping Electronic Articles in Computer and Information Science ISSN 1401-9841, 3(015), 1998.
- [Ferraris et al., 2007] Paolo Ferraris, Joohyung Lee, and Vladimir Lifschitz. A new perspective on stable models. In Proceedings of International Joint Conference on Arti- ficial Intelligence (IJCAI), pages 372-379, 2007. IJCAI
- [Ferraris et al., 2009] Paolo Ferraris, Joohyung Lee, Vladimir Lifschitz, and Ravi Palla. Symmetric splitting in the general theory of stable models. 2009. This volume. [Ferraris et al., 2010] IJCAI
- Paolo Ferraris, Joohyung Lee, and Vladimir Lifschitz. Stable models and circumscription. 11 Artificial Intelligence, 2010. To appear.
- [Gelfond and Lifschitz, 1998] Michael Gelfond and Vladimir Lifschitz. Action languages. Electronic Transactions on Artificial Intelligence, 3:195-210, 1998.
- [Janhunen and Oikarinen, 2004] Tomi Janhunen and Emilia Oikarinen. Capturing parallel circumscription with dis- junctive logic programs. In Proceedings of European Con- ference on Logics in Artificial Intelligence (JELIA), pages 134-146, 2004.
- [Kowalski and Sergot, 1986] Robert Kowalski and Marek Sergot. A logic-based calculus of events. New Genera- tion Computing, 4:67-95, 1986.
- [Lee and Lin, 2004] Joohyung Lee and Fangzhen Lin. Loop formulas for circumscription. In Proceedings of National Conference on Artificial Intelligence (AAAI), pages 281- 286, 2004.
- [Lee et al., 2008] Joohyung Lee, Vladimir Lifschitz, and Ravi Palla. A reductive semantics for counting and choice in answer set programming. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 472- 479, 2008.
- [Lifschitz et al., 1999] Vladimir Lifschitz, Lappoon R. Tang, and Hudson Turner. Nested expressions in logic programs. Annals of Mathematics and Artificial Intelligence, 25:369- 389, 1999.
- [Lifschitz, 1994] Vladimir Lifschitz. Circumscription. In D.M. Gabbay, C.J. Hogger, and J.A. Robinson, editors, Handbook of Logic in AI and Logic Programming, vol- ume 3, pages 298-352. Oxford University Press, 1994.
- [Lifschitz, 2008] Vladimir Lifschitz. What is answer set pro- gramming? In Proceedings of the AAAI Conference on Artificial Intelligence, pages 1594-1597, 2008.
- [Lin and Zhou, 2007] Fangzhen Lin and Yi Zhou. From an- swer set logic programming to circumscription via logic of GK. In Proceedings of International Joint Conference on Artificial Intelligence (IJCAI), 2007. IJCAI
- [Marek and Truszczyński, 1999] Victor Marek and Mirosław Truszczyński. Stable models and an alter- native logic programming paradigm. In The Logic Programming Paradigm: a 25-Year Perspective, pages 375-398. Springer Verlag, 1999.
- [McCarthy, 1980] John McCarthy. Circumscription-a form of non-monotonic reasoning. Artificial Intelligence, 13:27-39,171-172, 1980.
- [McCarthy, 1986] John McCarthy. Applications of circum- scription to formalizing common sense knowledge. Artifi- cial Intelligence, 26(3):89-116, 1986.
- [Miller and Shanahan, 1999] Rob Miller and Murray Shana- han. The event calculus in classical logic -alternative ax- iomatisations. Electron. Trans. Artif. Intell., 3(A):77-105, 1999.
- [Mueller, 2004a] Erik T. Mueller. Event calculus reasoning through satisfiability. J. Log. Comput., 14(5):703-730, 2004.
- [Mueller, 2004b] Erik T. Mueller. A tool for satisfiability- based commonsense reasoning in the event calculus. In Valerie Barr and Zdravko Markov, editors, FLAIRS Con- ference. AAAI Press, 2004.
- [Mueller, 2006] Erik Mueller. Commonsense reasoning. El- sevier, 2006.
- [Niemelä, 1999] Ilkka Niemelä. Logic programs with stable model semantics as a constraint programming paradigm. Annals of Mathematics and Artificial Intelligence, 25:241- 273, 1999.
- [Reiter, 1980] Raymond Reiter. A logic for default reason- ing. Artificial Intelligence, 13:81-132, 1980.
- [Shanahan and Witkowski, 2004] Murray Shanahan and Mark Witkowski. Event calculus planning through satisfiability. J. Log. Comput., 14(5):731-745, 2004.
- [Shanahan, 1995] Murray Shanahan. A circumscriptive cal- culus of events. Artif. Intell., 77(2):249-284, 1995.
- [Shanahan, 1997] Murray Shanahan. Solving the Frame Problem: A Mathematical Investigation of the Common Sense Law of Inertia. MIT Press, 1997.
- [Shanahan, 1999] Murray Shanahan. The event calculus ex- plained. In Artificial Intelligence Today, LNCS 1600, pages 409-430. Springer, 1999.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
The stable model semantics is the mathematical basis of answer set programming [Marek and Truszczy´nski, 1999; Niemel¨a, 1999; Lifschitz, 2008]. Recently, Ferraris, Lee and Lifschitz [2007] presented a general definition of a stable model that applies to the syntax of arbitrary first-order sentences, under which logic programs are viewed as a special class of first-order sentences. The new semantics is similar to the definition of circumscription [McCarthy, 1980; 1986], and can even be characterized in terms of circumscription [Ferraris et al., 2007, Corollary 1]. Essentially the same characterization was also independently given in [Lin and Zhou, 2007].
The opposite direction, turning (parallel) circumscription into the stable model semantics, was shown in [Lee and Lin, 2004; Janhunen and Oikarinen, 2004] limited to the propositional case. The first contribution of this paper is a generalization of the result from [Lee and Lin, 2004]: turning first-order circumscription into the general stable model semantics. Such close relationship between the two formalisms is curious since they have formed rather disparate traditions in knowledge representation. In particular, they have provided different solutions to the frame problem. A group of action formalisms, such as circumscriptive event calculus [Shanahan, 1995] and temporal action logics [Doherty et al., 1998], is based on classical logic, using circumscription to handle the frame problem. On the other hand, the solution provided by answer set programming (ASP), that is carried over to high level action language A [Gelfond and Lifschitz, 1998] and many of its descendants that are based on ASP, uses both default negation (not) and strong negation (¬)-the idea of which is closely related to Reiter's default logic solution [Reiter, 1980]. Interestingly, the development of the event calculus has spanned over both classical logic and logic programming traditions. The original version of the event calculus [Kowalski and Sergot, 1986] was formulated as logic programs but not under the stable model semantics (that was the time before the invention of the stable model semantics). More extensive later developments of the event calculus have been carried out under the classical logic setting via circumscription [Shanahan, 1995; Miller and Shanahan, 1999].
In this paper we show how to embed circumscriptive event calculus into the general language of stable models, and furthermore into answer set programs under certain conditions. The reformulation of the event calculus in the stable model semantics here can be viewed as turning back the event calculus to the logic program tradition, in the modern form of answer set programming. In contrast to the SATbased approaches from [Shanahan and Witkowski, 2004; Mueller, 2004a] which turn circumscription into completion and hence cannot handle certain recursive axioms of the event calculus, we show that the ASP approach can compute the full version of the event calculus assuming that the domain is given and finite. Our work shows that the new stable model semantics is a nonmonotonic formalism as general as circumscription, with the unique advantage of having efficient ASP solvers as computational tools.
Our work is motivated by Mueller's work that is available on the webpage
http://decreasoner.sourceforge.net/csr/ecas/,
where a few example answer set programs are given to illustrate that event calculus like reasoning can be done using ASP solvers. However, this is rather a "proof of concept" and no formal justification is provided there.
2 Review of the Event Calculus
Here we follow the extensive syntax of circumscriptive event calculus described in [Mueller, 2006, Chapter 2].
We assume a many-sorted first-order language, which contains an event sort, a fluent sort, and a timepoint sort. A fluent term is a term whose sort is a fluent; an event term and a timepoint term are defined similarly. A condition is defined recursively as follows:
- A comparison (τ1 < τ2, τ1 ≤ τ2, τ1 ≥ τ2, τ1 > τ2, τ1 = τ2, τ1 ̸= τ2) for terms τ1, τ2 is a condition;
- If f is a fluent term and t is a timepoint term, then HoldsAt(f, t) and ¬HoldsAt(f, t) are conditions;
- If γ1 and γ2 are conditions, then γ1 ∧γ2 and γ1 ∨γ2 are conditions;
- If v is a variable and γ is a condition, then ∃vγ is a condition.
We will use e and ei to denote event terms, f and fi to denote fluent terms, t and ti to denote timepoint terms, and γ and γi to denote conditions. We understand formula F ↔G as shorthand for (F → G) ∧ (G → F); formula ⊤ as shorthand for ⊥ → ⊥; formula ¬F as shorthand for F → ⊥.
An event calculus domain description is defined as 1
where
- Σ is the conjunction of universal closures of axioms of the form
where each of π1 and π2 is either Initiates or Terminates;
- Δ is the conjunction of universal closures of temporal ordering formulas (comparisons between timepoint terms) and axioms of the form
where σ is Started or Stopped and each πj (1 ≤ j ≤ n) is either Initiated or Terminated, which are defined as follows:
↔ (Started(f, t)∧
Initiated(f, t) def
1 The syntax from [Mueller, 2006, Chapter 2] allows CIRC[Θ ; Ab1, . . . , Abn] where Θ is a conjunction of cancellation axioms, which we omit here for simplicity of presentation.
- Ξ is a conjunction of first-order sentences (outside the scope of circumscription) including unique name axioms, state constraints, and one of the two axiomatizations of the event calculus, EC and DEC axioms [Mueller, 2006].
As listed, circumscriptive event calculus descriptions look different from logic programs. The former may contain existential quantifiers; only some parts of the description are circumscribed on selected lists of predicates. Nonetheless, we will see that the differences are not essential.
3 Review of the General Stable Model Semantics
Under the new definition of stable models presented in [Ferraris et al., 2007] that is applicable to arbitrary first-order sentences, a logic program is identified with a universal formula, called the FOL-representation. For example, the FOLrepresentation of the program
is
The review here follows [Ferraris et al., 2010], a journal version of [Ferraris et al., 2007], in which the stable model operator was extended to distinguish between intensional and extensional predicates. Let p be a list of distinct predicate constants p1, . . . , pn, and let u be a list of distinct predicate variables u1, . . . , un of the same length as p. By u ≤ p we denote the conjunction of the formulas ∀x(ui(x) → pi(x)) for all i = 1, . . . n where x is a list of distinct object variables whose length is the same as the arity of pi. Expression u < p stands for (u ≤ p) ∧ ¬(p ≤ u).
For any first-order sentence F , expression SM[F ; p] stands for the second-order sentence 2
where p is the list p1, . . . , pn of predicate constants that are called intensional, u is a list u1, . . . , un of distinct predicate variables corresponding to p, and F ∗ (u) is defined recursively:
- pi(t)∗ = ui(t) for any tuple t of terms;
- F ∗ = F for any atomic formula F that does not contain members of p;
SM[F] defined in [Ferraris et al., 2007] is identical to SM[F ; p] where intensional predicate constants p range over all predicate constants occurring in F. Let σ(F) be the signature consisting of the object, function and predicate constants occurring in F . According to [Ferraris et al., 2007], an interpretation of σ(F) that satisfies SM[F; p] is called a stable model of F, where p is the list of all predicate constants in σ(F). If F contains at least one object constant, an Herbrand stable model of F is called an answer set of F. The answer sets of a logic program Π are defined as the answer sets of the FOL-representation of Π. It turns out that this definition, applied to the syntax of logic programs, is equivalent to the traditional definition of answer sets based on grounding and fixpoint construction [Ferraris et al., 2007].
2 Here we use expression SM[F; p] in place of SMp[F] used in [Ferraris et al., 2010].
The fact that intensional predicates p in SM[F; p] is allowed not to include some predicates occurring in the formula is not essential in view of the following proposition. By pr(F) we denote the list of all predicate constants occurring in F ; by Choice(p) we denote the conjunction of "choice formulas" ∀x(p(x) ∨¬p(x)) for all predicate constants p in p where x is a list of distinct object variables whose length is the same as the arity of p.
Proposition 1 [Ferraris et al., 2010, Theorem 2] If p is a subset of pr(F), then
is logically valid.
However, it will be convenient to describe our main results in this paper by allowing p to be partial.
4 Turning Circumscription and Event Calculus Descriptions into SM
We say that an occurrence of a predicate constant in a formula F is strictly positive if that occurrence is not in the antecedent of any implication. For instance, in (p → q) → r, only r has a strictly positive occurrence.
For any set p of predicate constants and any formulas G and H, we call implication G → H canonical (relative to p) if
- every occurrence of every predicate constant from p in G is strictly positive in G, and
- every occurrence of every predicate constant from p in H is strictly positive in H.
For instance, p(x) → q(x) is a canonical implication relative to {p, q}, while its contraposition ¬q(x) → ¬p(x) is not. Also ∃x p(x) → ∃x q(x) is a canonical implication relative to {p, q}.
By a canonical theory (relative to p) we mean the conjunction of sentences of the form
where x is a list of variables (possibly empty), and G→H is a canonical implication (relative to p). For instance,
is a canonical theory relative to {p, q}, while
is not a canonical theory relative to {p} (it becomes canonical if ∃ is replaced with ∀). Note that any quantifier-free formula (and universal formula) can be equivalently rewritten as a conjunction of canonical implications. One way is by converting to a conjunctive normal form and then rewriting each clause as a canonical implication. An arbitrary sentence that contains existential quantifiers can still be turned into a canonical theory using Skolemization, which preserves satisfiability.
The following proposition shows that, for any canonical theory, circumscription coincides with the stable model semantics.
Proposition 2 For any canonical theory F relative to p,
is logically valid.
For instance, for (3) that is canonical relative to {p, q}, formulas CIRC[(3); p, q] and SM[(3); p, q] are equivalent to each other. Also any sentence F is clearly equivalent to a canonical theory relative to ∅, so that CIRC[F; ∅] is equivalent to SM[F; ∅], which in turn is equivalent to F. On the other hand, for (4) that is not canonical relative to p, CIRC[(4); p] is not equivalent to SM[(4); p]: the only Herbrand model of the signature {p/2, a, b} that satisfies CIRC[(4); p] is {p(a, a)} while the Herbrand models of the same signature that satisfy SM[(4); p] are {p(a, a)} and {p(a, a), p(b, a)}.
It turns out that canonical theories cover a wide range of formalisms based on circumscription. Indeed, in the syntax of the event calculus described in Section 2, all axioms in Σ are already canonical relative to {Initiates,Terminates,Releases}; all axioms in Δ are already canonical relative to {Happens}. Though not described here in detail, one can check that descriptions in temporal action logics are canonical as well.
The following theorem shows a few equivalent reformulations of circumscriptive event calculus in terms of the stable model semantics. We assume that Ξ was already equivalently rewritten so that it contains no strictly positive occurrences of Initiates, Terminates, Releases, Happens (by prepending ¬¬ to such occurrences).
Theorem 1 Given an event calculus description (1), let p be the set of all predicate constants (other than equality and comparisons) occurring in it. The following theories are equivalent to each other: 3
- (a) CIRC[Σ; I, T,R] ∧CIRC[Δ;H] ∧Ξ
- (b) SM[Σ; I, T,R] ∧ SM[Δ;H] ∧Ξ ;
- (c) SM[Σ∧Δ∧Ξ; I, T,R,H] ;
- (d) SM[Σ∧Δ∧Ξ∧Choice(p \ {I, T,R,H}); p].
The equivalence between (a) and (b) is immediate from Proposition 2; the equivalence between (b) and (c) follows from the general splitting theorem for the stable model semantics [Ferraris et al., 2009]; the equivalence between (c) and (d) is immediate from Proposition 1.
5 Turning Event Calculus Descriptions into Answer Set Programs
Like answer set programs, the intensional predicates of formula (d) in Theorem 1 are all the predicates that occur in the event calculus description. On the other hand, the description contains formulas that may not be in the rule form, and may contain existential quantifiers, which are not allowed in answer set programs. In this section we provide a translation of the event calculus into answer set programs so that ASP solvers can be applied for event calculus reasoning. To facilitate the discussion, we introduce the notion of RASPL-1M programs. Syntactically similar codes are accepted by LPARSE 4 -the front-end of several ASP solvers, such as SMODELS 5 , CMODELS 6 , CLASP, and CLINGO 7 .
3 Due to lack of space, we abbreviate the names of circumscribed predicates.
5.1 RASPL-1M Programs
The definition of stable models reviewed in Section 3 can be easily extended to many-sorted first-order languages, similar to the extension of circumscription to many-sorted firstorder languages (Section 2.4 of [Lifschitz, 1994]). We define RASPL-1M programs as a special class of sentences under this extension, which are essentially a many-sorted extension of RASPL-1 programs from [Lee et al., 2008]. We assume that the underlying signature contains an integer sort and contains several built-in symbols, such as integer constants, builtin arithmetic functions, such as +, -, and comparison operators, such as <, ≤, >, ≥. Since we do not need counting aggregates in this paper, for simplicity, we will assume that every "aggregate expression" is an atom or a negated atom. That is, a rule is an expression of the form
(0 ≤ k ≤ m ≤ n ≤ p), where each Ai is an atom, possibly equality or comparison. A program is a finite list of rules.
The "choice rule" of the form {A} ← Body where A is an atom, stands for A ← Body, not not A.
The semantics of a RASPL-1M program is understood by turning it into its corresponding many-sorted FOLrepresentation, as in RASPL-1. The integer constants and built-in symbols are evaluated in the standard way, and we consider only those "standard" interpretations. The answer sets of a RASPL-1M program are the Herbrand interpretations of the signature consisting of the object, function and predicate constants occurring in the program, that satisfy SM[F ; p], where F is the FOL-representation of the program and p is the list of predicate constants occurring in F .
5.2 Turning Event Calculus Descriptions to RASPL-1M Programs
The following procedure turns an event calculus description into a RASPL-1M program. As before, we assume that Ξ was already equivalently rewritten so that it contains no strictly positive occurrences of Initiates, Terminates, Releases, Happens (by prepending ¬¬ to such occurrences).
Definition 1 (Translation EC2ASP) 1. Rewrite all the definitional axioms of the form
4 http://www.tcs.hut.fi/Software/smodels
5 http://www.tcs.hut.fi/Software/smodels .
6 http://www.cs.utexas.edu/users/tag/cmodels.html .
7 http://potassco.sourceforge.net .
- as ∀x(G → p(x)).
- For each axiom that contains existential quantifiers, repeat the following until there are no existential quantifiers:
- (a) Replace maximal negative occurrences of ∃yG(y) in the axiom by G(z) where z is a new variable.
- (b) Replace maximal positive occurrences of ∃yG(x, y) in the axiom where x is the list of all free variables of ∃yG(x, y), by the formula ¬¬pG(x) where pG is a new predicate constant, and add the axiom
- Add choice formulas ∀x(p(x) ∨ ¬p(x)) for all the predicate constants p except for those in {Initiates, Terminates, Releases, Happens} ∪ p1 ∪ p2 where
- p1 is the set of all predicate constants p considered in Step 1.
- p2 is the set of all new predicate constants pG introduced in Step 2.
- Identifying the formulas with programs with nested expressions [Lifschitz et al., 1999], apply the conversion from [Lifschitz et al., 1999] that turns programs with nested expressions into disjunctive logic programs.
For example, consider DEC5 axiom:
In order to eliminate the positive occurrence of the existential quantifier in the formula, we apply Step 2(b), introducing the formula
and replacing (7) with 8
Step 4 turns these formulas into rules
Due to lack of space, instead of presenting a formal proof, we attempt to give the idea of the translation. Step 1 can be dropped without affecting the correctness, but keeping it yields a simpler program. Step 2 eliminates existential quantifiers. Step 2(a) is one of the steps in prenex normal form conversion. Eliminating positive occurrences of existential quantifiers using new predicates as in Step 2(b) works only if G contains no strictly positive occurrences of predicates to minimize, which is the case with the syntax of the event calculus (Section 2). The following proposition justifies this step of eliminating existential quantifiers.
8 The proof of Theorem 2 uses the fact that ¬¬ is put in front of pG(x) in Step 2(b). Indeed, the translation would be incorrect if ¬¬ was simply dropped.
Proposition 3 Let F be a sentence, let p be a list of distinct predicate constants and let q be a predicate constant that does not belong to the signature of F . For any occurrence of a subformula ∃xG(x, y) of F where y is the list of all free variables in ∃xG(x, y), let F ′ be the formula obtained from F by replacing that occurrence with ¬¬q(y). If G(x, y) contains no strictly positive occurrences of predicate constants from p, then the models of
restricted to the signature of F are precisely the models of SM[F ; p].
Alternatively, if the domain is known and finite, existential quantifiers can be replaced with multiple disjunctions. But this translation is not modular, and such multiple disjunctions need to be updated when the domain changes. Also one would imagine Skolemization, but there is a problem since answer sets are Herbrand models. Consider
which asserts that p is a singleton. If Step 2 was replaced with Skolemization, the translation would yield RASPL-1M program
(b is a Skolem constant), which has no answer sets. Step 3 is to expand the list of intensional predicates to cover all the predicates occurring in the description, as in Proposition 1. The transformation until Step 3 yields a set of implications where each antecedent and consequent is formed from atoms by allowing ¬, ∧, and ∨ nested arbitrarily, similar to the syntax of a program with nested expressions from [Lifschitz et al., 1999]. The well-known transformation that turns a program with nested expressions into a disjunctive logic program from [Lifschitz et al., 1999] can be applied to turn these set of implications into a RASPL-1M program.
Theorem 2 Let T be an event calculus domain description, let σ be the signature consisting of the object, function and predicate constants occurring in T, and let Π be a RASPL-1M program obtained by applying the translation EC2ASP to T. The stable models of Π restricted to σ (disregarding all new predicate constants pG introduced in Step 2 (b)) are precisely the models of T of signature σ.
Turning the resulting RASPL-1M program further into the input language of LPARSE requires minor rewriting, such as moving equality or negated atoms to the body (e.g., not p(t) ← . . . into ← . . . , p(t)), and adding domain predicates in the body for all variables occurring in the rule. 9
6 Experiments
We have implemented a prototype of an ASP-based event calculus reasoner called ECASP, based on the translation in Section 5.2. The implementation, along with the results of our experiments are available at the ECASP homepage:
9 If we are only interested in answer sets, rather than (nonHerbrand) stable models (recall the distinction described in Section 3), UNA axioms can be dropped.
http://reasoning.eas.asu.edu/ecasp .
The system turns an event calculus description into the input language of LPARSE.
6.1 Comparison with SAT-based Approach
The Discrete Event Calculus (DEC) reasoner 10 is an implementation of the event calculus written by Erik Mueller [2004b]. The system reduces event calculus reasoning into satisfiability checking by turning circumscription into predicate completion ([Lifschitz, 1994, Proposition 2]) and then finds the models using SAT solvers. Thanks to the availability of efficient SAT solvers, the system outperforms traditional abductive event calculus planners. Compared to another similar approach in [Shanahan and Witkowski, 2004], the system handles a wider range of reasoning tasks. Out of the 14 benchmark problems from [Shanahan, 1997; 1999], the DEC reasoner was shown to be able to handle 11 of them, while the other approach can handle only one [Mueller, 2004a].
However, since circumscription is not always reducible to completion, the DEC reasoner is unable to handle effect constraints, disjunctive event axioms and compound events. For example, it is well known that the following effect constraints that describe the indirect effects of the agent's walking on the objects that he is holding cannot be handled by predicate completion.
On the other hand, the rule corresponding to this formula can be directly handled by answer set solvers. Indeed, our implementation can handle all event calculus axioms reviewed in Section 2, and solved all 14 benchmark problems.
We compared the performance of (i) the DEC reasoner (v 1.0) running RELSAT (v 2.0) with (ii) ECASP with LPARSE (v 1.1.1)+CMODELS (v 3.75) running RELSAT (v 2.0), (iii) ECASP with GRINGO (v 2.0.2) +CLASP (v 1.1.3) (CLASPD (v 1.1) used for disjunctive programs), and (iv) ECASP with CLINGO (v 2.0.2). ECASP turns the input in the language of the DEC reasoner into the language of LPARSE. Both LPARSE and GRINGO turn the result into a ground ASP program. CMODELS turns this ground program into a set of clauses and then invokes a SAT solver to compute answer sets, while CLASP computes answer sets using the techniques similar to those used in SAT solvers but without generating clauses. CLINGO is a system that combines GRINGO and CLASP in a monolithic way. We have tested many examples and some notable differences are reported in the table. The first five examples are part of the benchmark problems from [Shanahan, 1997; 1999]. The next four are from [Mueller, 2006]. (We increased timepoints to see more notable differences.) All experiments were done on a Pentium machine with 3.00 GHz CPU and 2GB RAM running 64 bit Linux. The reported run times were obtained using the Linux time command, except for the DEC reasoner for which we recorded the times reported by the system. This was to avoid including the time spent by the DEC reasoner in producing output in a neat format. For the DEC reasoner, the times in parentheses are "(encoding time + SAT solving time)." For the others, they are the times spent by each of the grounder and the solver. CMODELS time includes the time spent in converting the ground program generated by LPARSE into a set of clauses, and calling the SAT solver. The time spent by ECASP in translating an event calculus description into a logic program (with variables) is negligible for these problems. '-' denotes that the system cannot solve the example due to the limited expressivity. For instance, BusRide includes disjunctive event axioms, which results in a disjunctive program that cannot be handled by CLINGO.
10 http://decreasoner.sourceforge.net .
| Problem (max. step) | DEC reasoner | ECASP w/ LPA + CMO | ECASP w/ GRI + CLA | ECASP w/ CLI |
|---|---|---|---|---|
| BusRide (15) | - | 0.48 (0.42+0.06) A:156/R:7899 C:188 | 0.04 (0.03+0.01) A:733/R:3428 | - |
| Commuter (15) | - | 498.11 (447.50+50.61) A:4913/R:7383943 C:4952 | 44.42 (37.86 + 6.56) A:24698/R:5381620 | 28.79 |
| Kitchen Sink (25) | 71.10 (70.70+0.40) A:1014/C:12109 | 43.17 (37.17+6.00) A:123452/R:482018 C:0 | 2.47 (1.72+0.75) A:114968/R:179195 | 2.03 |
| Thielscher Circuit (20) | 13.9 (13.6+0.3) A:5138/C:16122 | 0.53 (0.48+0.05) A:4336/R:11399 C:0 | 0.07 (0.05+0.02) A:1743/R:5669 | 0.05 |
| Walking Turkey (15) | - | 0.05 (0.04+0.01) A:556/R:701 C:0 | 0.04 (0.01+0.03) A:364/R:503 | 0.01 |
| Falling w/ AntiTraj (15) | 270.2 (269.3+0.9) A:416/C:3056 | 0.74 (0.66+0.08) A:5757/R:10480 C:0 | 0.10 (0.08+0.02) A:4121/R:7820 | 0.08 |
| Falling w/ Events (25) | 107.70 (107.50+0.20) A:1092/C:12351 | 34.77 (30.99+3.78) A:1197/R:390319 C:1393 | 2.90 (2.01+0.89) A:139995/R:208282 | 2.32 |
| HotAir Baloon (15) | 61.10 (61.10+0.00) A:288/C:1163 | 0.19 (0.16+0.03) A:489/R:2958 C:678 | 0.04 (0.03+0.01) A:1137/R:1909 | 0.03 |
| Telephone1 (40) | 18.20 (17.70+0.50) A:5419/C:41590 | 1.70 (1.51+0.19) A:23978/R:29841 C:0 | 0.31 (0.26+0.05) A:21333/R:27037 | 0.25 |
Overall, ECASP with CLINGO was the clear winner, followed by ECASP with GRINGO+CLASP. Though the DEC reasoner and CMODELS call the same SAT solver RELSAT, the number of atoms produced by the DEC reasoner is in general much smaller. This is because the DEC reasoner adopts an encoding method (that is based on predicate completion) which avoids a large number of ground instances of atoms such as Initiates(e, f, t), Terminates(e, f, t), and Releases(e, f, t). On the other hand, in several examples, the number of clauses generated by CMODELS is 0, which means that the answer sets were found without calling the SAT solver. This is because for these examples the unique answer set coincides with the well-founded model, which is efficiently computed by CMODELS without calling SAT solvers. Out of the 14 benchmark examples from [Shanahan, 1997; 1999], eight of them belong to this case. Another reason for the good performance of the ASP approach is the efficient grounding methods implemented in LPARSE and GRINGO, which are drastically faster than that of the DEC reasoner.
6.2 Comparison withMueller's ASP Approach
Though no general method was given in Mueller's ASP approach on the webpage cited in the introduction, we observe a few notable differences. One difference is that no choice rules were used in Mueller's examples so that all predicates are to be minimized, which resulted in considering prediction problems only. On the other hand, our approach can handle planning and postdiction problems as well. To solve a planning problem, Happens should be exempt from minimization in logic programs, which can be achieved by adding choice rules for it. More examples can be found from the ECASP homepage.
7 Conclusion
The possibility of embedding circumscriptive theories into the new language of stable models indicates that the latter is as general as the former, and that ASP is a viable approach to computing circumscriptive theories. We observe that the ASP approach can compute the full version of the event calculus, assuming that the domain is known and finite. Thanks to remarkable progress of ASP solvers in computing stable models, together with efficient grounding methods, our experiments showed promising results.
More synergies are expected from the relationship between the event calculus and ASP. In addition to action languages, circumscriptive event calculus can now be regarded as another useful high level action formalism for ASP, addressing some issues that are not well regarded in the context of action languages, such as describing continuous change and hierarchical planning. Embedding both the event calculus and action languages into ASP may be useful in comparing these high level formalisms and even merging the descriptions written in each of them.
Acknowledgements
We are grateful to Vladimir Lifschitz and Erik Mueller for useful comments on the idea of this paper and several pointers to earlier work. We are also grateful to anonymous referees for their useful comments. The authors were partially supported by the National Science Foundation under Grant IIS-0839821.
@inproceedings{ijcai2009p141,
title = {Circumscriptive Event Calculus as Answer Set Programming},
author = {Kim, Tae-Won and Lee, Joohyung and Palla, Ravi},
booktitle = {Proceedings of the Twenty-First International Joint Conference on
Artificial Intelligence, {IJCAI-09}},
publisher = {International Joint Conferences on Artificial Intelligence},
editor = {Craig Boutilier},
pages = {823--828},
year = {2009},
url = {https://ijcai.org/proceedings/2009/141},
}
TY - CPAPER TI - Circumscriptive Event Calculus as Answer Set Programming AU - Kim, Tae-Won AU - Lee, Joohyung AU - Palla, Ravi T2 - Proceedings of the Twenty-First International Joint Conference on Artificial Intelligence, IJCAI-09 PB - International Joint Conferences on Artificial Intelligence PY - 2009 SP - 823 EP - 828 UR - https://ijcai.org/proceedings/2009/141 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: