Browse Source

Replaced all create_node calls to their data structure equivalents

Yentl Van Tendeloo 4 years ago
parent
commit
7476d11930

+ 6 - 6
bootstrap/conformance_scd.alc

@@ -62,10 +62,10 @@ Element function precompute_cardinalities(model : Element):
 	metamodel = model["metamodel"]
 	keys = allInstances(metamodel, "Association")
 
-	cardinalities = create_node()
+	cardinalities = dict_create()
 	while (0 < list_len(keys)):
 		key = set_pop(keys)
-		tmp_dict = create_node()
+		tmp_dict = dict_create()
 		slc = read_attribute(metamodel, key, "source_lower_cardinality")
 		suc = read_attribute(metamodel, key, "source_upper_cardinality")
 		tlc = read_attribute(metamodel, key, "target_lower_cardinality")
@@ -86,7 +86,7 @@ Element function precompute_cardinalities(model : Element):
 	keys = allInstances(metamodel, "AttributeLink")
 	while (0 < list_len(keys)):
 		key = set_pop(keys)
-		tmp_dict = create_node()
+		tmp_dict = dict_create()
 
 		// Attributes always have 1 max
 		dict_add_fast(tmp_dict, "tuc", 1)
@@ -129,8 +129,8 @@ String function conformance_scd(model : Element):
 	reverse_m = make_reverse_dictionary(model["model"])
 	reverse_mm = make_reverse_dictionary(model["metamodel"]["model"])
 
-	spo_cache = create_node()
-	spi_cache = create_node()
+	spo_cache = dict_create()
+	spi_cache = dict_create()
 
 	// Load in variables
 	scd = import_node("models/SimpleClassDiagrams")
@@ -330,7 +330,7 @@ Element function generate_bottom_type_mapping(model_dict : Element):
 	String element
 
 	elements = dict_keys(model_dict)
-	result = create_node()
+	result = dict_create()
 
 	while (set_len(elements) > 0):
 		element = set_pop(elements)

+ 5 - 5
bootstrap/constructors.alc

@@ -20,8 +20,8 @@ Element function construct_function():
 	main_function = read_root()
 
 	// Clear global variables
-	while_stack = create_node()
-	variable_map = create_node()
+	while_stack = list_create()
+	variable_map = dict_create()
 
 	continue = True
 	while (continue):
@@ -105,7 +105,7 @@ Action function construct_global():
 		dict_add_fast(assign, "value", value)
 
 		Element result
-		result = create_node()
+		result = dict_create()
 		dict_add_fast(result, "name", "")
 		dict_add_fast(result, "instruction", this_element)
 		dict_add_fast(result, "start", this_element)
@@ -113,7 +113,7 @@ Action function construct_global():
 		return result!
 	else:
 		Element result
-		result = create_node()
+		result = dict_create()
 		dict_add_fast(result, "name", "")
 		dict_add_fast(result, "instruction", this_element)
 		dict_add_fast(result, "start", this_element)
@@ -173,7 +173,7 @@ Action function construct_funcdef(mutable : Boolean):
 	dict_add_fast(func, "body", construct_unknown())
 
 	Element result
-	result = create_node()
+	result = dict_create()
 	dict_add_fast(result, "name", name)
 	dict_add_fast(result, "instruction", func)
 	dict_add_fast(result, "start", declare)

+ 24 - 24
bootstrap/core_algorithm.alc

@@ -49,7 +49,7 @@ Element function get_full_model(model_id : String, metamodel_id : String):
 
 	choice = get_instanceOf_link(model_id, metamodel_id)
 
-	m = create_node()
+	m = dict_create()
 	dict_add(m, "model", import_node(read_attribute(core, model_id, "location")))
 	dict_add(m, "type_mapping", import_node(read_attribute(core, choice, "typing_location")))
 	dict_add(m, "semantics", set_pop(allAssociationDestinations(core, choice, "semantics")))
@@ -345,13 +345,13 @@ Element function execute_operation(operation_id : String, input_models : Element
 	Element output_metamodels
 	Element iter
 	String edge
-	input_metamodels = create_node()
+	input_metamodels = dict_create()
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformInput")
 	while (read_nr_out(iter) > 0):
 		edge = set_pop(iter)
 		dict_add(input_metamodels, read_attribute(core, edge, "name"), read_attribute(core, readAssociationDestination(core, edge), "name"))
 
-	output_metamodels = create_node()
+	output_metamodels = dict_create()
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformOutput")
 	while (read_nr_out(iter) > 0):
 		edge = set_pop(iter)
@@ -370,7 +370,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 	// 2) Merge source models
 
 	if (merged_metamodel_id != ""):
-		model_tuples = create_node()
+		model_tuples = set_create()
 		keys = dict_keys(input_models)
 		while (read_nr_out(keys) > 0):
 			key = set_pop(keys)
@@ -420,7 +420,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 		tracability = False
 
 	if (result):
-		model_tuples = create_node()
+		model_tuples = set_create()
 		keys = dict_keys(output_models)
 		while (read_nr_out(keys) > 0):
 			key = set_pop(keys)
@@ -468,9 +468,9 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 	String produce
 	Element output_map
 
-	inputs = create_node()
-	outputs = create_node()
-	output_map = create_node()
+	inputs = dict_create()
+	outputs = dict_create()
+	output_map = dict_create()
 
 	// Read out the referenced element from the MvC
 	transformation_id = get_model_id(read_attribute(pm, element, "name"))
@@ -531,13 +531,13 @@ Void function enact_PM(pm : Element, prefix : String, user_id : String):
 	output("Success")
 
 	// Initialize Join counters
-	counters = create_node()
+	counters = dict_create()
 	join_nodes = allInstances(pm, "Join")
 	while (read_nr_out(join_nodes) > 0):
 		dict_add(counters, set_pop(join_nodes), 0)
 
 	// Create the worklist with the Start instance as first element
-	worklist = create_node()
+	worklist = set_create()
 	set_add(worklist, create_tuple(set_pop(allInstances(pm, "Start")), True))
 
 	while (bool_not(pm_finished(worklist, pm))):
@@ -757,12 +757,12 @@ String function cmd_model_render(user_id : String, model_name : String, mapper_n
 					tracability_name = (("__TRACABILITY_" + model_name) + "__") + mapper_name
 
 					// Take the abstract syntax model and the previously rendered model
-					inputs = create_node()
+					inputs = dict_create()
 					dict_add(inputs, "abstract", model_name)
 					dict_add(inputs, "rendered", rendered_name)
 
 					// Fetch the output types
-					output_map = create_node()
+					output_map = dict_create()
 					out_links = allOutgoingAssociationInstances(core, mapper_ID, "transformOutput")
 					while(read_nr_out(out_links) > 0):
 						link = set_pop(out_links)
@@ -829,7 +829,7 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 		if (allow_read(user_id, transformation_id)):
 			if (is_nominal_instance(core, transformation_id, "Transformation")):
 				// Read out source and target links
-				inputs = create_node()
+				inputs = dict_create()
 
 				sources = allOutgoingAssociationInstances(core, transformation_id, "transformInput")
 				while (read_nr_out(sources) > 0):
@@ -858,8 +858,8 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 						return "Model not found: " + source_model_name!
 
 				targets = allOutgoingAssociationInstances(core, transformation_id, "transformOutput")
-				outputs = create_node()
-				output_map = create_node()
+				outputs = dict_create()
+				output_map = dict_create()
 				while (read_nr_out(targets) > 0):
 					target = set_pop(targets)
 					assoc_name = read_attribute(core, target, "name")
@@ -941,9 +941,9 @@ String function cmd_new_verify(user_id : String, model_name : String, metamodel_
 			Element conformance
 
 			conformance_operation = set_pop(allAssociationDestinations(core, get_instanceOf_link(model_id, get_model_id(metamodel_name)), "semantics"))
-			inputs = create_node()
+			inputs = dict_create()
 			dict_add(inputs, "SimpleClassDiagrams", model_name)
-			result = execute_operation(conformance_operation, inputs, create_node(), read_root())
+			result = execute_operation(conformance_operation, inputs, dict_create(), read_root())
 			return ""!
 		else:
 			return "Permission denied to model: " + model_name!
@@ -1065,10 +1065,10 @@ String function transformation_add(user_id : String, source_models : Element, ta
 	Element keys
 	String key
 
-	source = create_node()
-	target = create_node()
-	all_formalisms = create_node()
-	formalism_map = create_node()
+	source = dict_create()
+	target = dict_create()
+	all_formalisms = set_create()
+	formalism_map = set_create()
 
 	keys = dict_keys(source_models)
 	while (read_nr_out(keys) > 0):
@@ -1185,9 +1185,9 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 	String merged_formalism_id
 	String tracability_link
 
-	source = create_node()
-	target = create_node()
-	to_ramify = create_node()
+	source = dict_create()
+	target = dict_create()
+	to_ramify = set_create()
 
 	keys = dict_keys(source_models)
 	while (read_nr_out(keys) > 0):

+ 2 - 2
bootstrap/library.alc

@@ -12,8 +12,8 @@ Element function export_node(model_name : String, model_reference : Element):
 	while(counter_i < length):
 		if (bool_not(dict_in(current, splitted[counter_i]))):
 			// Create the new node
-			dict_add(current, splitted[counter_i], create_node())
-			dict_add(current[splitted[counter_i]], "__hierarchy_node", create_node())
+			dict_add(current, splitted[counter_i], dict_create())
+			dict_add(current[splitted[counter_i]], "__hierarchy_node", dict_create())
 
 		// Read out newly created element
 		current = current[splitted[counter_i]]

+ 2 - 2
bootstrap/mini_modify.alc

@@ -403,7 +403,7 @@ Element function set_input(prompt : String):
 		output(prompt)
 		output("-- Set input: empty string to terminate set")
 
-	result = create_node()
+	result = set_create()
 	while (True):
 		inp = input()
 		if (value_eq(inp, "")):
@@ -419,7 +419,7 @@ Element function dict_input(prompt : String):
 		output(prompt)
 		output("-- Dict input: empty key to terminate dict")
 
-	result = create_node()
+	result = set_create()
 	while (True):
 		key = input()
 		if (value_eq(key, "")):

+ 12 - 12
bootstrap/model_management.alc

@@ -37,7 +37,7 @@ Element function model_fuse(models : Element):
 
 		// Add all elements from 'model', but prepend it with the 'model_name'
 		keys = dict_keys(model["model"])
-		second_keys = create_node()
+		second_keys = set_create()
 
 		while (read_nr_out(keys) > 0):
 			key = set_pop(keys)
@@ -59,7 +59,7 @@ Element function model_fuse(models : Element):
 
 			if (read_nr_out(keys) == 0):
 				keys = second_keys
-				second_keys = create_node()
+				second_keys = set_create()
 
 	return new_model!
 
@@ -75,7 +75,7 @@ Element function model_copy(src_model : Element):
 
 	dst_model = instantiate_model(src_model["metamodel"])
 	keys = dict_keys(src_model["model"])
-	second_keys = create_node()
+	second_keys = set_create()
 
 	while (read_nr_out(keys) > 0):
 		name = set_pop(keys)
@@ -108,7 +108,7 @@ Element function model_copy(src_model : Element):
 
 		if (read_nr_out(keys) == 0):
 			keys = second_keys
-			second_keys = create_node()
+			second_keys = set_create()
 
 	return dst_model!
 
@@ -159,7 +159,7 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
 	String type
 
 	new_model = instantiate_model(metamodel)
-	elem_map = create_node()
+	elem_map = dict_create()
 
 	// Do the iteration
 	while (read_nr_out(models) > 0):
@@ -169,7 +169,7 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
 
 		// Add all elements from 'model'
 		keys = dict_keys(model["model"])
-		second_keys = create_node()
+		second_keys = set_create()
 
 		while (read_nr_out(keys) > 0):
 			// Copy the new element
@@ -197,7 +197,7 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
 
 			if (read_nr_out(keys) == 0):
 				keys = second_keys
-				second_keys = create_node()
+				second_keys = set_create()
 
 	// Now link in the tracability model
 	// Go over all TracabilityLink elements and connect them in the merged model as well
@@ -232,7 +232,7 @@ Element function model_split(merged_model : Element, models : Element, tracabili
 	if (read_nr_out(models) == 0):
 		// No results needed, so stop immediately unless tracability is True
 		if (bool_not(tracability)):
-			return create_node()!
+			return dict_create()!
 
 	Element result
 	Element metamodel
@@ -257,11 +257,11 @@ Element function model_split(merged_model : Element, models : Element, tracabili
 	String dst_name
 	String new_name
 
-	result = create_node()
+	result = dict_create()
 	tracability_model = instantiate_model(import_node("models/Tracability"))
 	reverse = make_reverse_dictionary(merged_model["model"])
-	mapping = create_node()
-	second_keys = create_node()
+	mapping = dict_create()
+	second_keys = set_create()
 
 	while (read_nr_out(models) > 0):
 		model_tuple = set_pop(models)
@@ -344,7 +344,7 @@ Element function model_split(merged_model : Element, models : Element, tracabili
 
 		if (read_nr_out(keys) == 0):
 			keys = second_keys
-			second_keys = create_node()
+			second_keys = set_create()
 
 	// Finally, we also add tracability information as a separate model
 	if (tracability):

+ 9 - 9
bootstrap/modelling.alc

@@ -19,11 +19,11 @@ Element function instantiate_bottom():
 	Element new_model
 
 	// The actual root node of the model
-	new_model = create_node()
+	new_model = dict_create()
 
 	// Add an empty model and empty type mapping
-	dict_add_fast(new_model, "model", create_node())
-	dict_add_fast(new_model, "type_mapping", create_node())
+	dict_add_fast(new_model, "model", dict_create())
+	dict_add_fast(new_model, "type_mapping", dict_create())
 
 	// Return the created model
 	return new_model!
@@ -75,7 +75,7 @@ String function model_add_edge(model : Element, name : String, source : String,
 Void function retype_model(model : Element, metamodel : Element):
 	// Remove the type mapping and add a new one for the specified metamodel
 	dict_delete(model, "type_mapping")
-	dict_add_fast(model, "type_mapping", create_node())
+	dict_add_fast(model, "type_mapping", dict_create())
 	dict_add_fast(model, "metamodel", metamodel)
 	return!
 
@@ -169,11 +169,11 @@ Element function get_subclasses(model : Element, name : String):
 	String elem
 	Element nodes
 
-	nodes = create_node()
+	nodes = set_create()
 	set_add(nodes, name)
 
 	// Initialize empty set
-	result = create_node()
+	result = set_create()
 	i = 0
 
 	while (list_len(nodes) > 0):
@@ -200,11 +200,11 @@ Element function get_superclasses(model : Element, name : String):
 	String elem
 	Element nodes
 
-	nodes = create_node()
+	nodes = set_create()
 	set_add(nodes, name)
 
 	// Initialize empty set
-	result = create_node()
+	result = set_create()
 	i = 0
 
 	while (list_len(nodes) > 0):
@@ -483,7 +483,7 @@ String function add_AL(model : Element, element : Element):
 	String type
 	String elem_name
 
-	todo = create_node()
+	todo = set_create()
 	set_add(todo, create_tuple(element, "funcdef"))
 
 	while (0 < dict_len(todo)):

+ 12 - 12
bootstrap/object_operations.alc

@@ -13,7 +13,7 @@ Element function allInstances(model : Element, type_name : String):
 		String class
 		Element results
 
-		result = create_node()
+		result = set_create()
 		accepted = get_subclasses(model["metamodel"], type_name)
 
 		while (read_nr_out(accepted) > 0):
@@ -23,7 +23,7 @@ Element function allInstances(model : Element, type_name : String):
 		return result!
 	else:
 		log("No such type in the metamodel: " + type_name)
-		return create_node()!
+		return set_create()!
 
 Element function selectPossibleIncoming(model : Element, target : String, limit_set : Element):
 	// Find all possible incoming link types for the target model
@@ -33,7 +33,7 @@ Element function selectPossibleIncoming(model : Element, target : String, limit_
 	Element elem
 	Element result
 	Element target_element
-	result = create_node()
+	result = set_create()
 	model_dict = model["model"]
 	while (0 < list_len(limit_set)):
 		type = set_pop(limit_set)
@@ -52,7 +52,7 @@ Element function selectPossibleOutgoing(model : Element, source : String, limit_
 	Element result
 	Element source_element
 
-	result = create_node()
+	result = set_create()
 	model_dict = model["model"]
 	
 	while (0 < list_len(limit_set)):
@@ -71,7 +71,7 @@ Element function allOutgoingAssociationInstances(model : Element, source_name :
 	Integer all_out
 	Integer i
 
-	result = create_node()
+	result = set_create()
 	source = model["model"][source_name]
 	all_out = read_nr_out(source)
 	i = 0
@@ -91,7 +91,7 @@ Element function allIncomingAssociationInstances(model : Element, target_name :
 	Integer all_out
 	Integer i
 
-	result = create_node()
+	result = set_create()
 	source = model["model"][target_name]
 	all_out = read_nr_in(source)
 	i = 0
@@ -112,7 +112,7 @@ Element function getAttributeList(model : Element, element : String):
 	Element mm
 	String attr_type
 
-	result = create_node()
+	result = dict_create()
 	mm = model["metamodel"]["model"]
 	types = get_superclasses(model["metamodel"], read_type(model, element))
 
@@ -135,7 +135,7 @@ Element function getInstantiatableAttributes(model : Element, element : String):
 	Element result
 	String link
 
-	result = create_node()
+	result = dict_create()
 
 	all_links = allOutgoingAssociationInstances(model, element, "Attribute")
 	while (read_nr_out(all_links) > 0):
@@ -171,7 +171,7 @@ Element function reverseKeyLookupMulti(dict : Element, element : Element):
 	Element link
 	Element result
 
-	result = create_node()
+	result = set_create()
 	nr_in = read_nr_in(element)
 	counter = 0
 	while (counter < nr_in):
@@ -208,7 +208,7 @@ Element function allAssociationDestinations(model : Element, name : String, asso
 	Element tmp
 	Element result
 
-	result = create_node()
+	result = set_create()
 	tmp = allOutgoingAssociationInstances(model, name, association_type)
 
 	while (read_nr_out(tmp) > 0):
@@ -220,7 +220,7 @@ Element function allAssociationOrigins(model : Element, name : String, associati
 	Element tmp
 	Element result
 
-	result = create_node()
+	result = set_create()
 	tmp = allIncomingAssociationInstances(model, name, association_type)
 
 	while (read_nr_out(tmp) > 0):
@@ -239,7 +239,7 @@ Element function allowedAssociationsBetween(model : Element, src : String, dst :
 	String edge_name
 	String dst_name
 
-	result = create_node()
+	result = set_create()
 	type = read_type(model, src)
 	all_types = get_superclasses(model["metamodel"], type)
 

+ 5 - 5
bootstrap/ramify.alc

@@ -8,9 +8,9 @@ include "conformance_scd.alh"
 Element function ramify(model : Element):
 	// Create new model structure
 	Element new_model
-	new_model = create_node()
-	dict_add_fast(new_model, "model", create_node())
-	dict_add_fast(new_model, "type_mapping", create_node())
+	new_model = dict_create()
+	dict_add_fast(new_model, "model", dict_create())
+	dict_add_fast(new_model, "type_mapping", dict_create())
 	dict_add_fast(new_model, "metamodel", model["metamodel"])
 
 	dict_add_fast(new_model, "source", model)
@@ -109,13 +109,13 @@ Element function ramify(model : Element):
 	Integer i
 	Integer cnt
 
-	masked_attributes = create_node()
+	masked_attributes = set_create()
 	set_add(masked_attributes, "constraint")
 	set_add(masked_attributes, "lower_cardinality")
 	set_add(masked_attributes, "source_lower_cardinality")
 	set_add(masked_attributes, "target_lower_cardinality")
 
-	copied_attributes = create_node()
+	copied_attributes = set_create()
 	set_add(copied_attributes, "upper_cardinality")
 	set_add(copied_attributes, "source_upper_cardinality")
 	set_add(copied_attributes, "target_upper_cardinality")

+ 6 - 6
bootstrap/semi_primitives.alc

@@ -182,7 +182,7 @@ Element function set_copy(a : Element):
 	Integer i
 	Integer count
 
-	b = create_node()
+	b = set_create()
 	i = 0
 	count = read_nr_out(a)
 
@@ -225,7 +225,7 @@ String function list_to_string(s : Element):
 Element function create_tuple(a : Element, b : Element):
 	Element tuple
 
-	tuple = create_node()
+	tuple = list_create()
 	list_append(tuple, a)
 	list_append(tuple, b)
 
@@ -261,7 +261,7 @@ Element function set_overlap(sa : Element, sb : Element):
 		sa = sb
 		sb = result
 
-	result = create_node()
+	result = set_create()
 	i = 0
 
 	// Iterate over each element of sa and only add it to the result if it is also in sb
@@ -310,7 +310,7 @@ Element function dict_copy(d : Element):
 	Element keys
 	Element key
 
-	result = create_node()
+	result = dict_create()
 
 	keys = dict_keys(d)
 	while (read_nr_out(keys) > 0):
@@ -323,7 +323,7 @@ Element function set_to_list(s : Element):
 	Element result
 	Element tmp
 
-	result = create_node()
+	result = list_create()
 	tmp = set_copy(s)
 	while (read_nr_out(tmp) > 0):
 		list_append(result, set_pop(tmp))
@@ -351,7 +351,7 @@ Element function make_reverse_dictionary(dict : Element):
 	String key
 	String value
 
-	reverse = create_node()
+	reverse = dict_create()
 	keys = dict_keys(dict)
 	while (read_nr_out(keys) > 0):
 		key = set_pop(keys)

+ 1 - 1
bootstrap/services.alc

@@ -21,7 +21,7 @@ String function comm_newPort():
 
 	// Create queues
 	Element queues
-	queues = create_node()
+	queues = dict_create()
 	dict_add(queues, "input", create_node())
 	dict_add(queues, "last_input", queues["input"])
 	dict_add(queues, "output", create_node())

+ 14 - 14
bootstrap/transform.alc

@@ -21,8 +21,8 @@ Element function make_matching_schedule(schedule_model : Element, LHS : String,
 	reverse = make_reverse_dictionary(schedule_model["model"])
 
 	// Initialize
-	schedule = create_node()
-	workset = create_node()
+	schedule = list_create()
+	workset = set_create()
 	all_elements = allAssociationDestinations(schedule_model, LHS, "LHS_contains")
 	full_all_elements = set_copy(all_elements)
 	required_size = read_nr_out(all_elements)
@@ -82,7 +82,7 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
 	String original_typename
 	Boolean guaranteed_instance
 
-	options = create_node()
+	options = set_create()
 
 	typename = read_type(schedule_model, current_element)
 	original_typename = string_substr(typename, 4, string_len(typename))
@@ -150,13 +150,13 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
 
 		elif (read_nr_out(options) > 1):
 			// Multiple "only" options, which will not work out: no options!
-			return create_node()!
+			return set_create()!
 
 	// Filter options further
 	Element filtered_options
 	String option
 
-	filtered_options = create_node()
+	filtered_options = set_create()
 	while (read_nr_out(options) > 0):
 		option = set_pop(options)
 
@@ -195,7 +195,7 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
 	Element attributes_copy
 
 	options = filtered_options
-	filtered_options = create_node()
+	filtered_options = set_create()
 
 	// Check whether all attributes have a satisfied condition
 	attributes_copy = dict_keys(getAttributeList(schedule_model, current_element))
@@ -239,11 +239,11 @@ Element function full_match(host_model : Element, schedule_model : Element, curr
 	Element final_mappings
 	Boolean allowed
 
-	final_mappings = create_node()
+	final_mappings = set_create()
 
 	// First match the LHS part itself to get initial mappings
 	LHS = set_pop(allAssociationDestinations(schedule_model, current, "LHSLink"))
-	mappings = match(host_model, schedule_model, LHS, create_node())
+	mappings = match(host_model, schedule_model, LHS, dict_create())
 
 	// Got a list of all possible mappings, now filter based on NACs
 	NACs = allAssociationDestinations(schedule_model, current, "NACLink")
@@ -286,12 +286,12 @@ Element function match(host_model : Element, schedule_model : Element, LHS : Str
 	String option
 	Element options
 
-	mappings = create_node()
+	mappings = dict_create()
 	set_add(mappings, initial_mapping)
 	while (read_nr_out(schedule) > 0):
 		current_element = list_pop(schedule, read_nr_out(schedule) - 1)
 		//log("Binding element with label " + cast_v2s(read_attribute(schedule_model, current_element, "label")))
-		new_mappings = create_node()
+		new_mappings = dict_create()
 
 		while (read_nr_out(mappings) > 0):
 			map = set_pop(mappings)
@@ -308,14 +308,14 @@ Element function match(host_model : Element, schedule_model : Element, LHS : Str
 
 		if (read_nr_out(mappings) == 0):
 			// Stop because we have no more options remaining!
-			return create_node()!
+			return set_create()!
 
 	// Finished, so try the global constraint
 	String constraint
 	Element func
 	Boolean result
 
-	new_mappings = create_node()
+	new_mappings = dict_create()
 	constraint = read_attribute(schedule_model, LHS, "constraint")
 	if (element_neq(constraint, read_root())):
 		while (read_nr_out(mappings) > 0):
@@ -355,8 +355,8 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
 	reverse = make_reverse_dictionary(schedule_model["model"])
 
 	LHS_labels = dict_keys(mapping)
-	RHS_labels = create_node()
-	RHS_map = create_node()
+	RHS_labels = set_create()
+	RHS_map = dict_create()
 
 	RHS_elements = allAssociationDestinations(schedule_model, RHS, "RHS_contains")
 	while (read_nr_out(RHS_elements) > 0):

+ 2 - 2
bootstrap/utils.alc

@@ -56,7 +56,7 @@ String function JSON_print(model : Element):
 
 Element function list_reverse(lst : Element):
 	Element result
-	result = create_node()
+	result = list_create()
 
 	Integer i
 	i = list_len(lst)
@@ -68,7 +68,7 @@ Element function list_reverse(lst : Element):
 
 Element function list_splice(lst : Element, start : Integer, end : Integer):
 	Element result
-	result = create_node()
+	result = list_create()
 
 	Integer i
 	i = start

+ 0 - 8
kernel/modelverse_kernel/compiled.py

@@ -213,11 +213,3 @@ def create_tuple(a, b, **remainder):
                      ("CD", [result, b]),
                     ]
     raise PrimitiveFinished(result)
-
-def create_triple(a, b, c, **remainder):
-    result, = yield [("CN", [])]
-    _, _ =    yield [("CD", [result, a]),
-                     ("CD", [result, b]),
-                     ("CD", [result, c]),
-                    ]
-    raise PrimitiveFinished(result)