Getting Started
In this section you will find the instructions for running a minimal example application of Phenesthe. For more complicated applications please read the documentation section.
Running Phenesthe on the included ‘Alice & Bob’ sample
The samples/alice_and_bob/
folder includes an example usage of Phenesthe. The definitions.prolog
contains definitions of temporal phenomena, the narrative.prolog
contains the input phenomena i.e., the input and run.prolog
loads Phenesthe and preprocesses the phenomena definitions.
-
Have a look at the phenomena definitions in
definitions.prolog
and the narrative atnarrative.prolog
in thesamples/alice_and_bob
folder. - Load
run.prolog
in SWI-Prolog. Callingquery(5)
loads the input phenomena that arrived until ‘5’ and performs a recognition query given that time is ‘5’.cd samples/alice_and_bob swipl -l run.prolog ?- query(5). % asserts the input (until t=5) and performs recognition of phenomena at t=5
- In order to print the recognised events you will have to use the
event_instants(X,T)
predicate. Callingevent_instants(X,T)
will print a user defined event (X) and the instant list (T) at which it’s true. For example the eventunchanged(bob)
is true at the instant(s) included in listT=[3]
.?- event_instants(X,T). % outputs the recognised events X = unchanged(bob), T = [3] ; ...
state_intervals(X,I)
outputs user defined states (X) and the interval list (I) at which they hold. For example the statepossess(alice,wallet)
holds for the interval(s) included in listI = [[4, inf]]
.?- state_intervals(X,I). % outputs the recognised states X = possess(alice, wallet), I = [[4, inf]] ; ...
dynamic_phenomena_intervals(X,I)
outputs the user defined dynamic temporal phenomena (X) and the intervals (I) at which they hold. For example the statedrops_objects_when_hungry(bob)
holds for the interval(s) included in listI = [[1, inf]]
.?- dynamic_phenomenon_intervals(X,I). % outputs the recognised dynamic phenomena X = drops_objects_when_hungry(bob), I = [[1, inf]].