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
Instances For
Equations
- One or more equations did not get rendered due to their size.
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.
#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.