@@ -11,6 +11,7 @@ def parseSmt2File (path : System.FilePath) : MetaM Expr := do
1111 ofExcept (Parser.parseSmt2Query query)
1212
1313
14+ open Meta in
1415open Elab in
1516def decideSmt (type : Expr) : SolverM UInt8 := do
1617 let mv ← Meta.mkFreshExprMVar type
@@ -19,8 +20,8 @@ def decideSmt (type : Expr) : SolverM UInt8 := do
1920 try
2021 mv'.withContext $ IO.FS.withTempFile fun _ lratFile => do
2122 let cfg ← SolverM.getBVDecideConfig
22- let ctx ← (Tactic.BVDecide.Frontend. TacticContext.new lratFile cfg).run' { declName? := `lrat }
23- discard <| Tactic.BVDecide.Frontend. bvDecide mv' ctx
23+ let ctx ← (Tactic.BVDecide.TacticContext.new lratFile cfg).run' { declName? := `lrat }
24+ discard <| Tactic.BVDecide.bvDecide mv' ctx
2425 catch e =>
2526 -- TODO: improve handling of sat cases. This is a temporary workaround.
2627 let message ← e.toMessageData.toString
@@ -110,15 +111,15 @@ open Cli
110111
111112open Elab.Tactic.BVDecide.Frontend
112113
113- deriving instance Inhabited for SolverMode
114+ deriving instance Inhabited for Elab.Tactic.BVDecide. SolverMode
114115
115- instance : ToString SolverMode where
116+ instance : ToString Elab.Tactic.BVDecide. SolverMode where
116117 toString
117118 | .proof => "proof"
118119 | .counterexample => "counterexample"
119120 | .default => "default"
120121
121- instance : ParseableType SolverMode where
122+ instance : ParseableType Elab.Tactic.BVDecide. SolverMode where
122123 name := "SolverMode"
123124 parse?
124125 | "proof" => some .proof
@@ -131,7 +132,7 @@ unsafe def runLeanwuzlaCmd (p : Parsed) : IO UInt32 := do
131132 let context := argsToContext p
132133 Lean.initSearchPath (← Lean.findSysroot)
133134 enableInitializersExecution
134- let env ← importModules #[`Std.Tactic.BVDecide, `Leanwuzla.Aux ] {} 0 (loadExts := true )
135+ let env ← importModules #[`Std.Tactic.BVDecide, `Leanwuzla.Auxiliary ] {} 0 (loadExts := true )
135136 let coreContext := { fileName := "leanwuzla" , fileMap := default, options }
136137 let coreState := { env }
137138 let code ← SolverM.run parseAndDecideSmt2File context coreContext coreState
@@ -180,7 +181,7 @@ where
180181 disableAndFlatten := p.hasFlag "disableAndFlatten"
181182 disableEmbeddedConstraintSubst := p.hasFlag "disableEmbeddedConstraintSubst"
182183 disableKernel := p.hasFlag "disableKernel"
183- solverMode := p.flag! "solverMode" |>.as! SolverMode
184+ solverMode := p.flag! "solverMode" |>.as! Elab.Tactic.BVDecide. SolverMode
184185 }
185186
186187unsafe def leanwuzlaCmd : Cmd := `[Cli|
@@ -202,7 +203,7 @@ unsafe def leanwuzlaCmd : Cmd := `[Cli|
202203 disableAndFlatten; "Disable the and flattening pass."
203204 disableEmbeddedConstraintSubst; "Disable the embedded constraints substitution pass."
204205 disableKernel; "Disable the Lean kernel, that is only verify the LRAT cert, no reflection proof"
205- solverMode : SolverMode; "Select the SAT solver configuration to use (`proof`, `counterexample`, `default`)."
206+ solverMode : Elab.Tactic.BVDecide. SolverMode; "Select the SAT solver configuration to use (`proof`, `counterexample`, `default`)."
206207
207208 ARGS:
208209 input : String; "Path to the smt2 file to work on"
@@ -215,7 +216,7 @@ unsafe def leanwuzlaCmd : Cmd := `[Cli|
215216 ("pthreshold" , toString trace.profiler.threshold.defValue),
216217 ("maxSteps" , toString Lean.Meta.Simp.defaultMaxSteps),
217218 ("expthreshold" , toString exponentiation.threshold.defValue),
218- ("solverMode" , toString SolverMode.proof)
219+ ("solverMode" , toString Lean.Elab.Tactic.BVDecide. SolverMode.proof)
219220 ]
220221]
221222
0 commit comments