Section "neck"

As an optimization the system can directly perform neck goals if they belong to a deterministic built-in that do not modify the continuation. Unlike specials, which are registered via make_special(), they need to be registered via make_check(). Further evaluable foreign func-tions can be registered via make_arithmetic().

This new neck API is provided in the form of exec_build(), exec_unify() and exec_eval() that should be used to implement deterministic built-in and evaluable functions. They depend on a state in the form of the current variable display and they are order dependent, in that they should be execute along the arguments in-order and without omissions.

The following neck API calls are provided:

make_check(P): (host language)
The function returns an anonymous predicate for the deterministic built-in P.
make_arithmetic(P): (host language)
The function returns an anonymous predicate for the deterministic built-in P.
exec_build(A): (host language)
Return the dereferencing of the argument A.
exec_unify(A, T): (host language)
Determine whether the argument A and the term T unify.
exec_eval(A): (host language)
Return the evaluation of the argument A.

Kommentare