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

Wrong classifier instantiated for refined prototypes without binding #2839

Open
lwrage opened this issue Sep 12, 2022 · 0 comments
Open

Wrong classifier instantiated for refined prototypes without binding #2839

lwrage opened this issue Sep 12, 2022 · 0 comments

Comments

@lwrage
Copy link
Contributor

lwrage commented Sep 12, 2022

Summary
When a prototype that doesn't have an actual value supplied by a prototype binding is encountered during instantiation, OSATE uses the constraining classifier (if present) from the prototype declaration. However, if that classifier is provided in a refinement or substituted in a refinement, the instantiation does not use the refinement but only the original declartion.

Expected behavior
The classifier for instantiation should be taken from the refined prototype declaration.

Actual behavior
The classifier is taken from the original declaration

Steps To Reproduce

  1. Pate the model below into the OSATE editor and save
  2. Instantiate A.ix
  3. Open the instance file and notice that the data subcomponent is an instance of DT instead of `DT.i
package Issue2839
public
	
	data DT
	end DT;
	
	data implementation DT.i
	end DT.i;
	
	abstract A
	end A;
	
	abstract implementation A.i
		prototypes
			p: data DT;
		subcomponents
			d: data p;
	end A.i;
	
	abstract implementation A.ix extends A.i
		prototypes
			p: refined to data DT.i;
	end A.ix;
	
end Issue2839;

Desktop (please complete the following information):

  • OSATE Version: 2.11
  • Operating System: Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant