... hProlog1.1
In Version 3.0, the implementation of attributed variables is compatible with hProlog. This allows the programmer more control over structuring attributes than our previous implementation, whose API was modeled on SICStus.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... patterns 1.2
Despite the similar name, this method of delaying is conceptually different from SLG DELAYING discussed in Volume 1 of this manual, which is used for resolving cycles of dependencies in computing the well-founded semantics, and is not based on the state of instantiation of a term.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...ground(Term) 1.3
To use ground/1 in the condition, it must be imported into the file where it is used.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... executed 1.4
In Version 3.0, unifiable/3 is written as a Prolog predicate and so is slower than many of the predicates in this section.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... output 1.5
The format family of predicates is due to Quintus Prolog, by way of Ciao.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...chap-posix 1.6
Not all string manipulation predicates have been made thread-safe in Version 3.0.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...open/41.7
XSB does not convert pipe file descriptors into I/O streams automatically. Because of the way XSB I/O streams are represented, they are not inherited by the child process and they do not make sense to the child process (especially if the child is not another XSB process). Therefore, we must pass the child processes an OS file descriptor instead. The child then converts these descriptor into XSB I/O streams.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... profiling 1.8
The profiling library should only be used with the single-threaded engine in Version 3.0.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... variable1.9
Thus the list of variable names returned by read_term/{2,3} can be used directly in Dict.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... 1) 2.1
In addition, if a C module compiled by the single-threaded XSB engine is loaded by the multi-threaded engine, it will be recompiled, and vice-versa.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... also 2.2
In a 64-bit platform, users may override the default compilation of XSB by the configuration options -with-bits32 or -with-bits64. If either of these options is used, the default compilation options will pass along the appropriate memory options. If XSB is compiled with a memory option that is not the default of the platform, and if an externally compiled C file is to be loaded into XSB, it must be ensured that the C file has been compiled with the appropriate memory options: -m32 or -m64 if gcc is used.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... module2.3
Mac OSX users using 10.3 or above should have the environment variable MACOSX_DEPLOYMENT_TARGET set to 10.3 so that the compiler generates code that can be dynamically linked by XSB. This should be done automatically by XSB on initialization, but it is useful to check if encountering problems.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... passing 2.4
The inclusion of context parameters changes the lower-level interface for Version 3.0. C files written for previous versions of XSB continue to work properly for the single-threaded engine in, but will not work properly for the multi-threaded engine.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... provided 2.5
The fast float configuration option does represents floating point values as directly tagged single precision values rather than as indirectly tagged double precision values. Speed increases in arithmetic can be gained from this optimization, in exchange for significant precision loss on floating point numbers.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... file 2.6
for Windows, please see special instructions in Section 2.5.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... used 2.7
In Version 3.0, a foreign module that uses the higher-level C interface must be explicitly consulted before it can be used.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... threads 3.1
XSB's threading model is based on POSIX threads, which can be called in Windows through a variety of POSIX APIs - see Volume 1 chapter 8 Multi-threaded Programming in XSB.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... language 3.2
In previous versions of XSB, initialization from the C level required a -n option to be passed. This is no longer required.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... xsb_get_error_message() 3.3
Most XSB errors are handled in this manner when XSB is called through its API. A few errors will print directly to stderr and some XSB warnings will print to stdwarn which upon startup is dup-ed to stderr.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... flexibility 3.4
For the sake of brevity, we sometimes abuse notation and do not always distinguish between thread-contexts and their pointers.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... xsb_get_error_message() 3.5
Note that causing XSB's main thread to exit will cause the entire process to exit - not just XSB.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... files 3.6
The variable CFLAGS is needed in the linking stage in order to ensure that the appropriate memory option is passed if XSB is configured -with-bits32 or -with-bits64 to override the default on a 64-bit platform.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...  4.1
This interface was partly based on the XSB-Oracle Interface by Hassan Davulcu, Ernie Johnson and Terrance Swift.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... level 4.2
This predicate is obsolescent and odbc_import/{2,3,4} should be used instead.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... dictionaries 4.3
Users of Quintus Prolog may note that these predicates are all PRODBI compatible.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... concurrently 5.1
In Version 3.0, this package has not been ported to the multi-threaded engine.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... compile 7.1
This package has not yet been ported to the multi-threaded engine.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... service 8.1
This packages is not yet supported by the multi-threaded engine.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... libxml2 9.1
This package has not yet been tested for thread-safety
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... pages 10.1
This package has not yet been ported to the multi-threaded engine.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... characters).10.2
The string feature will be deprecated when XSB will have working atom garbage collection. When URL is a list of characters, then Result is also a list of characters, which eases the burden on the atom table and allows XSB to work longer before memory is exhausted.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... Warren 12.1
Thanks to Barry Evans for helping resuscitate the XASP installation procedure, and to Gonçalo Lopes for the installation procedure on Windows.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... evaluation 12.2
In Version 3.0, the Smodels API has not been tested with the multi-threaded engine, and Smodels itself is not thread-safe.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... compilers 12.3
XSB's compiler can automatically call foreign compilers to compile modules written in C, but in Version 3.0 of XSB C++ modules must be compiled with external commands, such as the make command shown below.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... Smodels 12.4
This section was written by Goncalo Lopes.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... model12.5
Currently, only normal rules can be retracted.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
... University.13.1
See http://www.informatik.uni-freiburg.de/$\sim$dbis/florid/ for more details.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.