Browse Source

Fixed pn_interface which duplicated the "model" entry, sometimes resulting in empty model list

Yentl Van Tendeloo 9 years ago
parent
commit
c9c3e3fe1f
2 changed files with 3 additions and 7 deletions
  1. 2 5
      integration/code/pn_interface.alc
  2. 1 2
      make_parallel.sh

+ 2 - 5
integration/code/pn_interface.alc

@@ -119,7 +119,7 @@ Element function create_metamodels():
 		retype(mm_bottom, mm_bottom, dict_read(mm_bottom_model, "__Inheritance"), mapping)
 		export_node("models/LTM_bottom", mm_bottom)
 
-	return 0
+	return dict_read(dict_read(read_root(), "__hierarchy"), "models")
 
 String function petrinet_constraints(model : Element):
 	// Check places to have positive number of tokens
@@ -480,10 +480,7 @@ Element function initial_prompt():
 	Element my_model
 	String mm_name
 
-	create_metamodels()
-
-	dict_add(dict_read(read_root(), "__hierarchy"), "models", create_node())
-	root = dict_read(dict_read(read_root(), "__hierarchy"), "models")
+	root = create_metamodels()
 
 	while (True):
 		output("Please give your command.")

+ 1 - 2
make_parallel.sh

@@ -6,12 +6,11 @@ shift
 
 for f in "$@"
 do
-    ./compile.sh $f $RANDOM $f CO &
+    ./compile.sh $f $RANDOM $f PO &
 done
 
 for job in `jobs -p`
 do
-echo $job
     wait $job || let "FAIL+=1"
 done