next up previous contents index
Next: 1.11.1 A Basic API Up: 1. Library Utilities Previous: 1.10 The Profiling Library   Contents   Index

1.11 Interned Tries and Low-level Trie Manipulation Utilities

Interned tries can be used to assert an retract facts in an extremely efficient manner. Terms can be interned within different tries, designated by a Root, or left as default. Like trie-indexed dynamic code and unlike normal asserted code, interned tries have a set semantics: the variant of a term can occur in a trie only once, additional asserts have no effect. In addition, no ordering of terms within the trie is guaranteed. In Version 3.0 of XSB, when multiple threads are used, all interned tries are private to a thread, so that information interned by one trie will not be visible to other threads. In order to ensure efficiency for these routines, not all possible error checking is done on their inputs.

Section 1.11.1 below provides an overview for the basic interface to interned tries, while Section 1.11.2 describes more advanced features. See also the module storage in Volume 1 which uses interned tries for backtrackable updates and associative arrays.



Subsections
next up previous contents index
Next: 1.11.1 A Basic API Up: 1. Library Utilities Previous: 1.10 The Profiling Library   Contents   Index
Terrance Swift 2007-10-06