Documentation

Strata.DL.SMT.Term

Based on Cedar's Term language. (https://github.com/cedar-policy/cedar-spec/blob/main/cedar-lean/Cedar/SymCC/Term.lean) This file defines the Term language, a strongly and simply typed IR. The Term language has a straightforward translation to SMTLib. It is designed to reduce the semantic gap between Strata and SMTLib, and to faciliate proofs of soundness and completeness of the symbolic evaluator. Additionally, it allows us to generate different SMT encodings for different solvers (e.g., CVC5's theory of finite sets vs Z3's theory of Arrays).

Terms should not be created directly using Term constructors. Instead, they should be created using the factory functions defined in Factory.lean. The factory functions check the types of their arguments, perform optimizations, and ensure that applying them to well-formed terms results in well-formed terms.

See TermType.lean and Op.lean for definition of Term types and operators.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      Instances For
        @[instance_reducible]
        Equations
        @[instance_reducible]
        Equations
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[instance_reducible]
          Equations
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def Strata.SMT.Term.hasListDec (ts₁ ts₂ : List Term) :
              Decidable (ts₁ = ts₂)
              Equations
              Instances For
                def Strata.SMT.Term.hasListListDec (ts₁ ts₂ : List (List Term)) :
                Decidable (ts₁ = ts₂)
                Equations
                Instances For
                  @[irreducible]
                  Equations
                  Instances For
                    @[irreducible]
                    Equations
                    Instances For
                      @[instance_reducible]
                      Equations
                      @[instance_reducible]
                      instance Strata.SMT.Term.decLt (x y : Term) :
                      Decidable (x < y)
                      Equations
                      @[reducible, inline]
                      Equations
                      Instances For
                        @[reducible, inline]
                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev Strata.SMT.Term.bitvec {n : Nat} (bv : BitVec n) :
                          Equations
                          Instances For

                            Add the names of the constructed sorts in the type of v.

                            Equations
                            Instances For
                              structure Strata.SMT.IF :
                              Instances For
                                @[instance_reducible]
                                Equations
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Strata.SMT.instDecidableEqIF.decEq (x✝ x✝¹ : IF) :
                                  Decidable (x✝ = x✝¹)
                                  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
                                      Equations
                                      Instances For