Skip to content

Commit

Permalink
Pate.TraceConstraint: support parsing constraints for symbolic integers
Browse files Browse the repository at this point in the history
these occur when pointers have symbolic regions
  • Loading branch information
danmatichuk committed Aug 13, 2024
1 parent dcda670 commit 995e16d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Pate/TraceConstraint.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ instance forall sym. W4S.W4Deserializable sym (TraceConstraint sym) where
case (BVS.mkBVUnsigned w c) of
Just bv -> return $ TraceConstraint var op (W4.ConcreteBV w bv)
Nothing -> fail "Unexpected integer size"
W4.BaseIntegerRepr -> do
(cS :: String) <- o .: "const"
((c :: Integer),""):_ <- return $ Num.readDec cS
return $ TraceConstraint var op (W4.ConcreteInteger c)
_ -> fail ("Unsupported expression type:" ++ show (W4.exprType var))

constraintToPred ::
Expand Down

0 comments on commit 995e16d

Please sign in to comment.