From ce0f3308c6b460243e48842d55ccbddd3af61ec0 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Mon, 20 Oct 2014 17:15:21 +0100 Subject: Catch more types in constructor parameters --- src/lem_interp/instruction_extractor.lem | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lem_interp/instruction_extractor.lem b/src/lem_interp/instruction_extractor.lem index d2597740..9ff4dd49 100644 --- a/src/lem_interp/instruction_extractor.lem +++ b/src/lem_interp/instruction_extractor.lem @@ -24,7 +24,16 @@ let extract_parm (E_aux e (_,tannot)) = | Just(T_app "vector" (T_args [T_arg_nexp _; T_arg_nexp _; _; T_arg_typ (T_id "bit")]),_,_,_) -> (i,IBitvector Nothing) | _ -> (i,IOther) end - | _ -> ("UNKNOWN_PARM",IOther) + | _ -> + let i = "Unnamed" in + match tannot with + | Just(T_id "bit",_,_,_) -> (i,IBit) + | Just(T_id "bool",_,_,_) -> (i,IBit) + | Just(T_app "vector" (T_args [T_arg_nexp _; T_arg_nexp (Ne_const len); _; T_arg_typ (T_id "bit")]),_,_,_) -> + (i,IBitvector (Just len)) + | Just(T_app "vector" (T_args [T_arg_nexp _; T_arg_nexp _; _; T_arg_typ (T_id "bit")]),_,_,_) -> + (i,IBitvector Nothing) + | _ -> (i,IOther) end end let rec extract_from_decode decoder = -- cgit v1.2.3