|
|
|
|
|
|
Re: how to write constraints in OCL [message #194746 is a reply to message #194600] |
Thu, 26 June 2008 23:47 |
Eclipse User |
|
|
|
Originally posted by: cdamus.zeligsoft.com
--=-LXIYASpbj7/MdN7z6Oyu
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi, Ye,
The -> operator is only used with collection operations such as "size"
and iterators such as "forAll." To access properties of model elements,
you must use the dot ( . ) operator:
self.outputs.inputRate
HTH,
Christian
On Wed, 2008-06-25 at 12:05 +0000, Ye Liu wrote:
> Hi Alex,
> The exact error report is :
> invalid expression body'self.incomingChannels<self.outputs->inputRate'
> Cause:Error in(variableExpCS):(Unrecognized variable:(inputRate))
>
> As I told ,the constraint is added to Link Mapping(Channel).if here by
> self you mean Gather ,then how to access to Gather in target end
> constraint of Channel?
>
> By the way ,in Source end constraint of Channel,there is already 'self<>
> oppositeEnd'.And can you tell me the meaning of source /target in the term
> source/target End constraint?
>
>
> Thanks a lot!
>
> Ye Liu
>
>
>
--=-LXIYASpbj7/MdN7z6Oyu
Content-Type: text/html; charset=utf-8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.0">
</HEAD>
<BODY>
Hi, Ye,<BR>
<BR>
The -> operator is only used with collection operations such as "size" and iterators such as "forAll." To access properties of model elements, you must use the dot ( . ) operator:<BR>
<BR>
self.outputs.inputRate<BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Wed, 2008-06-25 at 12:05 +0000, Ye Liu wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Hi Alex,</FONT>
<FONT COLOR="#000000"> The exact error report is :</FONT>
<FONT COLOR="#000000">invalid expression body'self.incomingChannels<self.outputs->input Rate' </FONT>
<FONT COLOR="#000000">Cause:Error in(variableExpCS):(Unrecognized variable:(inputRate))</FONT>
<FONT COLOR="#000000">As I told ,the constraint is added to Link Mapping(Channel).if here by </FONT>
<FONT COLOR="#000000">self you mean Gather ,then how to access to Gather in target end </FONT>
<FONT COLOR="#000000">constraint of Channel?</FONT>
<FONT COLOR="#000000">By the way ,in Source end constraint of Channel,there is already 'self<> </FONT>
<FONT COLOR="#000000">oppositeEnd'.And can you tell me the meaning of source /target in the term </FONT>
<FONT COLOR="#000000">source/target End constraint?</FONT>
<FONT COLOR="#000000">Thanks a lot!</FONT>
<FONT COLOR="#000000">Ye Liu</FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
--=-LXIYASpbj7/MdN7z6Oyu--
|
|
|
Powered by
FUDForum. Page generated in 0.03623 seconds