Skip to content
This repository has been archived by the owner. It is now read-only.

No access to AADL property constants in AGREE #77

Closed
kfhoech opened this issue Feb 20, 2018 · 2 comments
Closed

No access to AADL property constants in AGREE #77

kfhoech opened this issue Feb 20, 2018 · 2 comments

Comments

@kfhoech
Copy link
Contributor

@kfhoech kfhoech commented Feb 20, 2018

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.

@kfhoech
Copy link
Contributor Author

@kfhoech kfhoech commented Mar 19, 2018

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.

@kfhoech
Copy link
Contributor Author

@kfhoech kfhoech commented Mar 19, 2018

Resolved by Pull Request 99.

@kfhoech kfhoech closed this Mar 19, 2018
@kfhoech kfhoech added the v2.3.3 label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant