Browse Source

Make the cache in get_model_id work

Yentl Van Tendeloo 8 years ago
parent
commit
854006d532
2 changed files with 6 additions and 7 deletions
  1. 6 6
      bootstrap/core_algorithm.alc
  2. 0 1
      bootstrap/transform.alc

+ 6 - 6
bootstrap/core_algorithm.alc

@@ -13,19 +13,15 @@ include "utils.alh"
 include "conformance_finding.alh"
 include "typing.alh"
 
-Element core = ?
 
 String core_model_location = "models/core"
 
-Element caches = ?
+Element core = ?
+Element caches
 
 Void function initialize_core():
 	// TODO make this more flexible by putting it in the bootstrap in a similar way as other models
 	add_code_model(import_node("models/ActionLanguage"), "models/Conformance_MV", wrap_conformance)
-
-	dict_add_fast(caches, "models", dict_create())
-	dict_add_fast(caches, "users", dict_create())
-
 	return !
 
 Boolean function is_typed_by(model_id : String, metamodel_id : String):
@@ -1794,6 +1790,10 @@ Void function user_function_skip_init(user_id : String):
 	String cmd
 	String result
 
+	caches = dict_create()
+	dict_add_fast(caches, "models", dict_create())
+	dict_add_fast(caches, "users", dict_create())
+
 	output("Welcome to the Model Management Interface v2.0!")
 	output("Use the 'help' command for a list of possible commands")
 

+ 0 - 1
bootstrap/transform.alc

@@ -495,7 +495,6 @@ Boolean function transform_composite(host_model : Element, schedule_model : Elem
 
 	current = set_pop(allAssociationDestinations(schedule_model, composite, "Initial"))
 	while (is_nominal_instance(schedule_model, current, "Rule")):
-		log("Executing " + current)
 		// Still a rule that we must execute
 		typename = read_type(schedule_model, current)
 		if (typename == "Atomic"):