How zkcompiler/zkc works
zkc is a Lean-based compiler for zero-knowledge protocols. A programmer describes roles, private values, messages, and acceptance checks in the source language; the active documented workflow follows selected source entries through frontend emission, Core admission, role projection, and formal certificates. Core admission covers mixed function/protocol programs, header checking, function summaries, and loop bounds; checked transformations preserve function behavior under input requirements. The source excerpts chiefly cover auxiliary replay and checking scripts, so the compiler relationships below rely on README statements rather than inspected implementation calls.
Main entry points: Admission.lean Core admission · Programs.lean Mixed definitions · language zkc programs · Emit Frontend emission
Components 13
Source language
- zkc programs
language
Compiler frontend
- Frontend emission
lean/compiler/Zkc/Frontend/Emit
Protocol Core
- Mixed definitions
lean/compiler/Zkc/Core/Admission/Programs.lean - Header checking
lean/compiler/Zkc/Core/Admission/Check.lean - Function summaries
lean/compiler/Zkc/Core/Admission/Theorems.lean - Core admission
lean/compiler/Zkc/Core/Admission/Admission.lean - Role projection
lean/compiler/Zkc/Core/Projection - Loop bounds
lean/compiler/Zkc/Core/Admission - Checked transformation
lean/compiler/Zkc/Core/Transform - Core meaning
lean/compiler/Zkc/Core/Meaning
Formal results
- Formal certificates
lean/formal/Zkc/Formal/Interactive - Core proofs
lean/formal/Zkc/Formal
Other components
- Protocol author
Connections 11
- Protocol author → zkc programs: writes
README.md - zkc programs → Frontend emission: emits
README.md - Frontend emission → Core admission: admits
README.md - Core admission → Role projection: projects roles
README.md - Core admission → Formal certificates: feeds certificates
README.md - Role projection → Formal certificates: feeds certificates
README.md - Mixed definitions → Header checking: checks headers
README.md - Mixed definitions → Function summaries: proves summaries
README.md - Core admission → Loop bounds: records bounds
README.md - Checked transformation → Core meaning: preserves behavior
README.md - Core meaning → Core proofs: supports proofs
README.md