Event Calculus Answer Set Programming



!!!! This is a prototype implementation and is no longer being updated. An alternative tool for event calculus answer set programming is F2LP. F2LP is being actively updated and the current version has been tested on many event calculus examples, including the benchmark problems.!!!!

The following files are logic program encodings of certain domain descriptions. These have been directly downloaded from Eric Mueller's page:

1. EC/DEC Sleep_Mueller.lp

2. EC/DEC KitchenSink_Mueller.lp

3. EC/DEC PickUp_Mueller.lp


The Discrete Event Calculus (DEC) Reasoner is a tool for event calculus reasoning, implemented by Erik Mueller ( The *.e files given below are event calculus descriptions (in the input language of the DEC reasoner) corresponding to the above files and the *.lp files are the logic programs obtained by applying EC2ASP.

1. EC/DEC Sleep.e, EC/DEC Sleep.lp

2. EC/DEC KitchenSink.e, EC/DEC KitchenSink.lp

3. EC/DEC PickUp.e, EC/DEC PickUp.lp


Additional Examples for different forms of reasoning:

1. EC/DEC Sleep_Planning.e, EC/DEC Sleep_Planning.lp. This example illustrates the need for choice rules for Happens.

2. EC/DEC Sleep_Postdiction.e, EC/DEC Sleep_Postdiction.lp

3. EC/DEC Pendulum_Prediction.e, EC/DEC Pendulum_Prediction.lp


The files given below are the logic program encodings of the EC axioms, DEC axioms, Causal Constraints, and EC' axioms (for events with duration) obtained by applying EC2ASP.

EC.lp, DEC.lp, ECCausal.lp, EC_dur.lp.

The EC and DEC axioms by Erik Mueller are EC_Mueller.lp and DEC_Mueller.lp.

To run the encodings by Erik Mueller, refer


Using ECASP:

1. Download  binary files ‘ecasp’ and ‘format-output’ using the download link. 

2. To obtain the logic program encoding of an event calculus description

    domain_description.e, run ‘ecasp’ with ‘domain_description.e’ as the argument.

    This creates the file domain_description.lp.

3-1. For a domain description with causal constraints, use

    lparse -c maxstep=N DEC.lp [EC.lp] ECCausal.lp domain_description.lp | cmodels n |


3-2. For a domain description with durative events (ex: compound events), use

    lparse -c maxstep=N EC_dur.lp domain_description.lp | cmodels n | format-output

3-3. For other domain descriptions, use

    lparse -c maxstep=N DEC.lp [EC.lp] domain_description.lp | cmodels n | format-output


Replace N above by the maximum time point. Replace n by the number of answer sets you want to be displayed. Replacing n by 0 displays all the answer sets.

Any grounder that accepts Lparse input language (for ex: lparse or gringo) can be used in place of lparse and any solver that accepts Lparse output (smodels, clasp, claspD, etc.) can be used in place of cmodels. Please note that logic program encodings of domain descriptions can contain disjunctive rules which cannot be handled by some solvers (smodels, clasp, clingo, etc).  

[Contact Information]


Joolee(at), ravi.palla(at), Tae-Won.Kim(at)


School of Computing and Informatics

Arizona State University

Tempe, AZ 85281





ASP Based Event Calculus Reasoning