Module FlatCurry.Transform.ExecND

Author
Michael Hanus, Steven Libby
Version
September 2025

Implementation of transforming FlatCurry expressions by applying partially and non-deterministically defined expression transformations as long as possible with a chaotic (non-deterministic) strategy.

Exported Functions:

Exported Functions


transformExprND :: (() -> (Int, [Int]) -> Expr -> (Expr, String, Int)) -> Expr -> Expr  Deterministic 

Simplifies a FlatCurry expression according to some expression transformation which can be partially or non-deterministically defined. Since the expression transformation might be non-deterministic, we pass it as a function which is similarly to passing it via run-time choice.

To apply transformation steps, some subexpression is non-deterministically selected.

Further infos:
  • might behave indeterministically

transformExprMaxND :: Int -> (() -> (Int, [Int]) -> Expr -> (Expr, String, Int)) -> Expr -> Expr  Deterministic 

The same as transformExprND but takes the maximum number of transformation steps to be applied as a further argument. If the number is negative, then keep going until no transformation can be applied.

Further infos:
  • might behave indeterministically