summaryrefslogtreecommitdiff
path: root/aarch64
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-01-17 18:51:42 +0000
committerAlasdair Armstrong2018-01-18 16:13:11 +0000
commit952fcb88797a1771eb018e63e8446055e944e035 (patch)
tree12cdc5f1054dfad02fa76abd22247564eb133a21 /aarch64
parent254b72f60388271058c6d259d5a98424e94cafc7 (diff)
Modified unification so Type_check.instantiation_of works after sizeof rewriting
This change allows the AST to be type-checked after sizeof re-writing. It modifies the unification algorithm to better support checking multiplication in constraints, by using division and modulus SMT operators if they are defined. Also made sure the typechecker doesn't re-introduce E_constraint nodes, otherwise re-checking after sizeof-rewriting will re-introduce constraint nodes.
Diffstat (limited to 'aarch64')
-rw-r--r--aarch64/prelude.sail8
1 files changed, 8 insertions, 0 deletions
diff --git a/aarch64/prelude.sail b/aarch64/prelude.sail
index e81dddcb..ca7e872d 100644
--- a/aarch64/prelude.sail
+++ b/aarch64/prelude.sail
@@ -5,6 +5,14 @@ type bits ('n : Int) = vector('n, dec, bit)
infix 4 ==
+val div = {
+ smt : "div"
+} : forall 'n 'm. (atom('n), atom('m)) -> atom(div('n, 'm))
+
+val mod = {
+ smt : "mod"
+} : forall 'n 'm. (atom('n), atom('m)) -> atom(mod('n, 'm))
+
val eq_atom = "eq_int" : forall 'n 'm. (atom('n), atom('m)) -> bool
val lteq_atom = "lteq" : forall 'n 'm. (atom('n), atom('m)) -> bool
val gteq_atom = "gteq" : forall 'n 'm. (atom('n), atom('m)) -> bool