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

Fan-in for data ports should be forbidden #2356

Closed
lwrage opened this issue Jun 5, 2020 · 5 comments · Fixed by #2364
Closed

Fan-in for data ports should be forbidden #2356

lwrage opened this issue Jun 5, 2020 · 5 comments · Fixed by #2364

Comments

@lwrage
Copy link
Contributor

lwrage commented Jun 5, 2020

Summary

OSATE should forbid fan-in for data ports.

Expected and Current Behavior

When multiple connections exist (in a mode) to a data port this should be an error. This should be check on the declarative model as much as possible as well as on the instance model.

Steps to Reproduce

  1. Open the model below in the AADL text editor.
  2. There should be an error on the data port.
package P2
public
	
	system S
	end S;
	
	system implementation S.i
		subcomponents
			a1: abstract A;
			a2: abstract A;
			b: abstract B;
		connections
			c1: port a1.aout -> b.bin;
			c2: feature a2.aout -> b.bin;
	end S.i;
	
	abstract A
		features
			aout: out data port;
	end A;
	
	abstract B
		features
			bin: in data port;
	end B;

end P2;

Environment

  • OSATE Version: 2.7.1
  • Operating System: all
@AaronGreenhouse
Copy link
Contributor

Rule (L11) in Section 9.2:

A data port cannot be the destination of more than one semantic port connection unless each semantic port connection is contained in a different mode.

@AaronGreenhouse
Copy link
Contributor

Checking in the instance model is much easier, so I will start with that.

Checking in the declarative model is not perfect, but we should catch the obvious cases like the above.

As stated above, this should be an error.

@AaronGreenhouse
Copy link
Contributor

Added instance model checking to ValidateConnectionSwitch. Added unit tests.

Added declarative model checking to Aadl2JavaValidator as the new method checkInDataPortConnections(ComponentImplementation).

Still needs unit tests.

@AaronGreenhouse
Copy link
Contributor

Added new unit tests and updated the existing ones affected by the new errors

@AaronGreenhouse
Copy link
Contributor

After discussion with @lwrage we decided to remove the declarative model checking because it can be misleading and confusing.

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