<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        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","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 56.7pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>You mean it worked with &quot;name&quot; instead of &quot;getName()&quot;? That would surprise be because as you figured, name does not exist on Variable&lt;...&gt;. But as Stephan says, the problem is generally solved already because you can use any OCL expression that has a result object of the lookupScope collection as context and returns a String.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I only wonder what this does for our impact analysis. The getName() operation isn't specified using a simple body. Couldn't you perhaps downcast the self to the ocl::ecore::Variable and then use the name property immediately? That would work with the impact analyzer for sure.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>                referenceBy=&quot;self.oclAsType(ecore::Variable).name&quot;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-- Axel<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> furcas-discussion-bounces@lists.furcas.org [mailto:furcas-discussion-bounces@lists.furcas.org] <b>On Behalf Of </b>Thomas Goldschmidt<br><b>Sent:</b> Friday, February 25, 2011 9:32 AM<br><b>To:</b> Stephan Erb<br><b>Cc:</b> furcas-discussion@lists.furcas.org<br><b>Subject:</b> Re: [furcas-discussion] referenceBy Use-Case<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hmm ok, just tried it again and now it works, maybe a combination of the generic type resolving mechanism I just implemented.</span><o:p></o:p></p><table class=MsoNormalTable border=0 cellpadding=0><tr><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><img id="_x0000_i1025" src="cid:image001.gif@01CBD537.15AE8EB0"><o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal>&nbsp; <o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><b><span style='font-size:7.5pt;font-family:"Verdana","sans-serif"'>Thomas Goldschmidt </span></b><span style='font-size:7.5pt;font-family:"Verdana","sans-serif"'><br><br>ABB AG<br>Forschungszentrum<br>Wallstadter Straße 59<br>68526 Ladenburg<br>Office Phone: +49 6203 716134<br>Office Fax: +49 6203 716253<br>e-mail:<span style='color:blue'> thomas.goldschmidt@de.abb.com</span></span><o:p></o:p></p></td></tr></table><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";color:gray'>ABB AG<br>Sitz/Head Office: Mannheim <br>Registergericht/Registry Court: Mannheim<br>Handelsregisternummer/Commercial Register No.: HRB 4664<br>Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim Schneider, Markus Ochsner, Hans-Georg Krabbe<br>Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard Jucker<br><br>Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. <br><br>This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.</span> <br><br><o:p></o:p></p><table class=MsoNormalTable border=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td width="40%" valign=top style='width:40.0%;padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><b><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Stephan Erb &lt;stephan@dev.static-void.de&gt;</span></b><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'> </span><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Sent by: furcas-discussion-bounces@lists.furcas.org</span> <o:p></o:p></p><p><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>25.02.2011 09:26</span> <o:p></o:p></p></td><td width="59%" valign=top style='width:59.0%;padding:.75pt .75pt .75pt .75pt'><table class=MsoNormalTable border=0 cellpadding=0 width="100%" style='width:100.0%'><tr><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=right style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>To</span><o:p></o:p></p></td><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>furcas-discussion@lists.furcas.org</span> <o:p></o:p></p></td></tr><tr><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=right style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>cc</span><o:p></o:p></p></td><td valign=top style='padding:.75pt .75pt .75pt .75pt'></td></tr><tr><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=right style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Subject</span><o:p></o:p></p></td><td valign=top style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Re: [furcas-discussion] referenceBy Use-Case</span><o:p></o:p></p></td></tr></table><p class=MsoNormal><o:p>&nbsp;</o:p></p><table class=MsoNormalTable border=0 cellpadding=0><tr><td valign=top style='padding:.75pt .75pt .75pt .75pt'></td><td valign=top style='padding:.75pt .75pt .75pt .75pt'></td></tr></table></td></tr></table><p class=MsoNormal><br><br><br><tt><span style='font-size:10.0pt'>Hey Thomas,</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><br><tt>I believe that we do already support this usecase:</tt><br><tt>&gt; referenceBy=&quot;OCL:...anything goes here...&quot;</tt><br><br><tt>Protocol is that the referenceBy expression returns a type covered by a</tt><br><tt>PrimitiveTemplate. </tt><br><br><tt>We implemented it because in same rare circumstances you need more</tt><br><tt>complex rules to derive the name of an object, as for example within the</tt><br><tt>as-Argument of the TCS syntax.</tt><br><br><tt>Best,</tt><br><tt>Stephan</tt><br><br><tt>On Fri, 2011-02-25 at 09:02 +0100, Thomas Goldschmidt wrote:</tt><br><tt>&gt; </tt><br><tt>&gt; Hi, </tt><br><tt>&gt; </tt><br><tt>&gt; I think I found a case where the current lookupScope/referenceBy</tt><br><tt>&gt; handling might not enough: </tt><br><tt>&gt; </tt><br><tt>&gt; I have a syntax for the Ecore variant of OCL which is based on</tt><br><tt>&gt; generics inheriting from a generic OCL metamodel (which is kind of</tt><br><tt>&gt; ugly in my oppinion). Anyway, there I define a template for</tt><br><tt>&gt; VariableExp in the fopllowing way: </tt><br><tt>&gt; </tt><br><tt>&gt; template &quot;</tt></span><a href="http://www.eclipse.org/ocl/1.1.0/Ecore"><tt><span style='font-size:10.0pt'>http://www.eclipse.org/ocl/1.1.0/Ecore&quot;#VariableExp </span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; : [[ </tt><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;referredVariable {forcedLower=1,mode=self} </tt><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | </tt><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;referredVariable &nbsp;{as=identifier, forcedLower=1 ,</tt><br><tt>&gt; lookupScope = &quot;ocl::ecore::Variable.allInstances()&quot;,</tt><br><tt>&gt; referenceBy=&quot;name&quot;} </tt><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ]] </tt><br><tt>&gt; </tt><br><tt>&gt; &nbsp;{{ eType=lookIn(&quot;OCL:self.referredVariable.oclAsType(ocl::ecore::Variable).eType&quot;), </tt><br><tt>&gt; </tt><br><tt>&gt; name=lookIn(&quot;OCL:self.referredVariable.oclAsType(ocl::ecore::Variable).name&quot;) }} </tt><br><tt>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ; </tt><br><tt>&gt; </tt><br><tt>&gt; However, this doesn't work as the referenceBy-feature &quot;name&quot; is</tt><br><tt>&gt; currently validated against the type of the feature it is intended to</tt><br><tt>&gt; set, i.e., referredVariable. In this setting referredVariable is typed</tt><br><tt>&gt; as &nbsp;Variable&lt;C, PM&gt; &nbsp;from ocl::expressions (which is the generic part</tt><br><tt>&gt; of OCL) where the generics are bound as &lt;EClassifier, EParameter&gt;.</tt><br><tt>&gt; Still there is a concrete subclass of VariableExp in the ocl::ecore</tt><br><tt>&gt; package defined as follows: Variable -&gt;</tt><br><tt>&gt; ETypedElement,Variable&lt;EClassifier, EParameter&gt;. This leads to the</tt><br><tt>&gt; fact that &quot;name&quot; is only defined on this concrete subclass (inherited</tt><br><tt>&gt; from ETypedElement-&gt;ENamedElement). Therefore, the &quot;name&quot; feature is</tt><br><tt>&gt; not found when validating the syntax and an error occurs. Still, the</tt><br><tt>&gt; generic Variable&lt;C, PM&gt; also inherits from the abstract class</tt><br><tt>&gt; ocl::utilities::TypedElement which defines an operation &quot;getName()&quot;.</tt><br><tt>&gt; This &quot;coincidence&quot; leads to the fact that on the Java side this</tt><br><tt>&gt; &quot;getName()&quot; magically works by resolving to ENamedElement.getName(),</tt><br><tt>&gt; during OCL evaluation this also works fine if we call operation</tt><br><tt>&gt; getName() instead of attribute &quot;name&quot;. Therefore, what might work is</tt><br><tt>&gt; using the operation in the referenceBy clause: </tt><br><tt>&gt; </tt><br><tt>&gt; referenceBy=&quot;getName()&quot; </tt><br><tt>&gt; </tt><br><tt>&gt; What do you think? Is this just a weird special case that will never</tt><br><tt>&gt; occur anywhere else? Or do we need to support this? </tt><br><tt>&gt; </tt><br><tt>&gt; Btw: Resolving generics as reference types was not supported in the</tt><br><tt>&gt; generator, I added this including some test cases and I will push this</tt><br><tt>&gt; later today. </tt><br><tt>&gt; </tt><br><tt>&gt; Cheers,</tt><br><tt>&gt; Thomas</tt><br><tt>&gt; </tt><br><tt>&gt; &nbsp; </tt><br><tt>&gt; Thomas Goldschmidt </tt><br><tt>&gt; </tt><br><tt>&gt; ABB AG</tt><br><tt>&gt; Forschungszentrum</tt><br><tt>&gt; Wallstadter Straße 59</tt><br><tt>&gt; 68526 Ladenburg</tt><br><tt>&gt; Office Phone: +49 6203</tt><br><tt>&gt; 716134</tt><br><tt>&gt; Office Fax: +49 6203</tt><br><tt>&gt; 716253</tt><br><tt>&gt; e-mail:</tt><br><tt>&gt; thomas.goldschmidt@de.abb.com</tt><br><tt>&gt; </tt><br><tt>&gt; </tt><br><tt>&gt; ABB AG</tt><br><tt>&gt; Sitz/Head Office: Mannheim </tt><br><tt>&gt; Registergericht/Registry Court: Mannheim</tt><br><tt>&gt; Handelsregisternummer/Commercial Register No.: HRB 4664</tt><br><tt>&gt; Geschäftsführung/Managing Board: Peter Smits (Vorsitzender), Joachim</tt><br><tt>&gt; Schneider, Markus Ochsner, Hans-Georg Krabbe</tt><br><tt>&gt; Vorsitzender des Aufsichtsrats/Chairman of Supervisory Board: Bernhard</tt><br><tt>&gt; Jucker</tt><br><tt>&gt; </tt><br><tt>&gt; Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte</tt><br><tt>&gt; Informationen. Wenn Sie nicht der richtige Adressat sind oder diese</tt><br><tt>&gt; E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den</tt><br><tt>&gt; Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie</tt><br><tt>&gt; die unbefugte Weitergabe dieser Mail ist nicht gestattet. </tt><br><tt>&gt; </tt><br><tt>&gt; This e-mail may contain confidential and/or privileged information. If</tt><br><tt>&gt; you are not the intended recipient (or have received this e-mail in</tt><br><tt>&gt; error) please notify the sender immediately and destroy this e-mail.</tt><br><tt>&gt; Any unauthorized copying, disclosure or distribution of the material</tt><br><tt>&gt; in this e-mail is strictly forbidden.</tt><br><tt>&gt; _______________________________________________</tt><br><tt>&gt; Furcas-discussion mailing list</tt><br><tt>&gt; Furcas-discussion@lists.furcas.org</tt><br><tt>&gt; </tt></span></a><a href="http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion"><tt><span style='font-size:10.0pt'>http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><br><br><tt>_______________________________________________</tt><br><tt>Furcas-discussion mailing list</tt><br><tt>Furcas-discussion@lists.furcas.org</tt><br></span></a><a href="http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion"><tt><span style='font-size:10.0pt'>http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br></span></a><o:p></o:p></p></div></div></body></html>