1:- use_package(assertions). 2 3:- doc(filetype, documentation). 4 5:- doc(author, "Joaquin Arias"). 6 7:- doc(title,"Usage"). 8 9:- doc(module, " 10 11@section{Help} 12 13@begin{verbatim} 14Usage: scasp [options] InputFile(s) 15@end{verbatim} 16 17s(CASP) computes stable models of ungrounded normal logic programs. 18Command-line switches are case-sensitive! 19 20@begin{verbatim} 21 General Options: 22 23 -h, -?, --help Print this help message and terminate. 24 -i, --interactive Run in user / interactive mode. 25 -a, --auto Run in automatic mode (no user interaction). 26 -sN, -nN Compute N answer sets, where N >= 0. 0 for all. 27 -v, --verbose Enable verbose progress messages. 28 -j, --justification Print proof tree for each solution. 29 -d0 Print the program translated (with duals and nmr_check). 30@end{verbatim} 31 32 33@section{Examples of use} 34 35To obtain one model of the program (i.e. test.pl) 36@begin{verbatim} 37 $ ./scasp test.pl 38 Answer: 1 39 { q(?Var6), not p(?Var6) } 40@end{verbatim} 41 42To obtain all the models (answers) of test.pl 43@begin{verbatim} 44 $ ./scasp -s0 test.pl 45@end{verbatim} 46 47To obtain 5 answers of test.pl 48@begin{verbatim} 49 $ ./scasp -s5 test.pl 50@end{verbatim} 51 52To print the 'translation' of the code (with duals predicates and 53check-rules) 54@begin{verbatim} 55 $ ./scasp -d0 test.pl 56@end{verbatim} 57 58To use scasp with its iterative mode: 59@begin{verbatim} 60 $ ./scasp -i test.pl 61 ?- p(X). 62 { p(?Var6), not q(?Var6) } ? ; 63 64 false. 65 ?- q(X). 66 { q(?Var6), not p(?Var6) } ? ; 67 68 false. 69 ?- halt. 70@end{verbatim} 71 72The example program @file{test.pl} (include the query in order to be use without 73iterative mode) is: 74 75@begin{verbatim} 76 p(X) :- not q(X). 77 q(X) :- not p(X). 78 79 ?- q(X). 80@end{verbatim} 81 82").