Yentl Van Tendeloo 7 年之前
父节点
当前提交
49e7548be9

二进制
bootstrap/bootstrap.m.gz


+ 0 - 11
bootstrap/core_algorithm.alc

@@ -650,7 +650,6 @@ Element function execute_operation(operation_id : String, input_models : Element
 			if (get_entry_id(input_models[key]) == ""):
 			if (get_entry_id(input_models[key]) == ""):
 				// Input model doesn't exist yet, so create
 				// Input model doesn't exist yet, so create
 				cmd_model_add(input_metamodels[key], input_models[key], "")
 				cmd_model_add(input_metamodels[key], input_models[key], "")
-				log("Creating non-existing input model")
 			mm = get_full_model(get_entry_id(input_models[key]), get_entry_id(input_metamodels[key]))
 			mm = get_full_model(get_entry_id(input_models[key]), get_entry_id(input_metamodels[key]))
 			if (element_eq(mm, read_root())):
 			if (element_eq(mm, read_root())):
 				log("Signature mismatch in operation for tag " + key)
 				log("Signature mismatch in operation for tag " + key)
@@ -707,7 +706,6 @@ Element function execute_operation(operation_id : String, input_models : Element
 		while (get_entry_id(model_name) != ""):
 		while (get_entry_id(model_name) != ""):
 			model_name = ".tmp/" + random_string(20)
 			model_name = ".tmp/" + random_string(20)
 		model_create(merged_model, model_name, merged_metamodel_id, "Model")
 		model_create(merged_model, model_name, merged_metamodel_id, "Model")
-		log("Manual model created " + model_name + " : " + cast_string(read_attribute(core, merged_metamodel_id, "name")))
 		// We want to modify, so modify
 		// We want to modify, so modify
 		do_spawn_modify(model_name, True)
 		do_spawn_modify(model_name, True)
 		merged_model = get_full_model(get_entry_id(model_name), merged_metamodel_id)
 		merged_model = get_full_model(get_entry_id(model_name), merged_metamodel_id)
@@ -804,11 +802,6 @@ Boolean function enact_action(pm : Element, element : String, mapping : Element)
 		type_name = read_attribute(pm, elem, "type")
 		type_name = read_attribute(pm, elem, "type")
 		elem_name = read_attribute(pm, elem, "name")
 		elem_name = read_attribute(pm, elem, "name")
 		if (cast_string(read_attribute(pm, consume, "name")) == "__traceability"):
 		if (cast_string(read_attribute(pm, consume, "name")) == "__traceability"):
-			log("Using input traceability model!")
-			log("Mapping: " + cast_string(mapping[elem_name]))
-			log("Type: " + cast_string(type_name))
-			log("Entry mapping: " + get_entry_id(mapping[elem_name]))
-			log("Entry type: " + get_entry_id(type_name))
 			input_traceability_model = model_copy(get_full_model(get_entry_id(mapping[elem_name]), get_entry_id(type_name)))
 			input_traceability_model = model_copy(get_full_model(get_entry_id(mapping[elem_name]), get_entry_id(type_name)))
 			output_traceability_type = type_name
 			output_traceability_type = type_name
 		else:
 		else:
@@ -849,12 +842,10 @@ Boolean function enact_action(pm : Element, element : String, mapping : Element)
 			// Yes, so store it
 			// Yes, so store it
 			// Note that we have overwritten the previous input traceability model, which is why it was a copy
 			// Note that we have overwritten the previous input traceability model, which is why it was a copy
 			model_overwrite(input_traceability_model, get_entry_id(output_traceability_name), get_entry_id(output_traceability_type))
 			model_overwrite(input_traceability_model, get_entry_id(output_traceability_name), get_entry_id(output_traceability_type))
-			log("Writing output traceability model!")
 
 
 		keys = dict_keys(outputs)
 		keys = dict_keys(outputs)
 		while (set_len(keys) > 0):
 		while (set_len(keys) > 0):
 			key = set_pop(keys)
 			key = set_pop(keys)
-			log("Overwriting model at " + key)
 			if (get_entry_id(output_map[key]) == ""):
 			if (get_entry_id(output_map[key]) == ""):
 				// New model
 				// New model
 				model_create(result[key], output_map[key], get_entry_id(outputs[key]), "Model")
 				model_create(result[key], output_map[key], get_entry_id(outputs[key]), "Model")
@@ -918,7 +909,6 @@ Void function enact_PM(pm : Element, mapping : Element):
 				mock_location = ".tmp/" + random_string(10)
 				mock_location = ".tmp/" + random_string(10)
 			dict_add(mapping, key, mock_location)
 			dict_add(mapping, key, mock_location)
 			cmd_model_add(signature[key], mapping[key], "")
 			cmd_model_add(signature[key], mapping[key], "")
-			log("Mock location created " + cast_string(signature[key]) + " : " + cast_string(mapping[key]))
 			set_add(mock_locations, mock_location)
 			set_add(mock_locations, mock_location)
 
 
 	// Initialize Join counters
 	// Initialize Join counters
@@ -959,7 +949,6 @@ Void function enact_PM(pm : Element, mapping : Element):
 
 
 			if (type == "Finish"):
 			if (type == "Finish"):
 				// We have finished, so terminate
 				// We have finished, so terminate
-				log("Finished node reached!")
 				break!
 				break!
 			elif (type == "Join"):
 			elif (type == "Join"):
 				// Only do this if all dependencies are fullfilled
 				// Only do this if all dependencies are fullfilled

+ 2 - 2
bootstrap/transform.alc

@@ -554,7 +554,7 @@ Boolean function transform_forall(host_model : Element, schedule_model : Element
 	Element mapping
 	Element mapping
 	Boolean result
 	Boolean result
 
 
-	log("Executing rule: " + current)
+	//log("Executing rule: " + current)
 
 
 	mappings = full_match(host_model, schedule_model, current, False)
 	mappings = full_match(host_model, schedule_model, current, False)
 
 
@@ -563,7 +563,7 @@ Boolean function transform_forall(host_model : Element, schedule_model : Element
 	else:
 	else:
 		result = False
 		result = False
 
 
-	log("Matches in forall: " + cast_string(set_len(mappings)))
+	//log("Matches in forall: " + cast_string(set_len(mappings)))
 	while (set_len(mappings) > 0):
 	while (set_len(mappings) > 0):
 		mapping = set_pop(mappings)
 		mapping = set_pop(mappings)
 		RHS = set_pop(allAssociationDestinations(schedule_model, current, "RHSLink"))
 		RHS = set_pop(allAssociationDestinations(schedule_model, current, "RHSLink"))

+ 1 - 1
kernel/modelverse_kernel/main.py

@@ -701,7 +701,7 @@ class ModelverseKernel(object):
             if prev_frame is None:
             if prev_frame is None:
                 _, =            yield [("DN", [task_root])]
                 _, =            yield [("DN", [task_root])]
                 del self.debug_info[self.taskname]
                 del self.debug_info[self.taskname]
-                print("Cleanup task " + str(self.taskname))
+                #print("Cleanup task " + str(self.taskname))
             else:
             else:
                 if self.debug_info[self.taskname]:
                 if self.debug_info[self.taskname]:
                     self.debug_info[self.taskname].pop()
                     self.debug_info[self.taskname].pop()

+ 1 - 1
wrappers/classes/modelverse.xml

@@ -428,7 +428,7 @@
                             <transition cond="self.expect_response_partial('Success: ')" target="../send_metadata">
                             <transition cond="self.expect_response_partial('Success: ')" target="../send_metadata">
                                 <script>
                                 <script>
                                     self.registered_metamodel[self.parameters[0]] = set(self.split_response(self.responses.pop(0))).pop()
                                     self.registered_metamodel[self.parameters[0]] = set(self.split_response(self.responses.pop(0))).pop()
-                                    print("Registering " + str(self.parameters[0]))
+                                    #print("Registering " + str(self.parameters[0]))
                                 </script>
                                 </script>
                             </transition>
                             </transition>
                         </state>
                         </state>

+ 0 - 7
wrappers/modelverse.py

@@ -77,7 +77,6 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
             # Fetch output from the MV
             # Fetch output from the MV
             response = responses.fetch(0)
             response = responses.fetch(0)
             if response is not None:
             if response is not None:
-                print("Got response: " + str(response))
                 if response.name == "data_output":
                 if response.name == "data_output":
                     # Got output of MV, so forward to SCCD
                     # Got output of MV, so forward to SCCD
                     if pipe is not None:
                     if pipe is not None:
@@ -85,10 +84,8 @@ def __run_new_modelverse_activity(address, username, password, taskname, pipe, c
                 elif response.name == "result":
                 elif response.name == "result":
                     # Finished execution, so continue and return result
                     # Finished execution, so continue and return result
                     if pipe is not None:
                     if pipe is not None:
-                        print("Sending over pipe!")
                         pipe.send(("terminate", []))
                         pipe.send(("terminate", []))
                         pipe.close()
                         pipe.close()
-                    print("TERMINATE")
                     return
                     return
                 else:
                 else:
                     raise Exception("Unknown data from MV to SC: " + str(response))
                     raise Exception("Unknown data from MV to SC: " + str(response))
@@ -123,11 +120,9 @@ def _process_SC(statechart, port_sc, taskname):
 
 
         if p2c_pipe.poll():
         if p2c_pipe.poll():
             response = p2c_pipe.recv()
             response = p2c_pipe.recv()
-            print("Got SC response: " + str(response))
             statechart[0].addInput(Event(response[0], statechart[1], response[1]))
             statechart[0].addInput(Event(response[0], statechart[1], response[1]))
             
             
             if response[0] == "terminate":
             if response[0] == "terminate":
-                print("Got break")
                 p2c_pipe.close()
                 p2c_pipe.close()
                 break
                 break
             empty = False
             empty = False
@@ -140,9 +135,7 @@ def _process_SC(statechart, port_sc, taskname):
         if empty:
         if empty:
             time.sleep(0.05)
             time.sleep(0.05)
 
 
-    print("Wait for join")
     p.join()
     p.join()
-    print("Joined SC")
 
 
 def _process_OP(callback, taskname):
 def _process_OP(callback, taskname):
     import multiprocessing
     import multiprocessing

+ 2 - 2
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
 
-Date:   Fri Nov 24 09:21:18 2017
+Date:   Fri Nov 24 13:36:55 2017
 
 
 Model author: Yentl Van Tendeloo
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server
 Model name:   MvK Server
@@ -2432,7 +2432,7 @@ class Modelverse(RuntimeClassBase):
     
     
     def _initialized_behaviour_operations_model_overwrite_search_0_exec(self, parameters):
     def _initialized_behaviour_operations_model_overwrite_search_0_exec(self, parameters):
         self.registered_metamodel[self.parameters[0]] = set(self.split_response(self.responses.pop(0))).pop()
         self.registered_metamodel[self.parameters[0]] = set(self.split_response(self.responses.pop(0))).pop()
-        print("Registering " + str(self.parameters[0]))
+        #print("Registering " + str(self.parameters[0]))
     
     
     def _initialized_behaviour_operations_model_overwrite_search_0_guard(self, parameters):
     def _initialized_behaviour_operations_model_overwrite_search_0_guard(self, parameters):
         return self.expect_response_partial('Success: ')
         return self.expect_response_partial('Success: ')