Skip to content

Commit

Permalink
Merge pull request #2226 from GaloisInc/T2223-bump-submodules-BoolMap
Browse files Browse the repository at this point in the history
Bump `what4` submodule (and friends) to bring in GaloisInc/what4#277 changes
  • Loading branch information
RyanGlScott authored Feb 17, 2025
2 parents bce996a + a6c47f2 commit 692d8fb
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@
[submodule "deps/mir-json"]
path = deps/mir-json
url = https://github.com/GaloisInc/mir-json.git
[submodule "deps/macaw-loader"]
path = deps/macaw-loader
url = https://github.com/GaloisInc/macaw-loader.git
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ packages:
deps/lmdb/lmdb
deps/lmdb/lmdb-simple
deps/macaw/base
deps/macaw/macaw-dump
deps/macaw/symbolic
deps/macaw/x86
deps/macaw/x86_symbolic
deps/macaw-loader/macaw-loader
deps/macaw-loader/macaw-loader-x86
deps/elf-edit
deps/dwarf
deps/argo/argo
Expand Down
2 changes: 1 addition & 1 deletion deps/crucible
2 changes: 1 addition & 1 deletion deps/macaw
Submodule macaw updated 118 files
1 change: 1 addition & 0 deletions deps/macaw-loader
Submodule macaw-loader added at 57ebde
18 changes: 9 additions & 9 deletions saw-core-what4/src/Verifier/SAW/Simulator/What4/ReturnTrip.hs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ data SAWExpr (bt :: BaseType) where
getInputs :: SAWCoreState n -> IO (Seq (SC.ExtCns SC.Term))
getInputs st = readIORef (saw_inputs st)

baseSCType ::
baseSCType ::
sym ->
SC.SharedContext ->
BaseTypeRepr tp ->
Expand Down Expand Up @@ -600,10 +600,10 @@ evaluateExpr sym st sc cache = f []
goNeg env x

B.ConjPred xs ->
case BM.viewBoolMap xs of
BM.BoolMapUnit -> SAWExpr <$> SC.scBool sc True
BM.BoolMapDualUnit -> SAWExpr <$> SC.scBool sc False
BM.BoolMapTerms (t:|ts) ->
case BM.viewConjMap xs of
BM.ConjTrue -> SAWExpr <$> SC.scBool sc True
BM.ConjFalse -> SAWExpr <$> SC.scBool sc False
BM.Conjuncts (t:|ts) ->
let pol (x,BM.Positive) = f env x
pol (x,BM.Negative) = termOfSAWExpr sym sc =<< goNeg env x
in SAWExpr <$> join (foldM (SC.scAnd sc) <$> pol t <*> mapM pol ts)
Expand Down Expand Up @@ -940,10 +940,10 @@ evaluateExpr sym st sc cache = f []
case expr of
-- negation of (x /\ y) becomes (~x \/ ~y)
B.AppExpr (B.appExprApp -> B.ConjPred xs) ->
case BM.viewBoolMap xs of
BM.BoolMapUnit -> SAWExpr <$> SC.scBool sc False
BM.BoolMapDualUnit -> SAWExpr <$> SC.scBool sc True
BM.BoolMapTerms (t:|ts) ->
case BM.viewConjMap xs of
BM.ConjTrue -> SAWExpr <$> SC.scBool sc False
BM.ConjFalse -> SAWExpr <$> SC.scBool sc True
BM.Conjuncts (t:|ts) ->
let pol (x, BM.Positive) = termOfSAWExpr sym sc =<< goNegAtom env x
pol (x, BM.Negative) = f env x
in SAWExpr <$> join (foldM (SC.scOr sc) <$> pol t <*> mapM pol ts)
Expand Down

0 comments on commit 692d8fb

Please sign in to comment.