Section "term"

Since Dogelog Player is a heap-based Prolog system, we can afford program sharing. Currently program sharing is realized for Prolog compounds, that have ground arguments. There is a base class structure for Prolog compounds, which has an alternative subclass frozen, which can be used for such frozen Prolog compounds.

Prolog variables store some colouring flags to manage Prolog generational garbage collection, and some serno which is used in lexical comparison. The serno once chosen during comparison or writing doesn’t change during environment trimming and therefore allows for certain algorithms, that other Prolog systems might not support.

The following term API calls are provided:

is_variable(T): host language
Check whether the object T is a Prolog variable.
is_compound(T): host language
Check whether the object T is a Prolog compound.
is_frozen(T): host language
Check whether the object T is a Prolog frozen.
new Variable(): host language
Create a Prolog variable.
new Compound(F, A): host language
Create a Prolog compound with functor F and arguments A.
new Frozen(F, A): host language
Create a frozen Prolog compound with functor F and arguments A.
deref(T): host language
Return the dereferencing of the term T.
copy_term(T): host language
Return a copy of the term T.


Use Privacy (c) 2005-2026 XLOG Technologies AG