osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
39 stars 8 forks source link

Abstract feature prototypes produce error in type declaration #1665

Closed dpgluch closed 5 years ago

dpgluch commented 5 years ago

Summary

Prototypes for features produce an error in the original type declaration for an extension using prototype binding.

Expected and Current Behavior

Get the error message " Couldn't resolve reference to Feature Classifier 'incoming' " in the example from the standard that is included here. The same message results for similar examples in the AADL course. For the course example included here there is the error message "Couldn't resolve reference to Feature Classifier 'comm' for the filtered out feature in the type declaration for filter but the prototype binding seems to work in the extension declaration for filter2.

Steps to Reproduce

  1. Use examples below
--This is an example from the standard:
package AbstractFeaturesStandard
public
abstract flowComponent
prototypes
dt: data;
incoming: in feature;
features
 insignal: in feature incoming;
 outsignal: out data port dt;
end flowComponent;
end AbstractFeaturesStandard;

-- This is a course example, where there is the error message "Couldn't resolve reference to Feature Classifier 'comm' for the filtered out feature in the type declaration for filter but  the prototype binding seems to work in the extension declaration for filter2.
thread filter
  prototypes
    comm: feature;
  features
    raw: in feature;
    filtered: out feature comm;
end filter;

data rdata
end rdata;

thread filter2
  extends filter
      (comm => out data port MyData)
      features
      raw: refined to in data port rdata;
end filter2;

data MyData
end MyData;

Environment

lwrage commented 5 years ago

The AADL code is wrong. If you want to reference a feature prototype you need to use the prototype keyword, e.g., insignal: in prototype incoming;, see section 8.1 in the AADL 2.2 standard. The change in the standard was introduced to syntactically distinguish

The example in the standard needs to be updated to the new syntax.

dpgluch commented 5 years ago

Lutz,

Got it thanks.

Have a great holiday season.

Dave

From: Lutz Wrage [mailto:notifications@github.com] Sent: Thursday, December 20, 2018 9:37 AMLutx To: osate/osate2 osate2@noreply.github.com Cc: David P Gluch dpg@sei.cmu.edu; Author author@noreply.github.com Subject: Re: [osate/osate2] Abstract feature prototypes produce error in type declaration (#1665)

The AADL code is wrong. If you want to reference a feature prototype you need to use the prototype keyword, e.g., insignal: in prototype incoming;, see section 8.1 in the AADL 2.2 standard. The change in the standard was introduced to syntactically distinguish

The example in the standard needs to be updated to the new syntax.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/osate/osate2/issues/1665#issuecomment-449019260, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXaqZobByBLhkbWypeJULr4ObTNkzWA-ks5u66B5gaJpZM4ZbI-N.