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

Error in flow precedence with refining/extends #2533

Closed
jjhugues opened this issue Nov 23, 2020 · 0 comments · Fixed by #2560
Closed

Error in flow precedence with refining/extends #2533

jjhugues opened this issue Nov 23, 2020 · 0 comments · Fixed by #2560
Assignees
Milestone

Comments

@jjhugues
Copy link
Contributor

jjhugues commented Nov 23, 2020

OSATE 2.9.0 and 2.7.0

The mode below trigger the following error:
the source of connection 'C2' does not match the preceding subcomponent or out flow spec feature 'f_pa.f_out' on s.impl3
This is rather unexpected, an inspection of the graphical editor seems to confirm the end to end flow is valid.

s.impl2 and s.impl3 are structurally equivalent, the only difference is that one subcomponents of s.impl2 is a refinement of an existing component, the same component in s.impl3 is a rewrite with same interface and flows.

package flow_order_test
public

	abstract f_source
		features
			f_so: out feature;
		flows
			flow_so: flow source f_so;
	end f_source;

	abstract f_sink
		features
			f_si: in feature;
		flows
			flow_si: flow sink f_si;
	end f_sink;

	abstract f_path
		features
			f_in: in feature;
			f_out: out feature;
		flows
			flow_pa: flow path f_in -> f_out;

	end f_path;

	system s

	end s;

	system implementation s.impl
		subcomponents
			f_si: abstract f_sink;
			f_so: abstract f_source;
			f_pa: abstract f_path;
		connections
			C1: feature f_so.f_so -> f_pa.f_in;
			C2: feature f_pa.f_out -> f_si.f_si;
		flows

			flow_pa: end to end flow f_so.flow_so -> C1 -> f_pa.flow_pa -> C2 -> f_si.flow_si;
	end s.impl;

	abstract f_path2 extends f_path
		features
			f_in2: in feature;
		flows
			flow_pa2: flow path f_in2 -> f_out;
	end f_path2;

	system implementation s.impl2 extends s.impl
		subcomponents
			f_pa: refined to abstract f_path2;
			f_so2: abstract f_source;
		connections
			C3: feature f_so2.f_so -> f_pa.f_in2;
		flows
			flow_pa2: end to end flow f_so2.flow_so -> C3 -> f_pa.flow_pa2 -> C2 -> f_si.flow_si;
	end s.impl2;

	abstract f_path3 -- f_path3 has exactly the same features and flows as f_path2
		features
			f_in: in feature;
			f_in2: in feature;
			f_out: out feature;
		flows
			flow_pa: flow path f_in -> f_out;
			flow_pa2: flow path f_in2 -> f_out;
	end f_path3;

	system implementation s.impl3 extends s.impl -- s.impl3 should be equivalent to s.impl2
		subcomponents
			f_pa: refined to abstract f_path3;
			f_so2: abstract f_source;
		connections
			C3: feature f_so2.f_so -> f_pa.f_in2;
		flows
			--  error on C2: The source of connection 'C2' does not match the preceding subcomponent or 
			--  out flow spec feature 'f_pa.f_out'	
			flow_pa2: end to end flow f_so2.flow_so -> C3 -> f_pa.flow_pa2 -> C2 -> f_si.flow_si;
	end s.impl3;

end flow_order_test;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants