diff options
| author | Alasdair Armstrong | 2018-01-17 18:51:42 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-01-18 16:13:11 +0000 |
| commit | 952fcb88797a1771eb018e63e8446055e944e035 (patch) | |
| tree | 12cdc5f1054dfad02fa76abd22247564eb133a21 /aarch64 | |
| parent | 254b72f60388271058c6d259d5a98424e94cafc7 (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.sail | 8 |
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 |
