From 934c9f9a85a560a2405c0e55c0b2e2f32b8f768d Mon Sep 17 00:00:00 2001 From: Nicolas Berthier Date: Wed, 20 Nov 2013 12:13:01 +0100 Subject: [PATCH] Handle `when' operators for non-Boolean expressions in Controllable-Nbac backend. --- compiler/minils/ctrl-n/ctrlNbacGen.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/minils/ctrl-n/ctrlNbacGen.ml b/compiler/minils/ctrl-n/ctrlNbacGen.ml index 653f605..4cbaef5 100644 --- a/compiler/minils/ctrl-n/ctrlNbacGen.ml +++ b/compiler/minils/ctrl-n/ctrlNbacGen.ml @@ -126,11 +126,13 @@ let rec translate_ext_bexp ~pref : _ -> bexp = function and translate_ext_eexp ~pref : _ -> eexp = function | Wconst se -> translate_static_eexp se | Wvar id -> `Ref (pref & mk_var & name id) + | Wwhen (ev, _, _) -> translate_ext_eexp ~pref ev.w_desc | _ -> failwith "TODO Unsupported Enum expression!" and translate_ext_nexp ~pref : _ -> nexp = function | Wconst se -> translate_static_nexp se | Wvar id -> `Ref (pref & mk_var & name id) + | Wwhen (ev, _, _) -> translate_ext_nexp ~pref ev.w_desc | _ -> failwith "TODO Unsupported Numerical expression!" let translate_ext ~pref ext = match translate_typ ext.w_ty with