Skip to main content



      Home
Home » Modeling » ATL » Please help me to check the helper context in ATL(just a helper)
icon5.gif  Please help me to check the helper context in ATL [message #1219188] Mon, 02 December 2013 09:32 Go to next message
Eclipse UserFriend
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
Re: Please help me to check the helper context in ATL [message #1219272 is a reply to message #1219188] Tue, 03 December 2013 00:33 Go to previous messageGo to next message
Eclipse UserFriend
Is there anyone who can offer some help?
Maybe some suggestions, such as how to debug atl code or print the object.
Tks
Re: Please help me to check the helper context in ATL [message #1219313 is a reply to message #1219188] Tue, 03 December 2013 04:41 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Problem when using GetValue
Next Topic:Generated model with wrong xmi tags
Goto Forum:
  


Current Time: Wed Jul 23 08:26:34 EDT 2025

Powered by FUDForum. Page generated in 0.06660 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top