This is the cl-prolog2 Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:17:42 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-prolog2
Common Interface to the ISO prolog implementations from Common Lisp
Masataro Asai
MIT
0.1
trivia
(system).
alexandria
(system).
trivia.quasiquote
(system).
external-program
(system).
trivial-garbage
(system).
package.lisp
(file).
compiler-macro.lisp
(file).
printers.lisp
(file).
interpreter.lisp
(file).
util.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-prolog2/cl-prolog2.asd
cl-prolog2/package.lisp
cl-prolog2/compiler-macro.lisp
cl-prolog2/printers.lisp
cl-prolog2/interpreter.lisp
cl-prolog2/util.lisp
cl-prolog2/compiler-macro.lisp
package.lisp
(file).
cl-prolog2
(system).
%print-rule
(compiler macro).
constant-fold-printer
(function).
print-commas
(compiler macro).
print-semicolons
(compiler macro).
print-term
(compiler macro).
cl-prolog2/printers.lisp
compiler-macro.lisp
(file).
cl-prolog2
(system).
%print-rule
(function).
print-commas
(function).
print-semicolons
(function).
print-term
(function).
cl-prolog2/interpreter.lisp
printers.lisp
(file).
cl-prolog2
(system).
*debug-prolog*
(special variable).
print-rule
(function).
run-command-with-debug-print
(function).
run-prolog
(generic function).
with-temp
(macro).
cl-prolog2/util.lisp
interpreter.lisp
(file).
cl-prolog2
(system).
print-sexp
(function).
sort-clauses
(function).
Packages are listed by definition order.
cl-prolog2.impl
alexandria
.
cl-prolog2
.
common-lisp
.
trivia.level2
.
print-rule
(function).
run-command-with-debug-print
(function).
with-temp
(macro).
%print-rule
(compiler macro).
%print-rule
(function).
constant-fold-printer
(function).
print-commas
(compiler macro).
print-commas
(function).
print-semicolons
(compiler macro).
print-semicolons
(function).
print-term
(compiler macro).
print-term
(function).
cl-prolog2
*debug-prolog*
(special variable).
print-sexp
(function).
run-prolog
(generic function).
sort-clauses
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Flag (0-3) for debugging the input to the prolog interpreter.
0 : disabled.
>=1: print the command line
>=2: print the prolog output
3 : most verbose. print misc messages.
Create a temporary file, then remove the file by unwind-protect.
Most arguments are analogous to mktemp.
When DIRECTORY is non-nil, creates a directory instead.
DEBUG is a form.
When evaluated to non-nil, it does not remove the directory so that you can investigate what happened inside the directory.
It may be evaluated multiple times.
This function returns a cl-prolog2 program for a prolog rule print-sexp/1,
which prints a prolog term in a SEXP form.
print-sexp prints atoms/numbers as atoms/numbers, a term as a list, and a list as a list.
To be used with SWI, SWI should be non-nil due to the implementation-specific matter.
(It uses compound_name_arguments/2 instead of =../2 for printing a term.)
usage:
(run-prolog ‘((:- main
(print-sexp (parent-of luke anakin))
halt)
(:- (initialization main))
,@(print-sexp :swi t))
:swi :output :string)
;; -> "(parent-of luke anakin)", NIL, 0
Destructively sort the rules by dictionary ordering.
Useful for avoiding noncontiguous-clauses errors (rules for the same clauses are not written adjacently).
Facts (rules without conditions) are given precedence to the standard rules.
Sorting is stable.
However, since it alters the ordering of the rules and Prolog checks the rules from top-to-bottom,
it may corrupt the program especially when cut operator (!) is involved.
Jump to: | %
C F G M P R S W |
---|
Jump to: | %
C F G M P R S W |
---|
Jump to: | *
S |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
* | |||
*debug-prolog* : | Public special variables | ||
| |||
S | |||
Special Variable, *debug-prolog* : | Public special variables | ||
|
Jump to: | *
S |
---|
Jump to: | C F I P S U |
---|
Jump to: | C F I P S U |
---|