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 errors for constant property associations #935

Closed
stevevestal opened this Issue Nov 9, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@stevevestal

stevevestal commented Nov 9, 2017

OSATE will accept the following declarations. It would seem that either an error would be raised on the first property association that constant is only allowed in property sets; or else an error would be raised in the second that overriding a property earlier declared to be constant is not allowed. (It would actually be nice to do this in some cases. Perhaps the committee might let such a request slip through into AADL 2.3 as an errata.)

system Desired_Component
	properties
		Memory_Size => constant 5 MByte;
end Desired_Component;

system implementation Desired_Component.Provided_Implementation
	properties
		Memory_Size => 10 Mbyte;
end Desired_Component.Provided_Implementation;

@lwrage lwrage self-assigned this Dec 22, 2017

@lwrage lwrage added the backlog label Dec 22, 2017

@lwrage lwrage added this to the 2.3.5 milestone Jul 2, 2018

@lwrage lwrage added next and removed backlog labels Jul 2, 2018

@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Jul 26, 2018

Contributor

According to the standard Memory_Size cannot be overwritten in the implementation because it is marked constant in the type. I assume that the same would apply for type extension.
If a contained property association is marked constant it means that there cannot be another contained property association higher up in the containment hierarchy that overrides the property value.

Contributor

lwrage commented Jul 26, 2018

According to the standard Memory_Size cannot be overwritten in the implementation because it is marked constant in the type. I assume that the same would apply for type extension.
If a contained property association is marked constant it means that there cannot be another contained property association higher up in the containment hierarchy that overrides the property value.

@lwrage

This comment has been minimized.

Show comment
Hide comment
@lwrage

lwrage Aug 11, 2018

Contributor

We need to add a validation that finds errors when overriding a constant property value that is inherited.
Instantiation needs to check if a contained property association overrides a constant property value. This tracked in a separate issue (#1447).

Contributor

lwrage commented Aug 11, 2018

We need to add a validation that finds errors when overriding a constant property value that is inherited.
Instantiation needs to check if a contained property association overrides a constant property value. This tracked in a separate issue (#1447).

@lwrage lwrage added in progress and removed next labels Aug 14, 2018

@wafflebot wafflebot bot added review and removed in progress labels Aug 14, 2018

@lwrage lwrage closed this in #1448 Aug 17, 2018

@wafflebot wafflebot bot removed the review label Aug 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment