Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No access to AADL property constants in AGREE #77

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

Comments

Projects
None yet
1 participant
@kfhoech
Copy link
Contributor

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 kfhoech self-assigned this Mar 19, 2018

@kfhoech

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Contributor Author

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 join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.