Tests for ProgramSyntax #
Experiments for programs #
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- GaudisCrypt.ProgTest.prog_while = GaudiProg[ while (§GaudisCrypt.ProgTest.a == 0) { GaudisCrypt.ProgTest.a <- §GaudisCrypt.ProgTest.a + 1; } ]
Instances For
Equations
Instances For
Equations
- GaudisCrypt.ProgTest.split = GaudiProg[ GaudisCrypt.ProgTest.a, GaudisCrypt.ProgTest.b <- (1, 2); ]
Instances For
Equations
- GaudisCrypt.ProgTest.split2 = GaudiProg[ GaudisCrypt.ProgTest.a, GaudisCrypt.ProgTest.b <- (1, 2); ]
Instances For
Equations
- GaudisCrypt.ProgTest.split3 = GaudiProg[ (GaudisCrypt.ProgTest.a, GaudisCrypt.ProgTest.b), GaudisCrypt.ProgTest.d <- ((1, 3), 2); ]
Instances For
Equations
- GaudisCrypt.ProgTest.prog_call = GaudiProg[ GaudisCrypt.ProgTest.a <- call GaudisCrypt.ProgTest.proc_inc (§GaudisCrypt.ProgTest.a); ]
Instances For
Equations
Instances For
Equations
- GaudisCrypt.ProgTest.prog_call_void = GaudiProg[ call GaudisCrypt.ProgTest.proc_inc (§GaudisCrypt.ProgTest.a); ]
Instances For
Printing and round-tripping #
#roundtrip t prints t with the delaborators of ProgramSyntax.lean, parses the printed
text again and checks that what comes back is definitionally equal to t. The printed text
is logged and pinned by the #guard_msgs docstrings — a delaborator that quietly gave up
(so that Lean printed the raw constructor term) would still round-trip, but would not print
the surface syntax, and the docstring catches that.
Print e, parse the printed text, elaborate it at e's type, and check the result is defeq
to e. Returns the printed text. (Also used by the flattening tests, on what they produce.)
Equations
- One or more equations did not get rendered due to their size.
Instances For
#roundtrip t: print t, parse the printed text, elaborate it, and check the result is
defeq to t. Logs the printed text.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Program variables #
A parameter or var stands for its slot localVarLens "x" T in the locals; printing turns the
slots back into names where it can.
Statements the macros did not build #
A statement built by hand or left behind by a rewrite prints as well, as long as its l-values are lenses.