Prolog code (source or object code) can be loaded by submitting normal Prolog load predicates as queries. Note that SICStus uses slashes '/' in file names where Windows uses backslash '\'.
Example:
PrologQueryCutFail("load_files('d:/xxx/myfile')")
To facilitate the location of Prolog
files, two clauses of user:file_search_path/2
are predefined:
app
That is, you can load the file myfile
located in the same
directory as the project/executable, issuing the query
PrologQueryCutFail("load_files(app(myfile))")
.
vbsp
vbsp.dll
file.
That is, you can use the query
PrologQueryCutFail("load_files(vbsp(myfile))")
to load
the file myfile
if it is located in the same directory as
vbsp.dll
.
Note that, as of SICStus 3.10, you can use the application
and
runtime
file search aliases to achive a similar effect.