Commit Graph

17 Commits

Author SHA1 Message Date
Dan Gohman
c59e9180de Tidy up whitespace. 2018-03-05 06:55:27 -08:00
d1m0
66da171050 Fix for #141 (#142)
* Add Atom and Literal base classes to CDSL Ast. Change substitution() and copy() on Def/Apply/Rtl to support substituting Var->Union[Var, Literal]. Check in Apply() constructor kinds of passed in Literals respect instruction signature

* Change verify_semantics to check all possible instantiations of enumerated immediates (needed to descrive icmp). Add all bitvector comparison primitives and bvite; Change set_semantics to optionally accept XForms; Add semantics for icmp; Fix typing errors in semantics/{smtlib, elaborate, __init__}.py after the change of VarMap->VarAtomMap

* Forgot macros.py

* Nit obscured by testing with mypy enabled present.

* Typo
2017-08-14 20:19:47 -07:00
d1m0
3a4a1d4faf 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
2017-07-31 16:02:27 -07:00
Dimo
ede02e0f97 Cleanup, typechecking and documentation nits 2017-07-28 10:47:08 -07:00
Dimo
1bbe644080 Add semantics for several more iadd with carry; Add xform_correct() and doc cleanup 2017-07-28 10:47:08 -07:00
Dimo
b5e1e4d454 Add smtlib.py 2017-07-28 10:47:08 -07:00
Dimo
eadb4cd39a Fix broken test_elaborate tests after the moving of is_concrete/cleanup_concrete_rtl 2017-07-28 10:47:08 -07:00
Dimo
42e0476cf4 Add primitive bvult, bvzeroext; Add semantics for bextend, icmp (partial - only for <) iadd_cout 2017-07-28 10:47:08 -07:00
Dimo
1ddee38895 cleanup_semantics() should remove repeated prim_from_bv(x) 2017-07-28 10:47:08 -07:00
Dimo
11014ec544 Nit: Make elaborate return a new Rtl instead of modifying the existing rtl inplace 2017-07-28 10:47:08 -07:00
Dimo
ef4ca676a4 Move apply() -> Xform.apply(); is_concrete_rtl() -> Rtl.is_concrete(); cleanup_concrete_rtl() -> Rtl.cleanup_concrete_rtl(). Documnetation nits in semantics.elaborate 2017-07-28 10:47:08 -07:00
Dimo
71f1646675 With multiple semantic transforms mentioning Enumerators, it may be possible for there not to be a substitution from the concrete rtl to some of the transforms. This is not an error - just a case where a given semantic transform doesnt apply. (e.g. icmp being described by different transforms with concrete intcc condition codes) 2017-07-28 10:47:08 -07:00
Dimo
e41ddf2a0d Change TV ranking to select src vars as a representative during unification; Nit: cleanup dot() emitting code; Nit: fix small bug in verify_semantics() - make an internal copy of src rtl to avoid clobbering of typevars re-used in multiple definitions 2017-07-25 15:38:48 -07:00
Dimo
7caaf7fea1 Fix CI: Var was only imported when mypy was present. 2017-07-24 14:08:44 -07:00
Dimo
dfb5a524b9 TI failure due to misplaced import 2017-07-24 14:08:44 -07:00
Dimo
74f72a3b43 Documentation nits; Sematnics syntax cleanup 2017-07-24 14:08:44 -07:00
Dimo
a5fe64440f Add insturction semantics. Add semantics for vsplit,vconcat,iadd. Add initial tests 2017-07-24 14:08:44 -07:00