Skip to content

Commit cff1bd6

Browse files
authored
remove SMT solver from RewriteStepState, use solver from arg. to evaluate (#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`.
1 parent 613cb49 commit cff1bd6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

booster/library/Booster/Pattern/Rewrite.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,8 +748,7 @@ performRewrite doTracing def mLlvmLibrary mSolver mbMaxDepth cutLabels terminalL
748748
simplifyP p = withContext CtxSimplify $ do
749749
st <- get
750750
let cache = st.simplifierCache
751-
smt = st.smtSolver
752-
evaluatePattern def mLlvmLibrary smt cache p >>= \(res, newCache) -> do
751+
evaluatePattern def mLlvmLibrary mSolver cache p >>= \(res, newCache) -> do
753752
updateCache newCache
754753
case res of
755754
Right newPattern -> do
@@ -922,7 +921,6 @@ data RewriteStepsState = RewriteStepsState
922921
{ counter :: !Natural
923922
, traces :: !(Seq (RewriteTrace ()))
924923
, simplifierCache :: SimplifierCache
925-
, smtSolver :: Maybe SMT.SMTContext
926924
}
927925

928926
rewriteStart :: RewriteStepsState
@@ -931,5 +929,4 @@ rewriteStart =
931929
{ counter = 0
932930
, traces = mempty
933931
, simplifierCache = mempty
934-
, smtSolver = Nothing
935932
}

0 commit comments

Comments
 (0)