Constraint Answer Set Programming without Grounding and its Applications

Extending Datalog/ASP with constraints (CASP) enhances its expressiveness and performance but it is not straightforward as the grounding phase removes variables and the links among them. We incorporate constraints into s(ASP), a goal-directed, top-down execution model which implements predicate answer set programming without grounding. The resulting model, s(CASP), can constrain variables that, as in CLP, are kept during the execution and in the answer sets. We show the enhanced expressiveness of s(CASP) w.r.t. other CASP systems, through a non-trivial example of modeling the event calculus.