Ver código fonte

Added initial functions (as template)

Yentl Van Tendeloo 8 anos atrás
pai
commit
7547c6098f
1 arquivos alterados com 17 adições e 0 exclusões
  1. 17 0
      bootstrap/core_algorithm.alc

+ 17 - 0
bootstrap/core_algorithm.alc

@@ -370,6 +370,23 @@ Boolean function pm_finished(worklist : Element, pm : String):
 			return True!
 	return False!
 
+Element function merge_models(models_dict : Element):
+	return create_node()!
+
+Element function split_models(metamodels_dict : Element):
+	return create_node()!
+
+Element function get_model(model_name : String, metamodel_name : String):
+	return get_full_model(get_model_id(model_name), get_model_id(metamodel_name))!
+
+Void function store_model(model_name : String, metamodel_name : String, model : Element):
+	if (get_model_id(model_name) == ""):
+		// New model
+		model_create(model, model_name, get_model_id(metamodel_name), "Model")
+	else:
+		model_overwrite(model, get_model_id(model_name), get_model_id(metamodel_name))
+	return!
+
 Element function execute_operation(operation_id : String, input_models : Element, tracability_model : Element):
 	// Operations are always in-place and uses only a single metamodel
 	// Therefore, we must: