Section "engine"

Dogelog Player allows registering special foreign function foreign functions. A special foreign function has access to the execution environment of the Dogelog Player and can be used to code deterministic and non-deterministic predicates. To realize a non-deterministic predicates the special foreign function leaves a choice point.

To simplify task switching a part of the engine state is stored in an engine object. Task switch-ing happens when a non-main task gets its execution share, and the main task is swapped in and out into a the task context. Tasks not only have their own continuation, trail and choice points, the streams are accessible via the engine object.

The following engine API calls are provided:

get_engine(): host language
The function returns the current engine.
get_ctx(): host language
The function returns the current task.
make_error(M): host language
Create an error term from the message M.
check_nonvar(T): host language
Assure that the object T is a nonvar.
check_atom(T): host language
Assure that the object T is an atom.
check_number(T): host language
Assure that the object T is a number.
check_integer(T): host language
Assure that the object T is an integer.
check_callable(T): host language
Assure that the object T is a callable.
check_atomic(T): host language
Assure that the object T is atomic.

Use Privacy (c) 2005-2026 XLOG Technologies AG