Browse Source

Fixed call in PN_interface to transforms

Yentl Van Tendeloo 8 years ago
parent
commit
a77e8c9d77

BIN
bootstrap/bootstrap.m.gz


+ 1 - 0
bootstrap/conformance_scd.alc

@@ -234,6 +234,7 @@ String function conformance_scd(model : Element):
 			if (attr_value < list_len(allInstances(model, metamodel_element))):
 			if (attr_value < list_len(allInstances(model, metamodel_element))):
 				return "Upper cardinality violated for class: " + metamodel_element!
 				return "Upper cardinality violated for class: " + metamodel_element!
 
 
+	log("Static semantics")
 	// Structure seems fine, now do static semantics
 	// Structure seems fine, now do static semantics
 	if (dict_in(metamodel, "constraints")):
 	if (dict_in(metamodel, "constraints")):
 		Element constraint_function
 		Element constraint_function

+ 2 - 0
bootstrap/transform.alc

@@ -14,7 +14,9 @@ Element function make_matching_schedule(LHS_model : Element):
 	// Initialize
 	// Initialize
 	schedule = create_node()
 	schedule = create_node()
 	workset = create_node()
 	workset = create_node()
+	log("Fetching all instances")
 	all_elements = allInstances(LHS_model, "Pre_Element")
 	all_elements = allInstances(LHS_model, "Pre_Element")
+	log("Got all instances")
 	required_size = read_nr_out(all_elements)
 	required_size = read_nr_out(all_elements)
 
 
 	// Need to keep adding to the schedule
 	// Need to keep adding to the schedule

+ 1 - 0
integration/code/pn_interface.alc

@@ -294,6 +294,7 @@ Element function main():
 	while (True):
 	while (True):
 		output("Please give your command.")
 		output("Please give your command.")
 		command = input()
 		command = input()
+		log("Exec " + command)
 
 
 		if (command == "help"):
 		if (command == "help"):
 			output("Currently no model is loaded, so your operations are limited to:")
 			output("Currently no model is loaded, so your operations are limited to:")

+ 3 - 2
integration/test_pn_interface.py

@@ -553,10 +553,11 @@ Element function constraint(model : Element, name : String):
                 "verify", "exit",
                 "verify", "exit",
              "ramify", "PetriNets",
              "ramify", "PetriNets",
              "new", "PetriNets_PRE", "pn_LHS",
              "new", "PetriNets_PRE", "pn_LHS",
+                "types",
                 "instantiate", "LHS", "lhs",
                 "instantiate", "LHS", "lhs",
                 "instantiate", "Pre_Place", "p",
                 "instantiate", "Pre_Place", "p",
                 "instantiate", "Pre_Transition", "t",
                 "instantiate", "Pre_Transition", "t",
-                "instantiate", "Pre_P2T", "pt",
+                "instantiate", "Pre_P2T", "pt", "p", "t",
                 "instantiate", "LHS_contains", "", "lhs", "p",
                 "instantiate", "LHS_contains", "", "lhs", "p",
                 "instantiate", "LHS_contains", "", "lhs", "t",
                 "instantiate", "LHS_contains", "", "lhs", "t",
                 "instantiate", "LHS_contains", "", "lhs", "pt",
                 "instantiate", "LHS_contains", "", "lhs", "pt",
@@ -564,7 +565,7 @@ Element function constraint(model : Element, name : String):
                 "attr_add", "t", "label", "old_t",
                 "attr_add", "t", "label", "old_t",
                 "attr_add", "pt", "label", "old_pt",
                 "attr_add", "pt", "label", "old_pt",
                 "verify", "exit",
                 "verify", "exit",
-             "transform", "pn", "PetriNets_PRE", "PetriNets_PRE",
+             "transform", "pn", "pn_LHS", "pn_LHS",
                 ],
                 ],
             None, "PO"))
             None, "PO"))
 
 

+ 1 - 0
kernel/modelverse_kernel/compiled.py

@@ -138,6 +138,7 @@ def allInstances(a, b, **remainder):
     # Now we figure out which types are valid for the specified model
     # Now we figure out which types are valid for the specified model
     desired_types = set()
     desired_types = set()
     mm_element, =    yield [("RD", [mm_dict, b_val])]
     mm_element, =    yield [("RD", [mm_dict, b_val])]
+
     work_list = []
     work_list = []
     work_list.append(mm_element)
     work_list.append(mm_element)
     mm_typing, =     yield [("RD", [metamodel, "type_mapping"])]
     mm_typing, =     yield [("RD", [metamodel, "type_mapping"])]