Skip to content

Wrong validation of error conditions #2209

@lwrage

Description

@lwrage

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:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions