Bug 527431 - [codegen] scope of trigger/message parameters
Summary: [codegen] scope of trigger/message parameters
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: codegen (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-17 16:15 EST by Ernesto Posse CLA
Modified: 2017-11-17 17:45 EST (History)
1 user (show)

See Also:


Attachments
ParameterTest model (7.45 KB, application/zip)
2017-11-17 16:15 EST, Ernesto Posse CLA
no flags Details
ParameterTest2 model (7.75 KB, application/zip)
2017-11-17 16:16 EST, Ernesto Posse CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ernesto Posse CLA 2017-11-17 16:15:06 EST
Created attachment 271538 [details]
ParameterTest model

if a transition with a trigger with parameter goes into a choice point, 
it appears that the parameter is only available in
- the effect of the transition going into the choice point, and
- the guards of any transition going out of the choice point, 
but *not* in the effect of any of the transitions going out of the 
choice point. 

This seems odd. Also, looking at the generated code, 'msg' is 
passed into the transitionaction (corresponding to the transitions
going out of a choice), meaning that only a 'define' is missing, as in, 
e.g., 
> #define c ( *(int *)msg->getParam( 0 ) )

A similar problem occurs in local transitions with triggers with 
parameters where the parameter is not available even in the effect
of the transition with the trigger that has the parameter (see second
attached model).
Comment 1 Ernesto Posse CLA 2017-11-17 16:16:05 EST
Created attachment 271539 [details]
ParameterTest2 model