22
33Caliper is a deep-embedded imperative language whose every instruction runs in
44constant time, designed as a compilation target for languages that want certified
5- resource bounds; in particular the witness-generation IR of the
6- [ Clean] ( https://github.com/rot256/clean ) zk-circuit project, which depends on this
7- library. Programs carry machine-checked upper bounds on running time and on
8- allocated memory.
5+ resource bounds, witness-generation IRs among them. Programs carry machine-checked
6+ upper bounds on running time and on allocated memory.
97
108## Files
119
@@ -19,14 +17,13 @@ allocated memory.
1917| ` Liveness.lean ` | Backward liveness analysis (` Stmt.liveBefore ` ), inferred peak register pressure (` Stmt.regPeak ` /` Stmt.regPeak₀ ` ), the live-ins + writes bound, the combined buffers-plus-registers judgment (` SpaceBound ` ), and ` Exec.straight_total_footprint_le ` |
2018| ` W64.lean ` | Fixed 64-bit surface: namespace ` Caliper64 ` of reducible ` abbrev ` s pinning ` w := 64 ` |
2119
22- ## Where the rest of the pipeline lives
20+ ## Scope
2321
2422This repository contains the machine: syntax, cost semantics, program logic,
25- builder surface, renderer, and the fixed 64-bit surface ` Caliper64 ` . The layers
26- on top of it (the witness-generation compiler, the prime-field gadget library
27- ` Fp w p ` , the ` TimedCircuit ` budgeted-witgen structure) live in the
28- [ Clean] ( https://github.com/rot256/clean ) project, which depends on this library.
29- Claims about those layers are stated and proved there, not here.
23+ builder surface, renderer, and the fixed 64-bit surface ` Caliper64 ` . Layers built
24+ on top of it, such as a compiler targeting the machine or a gadget library, live in
25+ the projects that depend on this one; claims about those layers are stated and
26+ proved there, not here.
3027
3128## Design decisions
3229
@@ -416,9 +413,9 @@ their own concrete numerals. `#print axioms <theorem>` is the audit tool.
416413## Caveats / next steps
417414- Natural next steps: a performant runner beyond the reference interpreter, and
418415 refining the cost model toward a concrete backend.
419- - A ` Proc ` record bundling ` code ` /` Pre ` /` Post ` /` time ` /` space ` /` spec ` (mirroring
420- Clean's ` FormalCircuit ` ) would package subroutines more tightly; the examples
421- inline this pattern with plain ` have ` s for now.
416+ - A ` Proc ` record bundling ` code ` /` Pre ` /` Post ` /` time ` /` space ` /` spec ` would package
417+ subroutines more tightly; the examples inline this pattern with plain ` have ` s for
418+ now.
422419- Registers in the examples use fixed conventions (callee-clobbered scratch); a
423420 register-window or parameterized-register discipline is mechanical to add
424421 (distinctness side conditions close by ` decide ` ).
0 commit comments