Browse Source

Removed the in/out place code again, as it is easier to do it manually for manual updates to the fused metamodel

Yentl Van Tendeloo 8 years ago
parent
commit
a6273e471e

BIN
bootstrap/bootstrap.m.gz


+ 20 - 11
bootstrap/model_management.alc

@@ -6,7 +6,7 @@ include "metamodels.alh"
 include "library.alh"
 include "modelling.alh"
 
-Element function model_fuse(models : Element):
+Element function model_fuse(name1 : String, model1 : Element, name2 : String, model2 : Element):
 	Element new_model
 	Element tagged_model
 	String model_name
@@ -15,15 +15,24 @@ Element function model_fuse(models : Element):
 	String key
 	Element selected_MM
 	String type
+	Element models
 
 	// Read out some data first
-	tagged_model = set_pop(models)
-	set_add(models, tagged_model)
-	model = list_read(tagged_model, 1)
-	selected_MM = model["metamodel"]
+	selected_MM = model1["metamodel"]
 	new_model = instantiate_model(selected_MM)
 
-	models = set_copy(models)
+	// Create a list to nicely iterate over it
+	models = create_node()
+	tagged_model = create_node()
+	list_append(tagged_model, name1)
+	list_append(tagged_model, model1)
+	list_append(models, tagged_model)
+	tagged_model = create_node()
+	list_append(tagged_model, name2)
+	list_append(tagged_model, model2)
+	list_append(models, tagged_model)
+
+	// Do the iteration
 	while (read_nr_out(models)):
 		tagged_model = set_pop(models)
 		model_name = list_read(tagged_model, 0)
@@ -38,16 +47,16 @@ Element function model_fuse(models : Element):
 			if (is_edge(model["model"][key])):
 				String src
 				String dst
-				src = (model_name + "/") + reverseKeyLookup(model["model"], read_edge_src(model["model"][key]))
-				dst = (model_name + "/") + reverseKeyLookup(model["model"], read_edge_dst(model["model"][key]))
+				src = model_name + reverseKeyLookup(model["model"], read_edge_src(model["model"][key]))
+				dst = model_name + reverseKeyLookup(model["model"], read_edge_dst(model["model"][key]))
 				if (bool_and(dict_in(new_model["model"], src), dict_in(new_model["model"], dst))):
-					instantiate_link(new_model, type, (model_name + "/") + key, (model_name + "/") + src, (model_name + "/") + dst)
+					instantiate_link(new_model, type, model_name + key, src, dst)
 				else:
 					list_append(keys, key)
 			elif (has_value(model["model"][key])):
-				instantiate_value(new_model, type, (model_name + "/") + key, model["model"][key])
+				instantiate_value(new_model, type, model_name + key, model["model"][key])
 			else:
-				instantiate_node(new_model, type, (model_name + "/") + key)
+				instantiate_node(new_model, type, model_name + key)
 
 	return new_model!
 

+ 1 - 0
bootstrap/modelling.alc

@@ -458,6 +458,7 @@ Void function construct_model():
 	String command
 	while (True):
 		command = input()
+		log(command)
 		if (command == "instantiate_bottom"):
 			Element m
 			m = instantiate_bottom()

+ 7 - 61
bootstrap/ramify.alc

@@ -4,47 +4,6 @@ include "modelling.alh"
 include "metamodels.alh"
 include "model_management.alh"
 
-Element function create_outplace_transformation_language(source : Element, target : Element):
-	log("Create outplace model!")
-	Element ramified
-	Element fused
-	Element tagged_model
-	Element model_list
-
-	// out-place transformation, so modify meta-model a bit and add further information
-	model_list = create_node()
-	tagged_model = create_node()
-	list_append(tagged_model, "SOURCE")
-	list_append(tagged_model, source)
-	list_append(model_list, tagged_model)
-	tagged_model = create_node()
-	list_append(tagged_model, "TARGET")
-	list_append(tagged_model, target)
-	list_append(model_list, tagged_model)
-
-	fused = model_fuse(model_list)
-	ramified = ramify(fused)
-
-	// Augment with information about the source and target
-	dict_add(ramified, "inplace", False)
-	dict_add(ramified, "source", source)
-	dict_add(ramified, "target", target)
-	dict_add(ramified, "fused", fused)
-
-	return ramified!
-
-Element function create_inplace_transformation_language(model : Element):
-	log("Create inplace model!")
-	Element ramified
-
-	ramified = ramify(model)
-
-	dict_add(ramified, "inplace", True)
-	dict_add(ramified, "source", model)
-	dict_add(ramified, "target", model)
-
-	return ramified!
-
 Element function ramify(model : Element):
 	// Create new model structure
 	Element new_model
@@ -54,6 +13,9 @@ Element function ramify(model : Element):
 	dict_add(new_model, "metamodel", model["metamodel"])
 	dict_add(new_model, "inheritance", model["inheritance"])
 
+	dict_add(new_model, "source", model)
+	dict_add(new_model, "target", model)
+
 	// Get local variables for parts
 	Element old_m
 	Element new_m
@@ -260,26 +222,6 @@ Element function ramify(model : Element):
 	instantiate_attribute(new_model, "QueryLHS", "target_lower_cardinality", 1)
 	instantiate_attribute(new_model, "QueryLHS", "target_upper_cardinality", 1)
 
-	// 	Class ForAll : Rule {}
-	instantiate_node(new_model, "Class", "ForAll")
-	instantiate_link(new_model, "Inheritance", "", "Atomic", "ForAll")
-
-	//	Association ForAllLHS (ForAll, LHS) {
-	//		target_lower_cardinality = 1
-	//		target_upper_cardinality = 1
-	//	}
-	instantiate_link(new_model, "Association", "ForAllLHS", "ForAll", "LHS")
-	instantiate_attribute(new_model, "ForAllLHS", "target_lower_cardinality", 1)
-	instantiate_attribute(new_model, "ForAllLHS", "target_upper_cardinality", 1)
-
-	//	Association ForAllRHS (ForAll, RHS) {
-	//		target_lower_cardinality = 1
-	//		target_upper_cardinality = 1
-	//	}
-	instantiate_link(new_model, "Association", "ForAllRHS", "ForAll", "RHS")
-	instantiate_attribute(new_model, "ForAllRHS", "target_lower_cardinality", 1)
-	instantiate_attribute(new_model, "ForAllRHS", "target_upper_cardinality", 1)
-
 	//	Class Atomic : Rule {}
 	instantiate_node(new_model, "Class", "Atomic")
 	instantiate_link(new_model, "Inheritance", "", "Atomic", "Rule")
@@ -300,6 +242,10 @@ Element function ramify(model : Element):
 	instantiate_attribute(new_model, "AtomicRHS", "target_lower_cardinality", 1)
 	instantiate_attribute(new_model, "AtomicRHS", "target_upper_cardinality", 1)
 
+	// 	Class ForAll : Atomic {}
+	instantiate_node(new_model, "Class", "ForAll")
+	instantiate_link(new_model, "Inheritance", "", "ForAll", "Atomic")
+
 	//	Class Composite : Rule {}
 	instantiate_node(new_model, "Class", "Composite")
 	instantiate_link(new_model, "Inheritance", "", "Composite", "Rule")

+ 4 - 30
bootstrap/transform.alc

@@ -279,21 +279,6 @@ Element function transform(host_model : Element, schedule_model : Element):
 	Element merged
 	Element original_mm
 
-	if (bool_not(schedule_model["metamodel"]["inplace"])):
-		// Do some preliminary changes if it is deemed out-place!
-		// Need to make sure that:
-		//		1) a fused language is created of source and target
-		// 		2) the host_model conforms to the fused language
-
-		// 1) Merge the languages
-		merged = schedule_model["metamodel"]["fused"]
-
-		// 2a) Copy host_model, as we will change its typing information and content out-place
-		host_model = model_copy(host_model)
-		
-		// 2b) Retype all elements of host_model in the merged language
-		model_retype_on_name(host_model, merged, "+", "SOURCE/")
-
 	// Now start transforming for real
 	all_composites = allInstances(schedule_model, "Composite")
 	if (read_nr_out(all_composites) == 1):
@@ -309,22 +294,11 @@ Element function transform(host_model : Element, schedule_model : Element):
 
 	if (transform_composite(host_model, schedule_model, current)):
 		// Success, so return True if it is in-place, or the new model if it is out-place
-		if (schedule_model["inplace"]):
-			log("Transform success!")
-			return True!
-		else:
-			// Prepare the model before sending it back
-			// Only keep elements with TARGET types and retype them to original
-			model_retype_on_name(host_model, original_mm, "-", "TARGET/")
-
-			return read_root()!
+		log("Transform success!")
+		return True!
 	else:
-		// Failure, so return False if it is in-place, or the root node if it is out-place
-		if (schedule_model["inplace"]):
-			log("Transform failed!")
-			return False!
-		else:
-			return read_root()!
+		log("Transform failed!")
+		return False!
 
 Boolean function transform_composite(host_model : Element, schedule_model : Element, composite : String):
 	String current

+ 68 - 28
integration/code/pn_interface.alc

@@ -9,6 +9,7 @@ include "modelling.alh"
 include "compilation_manager.alh"
 include "ramify.alh"
 include "transform.alh"
+include "model_management.alh"
 
 Element function model_loaded(model : Element):
 	String cmd
@@ -384,6 +385,66 @@ Element function main():
 			output("Switching to compilation manager!")
 			compilation_manager()
 			output("Back in model manager!")
+		elif (command == "unify"):
+			String mm1
+			String mm2
+			String name1
+			String name2
+			Element result
+			name = input()
+			if (dict_in(root, name)):
+				output("Already exists; aborting")
+			else:
+				output("Which language do you want to unify?")
+				mm1 = input()
+				if (dict_in(root, mm1)):
+					output("Name of this language in the unification")
+					name1 = input()
+					output("Second language to unify?")
+					mm2 = input()
+					if (dict_in(root, mm2)):
+						output("Name of this language in the unification")
+						name2 = input()
+						log("Calling model_fuse")
+						result = model_fuse(name1, root[mm1], name2, root[mm2])
+						dict_add(root, name, result)
+					else:
+						output("Second model not found; aborting")
+				else:
+					output("Model not found; aborting")
+		elif (command == "split"):
+			String mm_name
+			String value
+
+			output("Name of the model to split up?")
+			name = input()
+			if (dict_in(root, name)):
+				output("Name of new metamodel?")
+				mm_name = input()
+				if (dict_in(root, mm_name)):
+					output("Typename to split?")
+					value = input()
+					model_retype_on_name(root[name], root[mm_name], "-", value)
+				else:
+					output("No such metamodel; aborting")
+			else:
+				output("No such model; aborting")
+		elif (command == "join"):
+			String mm_name
+			String value
+
+			output("Model name?")
+			name = input()
+			if (dict_in(root, name)):
+				output("New metamodel?")
+				mm_name = input()
+				if (dict_in(root, mm_name)):
+					value = input()
+					model_retype_on_name(root[name], root[mm_name], "+", value)
+				else:
+					output("No such metamodel; aborting")
+			else:
+				output("No such model; aborting")
 		elif (command == "ramify"):
 			Element result
 			String old_name
@@ -392,35 +453,14 @@ Element function main():
 			if (dict_in(root, name)):
 				output("Already exists; aborting")
 			else:
-				String type
-				output("In-place (in) or Out-place (out)?")
-				type = input()
-				if (type == "in"):
-					output("Source language?")
-					String source
-					source = input()
-					if (dict_in(root, source)):
-						result = create_inplace_transformation_language(root[source])
-						dict_add(root, name, result)
-					else:
-						output("Unknown source language; aborting")
-				elif (type == "out"):
-					output("Source language?")
-					String source
-					String target
-					source = input()
-					if (dict_in(root, source)):
-						output("Target language?")
-						target = input()
-						if (dict_in(root, target)):
-							result = create_outplace_transformation_language(root[source], root[target])
-							dict_add(root, name, result)
-						else:
-							output("Unknown target language; aborting")
-					else:
-						output("Unknown source language; aborting")
+				output("Source language?")
+				String source
+				source = input()
+				if (dict_in(root, source)):
+					result = ramify(root[source])
+					dict_add(root, name, result)
 				else:
-					output("Unknown type of model transformation!")
+					output("Unknown source language; aborting")
 		elif (command == "transform"):
 			Element result
 			String schedule

+ 279 - 44
integration/test_pn_interface.py

@@ -31,6 +31,7 @@ all_files = [   "pn_interface.alc",
                 "conformance_scd.alc",
                 "library.alc",
                 "transform.alc",
+                "model_management.alc",
                 "ramify.alc",
                 "metamodels.alc",
                 "random.alc",
@@ -971,7 +972,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
                             }
                         }
                     }
-                    {Contains} Atomic consume {
+                    {Contains} ForAll consume {
                         LHS {
                             Pre_Transition lhs_consume_t{
                                 label = "0"
@@ -985,13 +986,6 @@ Void function action(host_model : Element, name : String, mapping : Element):
                             }
                             Pre_Place lhs_consume_p{
                                 label = "1"
-                                constraint = $
-                                    include "primitives.alh"
-                                    include "modelling.alh"
-                                    Boolean function constraint(host_model : Element, name : String):
-                                        // Check if this node is executing currently
-                                        return value_eq(read_attribute(host_model, name, "executed"), False)!
-                                    $
                             }
                             Pre_P2T lhs_consume_p2t(lhs_consume_p, lhs_consume_t){
                                 label = "2"
@@ -1013,8 +1007,6 @@ Void function action(host_model : Element, name : String, mapping : Element):
                                         weight = read_attribute(host_model, mapping["2"], "weight")
                                         unset_attribute(host_model, name, "tokens")
                                         instantiate_attribute(host_model, name, "tokens", tokens - weight)
-                                        unset_attribute(host_model, name, "executed")
-                                        instantiate_attribute(host_model, name, "executed", True)
                                         return!
                                     $
                             }
@@ -1023,7 +1015,7 @@ Void function action(host_model : Element, name : String, mapping : Element):
                             }
                         }
                     }
-                    {Contains} Atomic produce {
+                    {Contains} ForAll produce {
                         LHS {
                             Pre_Transition lhs_produce_t{
                                 label = "0"
@@ -1037,13 +1029,6 @@ Void function action(host_model : Element, name : String, mapping : Element):
                             }
                             Pre_Place lhs_produce_p{
                                 label = "1"
-                                constraint = $
-                                    include "primitives.alh"
-                                    include "modelling.alh"
-                                    Boolean function constraint(host_model : Element, name : String):
-                                        // Check if this node is executing currently
-                                        return value_eq(read_attribute(host_model, name, "executed"), False)!
-                                    $
                             }
                             Pre_T2P (lhs_produce_t, lhs_produce_p){
                                 label = "2"
@@ -1065,8 +1050,6 @@ Void function action(host_model : Element, name : String, mapping : Element):
                                         weight = read_attribute(host_model, mapping["2"], "weight")
                                         unset_attribute(host_model, name, "tokens")
                                         instantiate_attribute(host_model, name, "tokens", tokens + weight)
-                                        unset_attribute(host_model, name, "executed")
-                                        instantiate_attribute(host_model, name, "executed", True)
                                         return!
                                     $
                             }
@@ -1102,57 +1085,309 @@ Void function action(host_model : Element, name : String, mapping : Element):
                             }
                         }
                     }
-                    {Contains} Atomic unmark_place {
+                }
+                OnSuccess (mark, consume) {}
+                OnFailure (mark, failure) {}
+                OnSuccess (consume, produce) {}
+                OnFailure (consume, produce) {}
+                OnSuccess (produce, unmark_transition) {}
+                OnFailure (produce, unmark_transition) {}
+                OnSuccess (unmark_transition, success) {}
+                OnFailure (unmark_transition, failure) {}
+                Initial (schedule, mark) {}
+            }
+
+            export s to models/pn_simulate
+            """
+
+        self.assertTrue(run_file(all_files,
+            get_model_constructor(PN_runtime) + \
+                get_model_constructor(PN_model) + [
+                "ramify", "PetriNets_Runtime_SCHEDULE", "PetriNets_Runtime",
+                ] + get_model_constructor(schedule_model) + [
+                "transform", "pn", "pn_simulate",
+                "load", "pn",
+                    "list",
+                    "verify",
+                    "read", "t1",
+                    "read", "p1",
+                    "read", "p2",
+                    "read", "p3",
+                    "exit",
+            ],
+          None, "PO"))
+
+    def test_po_pn_interface_transform_pn_to_runtime(self):
+        PN_runtime = \
+            """
+            import models/SimpleClassDiagrams as SimpleClassDiagrams
+
+            SimpleClassDiagrams (Inheritance) PetriNets_Design{
+                Class Natural {}
+                Class Place {
+                    tokens : Natural
+                }
+                Class Transition {}
+                Association P2T (Place, Transition) {
+                    weight : Natural
+                }
+                Association T2P (Transition, Place) {
+                    weight : Natural
+                }
+            }
+
+            SimpleClassDiagrams (Inheritance) PetriNets_Runtime{
+                Class Natural {}
+                Class Boolean {}
+                Class Place {
+                    tokens : Natural
+                }
+                Class Transition {
+                    executing : Boolean
+                }
+                Association P2T (Place, Transition) {
+                    weight : Natural
+                }
+                Association T2P (Transition, Place) {
+                    weight : Natural
+                }
+            }
+
+            export PetriNets_Design to models/PetriNets_Design
+            export PetriNets_Runtime to models/PetriNets_Runtime
+            """
+
+        PN_model = \
+            """
+            import models/PetriNets_Design as PetriNets
+
+            PetriNets pn {
+                Place p1 {
+                    tokens = 1
+                }
+                Place p2 {
+                    tokens = 2
+                }
+                Place p3 {
+                    tokens = 3
+                }
+                Transition t1 {}
+                P2T (p1, t1) {
+                    weight = 1
+                }
+                P2T (p2, t1) {
+                    weight = 1
+                }
+                T2P (t1, p3) {
+                    weight = 2
+                }
+            }
+
+            export pn to models/pn
+            """
+
+        schedule_model = \
+            """
+            import models/PetriNets_SCHEDULE as PN_Transform
+
+            PN_Transform annotate {
+                Composite schedule {
+                    {Contains} Failure failure {}
+                    {Contains} Success success {}
+                    {Contains} ForAll copy_transitions {
+                        LHS {
+                            Pre_SOURCE_Transition {
+                                label = "0"
+                            }
+                        }
+                        RHS {
+                            Post_SOURCE_Transition ct1 {
+                                label = "0"
+                            }
+                            Post_TARGET_Transition ct2 {
+                                label = "1"
+                                action = $
+                                    include "primitives.alh"
+                                    include "modelling.alh"
+                                    Void function action(host_model : Element, name : String, mapping : Element):
+                                        instantiate_attribute(host_model, name, "executing", False)
+                                        return!
+                                    $
+                            }
+                            Post_TransitionLink (ct1, ct2){
+                                label = "2"
+                            }
+                        }
+                    }
+                    {Contains} ForAll copy_places {
                         LHS {
-                            Pre_Place {
+                            Pre_SOURCE_Place {
                                 label = "0"
-                                constraint = $
+                            }
+                        }
+                        RHS {
+                            Post_SOURCE_Place cp1 {
+                                label = "0"
+                            }
+                            Post_TARGET_Place cp2 {
+                                label = "1"
+                                action = $
                                     include "primitives.alh"
                                     include "modelling.alh"
-                                    Boolean function constraint(host_model : Element, name : String):
-                                        // Check if this node is executing currently
-                                        return value_eq(read_attribute(host_model, name, "executed"), True)!
+                                    Void function action(host_model : Element, name : String, mapping : Element):
+                                        instantiate_attribute(host_model, name, "tokens", read_attribute(host_model, mapping["0"], "tokens"))
+                                        return!
                                     $
                             }
+                            Post_PlaceLink (cp1, cp2){
+                                label = "2"
+                            }
+                        }
+                    }
+                    {Contains} ForAll copy_P2T {
+                        LHS {
+                            Pre_SOURCE_Place cp2t_p{
+                                label = "0"
+                            }
+                            Pre_SOURCE_Transition cp2t_t{
+                                label = "1"
+                            }
+                            Pre_SOURCE_P2T (cp2t_p, cp2t_t){
+                                label = "2"
+                            }
+                            Pre_TARGET_Place cp2t_p2{
+                                label = "3"
+                            }
+                            Pre_TARGET_Transition cp2t_t2{
+                                label = "4"
+                            }
+                            Pre_PlaceLink (cp2t_p, cp2t_p2){
+                                label = "5"
+                            }
+                            Pre_TransitionLink (cp2t_t, cp2t_t2){
+                                label = "6"
+                            }
                         }
                         RHS {
-                            Post_Place {
+                            Post_SOURCE_Place cp2t_p{
                                 label = "0"
+                            }
+                            Post_SOURCE_Transition cp2t_t{
+                                label = "1"
+                            }
+                            Post_SOURCE_P2T cp2t_p2t (cp2t_p, cp2t_t){
+                                label = "2"
+                            }
+                            Post_TARGET_Place cp2t_p2 {
+                                label = "3"
+                            }
+                            Post_TARGET_Transition cp2t_t2 {
+                                label = "4"
+                            }
+                            Post_PlaceLink (cp2t_p, cp2t_p2){
+                                label = "5"
+                            }
+                            Post_TransitionLink (cp2t_t, cp2t_t2){
+                                label = "6"
+                            }
+                            Post_TARGET_P2T cp2t_p2t2(cp2t_p2, cp2t_t2) {
+                                label = "7"
                                 action = $
                                     include "primitives.alh"
                                     include "modelling.alh"
                                     Void function action(host_model : Element, name : String, mapping : Element):
-                                        unset_attribute(host_model, name, "executed")
-                                        instantiate_attribute(host_model, name, "executed", False)
+                                        instantiate_attribute(host_model, name, "weight", read_attribute(host_model, mapping["2"], "weight"))
+                                        return!
+                                    $
+                            }
+                        }
+                    }
+                    {Contains} ForAll copy_T2P {
+                        LHS {
+                            Pre_SOURCE_Place ct2p_p{
+                                label = "0"
+                            }
+                            Pre_SOURCE_Transition ct2p_t{
+                                label = "1"
+                            }
+                            Pre_SOURCE_T2P (ct2p_p, ct2p_t){
+                                label = "2"
+                            }
+                            Pre_TARGET_Place ct2p_p2{
+                                label = "3"
+                            }
+                            Pre_TARGET_Transition ct2p_t2{
+                                label = "4"
+                            }
+                            Pre_PlaceLink (ct2p_p, ct2p_p2){
+                                label = "5"
+                            }
+                            Pre_TransitionLink (ct2p_t, ct2p_t2){
+                                label = "6"
+                            }
+                        }
+                        RHS {
+                            Post_SOURCE_Place ct2p_p{
+                                label = "0"
+                            }
+                            Post_SOURCE_Transition ct2p_t{
+                                label = "1"
+                            }
+                            Post_SOURCE_T2P (ct2p_p, ct2p_t){
+                                label = "2"
+                            }
+                            Post_TARGET_Place ct2p_p2 {
+                                label = "3"
+                            }
+                            Post_TARGET_Transition ct2p_t2 {
+                                label = "4"
+                            }
+                            Post_PlaceLink (ct2p_p, ct2p_p2){
+                                label = "5"
+                            }
+                            Post_TransitionLink (ct2p_t, ct2p_t2){
+                                label = "6"
+                            }
+                            Post_TARGET_T2P (ct2p_p2, ct2p_t2) {
+                                label = "7"
+                                action = $
+                                    include "primitives.alh"
+                                    include "modelling.alh"
+                                    Void function action(host_model : Element, name : String, mapping : Element):
+                                        instantiate_attribute(host_model, name, "weight", read_attribute(host_model, mapping["2"], "weight"))
                                         return!
                                     $
                             }
                         }
                     }
-
                 }
-                OnSuccess (mark, consume) {}
-                OnFailure (mark, failure) {}
-                OnSuccess (consume, consume) {}
-                OnFailure (consume, produce) {}
-                OnSuccess (produce, produce) {}
-                OnFailure (produce, unmark_transition) {}
-                OnSuccess (unmark_transition, unmark_place) {}
-                OnFailure (unmark_transition, failure) {}
-                OnSuccess (unmark_place, unmark_place) {}
-                OnFailure (unmark_place, success) {}
-                Initial (schedule, mark) {}
+                OnSuccess (copy_places, copy_transitions) {}
+                OnSuccess (copy_transitions, copy_P2T) {}
+                OnSuccess (copy_P2T, copy_T2P) {}
+                OnSuccess (copy_T2P, success) {}
+                OnFailure (copy_places, copy_transitions) {}
+                OnFailure (copy_transitions, copy_P2T) {}
+                OnFailure (copy_P2T, copy_T2P) {}
+                OnFailure (copy_T2P, success) {}
+                Initial (schedule, copy_places) {}
             }
 
-            export s to models/pn_simulate
+            export annotate to models/pn_annotate
             """
 
         self.assertTrue(run_file(all_files,
             get_model_constructor(PN_runtime) + \
                 get_model_constructor(PN_model) + [
-                "ramify", "PetriNets_Runtime_SCHEDULE", "in", "PetriNets_Runtime",
+                "unify", "PetriNets_Design_to_Runtime", "PetriNets_Design", "SOURCE_", "PetriNets_Runtime", "TARGET_",
+                "join", "pn", "PetriNets_Design_to_Runtime", "SOURCE_",
+                "load", "PetriNets_Design_to_Runtime",
+                    "instantiate", "Association", "PlaceLink", "SOURCE_Place", "TARGET_Place",
+                    "instantiate", "Association", "TransitionLink", "SOURCE_Transition", "TARGET_Transition",
+                    "exit",
+                "ramify", "PetriNets_SCHEDULE", "PetriNets_Design_to_Runtime",
                 ] + get_model_constructor(schedule_model) + [
-                "transform", "pn", "pn_simulate",
+                "transform", "pn", "pn_annotate",
+                "split", "pn", "PetriNets_Runtime", "TARGET/",
                 "load", "pn",
                     "list",
                     "verify",

+ 1 - 1
interface/HUTN/includes/model_management.alh

@@ -1,3 +1,3 @@
-Element function model_fuse(models : Element)
+Element function model_fuse(name1 : String, model1 : Element, name2 : String, model2 : Element)
 Element function model_copy(model : Element)
 Element function model_retype_on_name(model : Element, new_MM : Element, operation : String, name : String)

+ 0 - 2
interface/HUTN/includes/ramify.alh

@@ -1,3 +1 @@
-Element function create_inplace_transformation_language(model : Element)
-Element function create_outplace_transformation_language(source : Element, target : Element)
 Element function ramify(model : Element)