Skip to content

Execution Pipeline

Culsma runs source files through a staged execution pipeline.

ParseCompileValidatePlanRun

Stages

StageOutput
ParseAST for the source program.
CompileCanonical IR and compiler analysis.
ValidateSemantic diagnostics.
TypecheckUnit and dimension diagnostics.
PlanExecutable plan with steps and dependencies.
RuntimeFinal state, events, diagnostics, and user result.
ReplayReconstructed state from event stream.

Each stage owns the failures it can decide earliest. For example, unit dimension failures belong before runtime, while insufficient runtime material belongs to material-state execution.

Artifact Flow

The minimal example was verified with:

bash
python -m culsma.cli run \
  --input examples/minimal/public_minimal.culs \
  --artifacts-dir /tmp/culsma-docs-minimal-run

Result:

FieldValue
runtime_oktrue
total_steps5
completed_steps5
failed_steps0
skipped_steps0
semantic/type/plan/runtime diagnostics0

The run writes:

text
summary.json
ast.json
ir.json
validate.json
typecheck.json
plan.json
run.json
result.json

See Artifacts for details.

Released under the Apache-2.0 license.