Documentation

Cedar.SymCC.Factory

This file defines an API for construcing well-formed Terms. In this basic implementation, the factory functions perform only basic partial evaluation---constant folding along with a few other rewrites. In an optimized implementation, the factory functions would include more rewrite rules, and share a cache of partially cannonicalized terms that have been constructed so far.

The factory functions are total. If given well-formed and type-correct arguments, a factory function will return a well-formed and type-correct output. Otherwise, the output is an arbitrary term.

This design lets us minimize the number of error paths in the overall specification of symbolic compilation, which makes for nicer code and proofs, and it more closely tracks the specification of the concrete evaluator.

See Compiler.lean to see how the symbolic compiler uses this API.

@[inline]
Equations
Instances For
    def Cedar.SymCC.Factory.and (t₁ t₂ : Term) :
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Cedar.SymCC.Factory.or (t₁ t₂ : Term) :
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Cedar.SymCC.Factory.ite (t₁ t₂ t₃ : Term) :
          Equations
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              Instances For
                def Cedar.SymCC.Factory.bvapp (op : Op) (fn : {n : Nat} → BitVec nBitVec nBitVec n) (t₁ t₂ : Term) :
                Equations
                Instances For
                  Equations
                  Instances For
                    Equations
                    Instances For
                      def Cedar.SymCC.Factory.bvcmp (op : Op) (fn : {n : Nat} → BitVec nBitVec nBool) (t₁ t₂ : Term) :
                      Equations
                      Instances For
                        def Cedar.SymCC.Factory.bvso (op : Op) (fn : IntIntInt) (t₁ t₂ : Term) :
                        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
                                Instances For
                                  Equations
                                  Instances For
                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For