Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
No access to AADL property constants in AGREE #77
Property values are accessible in AGREE through the 'Get_Property' expression in the AGREE language. However, property constants are not accessible. Could the 'Get_Property' expression also access the constants. If so, the first parameter (the instance scope) would be irrelevant in that the second parameter fully specifies the AADL name including both the property set name and the constant name. Perhaps a grammar addition to AGREE 'Get_Property_Constant' which takes only the AADL name of the constant would be a better approach.
This is actually a fairly straightforward change. All of the necessary scoping is already handled by the infrastructure. The validator merely needs to be able to determine the correct AADL type of the property constant and allow property constants in addition to properties to be the second parameter of the Get_Property. And, the AgreeASTBuilder needs to be able to extract the property expression from the property constant. That's it.
Also, rather than introducing a new AGREE grammar element I'm using the existing Get_Property element. This is for two reasons. First, it avoids a grammar change which might have unforeseen difficulties with legacy models. And, it continues to require the the component context in which the property constant is evaluated. OSATE presently doesn't check when a a property constant is evaluated whether it is from a model element specified by the 'applies to' clause. But, in the future it might. And at that point we would need to add the component context to the parameters for the property constant getter requiring a change to the grammar.