Project

General

Profile

Revision 01d48bb0 src/automata.ml

View differences:

src/automata.ml
24 24
      actual_s : var_decl
25 25
    }
26 26

  
27
let cpvar_decl var_decl =
28
 mkvar_decl var_decl.var_loc ~orig:var_decl.var_orig (var_decl.var_id, var_decl.var_dec_type, var_decl.var_dec_clock, var_decl.var_dec_const, var_decl.var_dec_value)
29

  
27 30
let as_clock var_decl =
28 31
  let tydec = var_decl.var_dec_type in
29 32
  { var_decl with var_dec_type = { ty_dec_desc = Tydec_clock tydec.ty_dec_desc; ty_dec_loc = tydec.ty_dec_loc } }
......
99 102
  let actual_r = mk_new_name used (id ^ "__restart_act") in
100 103
  let actual_s = mk_new_name used (id ^ "__state_act") in
101 104
  {
102
    incoming_r' = mkvar_decl loc (incoming_r', tydec_bool, ckdec_any, false);
103
    incoming_s' = mkvar_decl loc (incoming_s', tydec_state typedef.tydef_id, ckdec_any, false);
104
    incoming_r = mkvar_decl loc (incoming_r, tydec_bool, ckdec_any, false);
105
    incoming_s = mkvar_decl loc (incoming_s, tydec_state typedef.tydef_id, ckdec_any, false);
106
    actual_r = mkvar_decl loc (actual_r  , tydec_bool, ckdec_any, false);
107
    actual_s = mkvar_decl loc (actual_s  , tydec_state typedef.tydef_id, ckdec_any, false)
105
    incoming_r' = mkvar_decl loc (incoming_r', tydec_bool, ckdec_any, false, None);
106
    incoming_s' = mkvar_decl loc (incoming_s', tydec_state typedef.tydef_id, ckdec_any, false, None);
107
    incoming_r = mkvar_decl loc (incoming_r, tydec_bool, ckdec_any, false, None);
108
    incoming_s = mkvar_decl loc (incoming_s, tydec_state typedef.tydef_id, ckdec_any, false, None);
109
    actual_r = mkvar_decl loc (actual_r  , tydec_bool, ckdec_any, false, None);
110
    actual_s = mkvar_decl loc (actual_s  , tydec_state typedef.tydef_id, ckdec_any, false, None)
108 111
  }
109 112

  
110 113
let vars_of_aut_state aut_state =
......
123 126
    node_id = node_id;
124 127
    node_type = Types.new_var ();
125 128
    node_clock = Clocks.new_var true;
126
    node_inputs = var_inputs;
127
    node_outputs = var_outputs;
129
    node_inputs = List.map cpvar_decl var_inputs;
130
    node_outputs = List.map cpvar_decl var_outputs;
128 131
    node_locals = [];
129 132
    node_gencalls = [];
130 133
    node_checks = [];
......
173 176
    node_id = node_id;
174 177
    node_type = Types.new_var ();
175 178
    node_clock = Clocks.new_var true;
176
    node_inputs = var_inputs;
177
    node_outputs = aut_state.incoming_r :: aut_state.incoming_s :: new_var_outputs;
178
    node_locals = new_var_locals @ handler.hand_locals;
179
    node_inputs = List.map cpvar_decl var_inputs;
180
    node_outputs = List.map cpvar_decl (aut_state.incoming_r :: aut_state.incoming_s :: new_var_outputs);
181
    node_locals = List.map cpvar_decl (new_var_locals @ handler.hand_locals);
179 182
    node_gencalls = [];
180 183
    node_checks = [];
181 184
    node_asserts = handler.hand_asserts; 

Also available in: Unified diff