mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-12-25 07:02:59 +03:00
Add a translation for the undefined value from semmc
This commit is contained in:
parent
3b763bf347
commit
18d5ac3fe4
@ -36,6 +36,7 @@ import qualified Data.Parameterized.ShapedList as SL
|
|||||||
import Data.Parameterized.Some ( Some(..) )
|
import Data.Parameterized.Some ( Some(..) )
|
||||||
import qualified Data.Parameterized.TraversableFC as FC
|
import qualified Data.Parameterized.TraversableFC as FC
|
||||||
import Data.Parameterized.Witness ( Witness(..) )
|
import Data.Parameterized.Witness ( Witness(..) )
|
||||||
|
import qualified Lang.Crucible.BaseTypes as CT
|
||||||
import qualified Lang.Crucible.Solver.Interface as SI
|
import qualified Lang.Crucible.Solver.Interface as SI
|
||||||
import qualified Lang.Crucible.Solver.SimpleBuilder as S
|
import qualified Lang.Crucible.Solver.SimpleBuilder as S
|
||||||
import qualified Lang.Crucible.Solver.SimpleBackend as S
|
import qualified Lang.Crucible.Solver.SimpleBackend as S
|
||||||
@ -472,6 +473,11 @@ evalNonceAppTH bvi nonceApp =
|
|||||||
locExp <- addEltTH bvi loc
|
locExp <- addEltTH bvi loc
|
||||||
liftQ [| addExpr (AppExpr (M.PopCount (NR.knownNat @64) $(return locExp))) |]
|
liftQ [| addExpr (AppExpr (M.PopCount (NR.knownNat @64) $(return locExp))) |]
|
||||||
_ -> fail ("Unsupported argument list for popcnt: " ++ showF args)
|
_ -> fail ("Unsupported argument list for popcnt: " ++ showF args)
|
||||||
|
"undefined" -> do
|
||||||
|
case S.nonceAppType nonceApp of
|
||||||
|
CT.BaseBVRepr n ->
|
||||||
|
liftQ [| M.AssignedValue <$> addAssignment (M.SetUndefined (M.BVTypeRepr $(natReprTH n))) |]
|
||||||
|
nt -> fail ("Invalid type for undefined: " ++ show nt)
|
||||||
_ | Just nBytes <- readMemBytes fnName -> do
|
_ | Just nBytes <- readMemBytes fnName -> do
|
||||||
case FC.toListFC Some args of
|
case FC.toListFC Some args of
|
||||||
[_, Some addrElt] -> do
|
[_, Some addrElt] -> do
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 6a48bfafe3a1c3992904a4c2b782af32f5672bb9
|
Subproject commit 44e45f2e58b47c171e31c8ccc272c8b9dbd7fdd9
|
Loading…
Reference in New Issue
Block a user