Section "instruction"
Depending whether an instruction is found in the head or in the
body, the behaviour of the in-struction is differently. In the
body, instructions do build a Prolog terms. In the head,
instructions try to unify Prolog terms and they might fall back
into the Prolog building mode. Instruction streams are represented
as host language objects.
In build mode, to permit clause sets inlining, the instructions
allow the functor of a callable or an atomic to be an anonymous
predicate. The corresponding goal is solved by directly branch-ing
into the clause set of the anonymous predicate. Further the
functor or atomic can be a cache node which speeds up the lookup
of a predicate indicator.
The cross-compiler and runtime generate the following objects:
- undefined: host language
- In building mode creates a fresh variable. In unify mode does
nothing.
- new Place(W): host language
- In building mode create or return the display at index W. In
unify mode assign or unify the other argument with the display
at index W.
- new Skeleton(F, A): host language
- In building mode creates a new undefined compound with functor
F and arguments L, and opens a new arguments context. In unify
mode defers the creation and performs initial specialized
compound unification, with the unify argument.
- new Cache(F): host language
- The constructor creates a cache node for the functor F.
- otherwise C:
- In building mode gives the embedded constant C, which is
allowed to be a ground term and need not be atomic only. In
unify mode performs unification of the embedded con-stant C with
the unify argument.