saeaadl / aadlv2.2

SAE AADL core language, version 2.2
1 stars 0 forks source link

Property constant reference #37

Open joeseibel opened 5 years ago

joeseibel commented 5 years ago

11.4 (L4) reads, "Property references in property_term or property_constant_term of property expressions must be applicable to the model element to which the property association applies."

Property constants don't apply to model elements, so "property_constant_term" should be removed from (L4).

Also, we should disallow property_term in the value of a property constant since the constant has no context for evaluating the property_term.

jjhugues commented 3 years ago

@lwrage can you please investigate this one? 11.4 (L4) is fine, but I cannot locate the part impacted by the second part, it seems it is implied constant_property_expression should not have property_term, but this rule is not explicitly defined. Is it acceptable to define

(L7) Property constant expression cannot reference _propertyterm.

lwrage commented 3 years ago

The constant expression legality rule should be in 11.1.3 Property Constants.

(L4) A constant_property_expression or constant_property_list_value may not directly or indirectly contain a reference to a model element, classifier, or property.

Legality rule 11.1.3 (L1) should be more precise:

(L1) A property constant cannot be declared for classifier and reference property types or for property types that contain a classifier or reference property type (as type of a list element or a record field).

jjhugues commented 3 years ago

Updates captured in the document