From 15b2c09425912f224aa926939efb734fcf0c15be Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Wed, 20 Sep 2017 16:44:33 +0100 Subject: [PATCH] =?UTF-8?q?Adapt=20to=20new=20interface=20of=20reatk.ctrlN?= =?UTF-8?q?bac=20(=E2=89=A5=200.11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compiler/heptagon/ctrln/ctrlNbacAsEpt.ml | 7 +++++-- compiler/minils/ctrln/ctrlNbacGen.ml | 2 +- configure.in | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/compiler/heptagon/ctrln/ctrlNbacAsEpt.ml b/compiler/heptagon/ctrln/ctrlNbacAsEpt.ml index 9838ee5..e26b40f 100644 --- a/compiler/heptagon/ctrln/ctrlNbacAsEpt.ml +++ b/compiler/heptagon/ctrln/ctrlNbacAsEpt.ml @@ -244,6 +244,9 @@ let translate_expr gd e = %a" print_typ (`Bint (s, w)), flag)) | `Nuop (op, e) -> mk_nuapp ?flag op e | `Nnop (op, e, f, l) -> mk_nnapp ?flag op e f l + | `Luop _ + | `Lbop _ + | `Lsop _ -> raise (Untranslatable ("Bitwise operation", flag)) | #cond as c -> trcond ?flag tb tn c | #flag as e -> apply' tn e and mkb_ncmp ?flag re e f = @@ -264,8 +267,8 @@ let translate_expr gd e = let flt = List.exists (fun { e_ty } -> e_ty = Initial.tfloat) el in let typ = if flt then Initial.tfloat else Initial.tint in let el = if flt - then List.rev_map flttyp_exp el - else List.rev el in + then List.rev_map flttyp_exp el + else List.rev el in let op = mk_bapp (Efun (nnop typ op)) in List.fold_left (fun acc e -> mkp typ (op acc e)) (List.hd el) (List.tl el) and tp ?flag : 'f AST.exp -> _ = function diff --git a/compiler/minils/ctrln/ctrlNbacGen.ml b/compiler/minils/ctrln/ctrlNbacGen.ml index 643d77e..7d168d8 100644 --- a/compiler/minils/ctrln/ctrlNbacGen.ml +++ b/compiler/minils/ctrln/ctrlNbacGen.ml @@ -398,7 +398,7 @@ let prefix_vars ~pref vars : symb -> symb = let declare_contr (decls, contrs, vds) ({ v_ident = id; v_type = ty } as vd) rank = let v = mk_symb & name id in - SMap.add v (translate_typ ty, `Contr (one, rank, None), None) decls, + SMap.add v (translate_typ ty, `Contr (one, rank, `None), None) decls, SMap.add v (id, ty) contrs, vd :: vds diff --git a/configure.in b/configure.in index 6960eb6..220fae0 100644 --- a/configure.in +++ b/configure.in @@ -71,7 +71,7 @@ AC_CHECK_OCAML_PKG([lablgtk2]) AC_MSG_WARN([Could not find 'lablgtk2'. The simulator will not be built]) fi -dnl version should be >= 0.9.6 +dnl version should be >= 0.11 AC_CHECK_OCAML_PKG([reatk.ctrlNbac]) if test "${OCAML_PKG_reatk_ctrlNbac}" = "no"; then package_reatk_ctrlNbac="ocaml"; #dummy flag