瀏覽代碼

Print the name of the generated state as well

Yentl Van Tendeloo 8 年之前
父節點
當前提交
c6aec5c717
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      integration/code/reachabilitygraph_print.mvc

+ 4 - 4
integration/code/reachabilitygraph_print.mvc

@@ -27,8 +27,8 @@ ReachabilityGraph_RAM reachabilitygraph_print {
                             while (read_nr_out(all_values) > 0):
                                 place = set_pop(all_values)
                                 dict_add(dict_values, read_attribute(model, place, "name"), read_attribute(model, place, "tokens"))
-                            log((cast_v2s(mapping["0"]) + ": ") + dict_to_string(dict_values))
-                            output((cast_v2s(mapping["0"]) + ": ") + dict_to_string(dict_values))
+                            log((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
+                            output((cast_v2s(read_attribute(model, name, "name")) + ": ") + dict_to_string(dict_values))
                             return!
                         $
                 }
@@ -59,8 +59,8 @@ ReachabilityGraph_RAM reachabilitygraph_print {
                     action = $
                         Void function action(model : Element, name : String, mapping : Element):
                             log("Transition action")
-                            log((((cast_v2s(mapping["0"]) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(mapping["1"]))
-                            output((((cast_v2s(mapping["0"]) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(mapping["1"]))
+                            log((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
+                            output((((cast_v2s(read_attribute(model, mapping["0"], "name")) + " --[") + cast_v2s(read_attribute(model, name, "name"))) + "]--> ") + cast_v2s(read_attribute(model, mapping["1"], "name")))
                             return!
                         $
                 }