Succeeds if Sum is the sum of integer arguments Add1 and Add2.
?Add1
an integer or a variable
?Add2
an integer or a variable
?Sum
an integer or a variable
Description
Defines the arithmetic relation Add1 + Add2 = Sum. If all arguments are
instantiated plus/3 succeeds if this relation holds. If one of the
arguments is uninstantiated, it is bound to an integer such that the
relation holds. If the system is in coroutining mode and more than one
argument is uninstantiated, plus/3 delays until at least two of the
arguments are known.
Fail Conditions
fails if Sum is not the sum of Add1 and Add2.
Resatisfiable
No
Exceptions
(5) Type error
an argument is neither an integer nor a variable
(4) Instantiation fault
more than one argument is uninstantiated (non-coroutining mode only)