<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle19
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 77.95pt 1.0in 77.95pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Christian,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>How about something like this:</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> conn_ports->forAll( </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> cp : gme::FCO | </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> let cpSz = cp.attribute("maxSize").oclAsType(ocl::Integer)
in</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> cpSz = mySz )</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This is a snippet from a constraint in a
large meta-model. Please note that here ‘cp’ is not casted in
anyways - it is just treated as a gme::FCO, which is the base type of all gme
objects, and calling the attribute method with a string argument on that is legit.
Perhaps you could give this a try</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Best wishes,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sandeep</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<div>
<p class=MsoAutoSig><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>--</span></font></p>
<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Sandeep Neema</span></font></p>
<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Research Scientist,</span></font></p>
<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Institute</span></font><font color=navy><span
style='color:navy'> of Software</span></font><font color=navy><span
style='color:navy'> Integrated Systems, Vanderbilt University</span></font></p>
<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Phone: 615-343-9996</span></font></p>
<p class=MsoAutoSig><font size=3 color=navy face="Times New Roman"><span
style='font-size:12.0pt;color:navy'>Email: <a
href="mailto:sandeep.k.neema@vanderbilt.edu">sandeep.k.neema@vanderbilt.edu</a></span></font></p>
</div>
<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span style='font-size:12.0pt;color:windowtext'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:windowtext'> Christian Brunette [mailto:Christian.Brunette@irisa.fr] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, March 18, 2005 10:28
AM<br>
<b><span style='font-weight:bold'>To:</span></b> gme-users<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [gme-users] Problem with OCL</span></font></p>
</div>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>What I want to check in the constraint is that the
attributes of the two connected FCO are equal. So, I have to access to the
attribute of the two connected FCOs in the same constraint.<br>
If I put the constraint on the abstract FCO and not on the Connection, I think
that I can only access to the attribute of the "src" or
"dst" FCO, not both. Am I right ?<br>
<br>
Christian<br>
<br>
Matthew J. Emerson wrote: </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PostalCode"><u1:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"><u1:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"><u1:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"></u1:SmartTagType></u1:SmartTagType></u1:SmartTagType></u1:SmartTagType>Here's
what I think you are describing:<u1:p></u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><img border=0 width=380 height=316
src="cid:image001.jpg@01C52BA7.3FEE1EB0"><br>
<br>
<br>
</span></font></p>
<u1:p></u1:p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><img border=0 width=614 height=442
src="cid:image002.jpg@01C52BA7.3FEE1EB0"></span></font></p>
<u1:p></u1:p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>You’re right, that definitely throws a
constraint. But what about this, which is functionally equivalent?<u1:p></u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><img border=0 width=614 height=420
src="cid:image003.jpg@01C52BA7.3FEE1EB0"></span></font></p>
<u1:p></u1:p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>Can you perform a similar relocation of your
constraint?<u1:p></u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>--Matt<u1:p></u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'><u1:p> </u1:p></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> -----Original Message-----</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> From: Larry H.</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Sent: Friday, March 18, 2005 9:21 AM</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> To: <a href="mailto:Christian.Brunette@irisa.fr">Christian.Brunette@irisa.fr</a>;
fixes.'@list.isis.vanderbilt.edu; " <gme-</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <a href="mailto:users@list.isis.vanderbilt.edu">users@list.isis.vanderbilt.edu</a>>"@list.isis.vanderbilt.edu</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Subject: RE: [<st1:PersonName u2:st="on">gme-users</st1:PersonName>] Problem with OCL</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Let me take an initial pass at this.</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> First, my understanding is that constraints are
defined on the paradigm</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> as generated, not as modeled. Abstract FCOs
are part of the paradigm</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> definition (meta-model) and do not exist in the
generated paradigm.</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Therefore, it is not possible for a valid
constraint to refer to them.</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> (Someone else should comment on constraint
validation in the paradigm</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> generation process.)</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> That said, the result is less power in constraint
definition, since the</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> constraints need to be defined on the concrete
FCOs. I must also leave</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> it to others to say what intentions there might
be for meta-modeling</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> refinements that could address this situation, or
to correct any</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> misunderstanding on my part reflected in this
response.</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> -----Original Message-----</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> From: <st1:PersonName u2:st="on">gme-users</st1:PersonName>-bounces@list.isis.vanderbilt.edu</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> [mailto:<st1:PersonName u2:st="on">gme-users</st1:PersonName>-bounces@list.isis.vanderbilt.edu] On Behalf Of</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Christian Brunette</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Sent: Friday, March 18, 2005 2:55 AM</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> To: GME users</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Subject: [<st1:PersonName u2:st="on">gme-users</st1:PersonName>] Problem with OCL</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Hello,</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> I'm a new user of GME. I have a problem with OCL
and I don't know if it</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> is a bug or a feature not yet implemented or a
constraint in OCL. I have</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> define several FCOs which inherit from an
abstract FCO in which</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> some attributes are defined. I add a connection
whose source and</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> destination are this abstract FCO. I would add a
constraint on this</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> connection. But I need to access to the
attributes of the connected</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> FCOs, so I need to cast them. But the constraint
checker said me that I</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> can't cast because the FCO is abstract. Is it a
bug ??</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Sincerely,</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Christian</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> --</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Christian Brunette</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Post-doctorant in the ESPRESSO team</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> IRISA-INRIA, Campus <st1:City u2:st="on">de Beaulieu </st1:City>, <st1:PostalCode u2:st="on">35042</st1:PostalCode> <st1:City u2:st="on"><st1:place u2:st="on">Rennes</st1:place></st1:City> cedex, France</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> Phone: +33 (0) 2 99 84 72 31, Fax: +33 (0) 2 99
84 71 71</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> _______________________________________________</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <st1:PersonName u2:st="on">gme-users</st1:PersonName>
mailing list</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <st1:PersonName u2:st="on">gme-users</st1:PersonName>@list.isis.vanderbilt.edu</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <a
href="http://list.isis.vanderbilt.edu/mailman/listinfo/">http://list.isis.vanderbilt.edu/mailman/listinfo/</a><st1:PersonName u2:st="on">gme-users</st1:PersonName></span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> </span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> _______________________________________________</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <st1:PersonName u2:st="on">gme-users</st1:PersonName>
mailing list</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <st1:PersonName u2:st="on">gme-users</st1:PersonName>@list.isis.vanderbilt.edu</span></font></p>
<p class=MsoPlainText><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>> <a
href="http://list.isis.vanderbilt.edu/mailman/listinfo/">http://list.isis.vanderbilt.edu/mailman/listinfo/</a><st1:PersonName u2:st="on">gme-users</st1:PersonName></span></font></p>
<pre wrap=""><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'> </span></font></pre><pre style='text-align:center'><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>
<hr size=4 width="90%" align=center>
</span></font></pre><pre><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'> </span></font></pre><pre><font size=2
color=black face="Courier New"><span style='font-size:10.0pt'>_______________________________________________</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>gme-users</span></font> mailing list</pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'><a
href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a></span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'> </span></font></pre>
<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><br>
<br>
<br>
</span></font></p>
<pre><font size=2 color=black face="Courier New"><span style='font-size:10.0pt'>-- </span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Christian Brunette</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>Post-doctorant in the ESPRESSO team</span></font></pre><pre><font
size=2 color=black face="Courier New"><span style='font-size:10.0pt'>IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France</span></font></pre><pre><font size=2 color=black face="Courier New"><span
style='font-size:10.0pt'>Phone: +33 (0) 2 99 84 72 31, Fax: +33 (0) 2 99 84 71 71</span></font></pre></div>
</div>
</body>
</html>