From b60e8ab4bb65d2d320cc13f3db2edc9a7478ef7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Thu, 9 Jun 2011 14:12:54 +0200 Subject: [PATCH] Better automata variable names. --- compiler/heptagon/transformations/automata.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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