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

In BA plugin, name resolution in actions fails when classifier with the same name exists #2175

Closed
Etienne13 opened this issue Jan 20, 2020 · 0 comments · Fixed by #2176
Closed
Assignees
Milestone

Comments

@Etienne13
Copy link
Contributor

Etienne13 commented Jan 20, 2020

Summary

Name resolution fails when an action references the name of a contained element which is also a classifier name.

Expected and Current Behavior

The following example is correct but the BA plugin crashes with an exception:

package 2175
public

  thread function1
  features
	function2 : out event port;
  properties
    Dispatch_Protocol => Periodic;
    Period => 100 ms;
    Compute_Execution_Time => 1 ms .. 2 ms;
    Priority => 2;
  annex behavior_specification {**
  	states
  		s : initial complete final state;
	transitions
		s -[on dispatch]-> s{function2!};
  **};
  end function1;

  thread function2
  end function2;
  
end 2175;

Exception trace:

java.lang.UnsupportedOperationException: getFeatureType : ThreadTypeImpl is not supported yet at line 20.
at org.osate.ba.utils.AadlBaUtils.getFeatureType(AadlBaUtils.java:1726)
at org.osate.ba.analyzers.AadlBaTypeChecker.getType(AadlBaTypeChecker.java:3216)
at org.osate.ba.analyzers.AadlBaTypeChecker$TypeCheckRule.test(AadlBaTypeChecker.java:3555)
at org.osate.ba.analyzers.AadlBaTypeChecker.typeCheck(AadlBaTypeChecker.java:3237)

Steps to Reproduce

  1. create an aadl package with the aadl code above
  2. open the file in osate
  3. the ba plugin crashes and the openning fails

Environment

  • OSATE Version: 2.7.0
  • Operating System: 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