|
|
Re: Please help me to check the helper context in ATL [message #1219313 is a reply to message #1219188] |
Tue, 03 December 2013 09:41 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
I am sure the ATL editor gives you useful syntax errors. Use it.
If you have too many errors, start with a smaller example so that you
and ATL do not get confused by an excess of problems.
Regards
Ed Willink
On 02/12/2013 16:08, hu xiang wrote:
>
> helper context UML!Action def:valueOfActionFiringRate:Real=
> let
> node:UML!Node=UML!Node.allInstances->select(e|e.name=(self.getValue(self.getAppliedStereotypes().first(),'host')))
> in
> let
> r1:String=node.getValue(node.getAppliedStereotypes().first(),'thoughput')
> in let
> r2:String=self.getValue(self.getAppliedStereotypes().first(),'hostDemand')
> in
> let i:Integer=s.indexOf('exp(') in
> let j:Integer=r1.indexOf('),') in
> let r11:String=r1.substring((i+5),j) in
> let r22:String=r1.substring((i+5),j) in
> let number:Real=r1.toReal()*r2.toReal in
> number;
>
>
>
> ATL can not easily debug. Maybe my code has systax error. Please some
> people may easily find out the error and let me know.
>
> UML!Action --paStep --host='Resource' hostDemand=(exp(2),s)
> UML!node --name=Resource
> --GaExeHost --thoughtput=(exp(2),s)
> I want to find the respongding resource in the context of UML!Action.
>
> Tks
>
|
|
|
Powered by
FUDForum. Page generated in 0.02694 seconds