Skip to content

Graph reduction

Evaluation of a functional program by rewriting a shared expression graph so lazy subexpressions are computed at most once.

Core Idea

The graph represents applications and values with shared nodes, non-strict evaluation selects a reducible expression only when demanded and updates the node with its result for all references. A reduction machine follows demand to an outer redex, rewrites it in place and preserves sharing through indirection or update nodes, avoiding duplicated evaluation that tree substitution would cause. The abstraction is therefore identified by a declared carrier, a transformation or constraint over that carrier, and an invariant that tells an analyst whether the named structure is genuinely present.

How would you explain it like I'm…

Solve-It-Once Sticky Note

Imagine a math problem written on one sticky note that lots of friends point to. Nobody solves it until someone actually needs the answer. Then it gets solved once, and the answer is written right on the note, so every friend pointing at it sees the answer without solving it again.

Shared Boxes, Lazy Answers

Some programming languages run programs by turning them into a graph: boxes for pieces of work, with arrows showing which pieces use which. If two parts of the program need the same piece, they both point to one shared box instead of copying it. A piece is only worked out when its result is actually needed. When it's done, the box is replaced by its answer, so everyone sharing it gets the result for free. This avoids doing the same work twice.

Lazy Evaluation by Shared Rewriting

Graph reduction is a way to evaluate functional programs by representing expressions as a graph, where applications and values can be shared nodes instead of copied subtrees. Evaluation is non-strict. The machine follows demand to an outer reducible expression (a redex), rewrites it, and overwrites that node with the result. Every reference to the node then sees the result. Compare this with tree substitution: there, an argument used twice is copied and might be evaluated twice. A precise account must spell out the rule for choosing the next redex, how updates happen, and how recursion and garbage are handled.

 

Graph reduction implements evaluation of a functional calculus over an expression graph whose nodes represent applications and values and may be shared. Under non-strict semantics, a reduction machine follows demand to an outermost redex, rewrites it, and overwrites the node with its result, often via indirection or update nodes. Because all references point to the same node, the result is computed once rather than duplicated, unlike tree-based substitution. A full account fixes the source calculus and its evaluation semantics, how sharing is represented, the redex-selection rule, the rewrite and update operations, how recursion (often cyclic graphs) and garbage are handled, and the normal-form and observational-equivalence argument showing the machine agrees with the calculus. The distinctive identity is this sharing-preserving, demand-driven rewriting, not functional programming in general.

Scope of Application

Graph reduction belongs to functional programming and is useful where the analyst can specify the typed functional programming carrier, including its objects, relations, parameters, conventions, evidence, boundary cases, and comparison targets, then evaluate the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument are explicit. The scope is broad within that domain but bounded by the need for the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument are explicit. The entry records a descriptive analytical identity; practical use requires the governing domain's evidence, standards, and safety obligations.

Clarity

The abstraction clarifies a crowded vocabulary by making the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument are explicit the center of the account. A claim should name the carrier, the governing operation or relation, the applicable assumptions, and the recognition test.

Manages Complexity

Without the abstraction, an analyst must reason directly over many local details: the carrier roles, admissibility assumptions, competing conventions, derived invariants, boundary cases, and proof or validation obligations specific to Graph reduction. Graph reduction compresses them into the roles in the structural signature. That compression permits comparison across instances without erasing the variables that determine validity. It also exposes which details may be varied safely and which are constitutive.

Abstract Reasoning

  1. Identify the carrier. State what the elements, states, objects, or observations are: the typed functional programming carrier, including its objects, relations, parameters, conventions, evidence, boundary cases, and comparison targets. Reject examples whose alleged carrier belongs to a different problem.
  2. Lock the constitutive rule. Express the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument are explicit independently of one notation or implementation.

Knowledge Transfer

Knowledge transfers strongly among subfields of functional programming because they reuse the typed functional programming carrier, including its objects, relations, parameters, conventions, evidence, boundary cases, and comparison targets, A reduction machine follows demand to an outer redex, rewrites it in place and preserves sharing through indirection or update nodes, avoiding duplicated evaluation that tree substitution would cause., and type the carrier, state every parameter and convention in the definition, test that the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument are explicit, compare the nearest accepted identity, and report counterexamples, uncertainty, and limiting cases.

Relationships to Other Abstractions

Local relationship map for Graph reductionParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Graph reductionDOMAINPrime abstraction: Equivalence-Preserving Rewriting — is a kind ofEquivalence-Pre…PRIME

Current abstraction Graph reduction Domain-specific

Parents (1) — outgoing typed relations

  • Graph reduction is a kind of Equivalence-Preserving Rewriting Prime

    It remains its own entry because its identity is fixed by the source calculus and evaluation semantics, expression graph and sharing, redex-selection rule, rewrite and update operation, treatment of recursion and garbage, normal form and observational-equivalence argument.

Hierarchy paths (2) — routes to 2 parentless roots

Neighborhood in Abstraction Space

Graph reduction sits in a crowded region of the domain-specific corpus (21st percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Graphical & Network Models of Dependence (16 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-25