unicode_fol_kit.reduce_trace

unicode_fol_kit.reduce_trace(node, limit=1000)[source]

Return the leftmost-outermost reduction trace from node to beta-normal form.

The result is [original, after step 1, after step 2, …], each element one beta_reduce_step apart, ending once no redex remains. A term already in beta-normal form yields a single-element list [node].

Parameters:
  • node (Node) – the term to reduce.

  • limit (int) – maximum number of reduction steps before giving up.

Raises:

ReductionLimitError – if more than limit steps are taken (the term is likely not normalizing under this strategy).

Returns:

A list of Node snapshots; the input is never mutated.

Return type:

list