|
@@ -81,9 +81,12 @@ action_language = [
|
|
|
'"instantiate_node"', 1, '"Class"', '"Input"',
|
|
|
'"instantiate_node"', 1, '"Class"', '"Resolve"',
|
|
|
'"instantiate_node"', 1, '"Class"', '"Call"',
|
|
|
- '"instantiate_link"', 1, '"Inheritance"', '""', '"Funcdef"', '"Any"',
|
|
|
+ '"instantiate_link"', 1, '"Association"', '"dict_link"', '"Action"', '"Action"',
|
|
|
+ '"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"', '""', '"Param"', '"Any"',
|
|
|
+ '"instantiate_link"', 1, '"Inheritance"', '""', '"Funcdef"', '"Action"',
|
|
|
+ '"instantiate_link"', 1, '"Inheritance"', '""', '"Param"', '"Action"',
|
|
|
'"instantiate_link"', 1, '"Inheritance"', '""', '"Statement"', '"Action"',
|
|
|
'"instantiate_link"', 1, '"Inheritance"', '""', '"Expression"', '"Action"',
|
|
|
'"instantiate_link"', 1, '"Inheritance"', '""', '"Resolve"', '"Statement"',
|
|
@@ -163,6 +166,31 @@ bottom_attributes = [
|
|
|
'"instantiate_attribute"', 1, '"tlc"', '"name"', '"target_lower_cardinality"',
|
|
|
'"instantiate_link"', 1, '"Association"', '"tuc"', '"Association"', '"Integer"',
|
|
|
'"instantiate_attribute"', 1, '"tuc"', '"name"', '"target_upper_cardinality"',
|
|
|
+ '"instantiate_link"', 1, '"Association"', '"constraint"', '"Any"', '"Funcdef"',
|
|
|
+ '"instantiate_attribute"', 1, '"constraint"', '"name"', '"constraint"',
|
|
|
+ '"exit"',
|
|
|
+ ]
|
|
|
+
|
|
|
+add_constraints = [
|
|
|
+ '"model"',
|
|
|
+ '"add_constraint"', 1, '"Integer"',
|
|
|
+ '2', 10, 11,
|
|
|
+ '"return"', 'true',
|
|
|
+ '"call"',
|
|
|
+ '"access"', '"resolve"', '"is_physical_int"',
|
|
|
+ '1',
|
|
|
+ '"call"',
|
|
|
+ '"access"', '"resolve"', '"dict_read"',
|
|
|
+ '2',
|
|
|
+ '"call"',
|
|
|
+ '"access"', '"resolve"', '"dict_read"',
|
|
|
+ '2',
|
|
|
+ '"const"', 10,
|
|
|
+ '"const"', '"model"',
|
|
|
+ 'false',
|
|
|
+ '"const"', 11,
|
|
|
+ 'false',
|
|
|
+ 'false',
|
|
|
'"exit"',
|
|
|
]
|
|
|
|
|
@@ -279,7 +307,7 @@ class TestConstructorsModels(unittest.TestCase):
|
|
|
self.assertTrue(run_barebone(commands, ["OK"], 1))
|
|
|
|
|
|
def test_constructors_action_language(self):
|
|
|
- commands = bottom + retype + bottom_attributes + action_language + conformance_check(1) + ['"return"', 'false']
|
|
|
+ commands = bottom + retype + action_language + bottom_attributes + conformance_check(1) + ['"return"', 'false']
|
|
|
self.assertTrue(run_barebone(commands, ["OK"], 1))
|
|
|
|
|
|
def test_constructors_instantiate_scd(self):
|