Skip to content
/ SPIRAL Public

Stratified Progressive Intermediate Representation Architecture Language: Intermediate representation spanning AIR, CIR, EIR, PIR and LIR layers, supporting both expression and control-flow documents.

Notifications You must be signed in to change notification settings

Mearman/SPIRAL

Repository files navigation

SPIRAL (Stratified Progressive Intermediate Representation Architecture Language)

npm Node

SPIRAL is a JSON-first intermediate representation spanning AIR, CIR, EIR, PIR, and LIR. All layers support expression and CFG block forms (hybrid documents).

Layers & Computational Classes

Layer Name Computational Class Key Feature
AIR Algebraic IR Primitive Recursive (bounded) Pure, no recursion, always terminates
CIR Computational IR Turing-Complete Lambdas, fix combinator for recursion
EIR Execution IR Turing-Complete Sequencing, mutation, loops, effects
PIR Parallel IR Turing-Complete Async/parallel primitives (spawn, await, channels)
LIR Low-Level IR Turing-Complete CFG-based, SSA with phi nodes

See wiki/Architecture.md for details.

Quick start

pnpm install
pnpm build
pnpm test

Run examples (folder or file stem):

pnpm run-example air/basics/arithmetic
pnpm run-example air/basics/arithmetic/arithmetic

Wiki

About

Stratified Progressive Intermediate Representation Architecture Language: Intermediate representation spanning AIR, CIR, EIR, PIR and LIR layers, supporting both expression and control-flow documents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •