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.
Runs f on each step's value, from step 0 up.
Equations
- Cvc.Untyped.Sys.Trace.iterM f (Cvc.Untyped.Sys.Trace.zero val) = f val
- Cvc.Untyped.Sys.Trace.iterM f (Cvc.Untyped.Sys.Trace.cons val tl) = do Cvc.Untyped.Sys.Trace.iterM (fun {k : Nat} => f) tl f val
Instances For
The value at the latest step, k.
Equations
- (Cvc.Untyped.Sys.Trace.zero val).getCurrent = val
- (Cvc.Untyped.Sys.Trace.cons val tl).getCurrent = val
Instances For
The value at step 0.
Equations
- (Cvc.Untyped.Sys.Trace.zero val).getZero = val
- (Cvc.Untyped.Sys.Trace.cons val tl).getZero = tl.getZero
Instances For
The symbols of each step, as terms.
Equations
Instances For
The values of each step's symbols, as Lean values.
Equations
Instances For
The values of each step's symbols, as terms.
Equations
Instances For
The values the model gives a TermTrace, as Lean values.
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Untyped.Symbols.Sig.ValueTrace.extract (Cvc.Untyped.Sys.Trace.zero terms) = Cvc.Untyped.Sys.Trace.zero <$> terms.getValues s
Instances For
The values the model gives a TermTrace, as Lean values.
Instances For
The values the model gives a TermTrace, as Lean values.
Instances For
The values the model gives a TermTrace, as terms.
Equations
- One or more equations did not get rendered due to their size.
- Cvc.Untyped.Symbols.Sig.ValueTermTrace.extract (Cvc.Untyped.Sys.Trace.zero terms) = Cvc.Untyped.Sys.Trace.zero <$> terms.getValueTerms s
Instances For
The values the model gives a TermTrace, as terms.
Equations
Instances For
The values the model gives a TermTrace, as terms.
Equations
Instances For
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.
- candidates : Symbols.Sig.Candidates
The candidate invariants, by name.
Instances For
A transition system over the symbol structure SVars.
Equations
Instances For
A transition system over the symbol structure SVars.
Equations
Instances For
Declares the symbols of step k in solver, and builds the initial predicate over them.
Equations
- Cvc.Untyped.Sys.initAt sys solver k = Cvc.Untyped.Solver.declareSymbolsAt k solver sys.idents >>= sys.init
Instances For
The transition predicate from step k to step k', over symbols already declared.
Equations
- Cvc.Untyped.Sys.nextAt sys curr next = sys.next curr next
Instances For
Bounded model checking of a system, unrolled to step k.
- mk' :: (
- idents : SV.Idents
The system's state variables.
The transition relation.
The candidate invariants not falsified yet.
- solver : Solver
The solver the unrolling is asserted in.
- sVars : Symbols.TermTrace k
The state variables of every step so far.
The counterexamples found, the latest first.
Each holds its step, its trace, and the candidates it falsified.
- )
Instances For
Bounded model checking of a system, unrolled to step k.
Equations
Instances For
Bounded model checking of a system, unrolled to step k.
Equations
Instances For
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
Whether every candidate has been falsified.
Equations
- Cvc.Untyped.Sys.Bmc.isDone bmc = bmc.candidates.isEmpty
Instances For
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
Moves to step k + 1, asserting the transition to it.
Equations
- One or more equations did not get rendered due to their size.