Quellcode durchsuchen

Fixed different kinds of transformation

Yentl Van Tendeloo vor 8 Jahren
Ursprung
Commit
20a836e261

+ 5 - 4
bootstrap/model_management.alc

@@ -24,7 +24,7 @@ Element function model_fuse(models : Element):
 	// Do the iteration
 	while (read_nr_out(models)):
 		tagged_model = set_pop(models)
-		model_name = string_join(list_read(tagged_model, 0), "_")
+		model_name = string_join(list_read(tagged_model, 0), "/")
 		model = list_read(tagged_model, 1)
 
 		// Add all elements from 'model', but prepend it with the 'model_name'
@@ -137,6 +137,10 @@ Void function model_join(dst_model : Element, src_model : Element, retyping_key
 	while (read_nr_out(queue) > 0):
 		name = list_pop(queue, 0)
 
+		type = read_type(src_model, name)
+		log("Instantiate element with old type: " + type)
+		log("New type: " + (retyping_key + type))
+
 		if (is_edge(src_model["model"][name])):
 			// Is an edge, so potentially queue it
 			String src
@@ -144,7 +148,6 @@ Void function model_join(dst_model : Element, src_model : Element, retyping_key
 
 			src = reverseKeyLookup(src_model["model"], read_edge_src(src_model["model"][name]))
 			dst = reverseKeyLookup(src_model["model"], read_edge_dst(src_model["model"][name]))
-			type = reverseKeyLookup(src_model["metamodel"]["model"], dict_read_node(src_model["type_mapping"], src_model["model"][name]))
 
 			if (bool_and(dict_in(mapping, src), dict_in(mapping, dst))):
 				// All present, so create the link between them
@@ -154,12 +157,10 @@ Void function model_join(dst_model : Element, src_model : Element, retyping_key
 
 		elif (has_value(src_model["model"][name])):
 			// Has a value, so copy that as well
-			type = reverseKeyLookup(src_model["metamodel"]["model"], dict_read_node(src_model["type_mapping"], src_model["model"][name]))
 			dict_add(mapping, name, instantiate_value(dst_model, retyping_key + type, "", src_model["model"][name]))
 
 		else:
 			// Is a node
-			type = reverseKeyLookup(src_model["metamodel"]["model"], dict_read_node(src_model["type_mapping"], src_model["model"][name]))
 			dict_add(mapping, name, instantiate_node(dst_model, retyping_key + type, ""))
 
 	return!

+ 17 - 2
bootstrap/modelling.alc

@@ -104,6 +104,11 @@ String function instantiate_node(model : Element, type_name : String, instance_n
 	// Basically create a node and type it immediately
 	String actual_name
 
+	if (bool_not(dict_in(model["metamodel"]["model"], type_name))):
+		log("ERROR: (instantiate_node) no such type in metamodel: " + type_name)
+		log("    for " + instance_name)
+		return ""!
+
 	actual_name = model_add_node(model, instance_name)
 	retype(model, actual_name, type_name)
 
@@ -114,6 +119,11 @@ String function instantiate_value(model : Element, type_name : String, instance_
 	// Basically create a node and type it immediately
 	String actual_name
 
+	if (bool_not(dict_in(model["metamodel"]["model"], type_name))):
+		log("ERROR: (instantiate_value) no such type in metamodel: " + type_name)
+		log("     for " + instance_name)
+		return ""!
+
 	actual_name = model_add_value(model, instance_name, value)
 	retype(model, actual_name, type_name)
 
@@ -257,8 +267,6 @@ String function instantiate_link(model : Element, type : String, name : String,
 	// Create a typed link between two nodes
 	String actual_name
 
-	actual_name = model_add_edge(model, name, source, destination)
-
 	if (type == ""):
 		// Have to find the type ourselves, as it isn't defined
 		Element out
@@ -275,6 +283,13 @@ String function instantiate_link(model : Element, type : String, name : String,
 		else:
 			log("ERROR: too many possible links between entries")
 			return ""!
+
+	if (bool_not(dict_in(model["metamodel"]["model"], type))):
+		log("ERROR: (instantiate_link) no such type in metamodel: " + type)
+		log("    for " + name)
+		return ""!
+
+	actual_name = model_add_edge(model, name, source, destination)
 	
 	retype(model, actual_name, type)
 	return actual_name!

+ 2 - 2
core/core_algorithm.alc

@@ -470,7 +470,7 @@ Void function user_function_skip_init(user_id : String):
 								input_keys = dict_keys(inputs)
 								while (read_nr_out(input_keys) > 0):
 									key = set_pop(input_keys)
-									model_join(merged_model, import_node(read_attribute(core, get_model_id(inputs[key]), "location")), key + "_")
+									model_join(merged_model, import_node(read_attribute(core, get_model_id(inputs[key]), "location")), key + "/")
 
 								// 3) Transform
 
@@ -489,7 +489,7 @@ Void function user_function_skip_init(user_id : String):
 									log("Model id: " + get_model_id(key))
 									desired_metamodel_id = get_model_id(key)
 									log("Instance of: " + desired_metamodel_id)
-									split_off_model = model_split(merged_model, import_node(read_attribute(core, desired_metamodel_id, "location")), key + "_")
+									split_off_model = model_split(merged_model, import_node(read_attribute(core, desired_metamodel_id, "location")), key + "/")
 
 									// Check if the destination model already exists
 									if (get_model_id(outputs[key]) == ""):

+ 28 - 28
integration/code/pn_design_to_runtime.mvc

@@ -6,15 +6,15 @@ RAM_PN_DR annotate {
         {Contains} Success success {}
         {Contains} ForAll copy_transitions {
             LHS {
-                Pre_PetriNets_Transition {
+                Pre_PetriNets/Transition {
                     label = "0"
                 }
             }
             RHS {
-                Post_PetriNets_Transition ct1 {
+                Post_PetriNets/Transition ct1 {
                     label = "0"
                 }
-                Post_PetriNets_Runtime_Transition ct2 {
+                Post_PetriNets_Runtime/Transition ct2 {
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -31,15 +31,15 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_places {
             LHS {
-                Pre_PetriNets_Place {
+                Pre_PetriNets/Place {
                     label = "0"
                 }
             }
             RHS {
-                Post_PetriNets_Place cp1 {
+                Post_PetriNets/Place cp1 {
                     label = "0"
                 }
-                Post_PetriNets_Runtime_Place cp2 {
+                Post_PetriNets_Runtime/Place cp2 {
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -57,19 +57,19 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_P2T {
             LHS {
-                Pre_PetriNets_Place cp2t_p{
+                Pre_PetriNets/Place cp2t_p{
                     label = "0"
                 }
-                Pre_PetriNets_Transition cp2t_t{
+                Pre_PetriNets/Transition cp2t_t{
                     label = "1"
                 }
-                Pre_PetriNets_P2T (cp2t_p, cp2t_t){
+                Pre_PetriNets/P2T (cp2t_p, cp2t_t){
                     label = "2"
                 }
-                Pre_PetriNets_Runtime_Place cp2t_p2{
+                Pre_PetriNets_Runtime/Place cp2t_p2{
                     label = "3"
                 }
-                Pre_PetriNets_Runtime_Transition cp2t_t2{
+                Pre_PetriNets_Runtime/Transition cp2t_t2{
                     label = "4"
                 }
                 Pre_D2R_PlaceLink (cp2t_p, cp2t_p2){
@@ -80,19 +80,19 @@ RAM_PN_DR annotate {
                 }
             }
             RHS {
-                Post_PetriNets_Place rhs_cp2t_p{
+                Post_PetriNets/Place rhs_cp2t_p{
                     label = "0"
                 }
-                Post_PetriNets_Transition rhs_cp2t_t{
+                Post_PetriNets/Transition rhs_cp2t_t{
                     label = "1"
                 }
-                Post_PetriNets_P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
+                Post_PetriNets/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
                     label = "2"
                 }
-                Post_PetriNets_Runtime_Place rhs_cp2t_p2 {
+                Post_PetriNets_Runtime/Place rhs_cp2t_p2 {
                     label = "3"
                 }
-                Post_PetriNets_Runtime_Transition rhs_cp2t_t2 {
+                Post_PetriNets_Runtime/Transition rhs_cp2t_t2 {
                     label = "4"
                 }
                 Post_D2R_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
@@ -101,7 +101,7 @@ RAM_PN_DR annotate {
                 Post_D2R_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
                     label = "6"
                 }
-                Post_PetriNets_Runtime_P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
+                Post_PetriNets_Runtime/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
                     label = "7"
                     action = $
                         include "primitives.alh"
@@ -115,19 +115,19 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_T2P {
             LHS {
-                Pre_PetriNets_Place ct2p_p{
+                Pre_PetriNets/Place ct2p_p{
                     label = "0"
                 }
-                Pre_PetriNets_Transition ct2p_t{
+                Pre_PetriNets/Transition ct2p_t{
                     label = "1"
                 }
-                Pre_PetriNets_T2P (ct2p_t, ct2p_p){
+                Pre_PetriNets/T2P (ct2p_t, ct2p_p){
                     label = "2"
                 }
-                Pre_PetriNets_Runtime_Place ct2p_p2{
+                Pre_PetriNets_Runtime/Place ct2p_p2{
                     label = "3"
                 }
-                Pre_PetriNets_Runtime_Transition ct2p_t2{
+                Pre_PetriNets_Runtime/Transition ct2p_t2{
                     label = "4"
                 }
                 Pre_D2R_PlaceLink (ct2p_p, ct2p_p2){
@@ -138,19 +138,19 @@ RAM_PN_DR annotate {
                 }
             }
             RHS {
-                Post_PetriNets_Place rhs_ct2p_p{
+                Post_PetriNets/Place rhs_ct2p_p{
                     label = "0"
                 }
-                Post_PetriNets_Transition rhs_ct2p_t{
+                Post_PetriNets/Transition rhs_ct2p_t{
                     label = "1"
                 }
-                Post_PetriNets_T2P (rhs_ct2p_t, rhs_ct2p_p){
+                Post_PetriNets/T2P (rhs_ct2p_t, rhs_ct2p_p){
                     label = "2"
                 }
-                Post_PetriNets_Runtime_Place rhs_ct2p_p2 {
+                Post_PetriNets_Runtime/Place rhs_ct2p_p2 {
                     label = "3"
                 }
-                Post_PetriNets_Runtime_Transition rhs_ct2p_t2 {
+                Post_PetriNets_Runtime/Transition rhs_ct2p_t2 {
                     label = "4"
                 }
                 Post_D2R_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
@@ -159,7 +159,7 @@ RAM_PN_DR annotate {
                 Post_D2R_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
                     label = "6"
                 }
-                Post_PetriNets_Runtime_T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
+                Post_PetriNets_Runtime/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
                     label = "7"
                     action = $
                         include "primitives.alh"

+ 2 - 2
integration/code/pn_print.mvc

@@ -5,12 +5,12 @@ RAM_PN_R print {
         {Contains} Success success {}
         {Contains} ForAll print_tokens {
             LHS {
-                Pre_PetriNets_Place {
+                Pre_PetriNets/Place {
                     label = "0"
                 }
             }
             RHS {
-                Post_PetriNets_Place {
+                Post_PetriNets/Place {
                     label = "0"
                     action = $
                         include "primitives.alh"

+ 28 - 35
integration/code/pn_runtime_to_design.mvc

@@ -6,23 +6,16 @@ RAM_PN_DR annotate {
         {Contains} Success success {}
         {Contains} ForAll copy_transitions {
             LHS {
-                Pre_PetriNets_Runtime_Transition {
+                Pre_PetriNets_Runtime/Transition {
                     label = "0"
                 }
             }
             RHS {
-                Post_PetriNets_Runtime_Transition ct1 {
+                Post_PetriNets_Runtime/Transition ct1 {
                     label = "0"
                 }
-                Post_PetriNets_Transition ct2 {
+                Post_PetriNets/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_R2D_TransitionLink (ct1, ct2){
                     label = "2"
@@ -31,15 +24,15 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_places {
             LHS {
-                Pre_PetriNets_Runtime_Place {
+                Pre_PetriNets_Runtime/Place {
                     label = "0"
                 }
             }
             RHS {
-                Post_PetriNets_Runtime_Place cp1 {
+                Post_PetriNets_Runtime/Place cp1 {
                     label = "0"
                 }
-                Post_PetriNets_Place cp2 {
+                Post_PetriNets/Place cp2 {
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -57,19 +50,19 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_P2T {
             LHS {
-                Pre_PetriNets_Runtime_Place cp2t_p{
+                Pre_PetriNets_Runtime/Place cp2t_p{
                     label = "0"
                 }
-                Pre_PetriNets_Runtime_Transition cp2t_t{
+                Pre_PetriNets_Runtime/Transition cp2t_t{
                     label = "1"
                 }
-                Pre_PetriNets_Runtime_P2T (cp2t_p, cp2t_t){
+                Pre_PetriNets_Runtime/P2T (cp2t_p, cp2t_t){
                     label = "2"
                 }
-                Pre_PetriNets_Place cp2t_p2{
+                Pre_PetriNets/Place cp2t_p2{
                     label = "3"
                 }
-                Pre_PetriNets_Transition cp2t_t2{
+                Pre_PetriNets/Transition cp2t_t2{
                     label = "4"
                 }
                 Pre_R2D_PlaceLink (cp2t_p, cp2t_p2){
@@ -80,19 +73,19 @@ RAM_PN_DR annotate {
                 }
             }
             RHS {
-                Post_PetriNets_Runtime_Place rhs_cp2t_p{
+                Post_PetriNets_Runtime/Place rhs_cp2t_p{
                     label = "0"
                 }
-                Post_PetriNets_Runtime_Transition rhs_cp2t_t{
+                Post_PetriNets_Runtime/Transition rhs_cp2t_t{
                     label = "1"
                 }
-                Post_PetriNets_Runtime_P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
+                Post_PetriNets_Runtime/P2T rhs_cp2t_p2t (rhs_cp2t_p, rhs_cp2t_t){
                     label = "2"
                 }
-                Post_PetriNets_Place rhs_cp2t_p2 {
+                Post_PetriNets/Place rhs_cp2t_p2 {
                     label = "3"
                 }
-                Post_PetriNets_Transition rhs_cp2t_t2 {
+                Post_PetriNets/Transition rhs_cp2t_t2 {
                     label = "4"
                 }
                 Post_R2D_PlaceLink (rhs_cp2t_p, rhs_cp2t_p2){
@@ -101,7 +94,7 @@ RAM_PN_DR annotate {
                 Post_R2D_TransitionLink (rhs_cp2t_t, rhs_cp2t_t2){
                     label = "6"
                 }
-                Post_PetriNets_P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
+                Post_PetriNets/P2T rhs_cp2t_p2t2(rhs_cp2t_p2, rhs_cp2t_t2) {
                     label = "7"
                     action = $
                         include "primitives.alh"
@@ -115,19 +108,19 @@ RAM_PN_DR annotate {
         }
         {Contains} ForAll copy_T2P {
             LHS {
-                Pre_PetriNets_Runtime_Place ct2p_p{
+                Pre_PetriNets_Runtime/Place ct2p_p{
                     label = "0"
                 }
-                Pre_PetriNets_Runtime_Transition ct2p_t{
+                Pre_PetriNets_Runtime/Transition ct2p_t{
                     label = "1"
                 }
-                Pre_PetriNets_Runtime_T2P (ct2p_t, ct2p_p){
+                Pre_PetriNets_Runtime/T2P (ct2p_t, ct2p_p){
                     label = "2"
                 }
-                Pre_PetriNets_Place ct2p_p2{
+                Pre_PetriNets/Place ct2p_p2{
                     label = "3"
                 }
-                Pre_PetriNets_Transition ct2p_t2{
+                Pre_PetriNets/Transition ct2p_t2{
                     label = "4"
                 }
                 Pre_R2D_PlaceLink (ct2p_p, ct2p_p2){
@@ -138,19 +131,19 @@ RAM_PN_DR annotate {
                 }
             }
             RHS {
-                Post_PetriNets_Runtime_Place rhs_ct2p_p{
+                Post_PetriNets_Runtime/Place rhs_ct2p_p{
                     label = "0"
                 }
-                Post_PetriNets_Runtime_Transition rhs_ct2p_t{
+                Post_PetriNets_Runtime/Transition rhs_ct2p_t{
                     label = "1"
                 }
-                Post_PetriNets_Runtime_T2P (rhs_ct2p_t, rhs_ct2p_p){
+                Post_PetriNets_Runtime/T2P (rhs_ct2p_t, rhs_ct2p_p){
                     label = "2"
                 }
-                Post_PetriNets_Place rhs_ct2p_p2 {
+                Post_PetriNets/Place rhs_ct2p_p2 {
                     label = "3"
                 }
-                Post_PetriNets_Transition rhs_ct2p_t2 {
+                Post_PetriNets/Transition rhs_ct2p_t2 {
                     label = "4"
                 }
                 Post_R2D_PlaceLink (rhs_ct2p_p, rhs_ct2p_p2){
@@ -159,7 +152,7 @@ RAM_PN_DR annotate {
                 Post_R2D_TransitionLink (rhs_ct2p_t, rhs_ct2p_t2){
                     label = "6"
                 }
-                Post_PetriNets_T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
+                Post_PetriNets/T2P (rhs_ct2p_t2, rhs_ct2p_p2) {
                     label = "7"
                     action = $
                         include "primitives.alh"

+ 19 - 18
integration/code/pn_simulate.mvc

@@ -1,4 +1,4 @@
-import models/RAM_PetriNets_Runtime as RAM_PN_R
+import models/RAM_PetriNets_Runtime_Runtime as RAM_PN_R
 
 RAM_PN_R s {
     Composite schedule {
@@ -6,7 +6,7 @@ RAM_PN_R s {
         {Contains} Success success {}
         {Contains} Atomic mark {
             LHS {
-                Pre_PetriNets_Transition {
+                Pre_PetriNets_Runtime/Transition {
                     label = "1"
                     constraint = $
                         include "primitives.alh"
@@ -16,7 +16,8 @@ RAM_PN_R s {
                             Element links
                             String link
                             String place
-                            links = allIncomingAssociationInstances(host_model, name, "P2T")
+                            log("Types in metamodel: " + set_to_string(dict_keys(host_model["metamodel"]["model"])))
+                            links = allIncomingAssociationInstances(host_model, name, "PetriNets_Runtime/P2T")
                             while (read_nr_out(links) > 0):
                                 link = set_pop(links)
                                 place = readAssociationSource(host_model, link)
@@ -27,7 +28,7 @@ RAM_PN_R s {
                 }
             }
             RHS {
-                Post_PetriNets_Transition {
+                Post_PetriNets_Runtime/Transition {
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -42,7 +43,7 @@ RAM_PN_R s {
         }
         {Contains} ForAll consume {
             LHS {
-                Pre_PetriNets_Transition lhs_consume_t{
+                Pre_PetriNets_Runtime/Transition lhs_consume_t{
                     label = "0"
                     constraint = $
                         include "primitives.alh"
@@ -52,18 +53,18 @@ RAM_PN_R s {
                             return value_eq(read_attribute(host_model, name, "executing"), True)!
                         $
                 }
-                Pre_PetriNets_Place lhs_consume_p{
+                Pre_PetriNets_Runtime/Place lhs_consume_p{
                     label = "1"
                 }
-                Pre_PetriNets_P2T lhs_consume_p2t(lhs_consume_p, lhs_consume_t){
+                Pre_PetriNets_Runtime/P2T lhs_consume_p2t(lhs_consume_p, lhs_consume_t){
                     label = "2"
                 }
             }
             RHS {
-                Post_PetriNets_Transition rhs_consume_t {
+                Post_PetriNets_Runtime/Transition rhs_consume_t {
                     label = "0"
                 }
-                Post_PetriNets_Place rhs_consume_p {
+                Post_PetriNets_Runtime/Place rhs_consume_p {
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -81,14 +82,14 @@ RAM_PN_R s {
                             return!
                         $
                 }
-                Post_PetriNets_P2T (rhs_consume_p, rhs_consume_t){
+                Post_PetriNets_Runtime/P2T (rhs_consume_p, rhs_consume_t){
                     label = "2"
                 }
             }
         }
         {Contains} ForAll produce {
             LHS {
-                Pre_PetriNets_Transition lhs_produce_t{
+                Pre_PetriNets_Runtime/Transition lhs_produce_t{
                     label = "0"
                     constraint = $
                         include "primitives.alh"
@@ -98,18 +99,18 @@ RAM_PN_R s {
                             return value_eq(read_attribute(host_model, name, "executing"), True)!
                         $
                 }
-                Pre_PetriNets_Place lhs_produce_p{
+                Pre_PetriNets_Runtime/Place lhs_produce_p{
                     label = "1"
                 }
-                Pre_PetriNets_T2P (lhs_produce_t, lhs_produce_p){
+                Pre_PetriNets_Runtime/T2P (lhs_produce_t, lhs_produce_p){
                     label = "2"
                 }
             }
             RHS {
-                Post_PetriNets_Transition rhs_produce_t{
+                Post_PetriNets_Runtime/Transition rhs_produce_t{
                     label = "0"
                 }
-                Post_PetriNets_Place rhs_produce_p{
+                Post_PetriNets_Runtime/Place rhs_produce_p{
                     label = "1"
                     action = $
                         include "primitives.alh"
@@ -127,14 +128,14 @@ RAM_PN_R s {
                             return!
                         $
                 }
-                Post_PetriNets_T2P (rhs_produce_t, rhs_produce_p){
+                Post_PetriNets_Runtime/T2P (rhs_produce_t, rhs_produce_p){
                     label = "2"
                 }
             }
         }
         {Contains} Atomic unmark_transition {
             LHS {
-                Pre_PetriNets_Transition {
+                Pre_PetriNets_Runtime/Transition {
                     label = "0"
                     constraint = $
                         include "primitives.alh"
@@ -146,7 +147,7 @@ RAM_PN_R s {
                 }
             }
             RHS {
-                Post_PetriNets_Transition {
+                Post_PetriNets_Runtime/Transition {
                     label = "0"
                     action = $
                         include "primitives.alh"

+ 8 - 8
integration/test_mvc.py

@@ -545,23 +545,23 @@ class TestModelverseCore(unittest.TestCase):
                         "instantiate",
                             "Association",
                             "D2R_PlaceLink",
-                            "PetriNets_Place",
-                            "PetriNets_Runtime_Place",
+                            "PetriNets/Place",
+                            "PetriNets_Runtime/Place",
                         "instantiate",
                             "Association",
                             "D2R_TransitionLink",
-                            "PetriNets_Transition",
-                            "PetriNets_Runtime_Transition",
+                            "PetriNets/Transition",
+                            "PetriNets_Runtime/Transition",
                         "instantiate",
                             "Association",
                             "R2D_PlaceLink",
-                            "PetriNets_Runtime_Place",
-                            "PetriNets_Place",
+                            "PetriNets_Runtime/Place",
+                            "PetriNets/Place",
                         "instantiate",
                             "Association",
                             "R2D_TransitionLink",
-                            "PetriNets_Runtime_Transition",
-                            "PetriNets_Transition",
+                            "PetriNets_Runtime/Transition",
+                            "PetriNets/Transition",
                         "exit",
                 "transformation_RAMify",
                     "__merged_PetriNets_RAM",

+ 1 - 1
interface/HUTN/grammars/modelling.g

@@ -29,7 +29,7 @@ grammar{
     tokens{
         IMPORT: 'import';
         AS: 'as';
-        MODEL_ID: '[a-zA-Z_][a-zA-Z_0-9]*';
+        MODEL_ID: '[a-zA-Z_][a-zA-Z_0-9/]*';
         MV_URL: '[a-zA-Z_0-9/]*';
         LCURLY: '{';
         RCURLY: '}';