next up previous index
Next: Obsolete Suspension Facilities Up: Advanced Control Features Previous: The Cut and the   Index


Delaying of Built-In Predicates

A number of built-in predicates can be configured to delay when their arguments are not sufficiently instantiated. This behaviour uses the more general mechanism introduced above and is enabled with
:- set_flag(coroutine, on).
As a consequence, these predicates will no longer raise instantiation faults, but delay instead. For example:
[eclipse 1]: X > 0.
instantiation fault in X > 0
[eclipse 2]: set_flag(coroutine, on).
yes.
[eclipse 3]: X > 0.

X = X
Delayed goals:
        X > 0
yes.
The delayed predicate will be executed as soon as the responsible variable is instantiated:
[eclipse 4]: X > 0, X=1.
 
X = 1
yes.

The following built-ins have this property:

</2 >/2 >=/2 =</2
=:=/2 =\=/2 plus/3 times/3.
is/2 functor/3 arg/3 =../2
atom_string/2 number_string/2 integer_atom/2 char_int/2
string_list/2 atom_length/2 string_length/2 concat_atoms/3
concat_atom/2 concat_strings/3 concat_string/2  


next up previous index
Next: Obsolete Suspension Facilities Up: Advanced Control Features Previous: The Cut and the   Index

1999-08-06