Browse Source

Fixed first few tests again

Yentl Van Tendeloo 8 years ago
parent
commit
2d3ed300c4

BIN
bootstrap/bootstrap.m.gz


+ 20 - 0
bootstrap/conformance_scd.alc

@@ -45,6 +45,7 @@ Element function precompute_cardinalities(model : Element):
 	Element cardinalities
 	Element keys
 	Element metamodel
+	Boolean optional
 
 	metamodel = model["metamodel"]
 	keys = allInstances(metamodel, "Association")
@@ -70,6 +71,24 @@ Element function precompute_cardinalities(model : Element):
 		if (list_len(tmp_dict) > 0):
 			dict_add(cardinalities, key, tmp_dict)
 
+	keys = allInstances(metamodel, "Attribute")
+	while (0 < list_len(keys)):
+		key = set_pop(keys)
+		tmp_dict = create_node()
+
+		// Attributes always have 1 max
+		dict_add(tmp_dict, "tuc", 1)
+
+		// Depending on whether it is optional or not, the cardinality is changed
+		optional = read_attribute(metamodel, key, "optional")
+		if (optional):
+			dict_add(tmp_dict, "tlc", 0)
+		else:
+			dict_add(tmp_dict, "tlc", 1)
+
+		if (list_len(tmp_dict) > 0):
+			dict_add(cardinalities, key, tmp_dict)
+
 	return cardinalities!
 
 String function conformance_scd(model : Element):
@@ -154,6 +173,7 @@ 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)
+								log("NAME: " + cast_e2s(read_attribute(model, check_type, "name")))
 								return error!
 						if (dict_in(cardinalities[check_type], "tuc")):
 							// An upper cardinality was defined at the target

+ 15 - 7
bootstrap/metamodels.alc

@@ -19,6 +19,12 @@ Element function constraint_string(model : Element, name : String):
 	else:
 		return "String has non-string instance"!
 
+Element function constraint_boolean(model : Element, name : String):
+	if (is_physical_boolean(model["model"][name])):
+		return "OK"!
+	else:
+		return "Boolean has non-boolean instance"!
+
 Element function constraint_if(model : Element, name : String):
 	if (is_physical_action(model["model"][name])):
 		if (cast_a2s(model["model"][name]) == "if"):
@@ -188,23 +194,25 @@ Element function initialize_SCD(location : String):
 	instantiate_node(scd, "AttributeValue", "Natural")
 	instantiate_node(scd, "AttributeValue", "Boolean")
 	model_define_attribute(scd, "Attribute", "optional", False, "Boolean")
-	model_define_attribute(scd, "Class", "lower_cardinality", False, "Natural")
-	model_define_attribute(scd, "Class", "upper_cardinality", False, "Natural")
-	model_define_attribute(scd, "Association", "source_lower_cardinality", False, "Natural")
-	model_define_attribute(scd, "Association", "target_lower_cardinality", False, "Natural")
-	model_define_attribute(scd, "Association", "source_upper_cardinality", False, "Natural")
-	model_define_attribute(scd, "Association", "target_upper_cardinality", False, "Natural")
+	model_define_attribute(scd, "Class", "lower_cardinality", True, "Natural")
+	model_define_attribute(scd, "Class", "upper_cardinality", True, "Natural")
+	model_define_attribute(scd, "Association", "source_lower_cardinality", True, "Natural")
+	model_define_attribute(scd, "Association", "target_lower_cardinality", True, "Natural")
+	model_define_attribute(scd, "Association", "source_upper_cardinality", True, "Natural")
+	model_define_attribute(scd, "Association", "target_upper_cardinality", True, "Natural")
 
 	// Add in the Action Language metamodel
 	add_AL_to_MM(scd)
 
 	// Define additional attributes that define functions
 	model_define_attribute(scd, "Element", "constraint", True, "funcdef")
-	model_define_attribute(scd, "AttributeValue", "to_string", False, "funcdef")
+	model_define_attribute(scd, "AttributeValue", "to_string", True, "funcdef")
 
 	// Define some constraints
 	instantiate_attribute(scd, "Natural", "constraint", constraint_natural)
 	instantiate_attribute(scd, "String", "constraint", constraint_string)
+	instantiate_attribute(scd, "Boolean", "constraint", constraint_boolean)
+	instantiate_attribute(scd, "attr_name", "optional", False)
 
 	// Add constraints to all primitive classes
 	// TODO this is much too slow right now

+ 8 - 2
bootstrap/modelling.alc

@@ -305,12 +305,13 @@ Void function model_delete_element(model : Element, name : String):
 
 	return!
 
-String function model_define_attribute(model : Element, elem : String, name : String, type : String):
+String function model_define_attribute(model : Element, elem : String, name : String, optional : Boolean, type : String):
 	// Create the necessary links to make it an attribute
 	String edge_name
 
-	edge_name = instantiate_link(model, "Association", "", elem, type)
+	edge_name = instantiate_link(model, "Attribute", "", elem, type)
 	instantiate_attribute(model, edge_name, "name", name)
+	instantiate_attribute(model, edge_name, "optional", optional)
 
 	return edge_name!
 
@@ -525,6 +526,8 @@ Void function construct_model():
 			instantiate_link(global_models[input()], input(), input(), input(), input())
 		elif (command == "add_constraint"):
 			add_constraint(global_models[input()], input(), construct_function())
+		elif (command == "model_define_attribute"):
+			model_define_attribute(global_models[input()], input(), input(), input(), input())
 		elif (command == "initialize_SCD"):
 			initialize_SCD(input())
 		elif (command == "initialize_bottom"):
@@ -568,6 +571,9 @@ Element function construct_model_raw(metamodel : Element):
 		elif (command == "instantiate_node"):
 			input()
 			instantiate_node(model, input(), input())
+		elif (command == "model_define_attribute"):
+			input()
+			model_define_attribute(model, input(), input(), input(), input())
 		elif (command == "instantiate_attribute"):
 			input()
 			instantiate_attribute(model, input(), input(), input())

+ 5 - 5
core/core_formalism.mvc

@@ -2,7 +2,7 @@ import models/SimpleClassDiagrams as SimpleClassDiagrams
 include "primitives.alh"
 
 SimpleClassDiagrams CoreFormalism {
-    Class String {
+    Attribute String {
         $
             if (bool_not(is_physical_string(self))):
                 return "String has no string value"!
@@ -11,7 +11,7 @@ SimpleClassDiagrams CoreFormalism {
         $
     }
 
-    Class Permissions {
+    Attribute Permissions {
         $
             if (bool_not(is_physical_string(self))):
                 return "Permissions has no string value"!
@@ -20,7 +20,7 @@ SimpleClassDiagrams CoreFormalism {
         $
     }
 
-    Class Boolean {
+    Attribute Boolean {
         $
             if (bool_not(is_physical_boolean(self))):
                 return "Boolean has no bool value"!
@@ -29,7 +29,7 @@ SimpleClassDiagrams CoreFormalism {
         $
     }
 
-    Class Natural {
+    Attribute Natural {
         $
             if (bool_not(is_physical_int(self))):
                 return "Natural has no integer value"!
@@ -40,7 +40,7 @@ SimpleClassDiagrams CoreFormalism {
         $
     }
 
-    Class TypeMapping {
+    Attribute TypeMapping {
         $
             if (has_value(self)):
                 return "TypeMapping cannot have a value for root node!"!

+ 86 - 82
integration/test_constructors_models.py

@@ -7,58 +7,66 @@ from utils import execute, kill, run_file, run_barebone
 bottom = [
         "model",
         "instantiate_bottom", "1",
+        "add_node", "1", "Element",
         "add_node", "1", "Class",
-        "add_node", "1", "Any",
+        "add_node", "1", "AttributeValue",
         "add_node", "1", "String",
-        "add_value", "1", "name", "name",
-        "add_edge", "1", "Association", "Class", "Any",
-        "add_edge", "1", "Inheritance", "Class", "Class",
-        "add_edge", "1", "Association_attribute", "Association", "String",
-        "add_edge", "1", "Association_name", "Association_attribute", "name",
-        "add_edge", "1", "assoc_inh_class", "Association", "Class",
-        "add_edge", "1", "class_inh_any", "Class", "Any",
-        "add_edge", "1", "string_inh_any", "String", "Any",
+        "add_value", "1", "name_value", "name",
+        "add_edge", "1", "Association", "Class", "Class",
+        "add_edge", "1", "Inheritance", "Element", "Element",
+        "add_edge", "1", "Attribute", "Element", "AttributeValue",
+        "add_edge", "1", "attr_name", "Attribute", "String",
+        "add_edge", "1", "attr_name_name", "attr_name", "name_value",
+        "add_edge", "1", "class_inh_element", "Class", "Element",
+        "add_edge", "1", "attributevalue_inh_element", "AttributeValue", "Element",
+        "add_edge", "1", "association_inh_class", "Association", "Class",
+        "add_edge", "1", "attribute_inh_attributevalue", "Attribute", "AttributeValue",
+
         "retype_model", "1", "1",
+        "retype", "1", "Element", "Class",
         "retype", "1", "Class", "Class",
-        "retype", "1", "Any", "Class",
-        "retype", "1", "String", "Class",
-        "retype", "1", "name", "String",
+        "retype", "1", "AttributeValue", "Class",
+        "retype", "1", "String", "AttributeValue",
+        "retype", "1", "name_value", "String",
         "retype", "1", "Association", "Association",
         "retype", "1", "Inheritance", "Association",
-        "retype", "1", "Association_attribute", "Association",
-        "retype", "1", "Association_name", "Association_attribute",
-        "retype", "1", "assoc_inh_class", "Inheritance",
-        "retype", "1", "class_inh_any", "Inheritance",
-        "retype", "1", "string_inh_any", "Inheritance",
-        "export_node", "1", "models/SimpleClassDiagrams",
+        "retype", "1", "Attribute", "Association",
+        "retype", "1", "attr_name", "Attribute",
+        "retype", "1", "attr_name_name", "attr_name",
+        "retype", "1", "class_inh_element", "Inheritance",
+        "retype", "1", "attributevalue_inh_element", "Inheritance",
+        "retype", "1", "association_inh_class", "Inheritance",
+        "retype", "1", "attribute_inh_attributevalue", "Inheritance",
+
+        "export_node", "1", "models/SimpleClassDiagrams_new",
         "exit",
     ]
 
 action_language = [
         "model",
-        "instantiate_node", "1", "Class", "Action",
-        "instantiate_node", "1", "Class", "Statement",
-        "instantiate_node", "1", "Class", "Expression",
-        "instantiate_node", "1", "Class", "funcdef",
-        "instantiate_node", "1", "Class", "param",
-        "instantiate_node", "1", "Class", "if",
-        "instantiate_node", "1", "Class", "break",
-        "instantiate_node", "1", "Class", "while",
-        "instantiate_node", "1", "Class", "continue",
-        "instantiate_node", "1", "Class", "assign",
-        "instantiate_node", "1", "Class", "return",
-        "instantiate_node", "1", "Class", "output",
-        "instantiate_node", "1", "Class", "declare",
-        "instantiate_node", "1", "Class", "global",
-        "instantiate_node", "1", "Class", "access",
-        "instantiate_node", "1", "Class", "constant",
-        "instantiate_node", "1", "Class", "input",
-        "instantiate_node", "1", "Class", "resolve",
-        "instantiate_node", "1", "Class", "call",
-        "instantiate_link", "1", "Association", "dict_link", "Action", "Any",
+        "instantiate_node", "1", "AttributeValue", "Action",
+        "instantiate_node", "1", "AttributeValue", "Statement",
+        "instantiate_node", "1", "AttributeValue", "Expression",
+        "instantiate_node", "1", "AttributeValue", "funcdef",
+        "instantiate_node", "1", "AttributeValue", "param",
+        "instantiate_node", "1", "AttributeValue", "if",
+        "instantiate_node", "1", "AttributeValue", "break",
+        "instantiate_node", "1", "AttributeValue", "while",
+        "instantiate_node", "1", "AttributeValue", "continue",
+        "instantiate_node", "1", "AttributeValue", "assign",
+        "instantiate_node", "1", "AttributeValue", "return",
+        "instantiate_node", "1", "AttributeValue", "output",
+        "instantiate_node", "1", "AttributeValue", "declare",
+        "instantiate_node", "1", "AttributeValue", "global",
+        "instantiate_node", "1", "AttributeValue", "access",
+        "instantiate_node", "1", "AttributeValue", "constant",
+        "instantiate_node", "1", "AttributeValue", "input",
+        "instantiate_node", "1", "AttributeValue", "resolve",
+        "instantiate_node", "1", "AttributeValue", "call",
+        "instantiate_link", "1", "Association", "dict_link", "Action", "Element",
         "instantiate_link", "1", "Association", "to_str", "dict_link", "String",
         "instantiate_attribute", "1", "to_str", "name", "name",
-        "instantiate_link", "1", "Inheritance", "", "Action", "Any",
+        "instantiate_link", "1", "Inheritance", "", "Action", "Element",
         "instantiate_link", "1", "Inheritance", "", "funcdef", "Action",
         "instantiate_link", "1", "Inheritance", "", "param", "Action",
         "instantiate_link", "1", "Inheritance", "", "Statement", "Action",
@@ -77,51 +85,51 @@ action_language = [
         "instantiate_link", "1", "Inheritance", "", "access", "Expression",
         "instantiate_link", "1", "Inheritance", "", "constant", "Expression",
         "instantiate_link", "1", "Inheritance", "", "input", "Expression",
-        "instantiate_link", "1", "Association", "statement_next", "Statement", "Statement",
+        "instantiate_link", "1", "Attribute", "statement_next", "Statement", "Statement",
+        "instantiate_link", "1", "Attribute", "if_cond", "if", "Expression",
+        "instantiate_link", "1", "Attribute", "if_then", "if", "Statement",
+        "instantiate_link", "1", "Attribute", "if_else", "if", "Statement",
+        "instantiate_link", "1", "Attribute", "while_cond", "while", "Expression",
+        "instantiate_link", "1", "Attribute", "while_body", "while", "Statement",
+        "instantiate_link", "1", "Attribute", "assign_var", "assign", "Element",
+        "instantiate_link", "1", "Attribute", "assign_value", "assign", "Expression",
+        "instantiate_link", "1", "Attribute", "break_while", "break", "while",
+        "instantiate_link", "1", "Attribute", "continue_while", "continue", "while",
+        "instantiate_link", "1", "Attribute", "return_value", "return", "Expression",
+        "instantiate_link", "1", "Attribute", "resolve_var", "resolve", "Element",
+        "instantiate_link", "1", "Attribute", "access_var", "access", "Element",
+        "instantiate_link", "1", "Attribute", "constant_node", "constant", "Element",
+        "instantiate_link", "1", "Attribute", "output_node", "output", "Expression",
+        "instantiate_link", "1", "Attribute", "global_var", "global", "String",
+        "instantiate_link", "1", "Attribute", "param_name", "param", "String",
+        "instantiate_link", "1", "Attribute", "param_value", "param", "Expression",
+        "instantiate_link", "1", "Attribute", "param_next_param", "param", "param",
+        "instantiate_link", "1", "Attribute", "funcdef_body", "funcdef", "Statement",
+        "instantiate_link", "1", "Attribute", "call_func", "call", "Expression",
+        "instantiate_link", "1", "Attribute", "call_params", "call", "param",
+        "instantiate_link", "1", "Attribute", "call_last_param", "call", "param",
         "instantiate_attribute", "1", "statement_next", "name", "next",
-        "instantiate_link", "1", "Association", "if_cond", "if", "Expression",
         "instantiate_attribute", "1", "if_cond", "name", "cond",
-        "instantiate_link", "1", "Association", "if_then", "if", "Statement",
         "instantiate_attribute", "1", "if_then", "name", "true",
-        "instantiate_link", "1", "Association", "if_else", "if", "Statement",
         "instantiate_attribute", "1", "if_else", "name", "false",
-        "instantiate_link", "1", "Association", "while_cond", "while", "Expression",
         "instantiate_attribute", "1", "while_cond", "name", "cond",
-        "instantiate_link", "1", "Association", "while_body", "while", "Statement",
         "instantiate_attribute", "1", "while_body", "name", "body",
-        "instantiate_link", "1", "Association", "assign_var", "assign", "Any",
         "instantiate_attribute", "1", "assign_var", "name", "var",
-        "instantiate_link", "1", "Association", "assign_value", "assign", "Expression",
         "instantiate_attribute", "1", "assign_value", "name", "value",
-        "instantiate_link", "1", "Association", "break_while", "break", "while",
         "instantiate_attribute", "1", "break_while", "name", "while",
-        "instantiate_link", "1", "Association", "continue_while", "continue", "while",
         "instantiate_attribute", "1", "continue_while", "name", "while",
-        "instantiate_link", "1", "Association", "return_value", "return", "Expression",
         "instantiate_attribute", "1", "return_value", "name", "value",
-        "instantiate_link", "1", "Association", "resolve_var", "resolve", "Any",
         "instantiate_attribute", "1", "resolve_var", "name", "var",
-        "instantiate_link", "1", "Association", "access_var", "access", "Any",
         "instantiate_attribute", "1", "access_var", "name", "var",
-        "instantiate_link", "1", "Association", "constant_node", "constant", "Any",
         "instantiate_attribute", "1", "constant_node", "name", "node",
-        "instantiate_link", "1", "Association", "output_node", "output", "Expression",
         "instantiate_attribute", "1", "output_node", "name", "node",
-        "instantiate_link", "1", "Association", "global_var", "global", "String",
         "instantiate_attribute", "1", "global_var", "name", "var",
-        "instantiate_link", "1", "Association", "param_name", "param", "String",
         "instantiate_attribute", "1", "param_name", "name", "name",
-        "instantiate_link", "1", "Association", "param_value", "param", "Expression",
         "instantiate_attribute", "1", "param_value", "name", "value",
-        "instantiate_link", "1", "Association", "param_next_param", "param", "param",
         "instantiate_attribute", "1", "param_next_param", "name", "next_param",
-        "instantiate_link", "1", "Association", "funcdef_body", "funcdef", "Statement",
         "instantiate_attribute", "1", "funcdef_body", "name", "body",
-        "instantiate_link", "1", "Association", "call_func", "call", "Expression",
         "instantiate_attribute", "1", "call_func", "name", "func",
-        "instantiate_link", "1", "Association", "call_params", "call", "param",
         "instantiate_attribute", "1", "call_params", "name", "params",
-        "instantiate_link", "1", "Association", "call_last_param", "call", "param",
         "instantiate_attribute", "1", "call_last_param", "name", "last_param",
 
         "instantiate_link", "1", "Inheritance", "", "statement_next", "dict_link",
@@ -148,27 +156,23 @@ action_language = [
         "instantiate_link", "1", "Inheritance", "", "call_params", "dict_link",
         "instantiate_link", "1", "Inheritance", "", "call_last_param", "dict_link",
 
-        "instantiate_link", "1", "Association", "constraint", "Class", "funcdef",
+        "instantiate_link", "1", "Attribute", "constraint", "Class", "funcdef",
         "instantiate_attribute", "1", "constraint", "name", "constraint",
         "exit",
     ]
 
 bottom_attributes = [
         "model",
-        "instantiate_node", "1", "Class", "Integer",
-        "instantiate_link", "1", "Inheritance", "integer_inh_any", "Integer", "Any",
-        "instantiate_link", "1", "Association", "lc", "Class", "Integer",
-        "instantiate_attribute", "1", "lc", "name", "lower_cardinality",
-        "instantiate_link", "1", "Association", "uc", "Class", "Integer",
-        "instantiate_attribute", "1", "uc", "name", "upper_cardinality",
-        "instantiate_link", "1", "Association", "slc", "Association", "Integer",
-        "instantiate_attribute", "1", "slc", "name", "source_lower_cardinality",
-        "instantiate_link", "1", "Association", "suc", "Association", "Integer",
-        "instantiate_attribute", "1", "suc", "name", "source_upper_cardinality",
-        "instantiate_link", "1", "Association", "tlc", "Association", "Integer",
-        "instantiate_attribute", "1", "tlc", "name", "target_lower_cardinality",
-        "instantiate_link", "1", "Association", "tuc", "Association", "Integer",
-        "instantiate_attribute", "1", "tuc", "name", "target_upper_cardinality",
+        "instantiate_node", "1", "AttributeValue", "Natural",
+        "instantiate_node", "1", "AttributeValue", "Boolean",
+        "model_define_attribute", "1", "Attribute", "optional", False, "Boolean",
+        "model_define_attribute", "1", "Class", "lower_cardinality", True, "Natural",
+        "model_define_attribute", "1", "Class", "upper_cardinality", True, "Natural",
+        "model_define_attribute", "1", "Class", "source_lower_cardinality", True, "Natural",
+        "model_define_attribute", "1", "Class", "source_upper_cardinality", True, "Natural",
+        "model_define_attribute", "1", "Class", "target_lower_cardinality", True, "Natural",
+        "model_define_attribute", "1", "Class", "target_upper_cardinality", True, "Natural",
+        "instantiate_attribute", "1", "attr_name", "optional", False,
         "exit",
     ]
 
@@ -221,7 +225,7 @@ instantiate_scd = [
         "instantiate_attribute", "2", "P2T_weight", "name", "weight",
         "instantiate_link", "2", "Association", "T2P_weight", "T2P", "Integer",
         "instantiate_attribute", "2", "T2P_weight", "name", "weight",
-        "export_node", "2", "models/PetriNets",
+        "export_node", "2", "models/PetriNets_new",
         "exit",
     ]
 
@@ -318,15 +322,15 @@ def conformance_check(node):
 
 class TestConstructorsModels(unittest.TestCase):
     def test_constructors_instantiate_bottom(self):
-        commands = bottom + bottom_attributes + conformance_check("models/SimpleClassDiagrams") + ["return", False]
+        commands = bottom + bottom_attributes + conformance_check("models/SimpleClassDiagrams_new") + ["return", False]
         self.assertTrue(run_barebone(commands, ["OK"], 1))
 
     def test_constructors_action_language(self):
-        commands = bottom + action_language + bottom_attributes + conformance_check("models/SimpleClassDiagrams") + ["return", False]
+        commands = bottom + action_language + bottom_attributes + conformance_check("models/SimpleClassDiagrams_new") + ["return", False]
         self.assertTrue(run_barebone(commands, ["OK"], 1))
 
     def test_constructors_constraints(self):
-        commands = bottom + action_language + bottom_attributes + add_constraints(1) + conformance_check("models/SimpleClassDiagrams") + ["return", False]
+        commands = bottom + action_language + bottom_attributes + add_constraints(1) + conformance_check("models/SimpleClassDiagrams_new") + ["return", False]
         self.assertTrue(run_barebone(commands, ["OK"], 1))
 
     def test_constructors_constraints_executed(self):
@@ -334,7 +338,7 @@ class TestConstructorsModels(unittest.TestCase):
         self.assertTrue(run_barebone(commands, ["OK"], 1))
 
     def test_constructors_instantiate_scd(self):
-        commands = bottom + bottom_attributes + instantiate_scd + conformance_check("models/PetriNets") + ["return", False]
+        commands = bottom + bottom_attributes + instantiate_scd + conformance_check("models/PetriNets_new") + ["return", False]
         self.assertTrue(run_barebone(commands, ["OK"], 1))
 
     def test_constructors_instantiate_pn(self):

+ 4 - 1
interface/HUTN/hutn_compiler/model_visitor.py

@@ -93,10 +93,13 @@ class ModelVisitor(Visitor):
 
         if is_definition:
             attr_name = children[0].get_text()
+            attr_optional = len(tree.get_children("OPTIONAL")) > 0
             attr_type = children[1].get_text()
-            self.constructors.extend(["instantiate_link", self.current_model, "Association", self.current_element[-1] + "_" + attr_name, self.current_element[-1], attr_type])
+            self.constructors.extend(["instantiate_link", self.current_model, "Attribute", self.current_element[-1] + "_" + attr_name, self.current_element[-1], attr_type])
             full_attribute_name = self.current_element[-1] + "_" + attr_name
             self.constructors.extend(["instantiate_attribute", self.current_model, full_attribute_name, "name", attr_name])
+            self.constructors.extend(["instantiate_attribute", self.current_model, full_attribute_name, "optional", attr_optional])
+
             if is_assign:
                 # There are also some attributes to set!
                 self.current_element.append(full_attribute_name)

+ 1 - 1
interface/HUTN/includes/modelling.alh

@@ -20,5 +20,5 @@ Void function construct_model()
 Element function read_attribute(model : Element, elem : String, name : String)
 Void function model_delete_element(model : Element, name : String)
 Void function add_constraint(model : Element, name : String, constraint : Action)
-String function model_define_attribute(model : Element, elem : String, name : String, type : String)
+String function model_define_attribute(model : Element, elem : String, name : String, optional : Boolean, type : String)
 Element function construct_model_raw(metamodel : Element)

+ 2 - 1
scripts/run_MvC_server.py

@@ -19,7 +19,8 @@ subprocess.check_call([sys.executable, "-m", "sccd.compiler.sccdc", "-p", "threa
 
 # Start up the MvK as a subprocess
 try:
-    obj = subprocess.Popen([sys.executable, "run_mvk_server.py", str(MVK_PORT), "--kernel=baseline-jit"], cwd="hybrid_server")
+    #obj = subprocess.Popen([sys.executable, "run_mvk_server.py", str(MVK_PORT), "--kernel=baseline-jit"], cwd="hybrid_server")
+    obj = subprocess.Popen([sys.executable, "run_mvk_server.py", str(MVK_PORT), "--kernel=legacy-interpreter"], cwd="hybrid_server")
 
     # Compile all MvC code
     subprocess.call([sys.executable, "scripts/execute_model.py", address, SETUP_USER, "bootstrap/*.alc", "core/*.alc", "core/*.mvc"])