Kaynağa Gözat

Updated all integration test code as well

Yentl Van Tendeloo 8 yıl önce
ebeveyn
işleme
d6f1ef4573

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 136384
bootstrap/bootstrap.m


+ 5 - 5
bootstrap/compilation_manager.alc

@@ -61,7 +61,7 @@ Void function compilation_manager():
 	else:
 		log("Failed to understand command")
 
-	return
+	return!
 
 String function check_symbols(root : Element, main_function : String, objs : Element):
 	Element symbols
@@ -89,7 +89,7 @@ String function check_symbols(root : Element, main_function : String, objs : Ele
 					dict_add(symbols, key, True)
 				elif (symbols[key]):
 					// Already in dictionary, and it was already defined
-					return "ERROR: multiple definition of symbol " + key
+					return "ERROR: multiple definition of symbol " + key!
 				else:
 					// Already in dictionary, but only used
 					dict_delete(symbols, key)
@@ -105,9 +105,9 @@ String function check_symbols(root : Element, main_function : String, objs : Ele
 		key = set_pop(keys)
 		if (bool_not(symbols[key])):
 			if (bool_not(bool_or(key == "output", key == "input"))):
-				return "ERROR: undefined symbol " + key
+				return "ERROR: undefined symbol " + key!
 
-	return "OK"
+	return "OK"!
 
 Void function link_and_load(root : Element, main_function : String, objs : Element):
 	String obj
@@ -129,4 +129,4 @@ Void function link_and_load(root : Element, main_function : String, objs : Eleme
 		// Resolve the main function, which should now be in (global) scope, and execute it
 		main_f = resolve(main_function)
 		main_f()
-	return
+	return!

+ 29 - 29
bootstrap/conformance_scd.alc

@@ -17,38 +17,38 @@ Element function set_copy(a : Element):
 		set_add(b, read_edge_dst(read_out(a, i)))
 		i = i + 1
 
-	return b
+	return b!
 
 Boolean function is_direct_instance(model : Element, instance : String, type : String):
 	// Just check whether or not the type mapping specifies the type as the type of the instance
-	return element_eq(dict_read_node(model["type_mapping"], model["model"][instance]), model["metamodel"]["model"][type])
+	return element_eq(dict_read_node(model["type_mapping"], model["model"][instance]), model["metamodel"]["model"][type])!
 
 Boolean function is_nominal_instance(model : Element, instance : String, type : String):
 	if (bool_not(dict_in(model["metamodel"]["model"], type))):
 		// type is not even in the specified metamodel, so this will never work
-		return False
+		return False!
 
 	if (bool_and(is_edge(model["metamodel"]["model"][type]), bool_not(is_edge(model["model"][instance])))):
 		// type is an edge, but we aren't
-		return False
+		return False!
 
 	if (bool_not(dict_in_node(model["type_mapping"], model["model"][instance]))):
 		// doesn't even have a type
-		return False
+		return False!
 
-	return is_nominal_subtype(model["metamodel"], reverseKeyLookup(model["metamodel"]["model"], dict_read_node(model["type_mapping"], model["model"][instance])), type)
+	return is_nominal_subtype(model["metamodel"], reverseKeyLookup(model["metamodel"]["model"], dict_read_node(model["type_mapping"], model["model"][instance])), type)!
 
 Boolean function is_nominal_subtype(metamodel : Element, subclass : String, superclass : String):
 	if (element_eq(metamodel["model"][subclass], metamodel["model"][superclass])):
-		return True
+		return True!
 
 	if (bool_not(dict_in(metamodel["model"], subclass))):
-		return False
+		return False!
 
 	if (bool_not(dict_in(metamodel["model"], superclass))):
-		return False
+		return False!
 
-	return set_in(get_superclasses(metamodel, subclass), superclass)
+	return set_in(get_superclasses(metamodel, subclass), superclass)!
 
 Element function precompute_cardinalities(model : Element):
 	Integer slc
@@ -85,7 +85,7 @@ Element function precompute_cardinalities(model : Element):
 		if (list_len(tmp_dict) > 0):
 			dict_add(cardinalities, key, tmp_dict)
 
-	return cardinalities
+	return cardinalities!
 
 String function conformance_scd(model : Element):
 	// Initialization
@@ -129,14 +129,14 @@ String function conformance_scd(model : Element):
 			log((("Check " + model_name) + " : ") + type_name)
 
 			if (bool_not(dict_in_node(typing, element))):
-				return "Model has no type specified: " + model_info(model, model_name)
+				return "Model has no type specified: " + model_info(model, model_name)!
 
 			if (bool_not(set_in_node(metamodel["model"], dict_read_node(typing, element)))):
-				return "Type of element not in specified metamodel: " + model_info(model, model_name)
+				return "Type of element not in specified metamodel: " + model_info(model, model_name)!
 
 			// This is true by definition of is_nominal_instance
 			//if (bool_not(is_nominal_instance(model, model_name, type_name))):
-			//	return "Element is not an instance of its specified type: " + model_info(model, model_name)
+			//	return "Element is not an instance of its specified type: " + model_info(model, model_name)!
 
 			if (is_edge(element)):
 				src_model = reverseKeyLookup(model["model"], read_edge_src(element))
@@ -145,10 +145,10 @@ String function conformance_scd(model : Element):
 				dst_metamodel = reverseKeyLookup(metamodel["model"], read_edge_dst(dict_read_node(typing, element)))
 
 				if (bool_not(is_nominal_instance(model, src_model, src_metamodel))):
-					return "Source of model edge not typed by source of type: " + model_info(model, model_name)
+					return "Source of model edge not typed by source of type: " + model_info(model, model_name)!
 
 				if (bool_not(is_nominal_instance(model, dst_model, dst_metamodel))):
-					return "Destination of model edge not typed by source of type: " + model_info(model, model_name)
+					return "Destination of model edge not typed by source of type: " + model_info(model, model_name)!
 
 			// Check cardinality for all of our edges
 			//
@@ -171,13 +171,13 @@ String function conformance_scd(model : Element):
 							if (integer_gt(cardinalities[check_type]["tlc"], instances)):
 								String error
 								error = (("Lower cardinality violation for outgoing edge of type " + check_type) + " at ") + model_info(model, model_name)
-								return error
+								return error!
 						if (dict_in(cardinalities[check_type], "tuc")):
 							// An upper cardinality was defined at the target
 							if (integer_lt(cardinalities[check_type]["tuc"], instances)):
 								String error
 								error = (("Upper cardinality violation for outgoing edge of type " + check_type) + " at ") + model_info(model, model_name)
-								return error
+								return error!
 
 			// Identical, but for outgoing, and thus for A in the figure
 			if (bool_not(dict_in(spi_cache, type_name))):
@@ -195,13 +195,13 @@ String function conformance_scd(model : Element):
 							if (integer_gt(cardinalities[check_type]["slc"], instances)):
 								String error
 								error = (("Lower cardinality violation for incoming edge of type " + check_type) + " at ") + model_info(model, model_name)
-								return error
+								return error!
 						if (dict_in(cardinalities[check_type], "suc")):
 							// An upper cardinality was defined at the source
 							if (integer_lt(cardinalities[check_type]["suc"], instances)):
 								String error
 								error = (("Upper cardinality violation for incoming edge of type " + check_type) + " at ") + model_info(model, model_name)
-								return error
+								return error!
 
 			Element constraint_function
 			constraint_function = read_attribute(metamodel, reverseKeyLookup(metamodel["model"], dict_read_node(typing, element)), "constraint")
@@ -209,7 +209,7 @@ String function conformance_scd(model : Element):
 				String result
 				result = constraint_function(model, model_name)
 				if (result != "OK"):
-					return result
+					return result!
 
 	// Check multiplicities, if they are defined (optional)
 	Element metamodel_keys
@@ -225,28 +225,28 @@ String function conformance_scd(model : Element):
 		if (element_neq(attr_value, read_root())):
 			// We have defined a lower cardinality, so check number of instances!
 			if (attr_value > list_len(allInstances(model, metamodel_element))):
-				return "Lower cardinality violated for class: " + metamodel_element
+				return "Lower cardinality violated for class: " + metamodel_element!
 
 		// Upper multiplicities
 		attr_value = read_attribute(metamodel, metamodel_element, "upper_cardinality")
 		if (element_neq(attr_value, read_root())):
 			// We have defined a lower cardinality, so check number of instances!
 			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!
 
 	// Structure seems fine, now do static semantics
 	if (dict_in(metamodel, "constraints")):
 		Element constraint_function
 		constraint_function = metamodel["constraints"]
-		return constraint_function(model)
+		return constraint_function(model)!
 	else:
-		return "OK"
+		return "OK"!
 
 Element function set_model_constraints(model : Element, func : Element):
 	if (dict_in(model, "constraints")):
 		dict_delete(model, "constraints")
 	dict_add(model, "constraints", func)
-	return model
+	return model!
 
 Element function generate_bottom_type_mapping(model : Element):
 	Element mm
@@ -267,10 +267,10 @@ Element function generate_bottom_type_mapping(model : Element):
 		else:
 			dict_add(tm, elem, mm["Node"])
 
-	return model
+	return model!
 
 String function model_info(model : Element, name : String):
-	return name
+	return name!
 	// For more detailed information
 	String result
 	result = ""
@@ -279,4 +279,4 @@ String function model_info(model : Element, name : String):
 	result = (result + "\nValue: ") + cast_v2s(model["model"][name])
 	result = (result + "\nSource: ") + cast_v2s(reverseKeyLookup(model["model"], read_edge_src(model["model"][name])))
 	result = (result + "\nDestination: ") + cast_v2s(reverseKeyLookup(model["model"], read_edge_dst(model["model"][name])))
-	return result
+	return result!

+ 35 - 35
bootstrap/constructors.alc

@@ -12,9 +12,9 @@ Action function construct_top():
 	while (True):
 		command = input()
 		if (command == "global"):
-			return construct_global()
+			return construct_global()!
 		elif (command == "funcdef"):
-			return construct_top_funcdef()
+			return construct_top_funcdef()!
 		else:
 			log("ERROR: did not understand command " + cast_e2s(command))
 
@@ -59,7 +59,7 @@ Action function construct_global():
 
 	if (input()):
 		dict_add(assign, "next", construct_top())
-	return this_element
+	return this_element!
 
 Action function construct_top_funcdef():
 	Action assign
@@ -113,7 +113,7 @@ Action function construct_top_funcdef():
 	if (input()):
 		dict_add(assign, "next", construct_top())
 
-	return global
+	return global!
 
 Action function construct_unknown():
 	String elem
@@ -122,37 +122,37 @@ Action function construct_unknown():
 	elem = input()
 
 	if (elem == "if"):
-		return construct_if()
+		return construct_if()!
 	elif (elem == "while"):
-		return construct_while()
+		return construct_while()!
 	elif (elem == "access"):
-		return construct_access()
+		return construct_access()!
 	elif (elem == "resolve"):
-		return construct_resolve()
+		return construct_resolve()!
 	elif (elem == "assign"):
-		return construct_assign()
+		return construct_assign()!
 	elif (elem == "call"):
-		return construct_call()
+		return construct_call()!
 	elif (elem == "return"):
-		return construct_return()
+		return construct_return()!
 	elif (elem == "const"):
-		return construct_const()
+		return construct_const()!
 	elif (elem == "declare"):
-		return construct_declare()
+		return construct_declare()!
 	elif (elem == "output"):
-		return construct_output()
+		return construct_output()!
 	elif (elem == "input"):
-		return construct_input()
+		return construct_input()!
 	elif (elem == "deref"):
-		return construct_deref()
+		return construct_deref()!
 	elif (elem == "break"):
-		return construct_break()
+		return construct_break()!
 	elif (elem == "continue"):
-		return construct_continue()
+		return construct_continue()!
 	elif (elem == "model"):
 		construct_model()
 		log("Constructed model")
-		return construct_unknown()
+		return construct_unknown()!
 	else:
 		log("ERROR: did not understand command " + cast_e2s(elem))
 
@@ -165,7 +165,7 @@ Action function construct_if():
 		dict_add(this_element, "else", construct_unknown())
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_while():
 	Action this_element
@@ -178,13 +178,13 @@ Action function construct_while():
 
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_access():
 	Action this_element
 	this_element = create_value(!access)
 	dict_add(this_element, "var", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_resolve():
 	Action this_element
@@ -198,7 +198,7 @@ Action function construct_resolve():
 	else:
 		linked_element = name
 	dict_add(this_element, "var", linked_element)
-	return this_element
+	return this_element!
 
 Action function construct_assign():
 	Action this_element
@@ -207,7 +207,7 @@ Action function construct_assign():
 	dict_add(this_element, "value", construct_unknown())
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_call():
 	Action this_element
@@ -243,22 +243,22 @@ Action function construct_call():
 
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_return():
 	if (input()):
 		Action this_element
 		this_element = create_value(!return)
 		dict_add(this_element, "value", construct_unknown())
-		return this_element
+		return this_element!
 	else:
-		return create_value(!return)
+		return create_value(!return)!
 
 Action function construct_const():
 	Action this_element
 	this_element = create_value(!constant)
 	dict_add(this_element, "node", input())
-	return this_element
+	return this_element!
 
 Action function construct_declare():
 	Action this_element
@@ -272,12 +272,12 @@ Action function construct_declare():
 	dict_add(variable_map, name, declared_element)
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_input():
 	Action this_element
 	this_element = create_value(!input)
-	return this_element
+	return this_element!
 
 Action function construct_output():
 	Action this_element
@@ -285,25 +285,25 @@ Action function construct_output():
 	dict_add(this_element, "value", construct_unknown())
 	if (input()):
 		dict_add(this_element, "next", construct_unknown())
-	return this_element
+	return this_element!
 
 Action function construct_deref():
 	Action this_element
 	this_element = create_value(!constant)
 	dict_add(this_element, "node", import_node(input()))
-	return this_element
+	return this_element!
 
 Action function construct_break():
 	Action this_element
 	this_element = create_value(!break)
 	dict_add(this_element, "while", while_stack[list_len(while_stack) - 1])
-	return this_element
+	return this_element!
 
 Action function construct_continue():
 	Action this_element
 	this_element = create_value(!continue)
 	dict_add(this_element, "while", while_stack[list_len(while_stack) - 1])
-	return this_element
+	return this_element!
 
 Action function construct_function():
 	Action func
@@ -340,4 +340,4 @@ Action function construct_function():
 	// Consume the final 'false', to indicate that no additional code will come
 	input()
 
-	return func
+	return func!

+ 3 - 3
bootstrap/library.alc

@@ -19,7 +19,7 @@ Element function export_node(model_name : String, model_reference : Element):
 	// current now contains the place where we should add the element
 	dict_add(current, list_read(splitted, length), model_reference)
 
-	return model_reference
+	return model_reference!
 
 Element function import_node(model_name : String):
 	Element splitted
@@ -35,6 +35,6 @@ Element function import_node(model_name : String):
 			current = current[splitted[counter_i]]
 			counter_i = counter_i + 1
 		else:
-			return read_root()
+			return read_root()!
 
-	return current
+	return current!

+ 51 - 51
bootstrap/metamodels.alc

@@ -7,143 +7,143 @@ include "modelling.alh"
 Element function constraint_natural(model : Element, name : String):
 	if (is_physical_int(model["model"][name])):
 		if (integer_gte(model["model"][name], 0)):
-			return "OK"
+			return "OK"!
 		else:
-			return "Natural number not larger than or equal to zero"
+			return "Natural number not larger than or equal to zero"!
 	else:
-		return "Natural has non-integer instance"
+		return "Natural has non-integer instance"!
 
 Element function constraint_string(model : Element, name : String):
 	if (is_physical_string(model["model"][name])):
-		return "OK"
+		return "OK"!
 	else:
-		return "String has non-string instance"
+		return "String has non-string instance"!
 
 Element function constraint_if(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "if"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_while(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "while"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_break(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "break"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_continue(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "continue"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_assign(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "assign"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_return(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "return"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_output(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "output"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_input(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "input"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_declare(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "declare"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_global(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "global"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_access(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "access"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_constant(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "constant"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_resolve(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "resolve"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function constraint_call(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "call"):
-			return "OK"
+			return "OK"!
 		else:
-			return "Got wrong action primitive: " + cast_a2s(model["model"][name])
+			return "Got wrong action primitive: " + cast_a2s(model["model"][name])!
 	else:
-		return "Expected physical action value"
+		return "Expected physical action value"!
 
 Element function initialize_SCD(location : String):
 	Element scd
@@ -349,7 +349,7 @@ Element function initialize_SCD(location : String):
 
 	// Finally done, so export!
 	export_node(location, scd)
-	return scd
+	return scd!
 
 Element function initialize_PN(location_SCD : String, location_PN : String):
 	Element pn
@@ -384,7 +384,7 @@ Element function initialize_PN(location_SCD : String, location_PN : String):
 	//set_model_constraints(pn, petrinet_constraints)
 	export_node(location_PN, pn)
 
-	return pn
+	return pn!
 
 Element function initialize_bottom(location_bottom : String):
 	Element ltm_bottom
@@ -403,7 +403,7 @@ Element function initialize_bottom(location_bottom : String):
 
 	export_node(location_bottom, ltm_bottom)
 
-	return ltm_bottom
+	return ltm_bottom!
 
 Element function create_metamodels():
 	String location_SCD
@@ -421,4 +421,4 @@ Element function create_metamodels():
 	if (bool_not(dict_in(dict_read(dict_read(read_root(), "__hierarchy"), "models"), "LTM_bottom"))):
 		initialize_bottom(location_bottom)
 
-	return dict_read(dict_read(read_root(), "__hierarchy"), "models")
+	return dict_read(dict_read(read_root(), "__hierarchy"), "models")!

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 1859
bootstrap/minimal.m


+ 30 - 30
bootstrap/modelling.alc

@@ -9,9 +9,9 @@ Element global_models = ?
 
 String function instantiated_name(element : Element, original : String):
 	if (original == ""):
-		return "__" + cast_id2s(element)
+		return "__" + cast_id2s(element)!
 	else:
-		return original
+		return original!
 
 Element function instantiate_bottom():
 	// Just create a new node that serves as the basis for everything
@@ -26,7 +26,7 @@ Element function instantiate_bottom():
 	dict_add(new_model, "type_mapping", create_node())
 
 	// Return the created model
-	return new_model
+	return new_model!
 
 String function model_add_node(model : Element, name : String):
 	// Adds a new node to the specified model with the desired name
@@ -38,7 +38,7 @@ String function model_add_node(model : Element, name : String):
 	actual_name = instantiated_name(new_node, name)
 	dict_add(model["model"], actual_name, new_node)
 
-	return actual_name
+	return actual_name!
 
 String function model_add_value(model : Element, name : String, value : Element):
 	// Similar to model_add_node, but add a value as well
@@ -47,7 +47,7 @@ String function model_add_value(model : Element, name : String, value : Element)
 	actual_name = instantiated_name(value, name)
 	dict_add(model["model"], actual_name, value)
 
-	return actual_name
+	return actual_name!
 
 String function model_add_edge(model : Element, name : String, source : String, destination : String):
 	// Add an edge between the source and destination nodes
@@ -59,25 +59,25 @@ String function model_add_edge(model : Element, name : String, source : String,
 		log("In link " + name)
 		log("ERROR: source of link unknown: " + source)
 		log("Destination: " + destination)
-		return ""
+		return ""!
 	if (bool_not(dict_in(model["model"], destination))):
 		log("In link " + name)
 		log("ERROR: destination of link unknown: " + destination)
 		log("Source: " + source)
-		return ""
+		return ""!
 
 	new_edge = create_edge(model["model"][source], model["model"][destination])
 	actual_name = instantiated_name(new_edge, name)
 	dict_add(model["model"], actual_name, new_edge)
 
-	return actual_name
+	return actual_name!
 
 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(model, "type_mapping", create_node())
 	dict_add(model, "metamodel", metamodel)
-	return
+	return!
 
 Void function retype(model : Element, element : String, type : String):
 	// Retype a model, deleting any previous type the element had
@@ -86,7 +86,7 @@ Void function retype(model : Element, element : String, type : String):
 		dict_delete(model["type_mapping"], model["model"][element])
 	dict_add(model["type_mapping"], model["model"][element], model["metamodel"]["model"][type])
 
-	return
+	return!
 
 Element function instantiate_model(metamodel : Element):
 	// Instantiate a model
@@ -94,7 +94,7 @@ Element function instantiate_model(metamodel : Element):
 	Element model
 	model = instantiate_bottom()
 	retype_model(model, metamodel)
-	return model
+	return model!
 
 String function instantiate_node(model : Element, type_name : String, instance_name : String):
 	// Create a node typed by a node from the metamodel
@@ -104,7 +104,7 @@ String function instantiate_node(model : Element, type_name : String, instance_n
 	actual_name = model_add_node(model, instance_name)
 	retype(model, instance_name, type_name)
 
-	return actual_name
+	return actual_name!
 
 String function find_attribute_type(model : Element, elem : String, name : String):
 	String mm_elem
@@ -115,9 +115,9 @@ String function find_attribute_type(model : Element, elem : String, name : Strin
 
 	if (value_eq(mm_elem, "")):
 		// Couldn't find element, so is not allowed!
-		return ""
+		return ""!
 	else:
-		return reverseKeyLookup(model["metamodel"]["model"], dict_read_edge(model["metamodel"]["model"][mm_elem], name))
+		return reverseKeyLookup(model["metamodel"]["model"], dict_read_edge(model["metamodel"]["model"][mm_elem], name))!
 
 Element function get_superclasses(model : Element, name : String):
 	Element result
@@ -147,7 +147,7 @@ Element function get_superclasses(model : Element, name : String):
 				set_add(nodes, read_edge_dst(edge))
 			j = j + 1
 
-	return result
+	return result!
 
 String function find_attribute_definer(model : Element, elem_name : String, name : String):
 	Element superclasses
@@ -157,8 +157,8 @@ String function find_attribute_definer(model : Element, elem_name : String, name
 	while (list_len(superclasses) > 0):
 		current = set_pop(superclasses)
 		if (dict_in(model["model"][current], name)):
-			return current
-	return ""
+			return current!
+	return ""!
 
 Void function instantiate_attribute(model : Element, element : String, attribute_name : String, value : Element):
 	// Instantiate an attribute of something that needs to be instantiated
@@ -170,13 +170,13 @@ Void function instantiate_attribute(model : Element, element : String, attribute
 
 	if (attr_type == ""):
 		log("Could not find attribute!")
-		return
+		return!
 		
 	attr_name = model_add_value(model, (element + ".") + attribute_name, value)
 	retype(model, attr_name, reverseKeyLookup(model["metamodel"]["model"], read_edge_dst(model["metamodel"]["model"][attr_type])))
 	instantiate_link(model, attr_type, "", element, attr_name)
 
-	return
+	return!
 
 String function instantiate_link(model : Element, type : String, name : String, source : String, destination : String):
 	// Create a typed link between two nodes
@@ -185,13 +185,13 @@ String function instantiate_link(model : Element, type : String, name : String,
 	actual_name = model_add_edge(model, name, source, destination)
 	retype(model, actual_name, type)
 
-	return actual_name
+	return actual_name!
 
 Void function define_inheritance(model : Element, inheritance_name : String):
 	// Set the inheritance link to the one defined in our own metamodel, given by the specified name
 	dict_add(model, "inheritance", model["metamodel"]["model"][inheritance_name])
 
-	return
+	return!
 
 Void function model_delete_element(model : Element, name : String):
 	// Remove the link
@@ -201,7 +201,7 @@ Void function model_delete_element(model : Element, name : String):
 	// 2) from the model
 	delete_element(model["model"][name])
 
-	return
+	return!
 
 Element function read_attribute(model : Element, element : String, attribute : String):
 	Integer i
@@ -221,10 +221,10 @@ Element function read_attribute(model : Element, element : String, attribute : S
 		if (dict_in_node(typing, edge)):
 			edge_type = dict_read_node(typing, edge)
 			if (element_eq(edge_type, dict_read_edge(read_edge_src(edge_type), attribute))):
-				return read_edge_dst(edge)
+				return read_edge_dst(edge)!
 		i = i + 1
 
-	return read_root()
+	return read_root()!
 
 Void function unset_attribute(model : Element, element : String, attribute : String):
 	// Removes an attribute if it exists
@@ -241,11 +241,11 @@ Void function unset_attribute(model : Element, element : String, attribute : Str
 		dict_delete(model["type_mapping"], model["model"][attr_link])
 		delete_element(read_edge_dst(model["model"][attr_link]))
 
-	return
+	return!
 
 Void function add_AL_links(model : Element, list : Element, element : Element, type: String, linkname : String, expected_type : String):
 	if (bool_not(dict_in(element, linkname))):
-		return
+		return!
 
 	Element link
 	link = dict_read_edge(element, linkname)
@@ -272,7 +272,7 @@ Void function add_AL_links(model : Element, list : Element, element : Element, t
 	list_append(node, expected_type)
 	set_add(list, node)
 
-	return
+	return!
 
 String function add_AL(model : Element, element : Element):
 	log("Adding constraint: " + cast_e2s(element))
@@ -353,7 +353,7 @@ String function add_AL(model : Element, element : Element):
 		else:
 			log("Already in there")
 
-	return reverseKeyLookup(model["model"], element)
+	return reverseKeyLookup(model["model"], element)!
 
 Void function add_constraint(model : Element, element : String, constraint : Action):
 	// Add local constraints to an element
@@ -365,7 +365,7 @@ Void function add_constraint(model : Element, element : String, constraint : Act
 	attr_type = find_attribute_type(model, element, "constraint")
 	instantiate_link(model, attr_type, "", element, constraint_name)
 
-	return
+	return!
 
 Void function construct_model():
 	String command
@@ -382,7 +382,7 @@ Void function construct_model():
 		elif (command == "add_edge"):
 			model_add_edge(global_models[input()], input(), input(), input())
 		elif (command == "exit"):
-			return
+			return!
 		elif (command == "retype_model"):
 			retype_model(global_models[input()], global_models[input()])
 		elif (command == "retype"):

+ 13 - 13
bootstrap/object_operations.alc

@@ -19,7 +19,7 @@ Element function allInstances(model : Element, type_name : String):
 		if (is_nominal_instance(model, key, type_name)):
 			set_add(result, key)
 
-	return result
+	return result!
 
 Element function selectPossibleIncoming(model : Element, target : String, limit_set : Element):
 	// Find all possible incoming link types for the target model
@@ -40,7 +40,7 @@ Element function selectPossibleIncoming(model : Element, target : String, limit_
 		if (is_nominal_subtype(model, target, reverseKeyLookup(model_dict, read_edge_dst(elem)))):
 			set_add(result, type)
 	
-	return result
+	return result!
 
 Element function selectPossibleOutgoing(model : Element, source : String, limit_set : Element):
 	// Find all possible outgoing link types for the source model
@@ -60,7 +60,7 @@ Element function selectPossibleOutgoing(model : Element, source : String, limit_
 		if (is_nominal_subtype(model, source, reverseKeyLookup(model_dict, read_edge_src(elem)))):
 			set_add(result, type)
 	
-	return result
+	return result!
 
 Element function allOutgoingAssociationInstances(model : Element, source_name : String, assoc_name : String):
 	// Read out all outgoing edges of the model and select those that are typed by the specified association
@@ -77,7 +77,7 @@ Element function allOutgoingAssociationInstances(model : Element, source_name :
 		assoc = set_pop(assocs)
 		if (element_eq(source, read_edge_src(model["model"][assoc]))):
 			set_add(result, assoc)
-	return result
+	return result!
 
 Element function allIncomingAssociationInstances(model : Element, target_name : String, assoc_name : String):
 	// Read out all outgoing edges of the model and select those that are typed by the specified association
@@ -94,7 +94,7 @@ Element function allIncomingAssociationInstances(model : Element, target_name :
 		assoc = set_pop(assocs)
 		if (element_eq(target, read_edge_dst(model["model"][assoc]))):
 			set_add(result, assoc)
-	return result
+	return result!
 
 Element function getAttributeList(model : Element, element : String):
 	Element result
@@ -117,7 +117,7 @@ Element function getAttributeList(model : Element, element : String):
 	// Go on to the metalevel
 	// TODO
 
-	return result
+	return result!
 
 Element function getInstantiatableAttributes(model : Element, element : String):
 	Element result
@@ -135,7 +135,7 @@ Element function getInstantiatableAttributes(model : Element, element : String):
 		if (is_physical_string(e)):
 			dict_add(result, e, reverseKeyLookup(model["model"], element[e]))
 
-	return result
+	return result!
 
 String function reverseKeyLookup(dict : Element, element : Element):
 	Element elements
@@ -145,9 +145,9 @@ String function reverseKeyLookup(dict : Element, element : Element):
 	while (0 < list_len(elements)):
 		name = set_pop(elements)
 		if (element_eq(dict[name], element)):
-			return name
+			return name!
 
-	return string_join(string_join("(unknown: ", cast_e2s(element)), " )")
+	return string_join(string_join("(unknown: ", cast_e2s(element)), " )")!
 
 String function print_dict(dict : Element):
 	Element keys
@@ -162,13 +162,13 @@ String function print_dict(dict : Element):
 		result = result + ": "
 		result = result + cast_v2s(dict[key])
 		result = result + "\n"
-	return result
+	return result!
 
 String function readAssociationSource(model : Element, name : String):
-	return reverseKeyLookup(model["model"], read_edge_src(model["model"][name]))
+	return reverseKeyLookup(model["model"], read_edge_src(model["model"][name]))!
 
 String function readAssociationDestination(model : Element, name : String):
-	return reverseKeyLookup(model["model"], read_edge_dst(model["model"][name]))
+	return reverseKeyLookup(model["model"], read_edge_dst(model["model"][name]))!
 
 String function followAssociation(model : Element, element_name : String, association_name : String):
 	Element assocs
@@ -180,4 +180,4 @@ String function followAssociation(model : Element, element_name : String, associ
 	while (0 < list_len(assocs)):
 		set_add(result, readAssociationDestination(model, set_pop(assocs)))
 
-	return result
+	return result!

+ 15 - 15
bootstrap/primitives.alc

@@ -102,35 +102,35 @@ Element function exec(first_instr : Element):
 	dict_add(n, "body", exec_if)
 	dict_add(exec_if, "next", exec_return)
 
-	return n()
+	return n()!
 
 Boolean function string_startswith(a: String, b: String):
 	Integer i
 	i = 0
 	if (string_len(b) > string_len(a)):
-		return False
+		return False!
 
 	while (i < string_len(b)):
 		if (string_get(a, i) != string_get(b, i)):
-			return False
+			return False!
 		i = i + 1
 	
-	return True
+	return True!
 
 Boolean function has_value(a: Element):
-	return bool_or(bool_or(bool_or(is_physical_action, is_physical_int(a)), is_physical_float(a)), bool_or(is_physical_string(a), is_physical_boolean(a)))
+	return bool_or(bool_or(bool_or(is_physical_action, is_physical_int(a)), is_physical_float(a)), bool_or(is_physical_string(a), is_physical_boolean(a)))!
 
 Boolean function float_gte(a: Float, b: Float):
-	return bool_or(float_gt(a, b), value_eq(a, b))
+	return bool_or(float_gt(a, b), value_eq(a, b))!
 
 Boolean function float_lte(a: Float, b: Float):
-	return bool_or(float_lt(a, b), value_eq(a, b))
+	return bool_or(float_lt(a, b), value_eq(a, b))!
 
 Boolean function integer_lte(a: Integer, b: Integer):
-	return bool_or(integer_lt(a, b), value_eq(a, b))
+	return bool_or(integer_lt(a, b), value_eq(a, b))!
 	
 Boolean function integer_gte(a: Integer, b: Integer):
-	return bool_or(integer_gt(a, b), value_eq(a, b))
+	return bool_or(integer_gt(a, b), value_eq(a, b))!
 
 String function string_substr(a: String, b: Integer, c: Integer):
 	String result
@@ -140,11 +140,11 @@ String function string_substr(a: String, b: Integer, c: Integer):
 
 	// If the string is too short for b to even start, return empty
 	if (b > string_len(a)):
-		return ""
+		return ""!
 
 	// If the part we want to snip is negative, we return empty
 	if (b > c):
-		return ""
+		return ""!
 
 	i = 0
 	result = ""
@@ -153,8 +153,8 @@ String function string_substr(a: String, b: Integer, c: Integer):
 			result = result + string_get(a, i)
 
 		if (i > c):
-			return result
-	return result
+			return result!
+	return result!
 	
 Element function resolve(name : String):
 	// Could directly access it through introspection
@@ -162,7 +162,7 @@ Element function resolve(name : String):
 	Element user_root
 	user_root = read_userroot()
 	user_root = user_root["globals"][name]["value"]
-	return user_root
+	return user_root!
 
 Integer function integer_modulo(a : Integer, b : Integer):
-	return a - b * (a / b)
+	return a - b * (a / b)!

+ 5 - 5
bootstrap/random.alc

@@ -18,16 +18,16 @@ Float function random():
 
 	// The seed is the new value
 	log("Return random " + cast_f2s(float_division(seed, m)))
-	return float_division(seed, m)
+	return float_division(seed, m)!
 
 Integer function random_interval(a : Integer, b : Integer):
 	if (a == b):
-		return a
+		return a!
 	else:
-		return cast_f2i(random() * (b - a + 1) + a)
+		return cast_f2i(random() * (b - a + 1) + a)!
 
 Element function random_choice(list : Element):
 	if (list_len(list) == 0):
-		return read_root()
+		return read_root()!
 	else:
-		return read_edge_dst(read_out(list, random_interval(0, read_nr_out(list) - 1)))
+		return read_edge_dst(read_out(list, random_interval(0, read_nr_out(list) - 1)))!

+ 1 - 1
integration/code/binary_to_decimal.alc

@@ -16,7 +16,7 @@ Integer function b2d(param : String):
 		accumul = integer_multiplication(accumul, 2)
 		counter = integer_subtraction(counter, 1)
 
-	return value
+	return value!
 
 Void function main():
 	while(True):

+ 2 - 2
integration/code/factorial.alc

@@ -2,9 +2,9 @@ include "primitives.alh"
 
 Integer function factorial(n : Integer):
 	if(n <= 1):
-		return 1
+		return 1!
 	else:
-		return n * factorial(n - 1)
+		return n * factorial(n - 1)!
 
 Void function main():
 	while(True):

+ 2 - 2
integration/code/fibonacci.alc

@@ -2,9 +2,9 @@ include "primitives.alh"
 
 Integer function fib(param : Integer):
 	if (param <= 2):
-		return 1
+		return 1!
 	else:
-		return fib(param - 1) + fib(param - 2)
+		return fib(param - 1) + fib(param - 2)!
 
 Void function main():
 	while(True):

+ 1 - 1
integration/code/fibonacci_smart.alc

@@ -7,7 +7,7 @@ Integer function fib(param : Integer):
 	while (param > list_len(numbers)):
 		new = list_len(numbers)
 		list_append(numbers, integer_addition(dict_read(numbers, new - 2), dict_read(numbers, new - 1)))
-	return dict_read(numbers, param - 1)
+	return dict_read(numbers, param - 1)!
 
 Void function main():
 	numbers = create_node()

+ 3 - 3
integration/code/if_elif.alc

@@ -2,10 +2,10 @@ include "primitives.alh"
 
 Integer function compare_with_zero(n : Integer):
 	if(n < 0):
-		return -1
+		return -1!
 	elif(n == 0):
-		return 0
-	return 1
+		return 0!
+	return 1!
 
 Void function main():
 	while(True):

+ 3 - 3
integration/code/if_elif_else.alc

@@ -2,11 +2,11 @@ include "primitives.alh"
 
 Integer function compare_with_zero(n : Integer):
 	if(n < 0):
-		return -1
+		return -1!
 	elif(n == 0):
-		return 0
+		return 0!
 	else:
-		return 1
+		return 1!
 
 Void function main():
 	while(True):

+ 3 - 3
integration/code/leap_year.alc

@@ -5,11 +5,11 @@ Boolean function leap_year(year : Integer):
 	if (remainder(year, 4) == 0):
 		// Unless it is also divisible by 1000
 		if (remainder(year, 1000) == 0):
-			return False
+			return False!
 		else:
-			return True
+			return True!
 	else:
-		return False
+		return False!
 
 Void function main():
 	while (True):

+ 1 - 1
integration/code/lib_remainder.alc

@@ -1,4 +1,4 @@
 include "primitives.alh"
 
 Integer function remainder(a : Integer, b: Integer):
-	return a - ((a / b) * b)
+	return a - ((a / b) * b)!

+ 1 - 1
integration/code/main.alc

@@ -3,4 +3,4 @@ include "io.alh"
 Void function main():
 	while(True):
 		output("Hello, world!")
-	return
+	return!

+ 3 - 3
integration/code/my_petrinet_with_MM_and_constraints.mvc

@@ -5,11 +5,11 @@ SCD PetriNets{
     Class Natural {
         $
             if (bool_not(is_physical_int(self))):
-                return "Natural has no integer value"
+                return "Natural has no integer value"!
             elif (integer_lt(self, 0)):
-                return "Natural does not have a positive or zero value"
+                return "Natural does not have a positive or zero value"!
             else:
-                return "OK"
+                return "OK"!
          $
     }
     Class Place{

+ 3 - 3
integration/code/petrinets_constraints.mvc

@@ -5,11 +5,11 @@ SCD PetriNets{
     Class Natural {
         $
             if (bool_not(is_physical_int(self))):
-                return "Natural has no integer value"
+                return "Natural has no integer value"!
             elif (integer_lt(self, 0)):
-                return "Natural does not have a positive or zero value"
+                return "Natural does not have a positive or zero value"!
             else:
-                return "OK"
+                return "OK"!
          $
     }
     Class Place{

+ 1 - 1
integration/code/pn_interface.alc

@@ -49,7 +49,7 @@ Element function model_loaded(model : Element):
 			output("  switch      -- Switch between conformance bottom and the linguistic metamodel")
 			output("  exit        -- Unload the model and go back to the loading prompt")
 		elif (cmd == "exit"):
-			return model
+			return model!
 		elif (cmd == "instantiate"):
 			String mm_type_name
 			output("Type to instantiate?")

+ 5 - 5
integration/code/pn_semantics.alc

@@ -10,7 +10,7 @@ Void function petrinet_enabled(model : Element):
 	output("Enabled transitions:")
 	while (0 < read_nr_out(set_enabled)):
 		output(set_pop(set_enabled))
-	return
+	return!
 
 Element function petrinet_enabled_set(model : Element):
 	Element all_transitions
@@ -47,7 +47,7 @@ Element function petrinet_enabled_set(model : Element):
 			set_add(enabled_transitions, under_study)
 
 	log("Got all enabled transitions!")
-	return enabled_transitions
+	return enabled_transitions!
 
 Void function petrinet_fire(model : Element):
 	output("Transition to fire?")
@@ -84,7 +84,7 @@ Void function petrinet_fire(model : Element):
 			output("Cannot fire if not enabled; aborting")
 	else:
 		output("Unknown transition; aborting")
-	return
+	return!
 
 Void function petrinet_list(model : Element):
 	Element keys 
@@ -101,7 +101,7 @@ Void function petrinet_list(model : Element):
 		if (element_eq(dict_read_node(typemap, model["model"][name]), place)):
 			// Found a place
 			output((name + ": ") + cast_i2s(read_attribute(model, name, "tokens")))
-	return
+	return!
 
 Void function main():
 	Element model
@@ -143,7 +143,7 @@ Void function execute_petrinet(model : Element):
 		elif (cmd == "list"):
 			petrinet_list(model)
 		elif (cmd == "exit"):
-			return
+			return!
 		else:
 			output("Did not understand command!")
 			output("Use 'help' for a list of available options")

+ 2 - 2
integration/code/power.alc

@@ -2,9 +2,9 @@ include "primitives.alh"
 
 Integer function power(base : Integer, exponent : Integer):
 	if (exponent == 0):
-		return 1
+		return 1!
 	else:
-		return base * power(base, exponent - 1)
+		return base * power(base, exponent - 1)!
 
 Void function main():
 	while (True):

+ 1 - 1
integration/code/revert.alc

@@ -14,7 +14,7 @@ String function revert_string(a : String):
 		result = string_join(string_get(a, counter), result)
 		counter = counter + 1
 
-	return result
+	return result!
 
 Void function main():
 	while (True):

+ 9 - 9
integration/code/rpgame.mvc

@@ -15,49 +15,49 @@ SCD RPGame{
             destination = readAssociationDestination(model, association)
             back_associations = allOutgoingAssociationInstances(model, destination, "tile_right")
             if (list_len(back_associations) < 1):
-                return "Left link does not have a right link back"
+                return "Left link does not have a right link back"!
             else:
                 association = set_pop(back_associations)
                 destination = readAssociationDestination(model, association)
                 if (destination != name):
-                    return "Right link does not have a left link back to the same tile"
+                    return "Right link does not have a left link back to the same tile"!
         associations = allOutgoingAssociationInstances(model, name, "tile_right")
         while (0 < list_len(associations)):
             association = set_pop(associations)
             destination = readAssociationDestination(model, association)
             back_associations = allOutgoingAssociationInstances(model, destination, "tile_left")
             if (list_len(back_associations) < 1):
-                return "Right link does not have a left link back"
+                return "Right link does not have a left link back"!
             else:
                 association = set_pop(back_associations)
                 destination = readAssociationDestination(model, association)
                 if (destination != name):
-                    return "Right link does not have a left link back to the same tile"
+                    return "Right link does not have a left link back to the same tile"!
         associations = allOutgoingAssociationInstances(model, name, "tile_top")
         while (0 < list_len(associations)):
             association = set_pop(associations)
             destination = readAssociationDestination(model, association)
             back_associations = allOutgoingAssociationInstances(model, destination, "tile_bottom")
             if (list_len(back_associations) < 1):
-                return "Top link does not have a bottom link back"
+                return "Top link does not have a bottom link back"!
             else:
                 association = set_pop(back_associations)
                 destination = readAssociationDestination(model, association)
                 if (destination != name):
-                    return "Top link does not have a bottom link back to the same tile"
+                    return "Top link does not have a bottom link back to the same tile"!
         associations = allOutgoingAssociationInstances(model, name, "tile_bottom")
         while (0 < list_len(associations)):
             association = set_pop(associations)
             destination = readAssociationDestination(model, association)
             back_associations = allOutgoingAssociationInstances(model, destination, "tile_top")
             if (list_len(back_associations) < 1):
-                return "Bottom link does not have a top link back"
+                return "Bottom link does not have a top link back"!
             else:
                 association = set_pop(back_associations)
                 destination = readAssociationDestination(model, association)
                 if (destination != name):
-                    return "Bottom link does not have a top link back to the same tile"
-        return "OK"
+                    return "Bottom link does not have a top link back to the same tile"!
+        return "OK"!
         $
     }
     Association tile_left (Tile, Tile){

+ 5 - 5
integration/code/rpgame_semantics.alc

@@ -28,10 +28,10 @@ Void function main():
 				output("Non-conforming model: " + verify_result)
 
 String function getHeroTile(model : Element, hero : String):
-	return set_pop(followAssociation(model, hero, "Character_on_tile"))
+	return set_pop(followAssociation(model, hero, "Character_on_tile"))!
 
 String function getGoalTile(model : Element, goal : String):
-	return set_pop(followAssociation(model, goal, "Item_on_tile"))
+	return set_pop(followAssociation(model, goal, "Item_on_tile"))!
 
 Void function setHeroTile(model : Element, hero : String, tile : String):
 	Element assocs
@@ -42,7 +42,7 @@ Void function setHeroTile(model : Element, hero : String, tile : String):
 
 	instantiate_link(model, "Character_on_tile", "", hero, tile)
 
-	return
+	return!
 
 Element function getConnectedTiles(model : Element, tile : String):
 	Element left
@@ -66,7 +66,7 @@ Element function getConnectedTiles(model : Element, tile : String):
 	while (dict_len(bottom) > 0):
 		set_add(result, set_pop(bottom))
 
-	return result
+	return result!
 
 Void function execute_rpgame(model : Element):
 	String hero
@@ -92,4 +92,4 @@ Void function execute_rpgame(model : Element):
 		hero_tile = random_choice(getConnectedTiles(model, hero_tile))
 		setHeroTile(model, hero, hero_tile)
 	output("Hero reached goal!")
-	return
+	return!

+ 3 - 3
integration/code/several_petrinets.mvc

@@ -5,11 +5,11 @@ SCD PetriNets{
     Class Natural {
         $
             if (bool_not(is_physical_int(self))):
-                return "Natural has no integer value at " + name
+                return "Natural has no integer value at " + name!
             elif (integer_lt(self, 0)):
-                return "Natural does not have a positive or zero value at " + name
+                return "Natural does not have a positive or zero value at " + name!
             else:
-                return "OK"
+                return "OK"!
          $
     }
     Class Place{

+ 0 - 1
interface/HUTN/hutn_compiler/hutnparser.py

@@ -293,7 +293,6 @@ class Parser(object):
         self.reset() #Changed by Daniel receive text as param. instead of once at init so first we reset the fields
         self.input = text
         results = self.applyrule('@start', 0)
-        print("Results: " + str(len(results)))
         if len(results) > 1:
             # Handle ambiguity
             from prettyprint_visitor import PrettyPrintVisitor