| Did you know ... | Search Documentation: |
| Pack scasp -- examples/benchmark_EventCalculus/lopstr19/README.md |
In this repository you will find the benchmark and instruction to reproduce the evaluation and example presented in the paper "Modelling and Reasoning in Event Calculus using Goal-Directed Constraint Answer Set Programming".
The file [bec_theory.pl](event-calculus/bec_theory.pl) contains the translation of the Basic Event Calculus theory.
This example is based on the example 14 in [Mueller, 2014b] and reason about turning on and off a light.
There are four files implementing different features:
go_bec_light_01
to check the behaviour of the rest of files execute the script:
go_bec_light_02_03_04
The scripts are located [here](event-calculus/scripts/). Note that there are the queries that success returning a valid partial model while others do not. For each of the queries there is a comment which explain the expected result.
Additionally you can execute the example invoking s(CASP) directly from the terminal. As an example let us execute s(CASP) asking for the justification tree with (note that it will execute the last uncommented query that appear in the file):
scasp -j bec_light_01.pl
This example is based on an example from [Shanahan, 1999] where a vessel is filled with water.
There are four files implementing different features:
go_bec_tap_01_overflow go_bec_tap_02_no_overflow go_bec_tap_03_two_models go_bec_tap_04_abducible_infer_event_time
Note that there are the queries that success returning a valid partial model while others do not. For each of the queries there is a comment which explain the expected result.
Ciao is a programming language that builds up from a logic-based simple kernel, and is designed to be extensible and modular. It is available at http://ciao-lang.org. Its supports:
To begin the interactive installation type the following one-liner in a sh-compatible terminal:
curl https://ciao-lang.org/boot -sSfL | sh
Do not forget to rerun the bashrc file `source ~/.bashrc`. If you have any problem go here for details.
s(CASP)
s(CASP) is an implementation of the stable model semantics of
constraint logic programming. Unlike similar systems, it does not
employ any form of grounding. This allows s(CASP) to execute programs
that are not finitely groundable, including those which make use of
lists and terms. It is available here.
Once you have Ciao working in your computer to install s(CASP) type the following one-liner in a sh-compatible terminal:
ciao get gitlab.software.imdea.org/ciao-lang/sCASP
If you have any problem go here for details.
s(CASP) against s(ASP)
In order to compare the run time of s(CASP) versus s(ASP) in the folder aux-sasp there are four files:
s(ASP) with a step-wise of 0.5 to discretize the time domain from 0 to 5.s(ASP) with a step-wise of 0.25 to discretize the time domain from 0 to 5.s(ASP).
s(ASP) is available here. We used the version 1.0.7.
In the scripts folder for s(CASP) (located [here](event-calculus/scripts/)) there is the script to run the benchmarks in the paper computing the time for s(CAPS):
s(CASP).s(CASP) against clingo
In order to compare the run time of s(CASP) versus clingo in the
folder sCASP-clingo there are several programs and scripts. We use
extension `.pl` for s(CASP), the extension `.clingo` for clingo 5.2.0
and `.e` for the encoding using F2LP.
In the folder [scripts](sCASP-clingo/scripts/) you can find the files used to run the benchmarks: