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

Validation does not catch flow source/sink in the middle of a flow path #2415

Closed
lwrage opened this issue Aug 20, 2020 · 0 comments · Fixed by #2433
Closed

Validation does not catch flow source/sink in the middle of a flow path #2415

lwrage opened this issue Aug 20, 2020 · 0 comments · Fixed by #2433

Comments

@lwrage
Copy link
Contributor

lwrage commented Aug 20, 2020

Summary

A model that contains a flow source or sink in the middle of a flow implementation is not valid. However, there is no error marker created in the AADL text editor.

Expected and Current Behavior

OSATE should detect this during validation and create error markers.

Note that a corresponding check for end to end flows works as expected.

Steps to Reproduce

  1. Load the following model in the AADL text editor
package Issue2415
public
	
	abstract T
	end T;
	
	abstract implementation T.i
		subcomponents
			l: abstract A;
			m: abstract A;
			r: abstract A;
		connections
			cl: port l.o -> m.i;
			cr: port m.o -> r.i;
		flows
			-- this one is ok
			e1: end to end flow l.fsrc -> cl -> m.fpth -> cr -> r.fsnk;
			-- correctly marked with an error on m.fsnk
			e2: end to end flow l.fsrc -> cl -> m.fsnk -> cr -> r.fsnk;
			-- correctly marked with an error on m.fsrc
			e3: end to end flow l.fsrc -> cl -> m.fsrc -> cr -> r.fsnk;
	end T.i;
	
	abstract A
		features
			i: in data port;
			o: out data port;
		flows
			fsrc: flow source o;
			fpth: flow path i -> o;
			fsnk: flow sink i;
	end A;
	
	abstract implementation A.i1
		subcomponents
			mm: abstract A;
		connections
			cml: port i -> mm.i;
			cmr: port mm.o -> o;
		flows
			-- this one is OK
			fpth: flow path i -> cml -> mm.fpth -> cmr -> o;
			-- there should be an error on mm.fsrc
			fpth: flow path i -> cml -> mm.fsrc -> cmr -> o;
			-- there should be an error on mm.fsnk
			fpth: flow path i -> cml -> mm.fsnk -> cmr -> o;
	end A.i1;
	
	abstract implementation A.i2
		subcomponents
			mm1: abstract A;
			mm2: abstract A;
		connections
			cml: port i -> mm1.i;
			cmm: port mm1.o -> mm2.i;
			cmr: port mm2.o -> o;
		flows
			-- this one is ok
			fpth: flow path i -> cml -> mm1.fpth -> cmm -> mm2.fpth -> cmr -> o;
			-- there should be an error on mm.fsrc
			fpth: flow path i -> cml -> mm1.fsrc -> cmm -> mm2.fpth -> cmr -> o;
			-- there should be an error on mm.fsnk
			fpth: flow path i -> cml -> mm1.fsnk -> cmm -> mm2.fpth -> cmr -> o;
	end A.i2;
	
	abstract implementation A.i3
		subcomponents
			mm1: abstract A;
			mm2: abstract A;
		connections
			cml: port i -> mm1.i;
			cmm: port mm1.o -> mm2.i;
			cmr: port mm2.o -> o;
		flows
			-- this one is OK
			fsrc: flow source mm2.fsrc -> cmr -> o;
			-- this one is ok
			fsrc: flow source mm1.fsrc -> cmm -> mm2.fpth -> cmr -> o;
			-- there should be an error on mm2.fsrc
			fsrc: flow source mm1.fsrc -> cmm -> mm2.fsrc -> cmr -> o;
			-- there should be an error on mm2.fsnk
			fsrc: flow source mm1.fsrc -> cmm -> mm2.fsnk -> cmr -> o;
	end A.i3;
	
	abstract implementation A.i4
		subcomponents
			mm1: abstract A;
			mm2: abstract A;
		connections
			cml: port i -> mm1.i;
			cmm: port mm1.o -> mm2.i;
			cmr: port mm2.o -> o;
		flows
			-- this one is OK
			fsnk: flow sink i -> cml -> mm1.fsnk;
			-- this one is ok
			fsnk: flow sink i -> cml -> mm1.fpth -> cmm -> mm2.fsnk;
			-- there should be an error on mm2.fsrc
			fsnk: flow sink i -> cml -> mm1.fsrc -> cmm -> mm2.fsnk;
			-- there should be an error on mm2.fsnk
			fsnk: flow sink i -> cml -> mm1.fsnk -> cmm -> mm2.fsnk;
	end A.i4;
	
end Issue2415;

Environment

  • OSATE Version: 2.8.0
  • Operating System: Windows, Linux
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.

2 participants