diff --git a/src/astPredef.ml b/src/astPredef.ml index 39392df4a1dc923765dad7d86b68b826bb9f5794..41942ad664fbbb99bc3deacb4ad2a5482a477d7b 100644 --- a/src/astPredef.ml +++ b/src/astPredef.ml @@ -93,7 +93,7 @@ let op2string = function | AND_n -> "and" | OR_n -> "or" | XOR_n -> "xor" - | IMPL_n -> "=>" + | IMPL_n -> if Lv6MainArgs.global_opt.Lv6MainArgs.kcg then assert false else "=>" | EQ_n -> "=" | NEQ_n -> "<>" | LT_n | ILT_n | RLT_n -> "<" @@ -108,7 +108,7 @@ let op2string = function | UMINUS_n -> "-" | MINUS_n -> "-" | PLUS_n -> "+" - | SLASH_n -> "/" + | SLASH_n -> if Lv6MainArgs.global_opt.Lv6MainArgs.kcg then "div" else "/" | TIMES_n -> "*" | IUMINUS_n -> "-" | IMINUS_n -> "-" diff --git a/src/l2lCheckKcgKeyWord.ml b/src/l2lCheckKcgKeyWord.ml index 388eda8c66eb74b17222ccd3e08d800bfa3ed5a4..ef90150ddce5e696a91adca0dd7019fa48e47391 100644 --- a/src/l2lCheckKcgKeyWord.ml +++ b/src/l2lCheckKcgKeyWord.ml @@ -15,7 +15,9 @@ module StringSet = let compare = compare end) -let kcg_kw_list = ["state";"clock";"initial"] +let kcg_kw_list = ["state";"clock";"initial";"abstract"; "activate";"and";"assume";"automaton";"bool";"case"; "char"; "const";"default";"div"; "do";"else"; "elsif"; "emit"; "end"; "enum"; "every";"false"; "fby"; "final"; "flatten"; "fold"; "foldi"; "foldw";" foldwi"; "function"; +"guarantee";"group";"if";"imported";"initial";"int";"is";"last";"let";"make";"map";"mapfold";"mapi"; "mapw";"mapwi";"match";"merge";"mod";"node";"not";"numeric";"of";"onreset";"open";"or";"package";"parameter";"pre";"private";"probe";"public";"real";"restart";"resume";"returns";"reverse";"sensor";"sig";"specialize";"synchro";"tel";"then";"times";"transpose";"true";"unless";"until";"var";"when";"where";"with";"xor"] + let kcg_kw = StringSet.of_list kcg_kw_list let (check_var_info : Lic.var_info -> unit) = diff --git a/src/licDump.ml b/src/licDump.ml index e50746bec99838e8e4734f7671ab027f6375ee52..8b14890459f83540b01888788116599b314ffcb3 100644 --- a/src/licDump.ml +++ b/src/licDump.ml @@ -263,7 +263,7 @@ and string_of_node_key_rec (no_prefix:bool) (nkey: node_key) = then Lv6Id.no_pack_string_of_long ik else Lv6Id.string_of_long ik | (ik, salst) -> - (*if global_opt.kcg then ((* recursive nodes have been unfold *) + if global_opt.kcg then ((* recursive nodes have been unfold *) (*assert (List.mem ik ["map"]);*) (* not yet working : - cas des noeuds itérés prédéfinis @@ -288,7 +288,7 @@ and string_of_node_key_rec (no_prefix:bool) (nkey: node_key) = (FreshName.node_key nkey name) ) - else *) + else let astrings = List.map static_arg2string_bis salst in let name = sprintf "%s_%s" (Lv6Id.no_pack_string_of_long ik) (String.concat "_" astrings) in (FreshName.node_key nkey name) @@ -500,7 +500,9 @@ and (string_of_by_pos_op_eff: Lic.by_pos_op srcflagged -> Lic.val_exp list -> st | WHEN clk, vel -> (tuple vel) ^ (string_of_clock clk) | CURRENT Some _,_ -> (* transform to merge in kcg mode *) - "current " ^ tuple_par (if global_opt.ec then List.tl vel else vel) + if global_opt.kcg then assert false + else + "current " ^ tuple_par (if global_opt.ec then List.tl vel else vel) | CURRENT None,_ -> "current " ^ tuple_par vel | TUPLE,_ -> (tuple vel) | CONCAT, [ve1; ve2] ->