I’m considering using the s(CASP) pack for rules-based fault diagnosis. However I’m wondering what the current status is - the docs seem kinda sparse, the only comprehensive ones I’ve been able to find are on the SWISH site at https://swish.swi-prolog.org/pldoc/pack/sCASP/ and it looks like the main development is elsewhere? Also, many of the examples don’t seem to work any more?
I’ll be using it internally so it will be fine as long as it will keep working on future SWI versions.
Another question: In some of the examples I see things like this:
#pred wounded_bird(X) :: '@(X) is a wounded bird'.
wounded_bird(john). % john is wounded
but I’ve not been able to find any documentation for what #pred does, nor for any of the similar-looking things such as #abducible, #show and so on. What do they do?
I’m also having problems calling out to Prolog from SCASP, the README says to use the prolog/1 predicate but I can’t get it to work:
:- attach_packs(packs, [replace(true)]).
:- use_module(library(scasp)).
:- use_module(library(scasp/embed)).
is_even(X) :-
0 is X mod 2.
:- begin_scasp(alan).
:- prolog (is_even/1) as opaque.
ok(X) :-
candidate(X),
is_even(X).
candidate(1).
candidate(2).
candidate(3).
:- end_scasp.
Results in:
Warning: scasp.pl:20:
Warning: scasp_predicate `(prolog)/1' does not exist
Warning: scasp.pl:20:
Warning: scasp_predicate `is_even/1' does not exist
Thanks.