Tracing
Definitions to support evaluation tracing of functional programs in Python.
Copyright (c) 2024 - Eindhoven University of Technology, The Netherlands
This software is made available under the terms of the MIT License.
- class FuPy.tracing.BaseStep(note: str, depth: int = 0)[source]
Bases:
ABCAbstract Base Class for all Trace steps.
- class FuPy.tracing.Trace(trace: list[~FuPy.tracing.BaseStep] = <factory>, depth: int = 0, skip_steps: set[type[~FuPy.tracing.BaseStep]] = <factory>, max_steps: int = None)[source]
Bases:
objectA Trace object contains a sequence of evaluation (rewrite) steps.
- exception FuPy.tracing.TracingTerminated[source]
Bases:
ExceptionException to indicate early termination of an expression evaluation.
Typically, this is because the maximum number of steps was reached.
- FuPy.tracing.trace(expr: Callable[[], A], live: bool | None = None, skip_steps: set[type[BaseStep]] | None = None, max_steps: int | None = None) tuple[A | Exception, Trace][source]
Trace evaluation of expr. The expression must be provided as a constant function, that is, in the form lambda: expr, or as Lazy(lambda: expr). Later, possibly also as string.
- FuPy.tracing.trace_step(step_: Callable[[], BaseStep]) None[source]
Add step_() to the trace if tracing is enabled. For internal use only.
Tracing basics
Definitions to support evaluation tracing of basic functionality.
Copyright (c) 2024 - Eindhoven University of Technology, The Netherlands
This software is made available under the terms of the MIT License.
- class FuPy.tracing_basics.ApplicationStep(note: str)[source]
Bases:
BaseStepClass for function application steps.
- class FuPy.tracing_basics.DefinitionStep(note: str)[source]
Bases:
BaseStepClass for function construction steps.
Tracing laziness
Definitions to support evaluation tracing of laziness functionality.
Copyright (c) 2024 - Eindhoven University of Technology, The Netherlands
This software is made available under the terms of the MIT License.
- class FuPy.tracing_laziness.EvaluationStep(note: str)[source]
Bases:
BaseStepClass for evaluation steps.