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

Validator error for AGREE Enum assignment #124

janetlj opened this Issue Apr 13, 2018 · 2 comments


None yet
2 participants
Copy link

janetlj commented Apr 13, 2018

In OSATE 2.3.2.vfinal version, when doing an assignment from a subcomponent feature of a datatype (e.g., Status_Type in the example below) that extends Enumeration_Type, to a local variable of the same type (e.g., active_status in the example below), the validator flags it as an error for the assignment (e.g., assign active_status = sub_test.active_status; in the example below), saying that the left side of the assignment is of Status_Type, while the right side of the assignment is of Enumeration_Type.

Code example:

data Enumeration_Type
		Data_Model::Data_Representation => Enum;
end Enumeration_Type;	

data Status_Type extends Enumeration_Type
		Data_Model::Enumerators => ("INVALID",
end Status_Type ;

   system test
       annex agree{**
           eq active_status: Status_Type;
    end test;

    system implementation test.impl
              sub_test: system sub_test;
          annex agree{**
               assign active_status = sub_test.active_status;
      end test.impl;

      system sub_test
            active_status: out data port Status_Type;
        end sub_test;

Note: changing the assign active_status = sub_test.active_status; to the following got rid of the validator error:
eq active_status2: Enumeration_Type = sub_test.active_status;

@kfhoech kfhoech self-assigned this Apr 16, 2018

@kfhoech kfhoech added bug AGREE labels Apr 16, 2018


This comment has been minimized.

Copy link

kfhoech commented Apr 16, 2018

Duplicated in develop branch hash e9a3710.

The problem is that at the evaluation of type chases the type back to the type from which it was extended without regard to whether it is finding the primitive base type of an AADL subcomponent or whether the type is an enumeration type.


This comment has been minimized.

Copy link

kfhoech commented Apr 16, 2018

Resolved by Pull Request.

Thanks, @janetlj for finding this bug!

@kfhoech kfhoech closed this Apr 16, 2018

@kfhoech kfhoech added the v2.3.3 label Jul 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.