Skip to content

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

@Etienne13

Description

@Etienne13

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions