Module fungi_lang::reduce

source ·
Expand description

Reduction semantics.

This module gives the incremental semantics of Fungi programs as a “small-step” reduction function, reduce.

To do so, it uses an external library (Adapton in Rust) to create and maintain the “demanded computation graph” (the DCG), that underpins change propagation.

See also: eval.

Structs

Configuration for reduction: A stack, environment and expression.
Stack frame
System configuration: global flags, etc

Enums

Local continuations
Cases for which step fails to reduce the program
Dynamic type errors (“stuck cases” for reduction)

Functions

Perform reduction steps (via step) until irreducible.
Perform a single small-step reduction.