Skip to content

Commit

Permalink
Add disable_lax_{arithmetic,pointer_ordering} (#1393)
Browse files Browse the repository at this point in the history
Fixes #1389.
  • Loading branch information
RyanGlScott authored Jul 23, 2021
1 parent 78bbe4e commit 4640425
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/SAWScript/Interpreter.hs
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,21 @@ enable_lax_arithmetic = do
rw <- getTopLevelRW
putTopLevelRW rw { rwLaxArith = True }

disable_lax_arithmetic :: TopLevel ()
disable_lax_arithmetic = do
rw <- getTopLevelRW
putTopLevelRW rw { rwLaxArith = False }

enable_lax_pointer_ordering :: TopLevel ()
enable_lax_pointer_ordering = do
rw <- getTopLevelRW
putTopLevelRW rw { rwLaxPointerOrdering = True }

disable_lax_pointer_ordering :: TopLevel ()
disable_lax_pointer_ordering = do
rw <- getTopLevelRW
putTopLevelRW rw { rwLaxPointerOrdering = False }

enable_what4_hash_consing :: TopLevel ()
enable_what4_hash_consing = do
rw <- getTopLevelRW
Expand Down Expand Up @@ -780,11 +790,21 @@ primitives = Map.fromList
Current
[ "Enable lax rules for arithmetic overflow in Crucible." ]

, prim "disable_lax_arithmetic" "TopLevel ()"
(pureVal disable_lax_arithmetic)
Current
[ "Disable lax rules for arithmetic overflow in Crucible." ]

, prim "enable_lax_pointer_ordering" "TopLevel ()"
(pureVal enable_lax_pointer_ordering)
Current
[ "Enable lax rules for pointer ordering comparisons in Crucible." ]

, prim "disable_lax_pointer_ordering" "TopLevel ()"
(pureVal disable_lax_pointer_ordering)
Current
[ "Disable lax rules for pointer ordering comparisons in Crucible." ]

, prim "enable_what4_hash_consing" "TopLevel ()"
(pureVal enable_what4_hash_consing)
Current
Expand Down

0 comments on commit 4640425

Please sign in to comment.