Version 3.8 (Three-Buck Chuck)
Many of the changes for Version 3.8 of XSB have been motivated by the
needs of our commercial and research users. To this end, XSB contains
several new libraries as well as a great number of changes to improve
robustness for various XSB features.
- XSB now supports parameterized modules which support a type
of higher-order programming by allowing modules to be parameterized by other modules.
This allows a module m to determine at run time which other modules
should be used to load predicates in m.
This extension also allows non-modules (defining predicates in usermod) to be loaded by
the dynamic module loader
- The view consistency feature of incremental tabling has been made
significantly more robust, and memory usage for incremental tables is
now significantly more efficient.
- The persistant tables package allows tables to be written to
files so that they can be saved between sessions, or communicated
between different XSB processes.
- The viewsys package provides a structured approach to transforming
data (stored in files or database tables) that XSB or other programs can use.
- Situations where a compilation error gave rise to a corrupt
object file are now fixed. call/1 has been
made more efficient in static code.
- load_dyn/[1,2] has been made more robust, and expanded so
that files are handled in a manner more consistent with compiled
code. For instance, load_dyn(c) now loads modules and supports
analysis features like usage inference
- Terms now have a maximum arity of 2^16 when used in tabling,
asserted in dynamic code, or created as structures. Terms in compiled
files have the old limit of 2^8 arguments.
- The range tree library allows data to be indexed via numeric or
- Smaller Bug fixes and Minor Changes
- File handling is now more consistent among XSB's predicates,
among the forms of names, and among platforms.
- Numerous changes have been made to XSB's statistics/[0,2] to
present information about tabled compuations in a clear, consistent,
and thorough manner.
- Character sets are now easier to set and change at a stream level,
and handling of general character codes is more robust.
- XSB now responds consistently to command-line
interrupts (e.g., ctrl-c, ctrl-d) across different platforms.
- Various bug fixes and improvements to
the sgml, xpath, and rdf packages.
- Answer set cardinality has been added to XSB's set of tripwires,
which support dynamic debugging of heavily tabled computations.
- A new predicate, truth_value/2 that indicates the truth
value of a given atom in the well-founded semantics whenever it is
sensible to do so within the operational semantics of XSB.
- XSB's C interface has been expanded to allow dynamic registration
of C functions as XSB predicates, and to allow direct creation of a
term in a given module.
- predicate_property/2 now gives more reliable and clearer
information for undefined or non-loaded predicates.
- The log_ith functionality has been expanded so that it
can simulate open-tailed lists, though with a lower complexity.
- Forest logging has been expanded to support information specific
to incremental tabling.
- Improvements in unification of floating point numbers.
- Small fixes for interned tables when used with findall.
Version 3.7 (Clan MacGregor)
- A derivation may be suspended and inspected via its table state,
its subgoal dependency graph, its incremental dependency graph, and
its residual dependency graph. The graph views may also be abstracted
using homomorphisms. Each of these views displays aspects of a
computation that can be useful for different purposes.
- A derivation may be suspended using
dynamically-modifiable tripwires which are activiated when a
derivation takes more time or space than expected or allowed. Tripwire
conditions include derivation time, amount of memory used, size of
goal, size of answer, number of non-completed tabled calls, and
recursive component size. Tripwires are quite general, and can also
be used to apply abstraction to a subgoal or answer, or simply to
throw an error.
- During a debugging session a derivation can also be suspended
via ctrl-c, and then inspected in the same manner.
- XSB's handling of break levels has been extended to safely
support inspection of suspended tabled derivations.
- XSB's computation of the well-founded semantics (WFS) now
automatically performs the answer completion operation, which makes
XSB's resolution method complete for WFS. (This is currently
available in the single-threaded engine only.)
- Answer Subsumption now works correctly and efficiently with
undefined answers. (Also, miscellaneous bugs in declarations for
answer subsumption have been fixed.)
- There is now better support for 64-bit Cygwin as well as better
support for XSB's packages under Windows.
- Performance improvements for tabling with call subsumption are
available using a new table_index directive to specify
alternate indexing of tables.
- XSB's timed_call/1 is now more powerful and supports a
mixture of co-routining capabilities. These capabilities can be
modified or cancelled during the course of inspecting a suspended
- A new predicate, crypto_hash/3 encrypts atoms according
to the md5 or ssh1 algorithms.
- Bug fixes and minor changes
- Numerous fixes and enhancements for abstracting tabled subgoals
and answers as well as for checking their size.
- Enhancements were also made to tabling routines to handle very
large subgoal or answer terms. Term sizes in the tens of thousands
with many thousands of variables are now supported for
subgoals, and sizes in the hundred thousands with tens of thousands of
variables are supported for answers.
- Such sizes may indicate errors in many applications, so
these sizes may be restricted via tripwires.
- Various fixes for obscure but important errors in heap garbage
collection, in get_residual/2; in repeatedly asserting and
retracting the same dynamic clauses; and in compiler register
allocation. In addition, various memrory problems uncovered by Valgrind were fixed.
- statistics/0 now displays better consistency for various
categories of memory usage. For statistics/2,
a table_ops key has been added, and statistics/2 now
includes an SCC count for the incomplete_tables key.
- Various packages have been made more robust. ODBC now closes
cursors on abort. Socket handling has been improved in several ways,
such as when XSB catches signals.
- Minor improvements to forest logging including stream flushing
and better designation of incomplete tables closed due to a
- Structures for tabled subgoals now require less space.
- Handling has been improved for terms of the form functor() by
Version 3.6 (Gazpatcho)
A number of changes have been made to make XSB more ISO-compliant.
- Error balls thrown by XSB are now of the ISO-compliant
form error/2 rather than error/3 as previously.
- The action of write/1 has been fixed so various
operators are now displayed in a more ISO-compliant manner. Reading
and writing escape characters is also more ISO-compliant now.
- The conditions under which arithmetic errors are thrown and the
types of errors that are thrown are now much more ISO-compliant.
Similar changes were made to errors thrown by file handling,
I/O-related predicates and other classes of predicates.
- When possible, XSB's table error balls now represent the actual
goal that caused the error, rather than simply the functor and arity
of the goal.
A number of improvements have been made to incremental tabling, with
the result that lazy incremental tabling is now the only incremental
tabling strategy supported in XSB. Lazy incremental tabling fully
replaces eager incremental tabling, as the lazy version is both more
robust and more efficient. In addition
- A new predicate abolish_nonincremental_tables/0 safely
abolishes all non-incremental tables, even when incremental and
non-incremental tables may depend on one another.
- Other new predicates have been added to allow introspection data
structures and state related to incremental tabling.
incr_is_invalid/1 allows inspection of the state of an
incremental subgoal, and incr_invalid_subgoals/1 returns a
list of incrementally tabled subgoals that are currently invalid. A
new option for statistics/2 returns the number of subgoals
and dependency edges in the incremental dependency graph.
- An addition has been made to forest logging to allow logging to be
turned off on a per-predicate basis.
- The predicate copy_term_nat/2 has been added, which acts
as copy_term/2 except that it does not copy the attributes of
variables. (This predicate acts as a similar predicate in SWI Prolog.)
- The library storage.P is now based on lazy incremental
- Bug fixes and minor changes
- Numerous bugs were fixed for table abolishes, particularly for the
following. Table garbage collection, which sometimes core dumped when
reclaiming space, has been made more robust. Transitive table
abolishes have also been made much more robust.
- Numerous obscure bugs were fixed in incremental tabling,
particularly when incremental tabling is used with table abolishes
(and when exceptions are thrown over incremental tabling).
Incremental tabling was also made more efficient in certain
cases. abolish_all_tables/0 now properly reclaims all
incremental tabling data structures. Table garbage collection also
now properly reclaims incremental table space.
- The predicate term_variables/2 is now implemented in C.
- Two new predicates have been
and abolish_table_subgoal/[1,2], which differ in whether they
abolish all tabled subgoals that unify with an input term, or only
abolish a tabled subgoal that is a variant of the input
term. abolish_table_subgoals/[1,2] acts in exactly the same
manner as abolish_table_call/[1,2], but is the preferred
Version 3.5 (Maotai)
- XSB's character-level I/O has been significantly rewritten and
expanded. It now supports as encodings UTF-8, CP-1252, and LATIN-1;
with UTF-8 as the default encoding on UNIX-style systems, and CP-1252
as the default encoding on Windows systems. Various ISO predicates
regarding encodings are also supported such
as character_set/1. Finally, other character-based I/O
predicates such as get_XXX, peek_XXX,
and put_XXX have been thoroughly rewritten and should be both
ISO-compliant and more efficient.
- XSB now has an alternative means of tabling ground structures
called "hash-consing" or "interning". This feature can greatly
improve performance when tabling is used for structural
- XSB now cleanly compiles under the latest version of Mac OS X
which uses LLVM's clang compiler.
- XSB's incremental tabling now fully supports view consistency for
tables that have been updated. Incremental tabling has also been
extended to allow abstraction of dynamic predicates in the call graph.
Finally, a number of bugs in incremental tabling have been fixed.
- XSB's compiler has been extended so that XSB can be used as a
preprocessor extending GPP
- Various predicates have been added: a platform-independent
built-in predicate epoch_seconds/1,
and module_of_term/2. XSB's concat_atom/2, a
generalization of the ISO atom_concat/2 now also can be used
to split atoms.
- A new library, prolog_db supports efficient meta-programming.
- Radial restraint is now available when XSB is embedded into a process.
- Bug fixes
- XSB now handles file paths that include spaces on Unix.
- Various fixes have made answer subsumption more robust.
- thread_sleep/1 now accepts seconds as per draft
standardization proposal. The at_exit/1 thread handler has
been changed so that its success, failure, or error doesn't affect the
thread exit status. Finally, a bug in handling exceptions resulting from
thread cancellation using a throw/1 signal has been fixed.
- Made XSB's use of gpp safe for cyclic #include statements.
- Various fixes for Prolog-based conditional compilation.
- Better indexing when loading forest logs. A new
option, partial logging is now also supported.
- format/[2,3] changed to better handle escaped characters.
Version 3.4 (Soy mILK)
- A new approach to bounded rationality within tabling,
termed radial restraint, can be used to ensure sound (with
respect to the well-founded semantics) termination of programs even
when they contain function symbols and have infinite models. Radial
restraint works by abstracting answers that exceed a given depth and
making the truth value for these answers undefined, and can be
declared on a per-predicate basis.
- A new builtin, u_not/1 assigns the
truth-value undefined to non-ground negative subgoals, rather
than throwing an exception. In various other cases, such as with
arithmetic computation errors, a goal can optionally be set
to undefined rather than throwing an exception.
- New builtins support better inspection of the state of tables,
even while these tables are being computed.
- get_incr_sccs_with_deps/[2,3] produces a Prolog
representation of the dependency graph of incrementally tabled
subgoals, including strongly connected components information and
dependencies among these components.
- A similar predicate, get_residual_sccs/[3,5] provides an
analogous view of atoms of the residual program whose truth value
is undefined under the well-founded semantics. In addition,
the predicate explain_u_val/2 can be used to explain why an
atom is undefined: because of negative loops, radial restraint, or
some other reason.
- Subgoal abstraction is now supported on a per-predicate basis.
- Added ISO predicate halt/1
- XSB's ODBC interface now has a predicate to return all available drivers.
- A bug was fixed that prevented XSB from properly initializing
when configured with a long path name under Windows. XSB also
requires less space to start up under Windows than it did
- Various fixes for bugs that occurred when copying into or out of
a table either large answers, or answers with a large number of
variables, or answers with large delay lists.
- Various bugs involving attributed variables were fixed: when
delaying the evaluation of tabled predicates via the when
library, and in certain cases where attributed variables occurred in
dynamic code. Finally, listing now prints out attributed variables
- Various bugs were fixed that occurred in error handling during
heavily tabled computations, such as when throwing a "maximum subgoal
depth exceeded" exception on very large subgoals, or when throwing
over incomplete incrementally tabled subgoals. Also error handling was
improved when a term to be interned exceeds a maximal user-defined
- Various small bugs were fixed for forest logging. Forest logging
now can print much larger terms than previously, and prints error
terms more concisely.
- Several small bugs were fixed for answer subsumption.
- XSB's tracing now uses writeq/2 for easier copy and paste while
tracing; also, a bug was . fixed when consult (/2) is
called within XSB's tracing.
- Bugs were fixed in abolish/1
in atom_chars/2, atom_codes/2 and
- The incremental tabling subsystem have been improved in various
ways. The subsystem now fully supports handling of conditional
answers (i.e., answers that are undefined in WFS). Updates of
incremental tables can now be done lazily whenever a tabled subgoal is
re-called: an explicit call to a table update routine is no longer
necessary. In addition, the XSB API has been restructured to be more
consistent, and several of the API routines have been moved into
- XSB's profiler now supports detection of calls that do not
properly use a predicate's indexing.
- XSB's forest logging now profiles tabled negation, including
delaying and simplification. In addition, several new routines have
been implemented that provide in-depth analysis of the logs.
- A new XSB flag allows information about incomplete tabled subgoals
and their SCCs to be written to a file upon throwing an exception,
which can aid in debugging.
- Several new built-ins have been added.
- ground_and_acyclic/1 is now available.
- check_variant/1 can efficiently check whether the
variant of a goal exists in trie-indexed dynamic predicates.
- find_n/4 acts as findall/3 but returns only the
first n solutions to a goal.
- XSB's table_dump library now distinguishes between
answers whose truth value is "true" and those whose truth value is
- Error handling routines have been improved, especially when
printing out cyclic or large terms.
- XSB's configuration now supports compilation with cilk.
- Bug fixes
- On Windows, XSB is automatically configured so that Windows
allocates a larger default call stack, removing a class of
A number of bugs have been fixed that together make XSB more robust
for very large and heavily tabled computations. Among these, XSB
better manages when an exception is thrown over the point of creation
of an incomplete table: previously this could cause a core dump under
certain situations, while now all such situations are detected and
- XSB handles updates to an incremental table that has active choice
points without core-dumping, as it sometimes did in previous
- call_cleanup/3 is now properly called when an
exception is thrown over a goal to be cleaned up, or when early
completing a tabled subgoal.
- Bugs in cyclic term handling that were present on 32-bit Linux are
- Other bug fixes include the following. There were various fixes
to small bugs in answer subsumption, particularly relating to
compilation. A fix was made to tabled negation when all conditional
answers to a goal have been removed by simplification. Handling of
floats by number_codes/chars was improved. A bug
in get_residual was fixed, which arose when displaying a
conditional answer with a large number of variables in its delay list.
Finally, a number of small bugs in handling large (boxed) integers have
- New features
- Call Abstraction is now fully implemented for fixed-order
stratified programs. The use of call abstraction can ensure
termination for all programs with finite models.
- A new flag unify_with_occurs_check can be set so that
XSB's core engine performs full unification for all resolution
operations (including tabling).
- A new predicate, timed_call/3, allows a goal to be
executed and repeatedly interrupted every n milliseconds with a
handler. During a long computation timed_call/3 can be used
to repeatedly report on the system state, to dynamically alter
heuristics, or to enforce resource limits (a more specialized
predicate, bounded_call/[3,4] is also available.)
- New predicates and evaluable functions have been added to support
the draft ISO core revision including ^/2,div/2,
and subsumes_term/2. (XSB already had most, but not all, of
these predicates and functions under non-ISO names.)
- Another new flag can be used to limit XSB's memory consumption to
a preset amount. Using an internally set memory limit, rather than
the system memory limit, can be important when XSB is used with Java
through InterProlog or is embedded into a C or Java program.
- Various other new predicates have been added to
XSB. print_incomplete_tables/[0,1] can be used to aid
debugging. term_size/2 and term_size_limit/2
efficiently determine the size of a term.. The various forms of
the table_dump predicate now display the number of calls to a
tabled subgoal along with SCC information for non-completed
- Important bug fixes and enhancements
- Fixed issue where XSB was not being configured correctly for Linux kernels 3.*
- XSB now performs unification of cyclic terms. In addition,
and atom_codes/2 are now cycle safe. The
predicate ground_or_cyclic/1 provides a cycle-safe groundness
- Improved compilation time for files with very large numbers of
predicates. Improved performance times
for tnot/1, is_cyclic/1,
- Added optional depth check for interned tries. Improved
robustness of exception handling for depth-checks in tables and tries
and for memory-overflow exceptions. Made exception handling for
several ISO predicates more consistent with ISO specifications.
- Profiling is now enabled for 64-bit Windows.
- The port of XSB to 64-bit Windows has been hardened so that XSB
can call external C functions, and its configuration process has been
- The initial version of a new tracing facility for computations,
called forest logging is now available for use.
- A new predicate, called table_dump/[1,2,3] allows easy
introspection of XSB's tables. In addition, new builtins
is_cyclic/1 and term_depth/2 are now available.
- Configuration of the latest version of XSB on the latest version
of Cygwin is now working again.
- Numerous bug fixes and specialized enhancements, the most
widespread of which were: Improving the module inferencing used by
XSB's compiler; improving XSB's exception handling when large
computations use all available memory; improved messages for term
depth exceptions; improved compilation times for files/modules with
a large number of predicates.
- XSB now includes a Java-based installer for Windows 32- and
64-bits, and for several varieties of Linux.
- XSB now allows a compiler option indicating that the input file is
canonical, which can improve the speed of compilation of files in
canonical form by 10-20\%.
- New flags allow users to automatically fail, warn, or throw an
error whenever trying to add to a table an answer whose depth is above
a given threshold. Separate flags are provided for lists and non-lists.
- Garbage collection time for abolishing tables is now maintained
- load_dyn/[1,2] can now dynamically load a file into a
- Several bug fixes, including the following. An obscure bug in
handling unsafe variables. A bug that sometimes occurred when adding
conditional answers with answers in the head but not in the delay
lists. Arrays used in interning an answer or trie term with a very
large number of variables, are now expanded when necessary.
- Minor changes were made to make errors that have to do with
tabling show the actual call that generated the error, rather than
just the predicate.
XSB is now supported on 64-bit Windows platform, either in 64-bit or
in 32-bit mode under MSVC compilation. Similar support has been
available for Linux and Mac OS X for several years. During the
porting process to Windows, several small bugs were fixed for all
A new table inspection
predicate variant_get_residual(Call,DelayList) can be used to
return (possibly conditional) answers for a table that is a variant
Prolog commons libraries are now included with the distribution.
XSB and its packages are now significantly easier to compile on
Windows using the MSVC compiler.
Fix to allow XSB to be compiled on the Mac with very recent changes to
Apple's xcode. These xcode changes broke backwards compatibility!
- Fix for recently introduced bug that broke XSB embedability into
C programs on Linux. In addition a fix allows XSB to exit cleanly in
32-bit Linux when tagged address space has been exceeded.
url_encode/2 and url_decode/2 are now standard predicates.
- A queryable trace log facility is now available do aid debugging.
Minor bug fixes and enhancements:
- Fixed core dump that arose from poor error handling when
univ was called using a list whose length was greater
Simplification stack is now dynamically expandable (this should only
affect programs that make extremely heavy use of well-founded
- pretty_print/2 now implemented to pretty print to a stream.
XSB now treats 0'\s as a space to improve compatibility with
some other Prologs.
Patch level added into the Prolog commons flag version_data;
patch date is now a part of the XSB banner.
Bug fixes for incremental tabling that arose when explicitly
abolishing invalidated incremental tables. Inclusion of information
about incremental tables in statistics when relevant.
Bug fixe for incremental tabling when evaluating programs with tabled
Fix for bug under 32-bit Linuxes when allocating very large chunks of
Inclusion of number of SCCs of non-completed tabled subgoals into
Fix in proc_files library for loading csv files into Prolog predicates.
Fixes for various bugs when using CLP(R) with tabling. Update of
CLP(R) package to include newest changes from SWI repository. Changes
to CLP(R) package to allow a smaller, and user-defined epsilon.
Changes to attribute API to make this XSB's API similar to that of SWI
and YAP (and perhaps others). Made term_variables/2 standard as it is
in other Prologs.
Last modified: $Id: changelog.html,v 1.13 2013-05-02 20:29:45 tswift Exp $