Concepts

Architecture

One portable program source, target-neutral semantics and exact-support resolution, then per-target Plan / IR and artifacts. External packagers, runtimes and networks live outside the compiler boundary.

Layers

  • SyntaxLean 4 Syntax as an entry tree only. Not domain semantics.
  • Source → Typed → Semantictarget-neutral. Must not branch on TargetId.
  • Resolveexact SupportClaim resolver, fail closed.
  • Materializetarget-owned Plan → TargetIR → emitter → OutputSet with provenance.

Repository layout

.
├── ProofForgeV2/    # compiler: Core · Language · Targets · CLI
├── Examples/        # compilable example programs
├── Tests/           # unit / materialization tests
├── docs/            # PRD · architecture · specs · ADR · diagrams
├── scripts/         # CI · clean-room · toolchain · doc checks
├── justfile         # local & CI gate entry
├── active/          # archived v1 tree (research only)
└── AGENTS.md        # control plane for agents / contributors

Boundaries

The compiler is a code-generation and semantic-check tool. It is not an on-chain VM, a key custodian, or a default network executor. build performs no network or key IO.

Full architecture spec on GitHub

Opens on GitHub