Next: 11.4 Useful Predicates
Up: 11.3 CHR in XSB
Previous: 11.3.1 Embedding in XSB
Contents
Index
Files containing CHR rules are required to have a .chr
extension, and their compilation has two steps. First the .chr
file is preprocessed into a .P file containing XSB code. This
.P file can then be loaded in the XSB emulator and used
normally.
- load_chr(File)
- chr_pp
load_chr/1 takes as input a file name whose extension is either
.chr or that has no extension. It preprocesses File if
the times of the CHR rule file is newer than that of the corresponding
Prolog file, and then consults the Prolog file.
- preprocess(File,PFile)
- chr_pp
preprocess/2 takes as input a file name whose extension is
either .chr or that has no extension. It preprocesses File if the times of the CHR rule file is newer than that of the
corresponding Prolog file, but does not consult the Prolog file.
Terrance Swift
2007-10-06