Documentation

Cvc.Untyped.Extra.Sys

Transition systems and bounded model checking, sort-erased #

A Sys is a transition system over a symbol structure: an initial predicate, a transition relation and named candidate invariants, each a function of the symbols at one step or two.

Sys.Bmc checks the candidates by bounded model checking. Bmc.mk starts at step 0; check answers the candidates some run reaching the current step falsifies, and is called again until it answers none; unroll then moves to the next step. isDone holds once no candidate is left.

@[reducible, inline]

An array of named predicates over SVars.

Equations
Instances For
    inductive Cvc.Untyped.Sys.Trace (α : Nat → Type) (k : Nat) :

    One value per step from 0 to k, the latest first.

    Instances For
      def Cvc.Untyped.Sys.Trace.iterM {m : Type → Type u_1} {α : Nat → Type} {k : Nat} [Monad m] (f : {k : Nat} → α k → m Unit) :
      Trace α k → m Unit

      Runs f on each step's value, from step 0 up.

      Equations
      Instances For
        def Cvc.Untyped.Sys.Trace.getCurrent {α : Nat → Type} {k : Nat} :
        Trace α k → α k

        The value at the latest step, k.

        Equations
        Instances For
          def Cvc.Untyped.Sys.Trace.getZero {α : Nat → Type} {k : Nat} :
          Trace α k → α 0

          The value at step 0.

          Equations
          Instances For
            @[reducible, inline]
            abbrev Cvc.Untyped.Symbols.Sig.TermTrace {SVars : Sig} [Ω] (k : Nat) :

            The symbols of each step, as terms.

            Equations
            Instances For
              @[reducible, inline]

              The values of each step's symbols, as Lean values.

              Equations
              Instances For
                @[reducible, inline]

                The values of each step's symbols, as terms.

                Equations
                Instances For

                  The values the model gives a TermTrace, as Lean values.

                  Equations
                  Instances For

                    The values the model gives a TermTrace, as Lean values.

                    Equations
                    Instances For

                      The values the model gives a TermTrace, as Lean values.

                      Equations
                      Instances For

                        The values the model gives a TermTrace, as terms.

                        Equations
                        Instances For
                          structure Cvc.Untyped.Sys [Ω] (SVars : Symbols.Sig) [Symbols SVars] :

                          A transition system over the symbol structure SVars.

                          • idents : SVars.Idents

                            The state variables' identifiers.

                          • init : SVars.FunAt'

                            The initial predicate.

                          • next : SVars.Fun2At'

                            The transition relation, from one step to the next.

                          • The candidate invariants, by name.

                          Instances For
                            @[reducible, inline]
                            abbrev Cvc.Untyped.Symbols.Sys [Ω] (SVars : Sig) [Symbols SVars] :

                            A transition system over the symbol structure SVars.

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev Cvc.Untyped.Symbols.Sig.Sys [Ω] (SVars : Sig) [Symbols SVars] :

                              A transition system over the symbol structure SVars.

                              Equations
                              Instances For
                                def Cvc.Untyped.Sys.initAt {SVars : Symbols.Sig} [Ω] [Symbols SVars] (sys : SVars.Sys) (solver : Solver) (k : Nat) :

                                Declares the symbols of step k in solver, and builds the initial predicate over them.

                                Equations
                                Instances For
                                  def Cvc.Untyped.Sys.nextAt {SVars : Symbols.Sig} [Ω] [Symbols SVars] (sys : SVars.Sys) {k k' : Nat} (curr : SVars.TermsAt k) (next : SVars.TermsAt k') :

                                  The transition predicate from step k to step k', over symbols already declared.

                                  Equations
                                  Instances For
                                    structure Cvc.Untyped.Sys.Bmc [Ω] (SV : Symbols.Sig) [Symbols SV] (k : Nat) :

                                    Bounded model checking of a system, unrolled to step k.

                                    Instances For
                                      @[reducible, inline]
                                      abbrev Cvc.Untyped.Symbols.Bmc [Ω] (SV : Sig) [Symbols SV] (k : Nat) :

                                      Bounded model checking of a system, unrolled to step k.

                                      Equations
                                      Instances For
                                        @[reducible, inline]
                                        abbrev Cvc.Untyped.Symbols.Sig.Bmc [Ω] (SV : Sig) [Symbols SV] (k : Nat) :

                                        Bounded model checking of a system, unrolled to step k.

                                        Equations
                                        Instances For
                                          def Cvc.Untyped.Sys.Bmc.mk {SVars : Symbols.Sig} [Ω] [Symbols SVars] (sys : SVars.Sys) :
                                          Env (SVars.Bmc 0)

                                          Starts checking sys at step 0, in a solver of its own.

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Cvc.Untyped.Sys.Bmc.isDone {SVars : Symbols.Sig} [Ω] [Symbols SVars] {k : Nat} (bmc : SVars.Bmc k) :

                                            Whether every candidate has been falsified.

                                            Equations
                                            Instances For
                                              def Cvc.Untyped.Sys.Bmc.check {SVars : Symbols.Sig} [Ω] [Symbols SVars] {k : Nat} (bmc : SVars.Bmc k) :
                                              Env (Option (Array String × SVars.Bmc k))

                                              The candidates some run reaching step k falsifies, and the checker without them.

                                              The counterexample is recorded in falsified. Answers none when no candidate left is falsified at this step, and fails if the solver gives up.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                def Cvc.Untyped.Sys.Bmc.unroll {SVars : Symbols.Sig} [Ω] [Symbols SVars] {k : Nat} (bmc : SVars.Bmc k) :
                                                Env (SVars.Bmc k.succ)

                                                Moves to step k + 1, asserting the transition to it.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For