Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ana-pantilie committed Feb 21, 2023
1 parent ab95859 commit 416e7fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions kore/src/Kore/Rewrite/SMT/Evaluator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ decidePredicate onUnknown sideCondition predicates =
debugEvaluateConditionResult result
case result of
Unsat -> do
return False
Sat -> do
heuristicResult <- queryWithHeuristic predicates
case heuristicResult of
Unsat -> return False
Expand All @@ -186,7 +188,6 @@ decidePredicate onUnknown sideCondition predicates =
SMT.reinit
_ -> pure ()
empty
Sat -> empty
Unknown -> do
limit <- SMT.withSolver SMT.askRetryLimit
-- depending on the value of `onUnknown`, this call will either log a warning
Expand Down Expand Up @@ -228,7 +229,7 @@ decidePredicate onUnknown sideCondition predicates =
preds'
traverse_ SMT.assert predicates'
SMT.check
hoistMaybe (find SimpleSMT.isSat results)
hoistMaybe (find SimpleSMT.isUnSat results)

applyHeuristic :: Predicate variable -> LogicT m (Predicate variable)
applyHeuristic (Predicate.PredicateNot (Predicate.PredicateExists var child)) = do
Expand Down
8 changes: 4 additions & 4 deletions kore/src/SMT/SimpleSMT.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module SMT.SimpleSMT (
assert,
check,
Result (..),
isSat,
isUnSat,
getExprs,
getExpr,
getConsts,
Expand Down Expand Up @@ -261,9 +261,9 @@ data Result
Unknown
deriving stock (Eq, Show)

isSat :: Result -> Bool
isSat Sat = True
isSat _ = False
isUnSat :: Result -> Bool
isUnSat Sat = True
isUnSat _ = False

-- | Common values returned by SMT solvers.
data Value
Expand Down

0 comments on commit 416e7fe

Please sign in to comment.