You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the data type of data access of a subprogram is a struct, we cannot access its fields in a parameter of a subprogram call action. The BA plugin complains that it "cannot have any more tokens".
Expected and Current Behavior
The example bellow is not considered legit by the BA parser, although I do not see any problem with it. Note: it works with subprogram out parameters but fails with requires data accesses or in parameters.
Steps to Reproduce
copy paste the example above
see the error; if you replace "requires data access" by "in parameter" it works.
package test
public
with data_model;
data field_type
end field_type;
data my_data
properties
Data_Model::Data_Representation => Struct;
Data_Model::Element_Names => ("f");
Data_Model::Base_Type => (classifier (field_type));
end my_data;
subprogram s1
features
f: requires data access field_type;
end s1;
subprogram s2
features
d: requires data access my_data;
annex behavior_specification {**
states
s: initial final state;
transitions
t: s-[]-> s {s1!(d.f)};
**};
end s2;
subprogram s3
features
d: in parameter my_data;
annex behavior_specification {**
states
s: initial final state;
transitions
t: s-[]-> s {s1!(d.f)};
**};
end s3;
end test;
Environment
OSATE Version: 2.8.0
Operating System: Linux, Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
Summary
When the data type of data access of a subprogram is a struct, we cannot access its fields in a parameter of a subprogram call action. The BA plugin complains that it "cannot have any more tokens".
Expected and Current Behavior
The example bellow is not considered legit by the BA parser, although I do not see any problem with it. Note: it works with subprogram out parameters but fails with requires data accesses or in parameters.
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: