Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macaw-symbolic: Fix interval bounds in mkGlobalPointerValidityPred #371

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions symbolic/src/Data/Macaw/Symbolic/Memory/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,26 @@ mkGlobalPointerValidityPredCommon tbl = \sym puse mcond ptr -> do
IM.IntervalCO lo hi -> do
lobv <- WI.bvLit sym w (BV.mkBV w (toInteger lo))
hibv <- WI.bvLit sym w (BV.mkBV w (toInteger hi))
lob <- WI.bvUlt sym lobv off
hib <- WI.bvUle sym off hibv
lob <- WI.bvUle sym lobv off
hib <- WI.bvUlt sym off hibv
WI.andPred sym lob hib
IM.ClosedInterval lo hi -> do
lobv <- WI.bvLit sym w (BV.mkBV w (toInteger lo))
hibv <- WI.bvLit sym w (BV.mkBV w (toInteger hi))
lob <- WI.bvUlt sym lobv off
hib <- WI.bvUlt sym off hibv
lob <- WI.bvUle sym lobv off
hib <- WI.bvUle sym off hibv
WI.andPred sym lob hib
IM.OpenInterval lo hi -> do
lobv <- WI.bvLit sym w (BV.mkBV w (toInteger lo))
hibv <- WI.bvLit sym w (BV.mkBV w (toInteger hi))
lob <- WI.bvUle sym lobv off
hib <- WI.bvUle sym off hibv
lob <- WI.bvUlt sym lobv off
hib <- WI.bvUlt sym off hibv
WI.andPred sym lob hib
IM.IntervalOC lo hi -> do
lobv <- WI.bvLit sym w (BV.mkBV w (toInteger lo))
hibv <- WI.bvLit sym w (BV.mkBV w (toInteger hi))
lob <- WI.bvUle sym lobv off
hib <- WI.bvUlt sym off hibv
lob <- WI.bvUlt sym lobv off
hib <- WI.bvUle sym off hibv
WI.andPred sym lob hib

let mkPred off = do
Expand Down
Loading