diff options
| author | Kathy Gray | 2014-10-20 17:15:21 +0100 |
|---|---|---|
| committer | Kathy Gray | 2014-10-20 17:15:21 +0100 |
| commit | ce0f3308c6b460243e48842d55ccbddd3af61ec0 (patch) | |
| tree | eb4978119c50d8e135b4a99db3919f40dd846767 /src | |
| parent | 1dac8366337233d7969c8f63288a9a031960bacd (diff) | |
Catch more types in constructor parameters
Diffstat (limited to 'src')
| -rw-r--r-- | src/lem_interp/instruction_extractor.lem | 11 |
1 files changed, 10 insertions, 1 deletions
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 = |
