Browse Source

Fix test add_AL for normal interpreter

Yentl Van Tendeloo 8 years ago
parent
commit
57542c0352
2 changed files with 8 additions and 6 deletions
  1. 6 4
      integration/code/pn_simulate.alc
  2. 2 2
      scripts/run_local_modelverse.py

+ 6 - 4
integration/code/pn_simulate.alc

@@ -17,7 +17,9 @@ Boolean function simulate(model : Element):
 	Element in_arcs
 	String arc_under_study
 
-	all_transitions = allInstances(model, "PetriNets/Transition")
+	log("Got types: " + set_to_string(dict_keys(model["metamodel"]["model"])))
+
+	all_transitions = allInstances(model, "PetriNets_Runtime/Transition")
 	enabled_transitions = create_node()
 
 	while (0 < read_nr_out(all_transitions)):
@@ -25,7 +27,7 @@ Boolean function simulate(model : Element):
 		enabled = True
 
 		// Find all incoming transitions
-		in_arcs = allIncomingAssociationInstances(model, under_study, "PetriNets/P2T")
+		in_arcs = allIncomingAssociationInstances(model, under_study, "PetriNets_Runtime/P2T")
 
 		while (0 < read_nr_out(in_arcs)):
 			arc_under_study = set_pop(in_arcs)
@@ -54,7 +56,7 @@ Boolean function simulate(model : Element):
 	String working_place
 	Integer new_value
 
-	workset = allIncomingAssociationInstances(model, transition, "PetriNets/P2T")
+	workset = allIncomingAssociationInstances(model, transition, "PetriNets_Runtime/P2T")
 	while (0 < read_nr_out(workset)):
 		working_arc = set_pop(workset)
 		working_place = reverseKeyLookup(model["model"], read_edge_src(model["model"][working_arc]))
@@ -62,7 +64,7 @@ Boolean function simulate(model : Element):
 		instantiate_attribute(model, working_place, "tokens", new_value)
 
 	// Add tokens
-	workset = allOutgoingAssociationInstances(model, transition, "PetriNets/T2P")
+	workset = allOutgoingAssociationInstances(model, transition, "PetriNets_Runtime/T2P")
 	while (0 < read_nr_out(workset)):
 		working_arc = set_pop(workset)
 		working_place = reverseKeyLookup(model["model"], read_edge_dst(model["model"][working_arc]))

+ 2 - 2
scripts/run_local_modelverse.py

@@ -10,6 +10,6 @@ else:
     # There's no need to specify `--kernel=baseline-jit` here, because that's the default kernel.
     # Also, specifying a kernel here breaks the performance tests.
 
-    subprocess.call([sys.executable, "run_mvk_server.py"] + sys.argv[1:], cwd="hybrid_server")
-    #subprocess.call([sys.executable, "run_mvk_server.py"] + sys.argv[1:] + ["--kernel=baseline-jit"], cwd="hybrid_server")
+    #subprocess.call([sys.executable, "run_mvk_server.py"] + sys.argv[1:], cwd="hybrid_server")
+    subprocess.call([sys.executable, "run_mvk_server.py"] + sys.argv[1:] + ["--kernel=baseline-jit"], cwd="hybrid_server")
     #subprocess.call([sys.executable, "-m", "cProfile", "-s", "tottime", "run_mvk_server.py"] + sys.argv[1:], cwd="hybrid_server", stdout=open("/tmp/stdout", 'w'), stderr=open("/tmp/stderr", "w"))