diff --git a/compiler/heptagon/transformations/automata.ml b/compiler/heptagon/transformations/automata.ml index a4f9886..013bc4e 100644 --- a/compiler/heptagon/transformations/automata.ml +++ b/compiler/heptagon/transformations/automata.ml @@ -53,7 +53,8 @@ let state_type_dec_list = ref [] (* create and add to the env the constructors corresponding to a name state *) let intro_state_constr type_name state state_env = - let c = Modules.fresh_constr "automata" state in + let n = String.capitalize (Names.shortname type_name) ^ "_" ^ state in + let c = Modules.fresh_constr "automata" n in Modules.add_constrs c type_name; NamesEnv.add state c state_env (* create and add the the global env and to state_type_dec_list @@ -75,7 +76,7 @@ let no_strong_transition state_handlers = let translate_automaton v eq_list handlers = - let type_name = Modules.fresh_type "automata" "states" in + let type_name = Modules.fresh_type "automata" "state" in (* the state env associate a name to a qualified constructor *) let state_env = List.fold_left