[aadl]: 转发: errors in an example of AADL-BA code
璐希 陈
chenluxiabc at yahoo.com.cn
Wed Apr 17 01:55:24 EDT 2013
Dear all,
I resent the email because I found I forgot to attach the aadl code. Sorry to trouble you.
My name is Luxi Chen. I'm a new learner about AADL-BA. Recently, I tried some examples from AADL website to show how AADL-BA works, but I met some common errors. The attachment is a simple example I download. I found several common errors.
(a) the part for definition "behaivor::integer", AADL-BA will warn me "Couldn't resolve reference to DataSubcomponentType 'Behavior::integer'."
(b) the part for system implementation XM.impl, AADL-BA warns me "Ending ':' does not match defining identifier 'XM.impl'"
I just feel very puzzled. Can anyone help me?
I downloaded the OSATE2 (integrated with Juno) from the homepage. The AADL-BA-FrontEnd is installed from the update site "http://aadl.telecom-paristech.fr/download/osate-plugins_update-site".
Thanks for your help and looking forward to your reply.
Best Regards,
Luxi Chen
Reliable Adaptive Distributed System Laboratory(RAD Lab)
Department of Computer Science and Engineering
Shanghai Jiao Tong
University
Shanghai, 200240, China
-----------------------------------------------------------------------------------------------------------------------
aadl-ba code
package medical
public
system XM
features
controller_input: in event data port Behavior::integer;
end XM;
system implementation XM.impl
subcomponents
xm_pr: process xm_process.impl;
timer_pr: process timer_process.impl;
connections
C11: event data port controller_input -> xm_pr.contr_input;
C12: event data port xm_pr.timeout_req -> timer_pr.timeout_req;
C13: event port timer_pr.timeout_input -> xm_pr.timeout_input;
end XM.impl;
process xm_process
features
-- contr_input: in event data port message;
contr_input: in event data port Behavior::integer;
timeout_input: in event port;
timeout_req: out event data port Behavior::integer;
end xm_process;
process implementation xm_process.impl
subcomponents
xm_th: thread xm_thread.impl;
connections
C21: event data port contr_input -> xm_th.contr_input;
C22: event port timeout_input -> xm_th.timeout_input;
C23: event data port xm_th.timeout_req -> timeout_req;
end xm_process.impl;
thread xm_thread
features
-- contr_input: in event data port message;
contr_input: in event data port Behavior::integer;
timeout_input: in event port;
timeout_req: out event data port Behavior::integer;
properties
Dispatch_Protocol => aperiodic;
end xm_thread;
thread implementation xm_thread.impl
-- subcomponents
-- in_message: data message.default;
-- in_message: data Behavior::integer;
-- xray_done: data Behavior::boolean;
-- pending_timeout: data Behavior::integer; --preparation time
-- xray_duration: data Behavior::integer;
annex behavior_specification {**
variables
xray_done: Behavior::boolean;
pending_timeout: Behavior::integer;
xray_duration: Behavior::integer;
in_message: Behavior::integer;
states
idle: initial complete state;
xray, pending_xray: complete state;
-- xray: state;
initial
xray_done := false;
pending_timeout := 2; -- pending_timeout is the time to set up
xray_duration := 1;
transitions
idle -[contr_input?(in_message) when in_message = 1]-> pending_xray {timeout_req!(pending_timeout);};
pending_xray -[timeout_input?]-> xray {timeout_req!(xray_duration);};
xray -[timeout_input?]-> idle {xray_done:=true;};
**};
end xm_thread.impl;
--package Behavior
--public
-- data integer
-- end integer;
-- data float
-- end float;
-- data boolean
-- end boolean;
--end Behavior;
end medical;
-------------- next part --------------
HTML attachment scrubbed and removed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: medical.aadl
Type: application/octet-stream
Size: 2510 bytes
Desc: not available
URL: <http://lists.sei.cmu.edu/pipermail/sae-aadl-users/attachments/20130417/87ea645a/attachment-0001.obj>
More information about the Sae-aadl-users
mailing list