Cleanup for PR #123 (#129)

* Fix bextend semantics; Change smtlib.py to use z3 python bindings for query building instead of raw strings

* Forgot the mypy stubs for z3
This commit is contained in:
d1m0
2017-07-31 16:02:27 -07:00
committed by Jakob Stoklund Olesen
parent 07e1f682d0
commit 3a4a1d4faf
6 changed files with 234 additions and 54 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import absolute_import
from semantics.primitives import prim_to_bv, prim_from_bv, bvsplit, bvconcat,\
bvadd, bvult, bvzeroext
bvadd, bvult, bvzeroext, bvsignext
from .instructions import vsplit, vconcat, iadd, iadd_cout, icmp, bextend, \
isplit, iconcat, iadd_cin, iadd_carry
from .immediates import intcc
@@ -116,7 +116,7 @@ bextend.set_semantics(
a << bextend(x),
(Rtl(
bvx << prim_to_bv(x),
bvy << bvzeroext(bvx),
bvy << bvsignext(bvx),
a << prim_from_bv(bvy)
), [InTypeset(x.get_typevar(), ScalarTS)]),
Rtl(