This module provides the basic infrastructure for the CEGAR (Counter Example Guided Abstraction Refinement) solver.
A hypothesis generated by the CEGAR refinement procedure.
- hyp : Normalize.Hyp
The
Expr-level non-internalized hypothesis. A
Syntax-level regular tactic proof for the hypothesis.A
Syntax-levelgrindtactic proof for the hypothesis. Ifnonewe will usehave : hypand letgrindmodes' automation figure it out.- isNormalized : Bool
Whether the hypothesis is already in
bv_decidenormal form and can skip the pre-processor.
Instances For
An entry for a particular function symbol in a model
- map : Std.HashMap (Array Std.Tactic.BVDecide.BVExpr.PackedBitVec) (Std.Tactic.BVDecide.BVExpr.PackedBitVec × Expr)
An entry is a map from inputs to the function symbol to values + the particular application of that function symbol with that value.
Instances For
A model for the UF component of the problem, derived from a SAT/BitVec model.
- model : Std.HashMap Sym.ExprPtr Entry
A model is a map from function symbols (keep in mind that these are lambdas that potentially fix some non-BitVec arguments like a dependent width) to the set of input/output pairs known for this function.
Instances For
A quantified EPR fact prepared for MBQI.
- fact : EPR.QuantifiedFact
The instantiation constants used to build the "skolem instance" of
fact.- instConstAtoms : Array ((w : Nat) × Std.Tactic.BVDecide.BVExpr w)
The reified
toBv instConstfor each ofinstConsts. The guards and the negated body of
factinstantiated withinstConsts, as well as the lemmas generated while reifying them.
Instances For
A Bool predicate UF atom of an EprTemplate.
The original, unencoded predicate if this is an application of an EPR predicate encoding.
- pattern : Expr
The predicate abstracted over its arguments, the key of the predicate in a
FunModel. - args : Array ((w : Nat) × Std.Tactic.BVDecide.BVExpr w)
The congruence-relevant arguments that the predicate is applied to.
Instances For
The quantified facts of an EPR problem.
- reifyState : State
The reification state that the expressions of the template live in.
The quantifiers themselves.
- predAtoms : Std.HashMap Nat PredAtom
The atoms of
reifyStatethat areBoolUF atoms, by atom number.
Instances For
- goal : MVarId
The meta variable that the CEGAR procedure is operating on.
- unusedHypotheses : Std.HashSet Normalize.Hyp
The set of unused hypothesis from the initial pre-processing, used for error messages later on.
- tacticContext : TacticContext
The
bv_decidegeneralTacticContext.
Instances For
State of the UF theory solver.
- congrCache : Std.HashMap Sym.ExprPtr Expr
Cache for congruence lemmas on UF theory atoms.
- currentModel : Cegar.FunModel
The most recent model produced by the UF solver.
Instances For
State of the BitVec theory solver.
The AIG built so far, incrementally extended every CEGAR step.
- blastCache : Std.Tactic.BVDecide.BVLogicalExpr.Cache self.aig
The bitblasting cached used so far, incrementally extended every CEGAR step.
- cnfCache : Std.Sat.AIG.toCNF.State self.aig
Both the CNF cache and CNF formula built up so far, incrementally extended every CEGAR step.
Instances For
State of the EPR theory solver.
- instSets : Option EPR.InstSets
The instantiation set analysis, computed at the first MBQI round and updated continously throughout the search. Before querying it needs to have been fed every ground term currently in the problem.
- template : Option Cegar.EprTemplate
The reified quantifiers for MBQI, built at the first MBQI round.
Instances For
State carried around by our theory solvers.
- funState : FunState
UF theory state.
- bitvecState : BitVecState
BitVec theory state.
- eprState : EprState
EPR theory state.
- preprocessCaches : Grind.BVDecide.Caches
Caches for the hypothesis preprocessor.
- satSolver : Cadical.Solver
The incremental SAT solver.
Instances For
- satExpr : SatAtBVLogical
The conjunction of all reflected expressions so far.
The queue of facts that will be processed at the beginning of the next CEGAR round.
The collection of hypotheses that have been used so far, used for proof recovery later on.
- didChange : Bool
Whether we should run another iteration of the procedure.
- theoryState : TheoryState
State for our various theory solvers.
- solverTimeBudgetMs : Nat
How many more milliseconds the SAT solver has to run.
- roundBudget : Nat
How many more CEGAR rounds the solver has left.
Instances For
Equations
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getReflectionResult = do let __do_lift ← get let __do_lift_1 ← read pure { satExpr := __do_lift.satExpr, unusedHypotheses := __do_lift_1.unusedHypotheses }
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getDidChange = do let __do_lift ← get pure __do_lift.didChange
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getTheoryState = do let __do_lift ← get pure __do_lift.theoryState
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getUsedHyps = do let __do_lift ← get pure __do_lift.usedHyps
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getTacticContext = do let __do_lift ← read pure __do_lift.tacticContext
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
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getSolverTime = do let __do_lift ← get pure __do_lift.solverTimeBudgetMs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getRounds = do let __do_lift ← get pure __do_lift.roundBudget
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.getSatSolver = do let __do_lift ← get pure __do_lift.theoryState.satSolver
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.Meta.Tactic.BVDecide.CegarM.createCert cert = do let lemmas ← Lean.Meta.Tactic.BVDecide.CegarM.getUsedHyps pure { lemmas := lemmas, lratCert := cert }