curry.backends.generic.eval.control module

Defines flow-control exceptions.

exception curry.backends.generic.eval.control.E_DIVERGE(qid, vid, binding)[source]

Bases: RuntimeFlowException

Raised when the nested evaluation of a set function reads a binding of an enclosing configuration (get_binding in rts_bindings.py of the Python backend): the capsule depends on the private state of that configuration, which another configuration with another binding may share (issue #86). allValues (currylib/setfunctions.py) clones the capsule for that configuration. qid is the queue to clone, vid the id under which its configurations looked the variable up, and binding the binding the clone absorbs.

exception curry.backends.generic.eval.control.E_RESIDUAL(ids)[source]

Bases: RuntimeFlowException

Raised when evaluation cannot complete due to uninstantiated free variables.

exception curry.backends.generic.eval.control.E_STEPLIMIT(qid=None)[source]

Bases: RuntimeFlowException

Raised when a configuration has spent its step budget. qid is the ID of the queue to rotate. None means the queue of the first handler.

exception curry.backends.generic.eval.control.E_TERMINATE[source]

Bases: RuntimeFlowException

Raised to terminate evaluation.

exception curry.backends.generic.eval.control.E_UNWIND[source]

Bases: RuntimeFlowException

Raised when control must break out of the recursive match-eval loop. This occurs when a symbol requiring exceptional handing (e.g., FAIL or CHOICE) was placed in a needed position, or when a variable is replaced by a value by rewriting the root node.

exception curry.backends.generic.eval.control.RuntimeFlowException[source]

Bases: BaseException

The base class for exceptions used by the runtime system for flow control. These should always be caught and handled.