Documentation

Lean.Compiler.LCNF.Testing

partial def Lean.Compiler.LCNF.Code.containsConst (constName : Name) (code : Code) :
Equations
    Instances For
      Instances For
        Instances For
          @[reducible, inline]
          Equations
            Instances For
              @[reducible, inline]
              Equations
                Instances For
                  @[reducible, inline]
                  Equations
                    Instances For
                      @[reducible, inline]
                      Equations
                        Instances For
                          @[reducible, inline]
                          Equations
                            Instances For
                              @[reducible, inline]
                              Equations
                                Instances For
                                  @[reducible, inline]
                                  Equations
                                    Instances For
                                      Equations
                                        Instances For
                                          def Lean.Compiler.LCNF.Testing.TestM.run {α : Type} (x : TestM α) (passUnderTest : Pass) (testName : Name) :
                                          Equations
                                            Instances For
                                              def Lean.Compiler.LCNF.Testing.SimpleAssertionM.run {α : Type} (x : SimpleAssertionM α) (decls : Array Decl) (passUnderTest : Pass) (testName : Name) :
                                              Equations
                                                Instances For
                                                  def Lean.Compiler.LCNF.Testing.InOutAssertionM.run {α : Type} (x : InOutAssertionM α) (input output : Array Decl) (passUnderTest : Pass) (testName : Name) :
                                                  Equations
                                                    Instances For

                                                      If property is false throw an exception with msg.

                                                      Equations
                                                        Instances For

                                                          Install an assertion pass right after a specific occurrence of a pass, default is first.

                                                          Equations
                                                            Instances For

                                                              Install an assertion pass right after each occurrence of a pass.

                                                              Equations
                                                                Instances For
                                                                  def Lean.Compiler.LCNF.Testing.assertForEachDeclAfter (assertion : PassDeclBool) (msg : String) (occurrence : Nat := 0) :

                                                                  Install an assertion pass right after a specific occurrence of a pass, default is first. The assertion operates on a per declaration basis.

                                                                  Equations
                                                                    Instances For

                                                                      Install an assertion pass right after the each occurrence of a pass. The assertion operates on a per declaration basis.

                                                                      Equations
                                                                        Instances For

                                                                          Replace a specific occurrence, default is first, of a pass with a wrapper one that allows the user to provide an assertion which takes into account both the declarations that were sent to and produced by the pass under test.

                                                                          Equations
                                                                            Instances For

                                                                              Replace all occurrences of a pass with a wrapper one that allows the user to provide an assertion which takes into account both the declarations that were sent to and produced by the pass under test.

                                                                              Equations
                                                                                Instances For

                                                                                  Insert a pass after passUnderTestName, that ensures, that if passUnderTestName is executed twice in a row, no change in the resulting expression will occur, i.e. the pass is at a fix point.

                                                                                  Equations
                                                                                    Instances For

                                                                                      Compare the overall sizes of the input and output of passUnderTest with assertion. If assertion inputSize outputSize is false throw an exception with msg.

                                                                                      Equations
                                                                                        Instances For

                                                                                          Assert that the overall size of the Decls in the compilation pipeline does not change after passUnderTestName.

                                                                                          Equations
                                                                                            Instances For

                                                                                              Assert that the overall size of the Decls in the compilation pipeline gets reduced by passUnderTestName.

                                                                                              Equations
                                                                                                Instances For

                                                                                                  Assert that the overall size of the Decls in the compilation pipeline gets reduced or stays unchanged by passUnderTestName.

                                                                                                  Equations
                                                                                                    Instances For

                                                                                                      Assert that the pass under test produces Decls that do not contain Expr.const constName in their Code.let values anymore.

                                                                                                      Equations
                                                                                                        Instances For