| Did you know ... | Search Documentation: |
| Pack scasp -- examples/dyncall/pas/README.md |
s(CASP) as embedded languageThis demo is created from PAS files from http://www.cliplab.org/papers/sCASP-ICLP2020/, the data accompagnying the paper "Justifications for Goal-Directed Constraint Answer Set Programming" by JoaquĆn Arias at all, ICLP 2020.
It provides a modular implementation of the case. For both the
PAS_rules.pl and PAS_guide.pl we merged the .pred version and
declared them to be modules connected using normal Prolog module
imported and export declarations. The PAS_patient.pl file defines the
patient data as a set of dynamic predicates. The file PAS_case.pl shows
how the files can be used to reason about s(CASP) cases data
dynamically. The system allows for multiple threads to query the same
set of rules using different patient data.
swipl PAS_case.pl ?- solve(chose(ace_inhibitors), 1).
swipl PAS_server.pl ?- server(8080).
And then connect to http://localhost:8080/
s(CASP) dynamic module translates -Name(Args) into '-Name'(Args).
The alternative would be to have all classical negation clauses to
be clauses of the same -/1 predicate. This causes normal Prolog
program analysis to fail and makes it impossible to import/export
classical negation.p(X) :- -q(X) into '-p'(X) :- '-q'(X).module(Name, Exports).
directive, but we can only do that if library(scasp) is loaded
before loading any scasp modules. We could provide
scasp_export/1.