please remove my e-mail address from this list. thanks.<br><br><div class="gmail_quote">2010/7/9 Kyle Zielinski <span dir="ltr"><<a href="mailto:zielins1@seattleu.edu">zielins1@seattleu.edu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm using XTeam (<a href="http://www-scf.usc.edu/%7Egedwards/xteam.html" target="_blank">http://www-scf.usc.edu/~gedwards/xteam.html</a>), and more<br>
specifically, extending the SafexADL paradigm on top of GME. I'm trying<br>
to add some constraints with my models, but am having problems<br>
understanding just what OCL is capable of in GME. (Not only that, but<br>
it's my first time attempting OCL.)<br>
<br>
We're using SafexADL to model and then simulate system architectures. I<br>
have a hierarchy (the general structure of which comes from XTeam) that<br>
goes like this:<br>
<br>
Root Folder<br>
Architecture Folder (Type: Folder Kind: Architecture)<br>
Architecture Folder (Type: Folder Kind: Architecture)<br>
Architecture (Type: Model, Kind: Architecture)<br>
Component1 (Type: Model, Kind: Component)<br>
Component2 (Type: Model, Kind: Component)<br>
Architecture2<br>
Component1<br>
Component2<br>
Elements Folder (Type: Folder, Kind: Elements)<br>
(more folders)<br>
...<br>
<br>
What I'm trying to do is simply ensure that two components in the same<br>
Architecture (that's of Type: Model, Kind: Architecture, not folders)<br>
can't have the same component name. At first, I had:<br>
<br>
let mySet = project.allInstancesOf( Component ) in<br>
mySet->isUnique( c | <a href="http://c.name" target="_blank">c.name</a>)<br>
<br>
I realized though, that this wouldn't work with the above example,<br>
because it gets all the components, period. So I tried this:<br>
<br>
let archBag = project.allInstancesOf( Architecture )->collect(<br>
oclAsType( Model )) in<br>
archBag->forAll( arch | let compSet = arch.models( Component ) in<br>
compSet->isUnique(v | <a href="http://v.name" target="_blank">v.name</a>) )<br>
<br>
Which would catch the constraint ... and then crash GME.<br>
<br>
Any suggestions?<br>
<br>
Kyle Zielinski<br>
<br>
_______________________________________________<br>
gme-users mailing list<br>
<a href="mailto:gme-users@list.isis.vanderbilt.edu">gme-users@list.isis.vanderbilt.edu</a><br>
<a href="http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users" target="_blank">http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users</a><br>
</blockquote></div><br>