intern Root is instantiated to a handle for a new trie.
trie_intern(+Term,+Root)
intern
Effectively asserts Term by interning into the trie
designated by Root. If a variant of Term is already in
Root the predicate succeeds, but a new copy of Term is not
added to the trie.
Error Cases
Root is uninstantiated
instantiation_error
Root is instantiated, but not an integer (trie handle)
type_error(integer,Root)
trie_interned(?Term,+Root)
intern
This predicate backtracks through the terms that unify with Term
and that are interned into the trie represented by the handle Root. Term may be free, or partially bound.
Error Cases
Root is uninstantiated
instantiation_error
Root is instantiated, but not an integer (trie handle)
type_error(integer,Root)
trie_retractall(?Term,+Root)
intern
Uninterns from Root all terms that unify with Term. If
there are no failure continuations pointing to nodes in Root,
space is reclaimed for the uninterned nodes; otherwise they are marked
as deleted but space is not reclaimed.
Error Cases
Root is uninstantiated
instantiation_error
Root is instantiated, but not an integer (trie handle)
type_error(integer,Root)
bulk_trie_insert(+Generator,+Root)
intern
Used to insert multiple terms into Root. Generator is a
callable term. Upon backtracking through Generator its first
argument should successively be instantiated to the terms to be
interned in Root. When inserting many terms, bulk_trie_insert/2 is faster than trie_insert as it does
not need to make multiple checks that the choice point stack is free
of failure continuations that point to nodes in the trie pointed to by
Root.