curry.backends.generic.eval.stepcounter module

class curry.backends.generic.eval.stepcounter.StepCounter(limit=None, global_limit=None)[source]

Bases: object

Counts the number of steps taken. If a limit is provided, raises E_STEPLIMIT when the limit is reached.

A global limit on the number of steps may be optionally specified. This is used primarily for testing and debugging. Raises E_TERMINATE after the specified number of steps.

property count
property global_count
property global_limit
increment()[source]
property limit
reset()[source]
reset_global()[source]