Documentation

Strata.Languages.Laurel.CoreGroupingAndOrdering

Grouping and Ordering for Core Translation #

Utilities for computing the grouping and topological ordering of Laurel declarations before they are emitted as Strata Core declarations.

Build the procedure call graph, run Tarjan's SCC algorithm, and return each SCC as a list of procedures paired with a flag indicating whether the SCC is recursive. Results are in reverse topological order: dependencies before dependents.

Procedures with axioms are placed as early as possible — before unrelated procedures without them — by stably partitioning them first before building the graph. Tarjan then naturally assigns them lower indices, causing them to appear earlier in the output.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    A single declaration in a CoreWithLaurelTypes program. Declarations are in dependency order (dependencies before dependents).

    Instances For

      A program whose declarations have been grouped and topologically ordered, using Laurel types. Produced by orderFunctionsAndProcedures from a UnorderedCoreWithLaurelTypes.

      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For