Skip to content

Commit

Permalink
also disable async TC in bv_decide et al
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Dec 12, 2024
1 parent 9df65ba commit 282c65c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/Lean/Elab/Tactic/BVDecide/Frontend/BVDecide.lean
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def bvDecide (g : MVarId) (ctx : TacticContext) : MetaM Result := do
throwError (← addMessageContextFull errorMessage)

@[builtin_tactic Lean.Parser.Tactic.bvDecide]
def evalBvTrace : Tactic := fun
def evalBvDecide : Tactic := fun
| `(tactic| bv_decide $cfg:optConfig) => do
let cfg ← elabBVDecideConfig cfg
IO.FS.withTempFile fun _ lratFile => do
Expand All @@ -319,4 +319,3 @@ def evalBvTrace : Tactic := fun

end Frontend
end Lean.Elab.Tactic.BVDecide

6 changes: 4 additions & 2 deletions src/Lean/Elab/Tactic/BVDecide/Frontend/LRAT.lean
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ def LratCert.toReflectionProof [ToExpr α] (cert : LratCert) (cfg : TacticContex
(← mkEqRefl (toExpr true))
try
let auxLemma ←
withTraceNode `sat (fun _ => return "Verifying LRAT certificate") do
mkAuxLemma [] auxType auxProof
-- disable async TC so we can catch its exceptions
withOptions (Elab.async.set · false) do
withTraceNode `sat (fun _ => return "Verifying LRAT certificate") do
mkAuxLemma [] auxType auxProof
return mkApp3 (mkConst unsat_of_verifier_eq_true) reflectedExpr certExpr (mkConst auxLemma)
catch e =>
throwError m!"Failed to check the LRAT certificate in the kernel:\n{e.toMessageData}"
Expand Down

0 comments on commit 282c65c

Please sign in to comment.