I am trying to replicate the worked Event Calculus example from the paper:
Modeling and Verification of Timed Systems with the Event Calculus and s(CASP)
Sarat Chandra Varanasi, Brendan Hall, Joaquín Arias, Elmer Salazar, Fang Li, Kinjal Basu, Kevin Driscoll and Gopal Gupta (CEUR Workshop Proceedings (CEUR-WS.org)
https://ceur-ws.org/Vol-2970/gdepaper2.pdf
It is a nice worked example which seems to contain all necessary code. I have replicated the results using Ciao sCASP and am hoping to replicate it using the swi-prolog sCASP library (and web UI).
The sources contain the following clause (and similar) :
% conditions for controller to detect train is in gate area
happens(in, T) :-
holdsAt(position(X1), T1),
holdsAt(position(X2), T2),
X1 #< 10,
X2 #>= 10,
sampling_window(W),
T2 #< T1 + W,
T2 #> T1,
inf(T2, T).
As one would expect, I include:
:- use_module(library(scasp)).
However when I run this I get errors:
?- ? holdsAt(passing, T).
ERROR: No permission to scasp procedure `nf_q:wait_linear/3'
ERROR: In:
ERROR: [42] throw(error(permission_error(scasp,procedure,...),_1114))
ERROR: [39] scasp_dyncall:predicate_calls(bv_q:inf(_1164,_1166,_1168,_1170),_1154) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:331
ERROR: [38] findall_loop(_1194,scasp_dyncall:predicate_calls(...,_1212),_1198,[]) at /usr/lib/swi-prolog/boot/bags.pl:109
ERROR: [37] cleanup_bag('$bags':findall_loop(_1248,...,_1252,[]),'$bags':'$destroy_findall_bag') at /usr/lib/swi-prolog/boot/bags.pl:106
ERROR: [34] scasp_dyncall:predicate_callees_nc(bv_q:inf(_1302,_1304,_1306,_1308),_1292) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:325
ERROR: [33] scasp_dyncall:predicate_callees(bv_q:inf(_1350,_1352,_1354,_1356),_1340) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:319
ERROR: [32] scasp_dyncall:callee_closure([bv_q: ...,...|...],t(user: ...,true,<,t(...,true,<,...,...),t(...,true,>,...,...)),[bv_q: ...,...|...],_1392) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:263
ERROR: [17] scasp_dyncall:callee_graph([user: ...,...],_1502) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:254
ERROR: [15] scasp_dyncall:scasp_query_clauses(user:holdsAt(passing,_1564),_1552) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:193
ERROR: [14] scasp_dyncall:scasp(user:holdsAt(passing,_1608),[]) at /home/sam/.local/share/swi-prolog/pack/scasp/prolog/scasp/dyncall.pl:123
ERROR: [13] '<meta-call>'(scasp:(...;false)) <foreign>
ERROR: [12] setup_call_cleanup(scasp:set_scasp_mode(unicode,false),scasp:(...;false),scasp:set_scasp_mode(false,false)) at /usr/lib/swi-prolog/boot/init.pl:680
ERROR: [9] toplevel_call(user:user: ...) at /usr/lib/swi-prolog/boot/toplevel.pl:1173
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
Exception: (37) cleanup_bag('$bags':findall_loop(_930, scasp_dyncall:predicate_calls(bv_q:inf(_912, _914, _916, _918), _930), _938, []), '$bags':'$destroy_findall_bag') ? abort
% Execution Aborted
How can I bring the CLP(Q) inf/2
into use in the same way as #<
and friends?
Many thanks,
Steve