Browse Source

Add error state and initial state to the reachability graph generation
algorithm

Yentl Van Tendeloo 8 years ago
parent
commit
94e0d33179
1 changed files with 3 additions and 1 deletions
  1. 3 1
      models/reachability.alc

+ 3 - 1
models/reachability.alc

@@ -85,8 +85,9 @@ Element function reachability_graph(params : Element, output_mms : Element):
 	set_add(workset, state_id)
 
 	// And add in the model itself
-	state = instantiate_node(out_model, "State", cast_i2s(state_id))
+	state = instantiate_node(out_model, "InitialState", cast_i2s(state_id))
 	instantiate_attribute(out_model, state, "name", cast_i2s(state_id))
+	instantiate_attribute(out_model, state, "error", False)
 	keys = dict_keys(dict_repr)
 	while (read_nr_out(keys) > 0):
 		key = set_pop(keys)
@@ -156,6 +157,7 @@ Element function reachability_graph(params : Element, output_mms : Element):
 					// And add in the model itself
 					state = instantiate_node(out_model, "State", cast_i2s(target_id))
 					instantiate_attribute(out_model, state, "name", cast_i2s(target_id))
+					instantiate_attribute(out_model, state, "error", False)
 
 					keys = dict_keys(new_dict_repr)
 					Element sub