Skip to content

Commit

Permalink
remove SMT solver from RewriteStepState, use solver from arg. to eval…
Browse files Browse the repository at this point in the history
…uate (#4002)

Supplies the SMT solver from the `performRewrite` instead of a (wrong)
value from `RewriteStepState`.
We don't need the SMT solver in the `RewriteStepState` as it won't be
modified, and the old code was also setting it to `Nothing`.
  • Loading branch information
jberthold authored Jul 29, 2024
1 parent 613cb49 commit cff1bd6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions booster/library/Booster/Pattern/Rewrite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -748,8 +748,7 @@ performRewrite doTracing def mLlvmLibrary mSolver mbMaxDepth cutLabels terminalL
simplifyP p = withContext CtxSimplify $ do
st <- get
let cache = st.simplifierCache
smt = st.smtSolver
evaluatePattern def mLlvmLibrary smt cache p >>= \(res, newCache) -> do
evaluatePattern def mLlvmLibrary mSolver cache p >>= \(res, newCache) -> do
updateCache newCache
case res of
Right newPattern -> do
Expand Down Expand Up @@ -922,7 +921,6 @@ data RewriteStepsState = RewriteStepsState
{ counter :: !Natural
, traces :: !(Seq (RewriteTrace ()))
, simplifierCache :: SimplifierCache
, smtSolver :: Maybe SMT.SMTContext
}

rewriteStart :: RewriteStepsState
Expand All @@ -931,5 +929,4 @@ rewriteStart =
{ counter = 0
, traces = mempty
, simplifierCache = mempty
, smtSolver = Nothing
}

0 comments on commit cff1bd6

Please sign in to comment.