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 validation of error conditions #2209

Closed
lwrage opened this issue Feb 23, 2020 · 1 comment · Fixed by #2229
Closed

Wrong validation of error conditions #2209

lwrage opened this issue Feb 23, 2020 · 1 comment · Fixed by #2229

Comments

@lwrage
Copy link
Contributor

lwrage commented Feb 23, 2020

Summary

References to subprogram propagations are not validated correctly in emv2 error transition conditions and out propagation conditions.

Expected and Current Behavior

The model below shows current error markers and what they should be.

  • subcomponent out propagation should be valid but is marked as an error
  • subcomponent in propagation is marked as an unresolved name but should be resolved
  • subcomponent in propagation should have a validation error
  • the error message for a subcomponent propagation should include the subcomponent name

Steps to Reproduce

  1. Load the model below in the AADL text editor.
  2. Inspect error markers.
package Issue2209
public

	system S
		features
			i: in feature;
			o: out feature;
	end S;

	system implementation S.i
		subcomponents
			a: abstract A;
		annex emv2 {**
			use types ErrorLibrary;
			use behavior ErrorLibrary::FailStop;
			
			error propagations
				i: in propagation {ValueError};
				o: out propagation {ValueError};
			end propagations;
			
			component error behavior
				transitions
					-- correct: no error marker
					all -[i]-> FailStop;
					-- correct error marker: "Referenced error propagation o must be an in propagation"
					all -[o]-> FailStop;
					-- wrong error marker: Couldn't resolve reference to 'i'.
					-- should be: "Referenced error propagation a.i must be an out propagation"
					all -[a.i]-> FailStop;
					-- wrong error marker: "Referenced error propagation o must be an in propagation"
					-- should be: no error marker
					all -[a.o]-> FailStop;
				propagations
					-- correct: no error marker
					FailStop -[i]-> o;
					-- correct error marker: "Referenced error propagation o must be an in propagation"
					FailStop -[o]-> o;
					-- wrong error marker: Couldn't resolve reference to 'i'.
					-- should be: "Referenced error propagation a.i must be an out propagation"
					FailStop -[a.i]-> o;
					-- wrong error marker: "Referenced error propagation o must be an in propagation"
					-- should be: no error marker
					FailStop -[a.o]-> o;
			end component;
		**};
	end S.i;

	abstract A
		features
			i: in feature;
			o: out feature;
		annex emv2 {**
			use types ErrorLibrary;
			
			error propagations
				i: in propagation {ValueError};
				o: out propagation {ValueError};
			end propagations;
		**};
	end A;

end Issue2209;

Environment

  • OSATE Version: 2.7.0
  • Operating System:
@lwrage lwrage changed the title TBD Wrong validation of error condition Feb 23, 2020
@lwrage lwrage changed the title Wrong validation of error condition Wrong validation of error conditions Feb 23, 2020
@lwrage lwrage added this to the 2.7.1 milestone Feb 23, 2020
@lwrage
Copy link
Contributor Author

lwrage commented Feb 23, 2020

Model issue2209 is on branch 2209_condition_validation, already

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