diff options
| author | Jon French | 2018-05-15 17:50:05 +0100 |
|---|---|---|
| committer | Jon French | 2018-05-15 17:50:05 +0100 |
| commit | e2d8fe4d847b6e8f71eecd7aa6d15799bd2a2e11 (patch) | |
| tree | af5ca7ac35244a706f9631ab8f1a4dada172f27d /src/ast_util.ml | |
| parent | ed3bb9702bd1f76041a3798f453714b0636a1b6b (diff) | |
| parent | 77b393e4f53d14955d301cbd16e22d2e7b026ede (diff) | |
Merge branch 'sail2' into mappings
Diffstat (limited to 'src/ast_util.ml')
| -rw-r--r-- | src/ast_util.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ast_util.ml b/src/ast_util.ml index 7af1b006..82e39022 100644 --- a/src/ast_util.ml +++ b/src/ast_util.ml @@ -247,6 +247,13 @@ and nexp_simp_aux = function when Big_int.equal c1 (Big_int.negate c2) -> n | _, _ -> Nexp_minus (n1, n2) end + | Nexp_neg n -> + begin + let (Nexp_aux (n_simp, _) as n) = nexp_simp n in + match n_simp with + | Nexp_constant c -> Nexp_constant (Big_int.negate c) + | _ -> Nexp_neg n + end | Nexp_app (Id_aux (Id "div",_) as id,[n1;n2]) -> begin let (Nexp_aux (n1_simp, _) as n1) = nexp_simp n1 in |
