Documentation

GaudisCrypt.Syntax.ProgramSyntaxTest

Tests for ProgramSyntax #

Experiments for programs #

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

                  Rejected declarations #