<?xml version='1.0' encoding='UTF-8' ?>
<rss version="2.0" xmlns:admin="http://webns.net/mvcb/" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:icbm="http://postneo.com/icbm" xmlns:includedComments="http://www.laudably.com/rss2-comments" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Steven Kelly on DSM: category: DSM-tech</title>
		<link>http://www.metacase.com/blogs/stevek/blogView</link>
		<description>Domain-Specific Modeling: A Toolmaker Perspective</description>
		<webMaster>stevek@metacase.com</webMaster>
		<lastBuildDate>Mon, 31 Aug 2009 12:00:09 +0300</lastBuildDate>
		<admin:generatorAgent rdf:resource="http://www.cincomsmalltalk.com/CincomSmalltalkWiki/CSTBlogModule"></admin:generatorAgent>
		<admin:errorReportsTo rdf:resource="mailto:stevek@metacase.com"></admin:errorReportsTo>
		<dc:language>en-us</dc:language>
		<dc:creator>Steven Kelly</dc:creator>
		<dc:rights>Copyright 2005- Steven Kelly</dc:rights>
		<dc:date>2009-08-31T12:00:09+03:00</dc:date>
		<item>
			<title>MERL primer for openArchitectureWare Xpand users</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3429172808</link>
			<category>DSM-tech</category>
			<pubDate>Mon, 31 Aug 2009 12:00:08 +0300</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml"> 
<p> 
<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3.html"> 
MERL</a> and openArchitectureWare's Xpand languages are rather similar in approach and functionality. The main differences are in syntax and keywords, so learning one if you know the other is easy. In the <a href="http://www.metacase.com/forums/forum_topics.asp?FID=1">MetaEdit+ forum</a> I've posted a quick <a href="http://www.metacase.com/forums/forum_posts.asp?TID=116">primer on how to translate from Xpand to MERL</a>. The primer is below, with comments after the respective row where necessary.</p> 
<table border="1" borderColor="#c0c0c0" cellPadding="2" cellSpacing="0"> 
<tbody> 
<tr> 
<th> Xpand</th> 
<th> MERL</th> 
</tr> 
<tr style="font-family: Courier"> 
<td> SomeFixedText</td> 
<td> 'SomeFixedText'</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;SOMECOMMAND&raquo;</td> 
<td> SOMECOMMAND</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> In XPand commands are quoted,
whereas in MERL fixed text is quoted.</font> 
</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;DEFINE foo ... ENDDEFINE&raquo;</td> 
<td> Report 'foo' ... EndReport</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> In MERL, each report is defined on
its own, not with several reports one after another in a single
text. 
<br/> Each report is defined on a particular Graph type (or the
supertype of all, Graph itself).</font> 
</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;FILE Name + &quot;.java&quot; ... ENDFILE&raquo;</td> 
<td> filename :Name '.java' write ... close</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;EXPAND foo FOREACH Bar&raquo;</td> 
<td> foreach .Bar { subreport 'foo' run }</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> You don't need to define a
subreport, you can just put the commands from foo in the {}. 
<br/> This often makes more sense, e.g. if you're not going to call
foo from elsewhere. 
<br/> &nbsp;
<br/> foreach is for navigation from a graph to its elements. 
<br/> For navigation between elements use &quot;do&quot; or &quot;dowhile&quot; (which
covers SEPARATOR):</font> 
</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;EXPAND foo FOREACH Bar&raquo;</td> 
<td> do .Bar { subreport 'foo' run }</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;EXPAND foo FOREACH Bar SEPARATOR &quot;,&quot;&raquo;</td> 
<td> dowhile .Bar { subreport 'foo' run ','}</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;this.name&raquo;</td> 
<td> :name</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;LET ... AS var ..&lt;var&gt;.. ENDLET&raquo;</td> 
<td> variable 'var' write ... close ..$var..</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> For assignments with a single
element on the right-hand side, you can use the shorter form: $var
= 'foo', $var = :foo etc.</font> 
</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;REM...ENDREM&raquo;</td> 
<td> /*...*/</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;PROTECT ID ... ... ENDPROTECT&raquo;</td> 
<td> md5id ... md5block ... md5sum</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;CSTART ... CEND ...&raquo;</td> 
<td> filename 'bar.java' 
<br/> md5start ... md5stop ... 
<br/> merge .. .. .. close</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> The start and end sequences are
specified in the filename command, since they will be the same for
the whole file</font> 
</td> 
</tr> 
<tr style="font-family: Courier"> 
<td> &laquo;this.name.toUpper()&raquo;</td> 
<td> :Name%upper</td> 
</tr> 
<tr> 
<td colSpan="2"> 
<font color="#000066" size="2"> For text manipulation, e.g. with
Java in oAW, you can use MERL 
<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3_6.html#_Ref190594241" target="_blank"> translators</a> . Many are defined in _translators,
such as %upper a-z A-Z, and you can define your own to convert any
combination of characters, strings and regular expressions.</font> 
</td> 
</tr> 
</tbody> 
</table> 
</div>]]></description>
			<guid isPermaLink="false">3429172808</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3429172808</wfw:comment>
		</item>
		<item>
			<title>Re: Processing of MetaEdit  Models with oAW</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3428923761</link>
			<category>DSM-tech</category>
			<pubDate>Fri, 28 Aug 2009 14:49:21 +0300</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">



<p>Heiko Kern has written a great set of information on how to <a href="http://blog.integration-engineering.de/2009/08/processing-of-metaedit-models-with-oaw">process MetaEdit+ models with oAW</a> (the openArchitectureWare model transformation tools for Eclipse). The integration he's built is a great example of how easy it is to <a href="http://www.metacase.com/mwb/integration.html">integrate MetaEdit+</a> with other tools:</p>

<ul><li>You can export models or metamodels from MetaEdit+ as XML. The format is an extension of the open Graph eXchange Language standard, <a href="http://www.gupro.de/GXL/tools/tools.html">GXL, supported by over 40 tools</a>.</li><li>You can quickly write a little generator to output your models in whatever XML or other text format you want.</li><li>MetaEdit+ can call other tools from its generators, e.g. for build integration.</li><li>Other tools can call MetaEdit+ with command-line parameters to specify a series of actions to run.</li><li>Other tools can call MetaEdit+ through its WebServices / SOAP API, to create/read/update/delete any data in models, and for control integration, e.g. to animate models for model-level debugging.</li><li>You can import models or metamodels as XML.</li><li>You can import text in any format and convert it to models via <a href="http://www.metacase.com/forums/forum_posts.asp?TID=44">reverse engineering</a> generators.</li></ul><p>At last year's OOPSLA <a href="http://www.dsmforum.org/events/DSM08/">DSM workshop</a>, Heiko had an article about his <a href="http://www.dsmforum.org/events/DSM08/Papers/3-Kern.pdf">MetaEdit+ / Eclipse integration</a>. We had a good discussion about it, in particular about his reasons for building it. His paper gave the impression that he wanted to use oAW  rather than MetaEdit+'s own MERL generator language, because he needed some specific features in oAW. It turned out though that he hadn't actually used MERL, and didn't realise that MERL and oAW's XPand are actually very similar in terms of approach and functionality. </p>

<p>MERL tends to be a little more succint: here is the MERL generator to output simple Java classes for a UML Class Diagram, as in Heiko's example:</p>

<style type="text/css">

.fixedtext { background-color: #F0F0F0; color:#800000 }

.metamodel { color: #006000}

.variable { color: #6699FF }

</style>

<pre>subreport '_translators' run



foreach <span class="metamodel">.Class [UML]</span>

{  filename id '.java' write

      '<span class="fixedtext">public class </span>' id '<span class="fixedtext"> {</span>' <span class="variable">$cr2</span>



      do <span class="metamodel">:Attributes</span>

      {  '<span class="fixedtext">   </span>' <span class="metamodel">:Visibility</span> '<span class="fixedtext"> </span>' <span class="metamodel">:Data type;</span> '<span class="fixedtext"> </span>' <span class="metamodel">:Name</span> '<span class="fixedtext">;</span>' <span class="variable">$cr2</span>



         '<span class="fixedtext">   public void set</span>' <span class="metamodel">:Name</span>%firstUpper '<span class="fixedtext">(</span>' <span class="metamodel">:Data type;</span> '<span class="fixedtext"> </span>' <span class="metamodel">:Name</span> '<span class="fixedtext">) {</span>' <span class="variable">$cr</span>

         '<span class="fixedtext">      this.</span>' <span class="metamodel">:Name</span> '<span class="fixedtext"> = </span>' <span class="metamodel">:Name</span> '<span class="fixedtext">;</span>' <span class="variable">$cr</span>

         '<span class="fixedtext">   }</span>' <span class="variable">$cr2</span>



         '<span class="fixedtext">   public </span>' <span class="metamodel">:Data type;</span> '<span class="fixedtext"> get</span>' <span class="metamodel">:Name</span>%firstUpper '<span class="fixedtext">() {</span>' <span class="variable">$cr</span>

         '<span class="fixedtext">      return this.</span>' <span class="metamodel">:Name</span> '<span class="fixedtext">;</span>' <span class="variable">$cr</span>

         '<span class="fixedtext">   }</span>' <span class="variable">$cr2</span>

      }

      '<span class="fixedtext">}</span>'

   close 

}

</pre>

<p>Heiko's oAW XPand code is 65% longer. Even ignoring the extra loop over all Class Diagrams that Heiko needs (MetaEdit+ offers that automatically in the UI or via the forAll:run: command-line parameter), oAW is still over 20% longer. The actual difference isn't that important: I'm sure both could be made shorter for this example, but the current code is typical of what is generally written. My point is that there's no real saving to be had by using XPand instead of MERL. If your models are in MetaEdit+, use MERL; if they're in Eclipse, use oAW. Having integration is great, but if you can avoid using it then that's even better. </p>

</div>]]></description>
			<guid isPermaLink="false">3428923761</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3428923761</wfw:comment>
		</item>
		<item>
			<title>Oslo Quadrant reviews</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3422287032</link>
			<category>DSM-tech</category>
			<pubDate>Fri, 12 Jun 2009 19:17:12 +0300</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>The May 26th CTP of Oslo includes the first public version of Quadrant, Microsoft's visual model editor. I've had my head down on other topics, so haven't had a chance to play with it yet, but here are some reviews from others.</p>
<p>Charles Young, <a href="http://geekswithblogs.net/cyoung/archive/2009/05/27/132452.aspx">Initial experiments</a></p><blockquote>Microsoft is publically committed to providing strong UML and XMI support in 'Oslo' and this is our first glimpse of what they intend. ... My initial experiments with LoadUML suggest that the tool is not yet fully functional. For example, it fell over the use of the xmi:type attribute on the uml:Model element. It failed to handle a type element of an ownedAttribute, and it didn't recognise the packageImport element. The error messages were not always very helpful and the tool is slow...</blockquote><blockquote>Initial experiments with LoadAssembly went a little more smoothly. Again, the tool is very slow, and can take several minutes to complete imports...</blockquote><blockquote>This early version of Quadrant has big problems with big models. It could, in some cases, take several minutes of 100% CPU usage to display the contents of a folder. Memory usage can also grow to monumental proportions...</blockquote><blockquote>All in all, don&rsquo;t expect Quadrant or the new loaders to behave very well. This is very early preview code. </blockquote><p>Charles did manage to get an XMI file and .NET assembly imported after some messing around, so it wasn't all bad. But those speed and memory problems aren't going to go away just by optimising code: scalability is something that must be architected in from the start.</p><p> Frank Lillehagen, <a href="http://activeknowledgemodeling.com/2009/05/29/microsoft-oslo-quadrant-first-impressions/">Quadrant - First Impressions</a> (I had the pleasure of meeting <a href="http://activeknowledgemodeling.com/about/">Frank</a> in May 2001, when he was VP at Computas and responsible for the <a href="http://en.wikipedia.org/wiki/Metis_(software)">Metis</a> modeling tool - first released in 1991!)</p><blockquote>Quadrant's user interface is novel, uniform, and functional, but a bit cumbersome, and as an early preview it exposes a lot of the underlying wiring, nuts and bolts. Some functionality is well supported, such as customizing views and interacting with large models in multiple workpads. On the other hand, services for e.g. relationship modeling are poor. ... Visualization is the focus, more than modeling.</blockquote><blockquote>The layout of diagrams is partially automated, however when you close and reopen a diagram, it will revert to an automatic layout, not keeping the location changes you made manually the last time. </blockquote><blockquote>The support for key visual modeling concepts like relationships is not native, and limited. Quadrant does not recognize many-to-many relationships from entities, leading to diagrams ... where [half] the shapes are really relationships that ... should be shown as links. </blockquote><p>From the pictures Frank posted, the existing models in Oslo break many principles of good modeling design. Having automatic layout that loses your manual layout changes pretty much rules out the chance of getting to know your way around your models, for any diagram more complex than a simple tree. And having no n-ary relationships is going to mean unwelcome hacking for both metamodelers and modelers: many relationships are binary, but certainly not all.</p><p>I'll continue to follow the progress of Quadrant with interest, but there seems little point getting my hands dirty with it yet. It's a shame that it seems to be back to square one for modeling at Microsoft - this is like the early versions of DSL Tools, and you'd think they'd have moved on in the 5 years since we first saw that. When we did a complete rewrite of MetaEdit (released 1993) to get the first version of MetaEdit+ (1995), there was rather a lot more that worked, and the scalability was already in place. The UI wasn't pretty, so we'll give Quadrant the thumbs up on that score, but the real worth of an application like this lies between the UI and the database. If Quadrant only works for binary relationships, autolayout, and small models, there's some major rework needed before it becomes a serious contender. Let's hope their bosses give them chance to do it!</p></div>]]></description>
			<guid isPermaLink="false">3422287032</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3422287032</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3422287032</includedComments:puid>
					<includedComments:author>Håvard Jørgensen</includedComments:author>
					<includedComments:pubDate>2009-06-13T14:39:54+03:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Good of you to refer to our blog (though you got the author wrong). I've made a minor revision in one of the sections you quote, based on &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/oslo/thread/8e99b707-552a-4cc6-8f6b-c5722761f623"&gt;a closer examination of the mechanisms for tailoring views&lt;/a&gt;. No surprising, there is more under the hood than Microsoft has documented publicly so far.&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>An update on relationships and view customisation</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3422287032</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3422287032</includedComments:puid>
					<includedComments:author>Steven Kelly</includedComments:author>
					<includedComments:pubDate>2009-06-14T11:57:00+03:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Sorry to have got the wrong&amp;nbsp;author,&amp;nbsp;H&amp;aring;vard: I knew the two of you wrote for that blog, but thought Frank was responsible for this entry - I'd read another entry of his and mixed the two up in my head.&lt;/p&gt;
&lt;p&gt;The question of where to store information about what is graphically or semantically a relationship and what is an object is an interesting one. For Oslo and Quadrant, where the idea seems to be more the ability to visualize data in many ways, it maybe makes sense to store this as "hints" outside the original (abstract) metamodel. However, if the intention is to make a graphical modeling tool, in particular for DSM, where each abstract metamodel will only have one concrete syntax, then this extra indirection just makes life hard for the metamodeler. That's one of the main problems with EMF + GMF, and why they need five different tools to cobble together a basic graphical editor.&lt;/p&gt;
&lt;p&gt;MetaEdit+ was built to support polymorphism of metatypes: an object type in one metamodel could be a relationship type in another metamodel. In practice nobody used this - NIAM is about the only language for which it is the natural implementation - so we removed that possibility, making the tool easier to understand and use. We've found that having n-ary relationships, letting objects and relationships directly reference each other via properties, and allowing a relationship to have a subgraph, is easily sufficiently powerful. After all, the results have to be understandable not just to metametamodelers, but metamodelers and their modelers too!&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Thanks for the update</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3422287032</wfw:comment>
		</item>
		<item>
			<title>The Model Repository (was: The CASE Repository)</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3414676783</link>
			<category>DSM-tech</category>
			<pubDate>Mon, 16 Mar 2009 17:19:43 +0200</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>At last year's <a href="http://www.dsmforum.org/events/DSM08/">OOPSLA Workshop on Domain-Specific Modeling</a> I had the pleasure and privilege of giving the <a href="http://www.dsmforum.org/events/DSM08/keynote.html">keynote</a>. One nice thing about keynotes is that you are given more freedom than for normal talks. I decided to take that to its limit by giving as my keynote a paper that was written 20 years earlier. As far as I could tell, nobody noticed :-). Actually, not wanting the audience to feel they had been fooled, I came clean near the start of the talk. All the same, the message in the talk was news to the lion's share of the audience.</p>
<p>In 1988 <a href="http://www.ceprin.org/index.php?page=richard-welke">Dr. Richard J. Welke</a>, with 26 years of computing experience and two CASE tool companies behind him, wrote a white paper on how model data should be structured, stored and manipulated -- irrespective of the modeling language. In a series of four tiny example model fragments he shows the problems we get into if we try to to represent models using just binary or Entity-Relationship-Attribute concepts, or to store models using just files or relational databases.</p><p>With today's users of Microsoft or Eclipse modeling tools only just finding out these problems through their own painful experience, now seemed a good time to revisit that paper. Prof. Welke has kindly allowed me to make it available here: <a href="http://www.dsmforum.org/papers/CASE_Repository.html">The CASE Repository: More than another database application</a>. </p><p>The sad truth is that for my keynote, the starting position was worse than for this article 20 years ago. Back then, people knew that storing models in files didn't work, and most were trying to store them in relational databases. They knew that by default, things just existed on their own, and had association links to other things, either directed or undirected. Nowadays, people are trying to store model data in files again, and worse in XML files -- with the in-built assumption that the world can be shoehorned into a tree structure, a hierarchy of strong containment aggregation. </p><p>Another difference between then and now is version control: back then it was obvious from databases that you couldn't talk about versions of individual pieces of data or tables, only of the whole set of inter-related data. The loss of fine granularity of versioning was a small price to pay for the gain in being able to support multiple simultaneous users working in the same set of data. Now, version control's &quot;check out, edit, merge&quot; has become the de facto poor man's multi-user capability -- so much so that few realise there could even be an alternative. </p><p>So, the only things I had to add to my keynote on top of the original paper were actually steps backward, hence the two titles: &quot;<a href="http://www.dsmforum.org/events/DSM08/keynote.html">The Model Repository: More than just XML under version control</a>&quot;, or: &quot;Domain-Specific Modeling: 20 years of progress?&quot;. Of course there has been progress, at least in the tools like MetaEdit+ or GME that have been around for a decade or more. For the others, all I can do is refer them to Welke's paper, and to the quote from the start of the tools chapter in our <a href="http://dsmbook.com/">book on DSM</a> :-)</p><blockquote>&quot;Those who cannot remember the past are condemned to repeat it.&quot; <br/><i>- George Santayana, The Life of Reason (1905)</i></blockquote></div>]]></description>
			<guid isPermaLink="false">3414676783</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3414676783</wfw:comment>
		</item>
		<item>
			<title>MetaEdit  and oAW recommended by Peter Bell</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3409216103</link>
			<category>DSM-tech</category>
			<pubDate>Mon, 12 Jan 2009 12:28:23 +0200</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>It was a nice start to my New Year to see kind words about us in <a href="http://www.pbell.com/">Peter Bell</a>'s blog. You might have had the pleasure of meeting Peter at OOPSLA or Code Generation, but what you may not know is what a <a href="http://www.bennadel.com/coldfusion/people/6-Peter-Bell.htm">&quot;rock star&quot; guru</a> he is in the ColdFusion community. In our terms, <a href="http://en.wikipedia.org/wiki/ColdFusion">ColdFusion</a> is a DSL solution for dynamic web sites -- like Ruby on Rails, but since 1995. Peter is thus well acquainted with the issues of DSL evolution: in ColdFusion, and in his own DSLs around it. And, as anyone who has met him will attest, he's also a truly great guy to be with: rare in someone with that level of technical skill. (And I so wish I'd said this about him earlier, before having to blog about him saying nice things about us!) </p>
<p><a href="http://www.pbell.com/index.cfm/2009/1/8/Domain-Specific-Modeling--Key-Vendors-and-last-nights-deck">Domain Specific Modeling: Key Vendors</a></p><blockquote>&quot;I'd strongly recommend anyone interested in DSM check out <a href="http://www.metacase.com/products.html">MetaEdit+</a> and <a href="http://www.openarchitectureware.org/">openArchitectureWare</a>. </blockquote><blockquote>The commercial (but affordable) <a href="http://www.metacase.com/products.html">MetaEdit+</a> is still for me the reference implementation for DSM tools and has solved problems such as being able to load old models after upgrading the metamodel that most other vendors haven't come to grips with yet. It doesn't work for every use case, but if it works for you it is a very mature offering and the team has a great deal of technical experience. If nothing else, check it out just to know the questions to ask any other vendor you may be considering! </blockquote><blockquote><a href="http://www.openarchitectureware.org/">openArchitectureWare</a> is an open source set of tools for developing DSM solutions within Eclipse. It has really matured recently with better tooling for easily generating plug-ins for textual DSLs based on a meta-model and constraints and it also has good tooling for visual modeling. It isn't as polished or seamless as MetaEdit+ but with the team behind it, it is again one of the products you have to consider if you're going to be doing any DSM and if you use Eclipse it's probably a really strong contender.&quot;</blockquote>
<p>openArchitectureWare (oAW to its friends) is a set of little languages for manipulating models: model checking (Check), transformation of models to text (Xpand), models to models (Xtend), and text to models (Xtext). It's most commonly used on Eclipse EMF models, but can work on other models too. The fascinating thing for me is the <a href="http://openarchitectureware.org/pub/documentation/4.3.1/html/contents/core_reference.html#xpand_reference_introduction">Xpand</a> language. It's remarkably similar to our <a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3.html">MERL</a>, even though there is no shared history: neither party knew about the other until much later on. </p><p>MERL and Xpand are both true DSLs for the task of turning models into code or other text. That makes them IMHO much easier to use for creating and maintaining your generators, compared with more simplistic templating languages like JET or T4. It also means that once you have learned to use one, switching to the other is largely just  changing the keywords and punctuation.</p></div>]]></description>
			<guid isPermaLink="false">3409216103</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3409216103</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3409216103</includedComments:puid>
					<includedComments:author>Peter Bell</includedComments:author>
					<includedComments:pubDate>2009-01-15T16:37:31+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Hi Steve,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Well thanks for the kind words. I can't believe you dug up that "rock star" page - had no idea it was out there. Clearly I'm going to have to give Ben a hard time about that :-)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Thanks!</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3409216103</wfw:comment>
		</item>
		<item>
			<title>DSL Tools Lab shows pain of constraints in C#</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3403962406</link>
			<category>DSM-tech</category>
			<pubDate>Wed, 12 Nov 2008 17:06:46 +0200</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml"> 

<p> Microsoft have a new 

<a href="http://code.msdn.microsoft.com/DSLToolsLab"> DSL Tools

Lab</a> for beginners to learn how to use DSL Tools in one day. Full

marks to Jean-Marc Prieur for starting off by explaining that

modeling languages should be based on the problem domain, not the

solution domain:</p> 

<blockquote> [Y]ou want to create a vertical language that is

suitable for your business, and from the models that the language

manipulates, generate the code for your business Framework.

Nevertheless, because it is difficult to ensure that everyone who

takes this training knows the professional tasks that are addressed

by the targeted business Framework, we will settle for a horizontal

(that is, technical) DSL.</blockquote> 

<p> The example language is thus a simple state machine (why is it always a state machine?!). The part that interested me is <a href="http://code.msdn.microsoft.com/DSLToolsLab/Release/ProjectReleases.aspx?ReleaseId=1698"> 

Part 3, Validation and coherence of the model</a>. Let's look first

at how to display the label for a transition. A transition

specifies an Event that causes it, a guard Condition that must be

true for it to be followed, and an Action that is taken when it is

followed. All of these are written in the example as C# code

snippets (tut tut :->). They want to display them as one single

label, formatted as "Event [Condition] / Action".</p> 

<p> Here's how to do it in DSL Tools: four pages of dense (8 pt font!) instructions and code, total 242 lines:</p> 

<p> 

<img alt="Formatting a transition label the DSL Tools way" src="http://www.metacase.com/blogs/stevek/images/DSLLabTransitionLabel.png"/> 

 

</p> 

<p> And here's how to do it in 

<a href="http://www.metacase.com/products.html">MetaEdit+</a>:

three lines of 

<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3.html">

MERL</a> in the transition symbol's label:</p> 

<blockquote> 

<tt> 

<font color="darkgreen"> :Event</font> 

<br/>  if 

<font color="darkgreen"> :Condition</font> then 

<font color="darkred"> ' ['</font> 

<font color="darkgreen"> :Condition</font> ']' endif 

<br/>  if 

<font color="darkgreen"> :Action</font> then 

<font color="darkred"> ' / '</font> 

<font color="darkgreen"> :Action</font> endif</tt> 

</blockquote> 

<p> About 10-15% of the DSL Tools solution is taken up by what I'd say is a really bad idea: storing the calculated label as a property in the transition alongside the Event, Condition and Action -- effectively duplicating that information. This also means they need to be able to parse the syntax of the label if it is edited, to update the other three properties.</p> 

<p> Next, let's look at how to ensure there is only one Initial

State. First, the DSL Tools way: just into the 4th page of 8pt

instructions and code, total 200 lines:</p> 

<p> 

<img alt="Ensuring only one Initial State the DSL Tools way" src="http://www.metacase.com/blogs/stevek/images/DSLLabInitialState.png"/> 

 

</p> 

<p> And here's how to do it in MetaEdit+: a simple 

<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-2_5_6.html#Heading409">Occurrence Constraint</a> for Initial State in graphs of type State

Diagram:</p> 

<blockquote> 

<strong>Initial State</strong> may occur at most 

<strong>1</strong> time</blockquote> 

<p> The lab goes on to mention several other possible constraints and checks, but doesn't show you how to implement them (presumably since the intention is to finish it in one day). Here they are, along with how to implement them in MetaEdit+ -- I just tried, and it took just over a minute to do all five:</p> 

<ul xmlns="http://www.w3.org/1999/xhtml"> 

<li> Final States should not have an exit transition 

<blockquote> Normally this would just be in the Binding for

Transition, which specifies for each role (end) of the relationship

which objects it may connect to: Exit (State | Initial State),

Enter (State | Final State).</blockquote> 

<blockquote> Another way would be a connectivity constraint: 

<b> Final State</b> may be in at most 

<b> 0</b> roles of type 

<b> Exit</b> </blockquote> </li> 

<li> Entry and Exit actions of the States must have non-blank code 

<blockquote> The 

<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-2_6.html#Heading447"> 

Value Regex</a> for the code property in the Actions would be <tt>.+</tt></blockquote> 

<blockquote> Actually, I think this is an unnecessary requirement: many states have no entry or exit action.</blockquote></li>

<li> Names of States must not be blank 

<blockquote> The same Value Regex as above.</blockquote> </li> 

<li> Names of States must be valid C# identifiers 

<blockquote> Change the Value Regex to something like <tt> [a-zA-Z_][a-zA-Z0-9_]*</tt></blockquote> 

<blockquote> Again, I think this is a poor requirement: much better

is to allow modelers to type whatever seems sensible, and then turn

it into a valid identifier when outputting. In MERL you can use 

<a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3_6.html#_Ref190594241"> 

translators</a> to do this, e.g. 

<tt> :Name%var</tt>. Using %var translates the :Name property's non-identifier characters into underscores; you can create your own similar translators, e.g. "%upper a-z A-Z" translates lowercase characters to uppercase.</blockquote> </li> 

<li> Names of States must be unique in a State Diagram

<blockquote> A <a href="http://www.metacase.com/support/45/manuals/mwb/Mw-2_5_6.html#Heading409">Uniqueness Constraint</a> for State Diagrams: Property

"Name" in State must have unique values</blockquote> 

<blockquote> Note that this is per diagram: if you want States to have unique names in the whole repository, you can mark the Name property in State as unique.</blockquote> </li> 

</ul> 

<p>Hopefully this gives some idea of how easy it is to add constraints and checks in MetaEdit+. With experience from making hundreds of modeling languages over the last 15 years, we have a pretty good idea of what kinds of constraints you actually need. That allows us to offer you simple ways to define them, without having to resort to hundreds of lines of hand coding for each. And there's no "customization cliff": if you have something we haven't thought of, you can just write it in <a href="http://www.metacase.com/support/45/manuals/mwb/Mw-5_3.html">MERL</a>, or in whatever language you want via the <a href="http://www.metacase.com/support/45/manuals/mwb/Mw-8.html">API</a>.</p>

</div>]]></description>
			<guid isPermaLink="false">3403962406</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3403962406</wfw:comment>
		</item>
		<item>
			<title>Oslo roundup</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</link>
			<category>DSM-tech</category>
			<pubDate>Wed, 29 Oct 2008 20:10:06 +0200</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml"> 
<p>Overall, it looks like Oslo is primarily just a way to provide configuration information for Microsoft applications. If you want to model and generate Java, or something running on Linux, or a standalone Windows program, or embedded software, it's not for you. If you're building in-house IT applications in the Microsoft stack, it could be useful at some point in the future.</p><p>From <a href="http://blog.avanadeadvisor.com/blogs/aalialikoski/archive/2008/10/29/12065.aspx"> 
Aali Alikoski</a> , who ran the DSM workshop at XP with me, knows
the DSL Tools well, and is at PDC:</p> 
<blockquote> &quot;Oslo&quot; initially seems like a disappointment for me. I
continue wondering what is the relationship between it and DSL
Tools. It seems that there is no relationship at all, which seems
odd since Oslo has many of the same features as DSL Tools (a couple
of years later), although in a more limited way in my opinion. It
looks from outside like Don Box et al haven't synched their
thoughts with Jack Greenfield, which they should have
done.</blockquote> 
<p> Paraphrased from 
<a href="http://martinfowler.com/bliki/Oslo.html"> Martin
Fowler</a> , who got a pre-PDC showing of Oslo from Don Box et al., based on further input from <a href="http://samgentile.com/blogs/samgentile/">Sam Gentile</a> and what I can glean from playing around for an hour with the SDK:</p> 
<blockquote> Oslo has three main components:
<ul xmlns="http://www.w3.org/1999/xhtml"> 
<li> a language (M) for  textual DSLs, with three sub-languages:<ul> 
<li> MGrammar: defines grammars for Syntax Directed Translation.[think BNF]</li> 
<li> MSchema: defines schemas for a Semantic Model [think C structs]</li> 
<li> MGraph: is a textual data format for representing instances of a Semantic Model [think JSON]</li> 
</ul> </li> 
<li> a design surface (Quadrant) for graphical DSLs</li> 
<li> the &quot;Oslo&quot; repository that stores semantic models in a relational database</li> 
</ul> You could define a semantic model with MSchema. You could then populate it (in an ugly way) with MGraph. A better way to populate it would be to build a decent DSL using MGrammar, and pass the result to the general parser mechanism that Oslo provides, along with some input in that DSL.The parser gives you a syntax tree, but that's often not the same as a semantic model. So usually you'll <strong>write code</strong> to walk the tree and populate a semantic model defined with MSchema. Once you've done this you can easily take that model and store it in the repository. </blockquote>
<p>For me, that &quot;<strong>write code</strong>&quot; is the worst part. If Martin's right, that means that there is no good way to just specify your DSL syntax with your schema, and have statements in that DSL saved to the repository. That seems a step back from what I'm used to in other tools like XText or MPS.</p> 
</div>]]></description>
			<guid isPermaLink="false">3402763806</guid>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Alex</includedComments:author>
					<includedComments:pubDate>2008-10-30T20:32:04+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;&amp;gt; If Martin's right, that means that there is no good way to just specify
your DSL syntax with your schema, and have statements in that DSL saved
to the repository.&lt;/p&gt;
&lt;p&gt;This does not appear to be the case. From the same write-up by Martin Fowler:&lt;/p&gt;
&lt;p&gt;"&lt;strong&gt;The default way a grammar is run is to do tree construction. As it
turns out the tree construction is the behavior of the default class
that gets called by the grammar while it's processing some input.&lt;/strong&gt; This
class has an interface and you can write your own class that
implements this. This would allow you to do embedded translation and
embedded interpretation. It's not the same as code actions, as the
action code isn't in the grammar, but in this other class. I reckon
this could well be better since the code inside actions often swamp
grammars."&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>The default way a grammar is run is to do tree construction</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Steven Kelly</includedComments:author>
					<includedComments:pubDate>2008-10-30T22:16:43+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;But the default tree produced by parsing the input according to the MGrammar isn't the semantic model. To get the semantic model, you&amp;nbsp;need to write code: your own class to walk the tree and output the semantic model.&amp;nbsp;XText lets you just specify the syntax, and creates the semantic model automatically. An &lt;a href="http://www.eclipse.org/gmt/oaw/download/notes43.html"&gt;experimental feature&lt;/a&gt; allows you to link up to an existing semantic model if you have one, but that's optional.&lt;/p&gt;&lt;p&gt;M's freedom of writing code to define a custom mapping from tree to model is nice, but not at the expense of having to do it even for simple cases. And even the simplest cases can't be handled in the MGrammar actions.&amp;nbsp;For instance, in the music example grammar, I wanted to turn the notes into numerical values, and expected to be able to do something like this:&lt;/p&gt;&lt;p&gt;token Note = &amp;quot;A&amp;quot;..&amp;quot;G&amp;quot;;&lt;br/&gt;token Octave = &amp;quot;0&amp;quot;..&amp;quot;4&amp;quot;;&lt;br/&gt;syntax FullNote = note:Note oct:Octave&amp;nbsp;=&amp;gt; &amp;quot;CDEFGAB&amp;quot;.IndexOf(note)&amp;nbsp;+ 12 * oct;&lt;/p&gt;&lt;p&gt;No luck: the action (the part after =&amp;gt;) can't use any code. The main problem though is that you have to write code at all, even for the simple cases.&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>@Alex</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Steven Kelly</includedComments:author>
					<includedComments:pubDate>2008-11-03T13:04:27+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Maybe the clearest I've seen so far:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.heise-online.co.uk/news/PDC-Microsoft-puts-modelling-into-concrete-terms-with-Oslo--/111842" target="_blank"&gt;PDC: Microsoft puts modelling into concrete terms with "Oslo"&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Another good overview of Oslo</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Sven Efftinge</includedComments:author>
					<includedComments:pubDate>2008-11-03T23:42:46+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;There are two very important thngs I havn't seen in MGrammar so far.&lt;/p&gt;
&lt;p&gt;1) Grammars seem to be one-way only (havn't seen any examples where they create textual syntax from models). You need this if you want to edit or view information from their repository in a textual manner. You'ld also need it if you want to be able to edit textual artifacts using graphical tools.&lt;/p&gt;
&lt;p&gt;2) Cross-linking. All examples just create trees. As they stated that M itself is written in M (which has cross links), there must be a way to implement them. I'm curious why they never show it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>two important things</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Alex</includedComments:author>
					<includedComments:pubDate>2008-11-04T22:45:56+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;1) This question was asked during PDC session 'Building Textual DSLs with the "Oslo" Modeling Language'; the answer was &lt;span&gt;Giovanni Della-Libera: &lt;/span&gt;"It's been the number one feature request at the conference. We are actively looking into this." Chris Anderson: "We've been all harrasing Gio about this feature ..."&lt;/p&gt;
&lt;p&gt;Video at http://channel9.msdn.com/pdc2008/TL31/, relevant question at 47:10. The whole Q&amp;amp;A session is quite informative.&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>@Sven Efftinge</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:guid>
					<includedComments:puid>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3402763806</includedComments:puid>
					<includedComments:author>Don Box</includedComments:author>
					<includedComments:pubDate>2008-11-08T05:38:25+02:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Lots of good discussion here.&amp;nbsp; Let me chime in with a few clarifications.&lt;/p&gt;
&lt;p&gt;The bits (and spec) we shipped last week have several annoying limitiations that we are addressing in the milestone we're about to enter. Specifically:&lt;/p&gt;
&lt;p&gt;1. An M module cannot contain both schema and language definitions. This is due to the fact that currently we have two toolchains (M/MX and MG/MGX). This will go away ASAP.&lt;/p&gt;
&lt;p&gt;2. The right-hand-sides of grammar productions support a VERY limited set of operators.&amp;nbsp; We're want to allow more or less arbitrary M expressions, including the ability to schematize the right-hand-sides.&lt;/p&gt;
&lt;p&gt;The second point will provide a lot of power for forming arbitrary structured data as the output of the parse. Assuming we go all the way with point #2, that includes calling arbitrary M funcitons (remember, M Schema includes pretty rich functional expressions and queries including named/parameterized functions).&amp;nbsp;&amp;nbsp; As to whether that means your grammar can produce a "semantic model" I'll plead "you tell me."&amp;nbsp; I'd love it if y'all could tell me the litmus tests you'd use so I could answer yeah or nay.&lt;/p&gt;
&lt;p&gt;Oh, and the current bits allow grammars to yield DAGs but full cyclic graphs won't happen until we go all the way and open up RHSs to all of M.&lt;/p&gt;
&lt;p&gt;And yes, the desire for a text output system is huge.&amp;nbsp; I feel dirty saying this, but if I had one, i'd get XML (poor man's at least) for free :-)&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>Some comments</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3402763806</wfw:comment>
		</item>
		<item>
			<title>Code generation performance comparison</title>
			<link>http://www.metacase.com/blogs/stevek/blogView?showComments=true&amp;entry=3385914921</link>
			<category>DSM-tech</category>
			<pubDate>Thu, 17 Apr 2008 19:55:21 +0300</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>I've just finished booking our trip to <a href="http://www.codegeneration.net/conference/">Code Generation</a> 2008, whose <a href="http://www.codegeneration.net/conference/programme.php">program</a> is now published. One talk I'm particularly looking forward to is <a href="http://www.codegeneration.net/conference/sessioninfo.php?session=selickey">Bran Selic's keynote</a> on how DSM can meet the highest standards of performance needed for generated code in Quality of Service constrained applications. Our experience too is that while generated code cannot outperform the best handwritten code (how could it?), with DSM and domain-specific generators it does outperform the <em>average</em> handwritten code, so the overall speed of the whole system is better.</p><p>Thinking back to Code Generation 2007 reminded me that the performance of the code generator itself can also be an issue. One company I talked to had a modeling tool generating code as part of a nightly build. The problem was, they kept running out of &quot;night&quot;. They were already up to a four processor machine dedicated to running the generation, and that wasn't able to finish the job overnight. What really surprised me was that they only had a few hundred diagrams. I've seen organizations with many gigabytes of models - orders of magnitude more than this case - managing just fine</p><p>An article in IEEE Software (<a href="http://doi.ieeecomputersociety.org/10.1109/MS.2007.135 ">Cuadrado &amp; Molina</a>, Sep-Oct 2007) examined the performance of the Eclipse MDD tools for code generation, comparing it with DSLs made with Ruby. They took the same UML model as a starting point, and followed the common Eclipse practice of a model-to-model transformation first to make a &quot;Java model&quot;, then a model-to-text transformation to make the .java code files. For the former they used ATL, and for the latter MOFScript; in Ruby there were two corresponding DSLs.</p><p>The model was very simple: 40 classes and 50 inheritance relationships, with each class defining around 6 attributes. The code generated was what you'd expect: a one-to-one mapping to .java files, with accessor methods for each attribute, giving a total of 2550 LOC.</p><p>Since I'm inherently incapable of resisting a competitive challenge, I imported the UML model from the Eclipse format into MetaEdit+, and made a code generator in MERL to output the same code. Here then are the results: times for Eclipse and Ruby are from the article, my MetaEdit+ time is on comparable hardware.</p>
<p><img alt="Time to generate Java code for a UML model: Eclipse 5.423s, Ruby 3.557s, MetaEdit+ 0.176s" src="http://www.metacase.com/blogs/stevek/images/generationSpeed.png"/></p>
<p>I guess the graph speaks for itself: MetaEdi+ is over 30 times faster than Eclipse, and over 20 times faster than Ruby. Even if we ignore all the reading and writing that Eclipse has to do, MetaEdit+ is still over 20 times faster. Since I imagine some people won't be too happy with those results, let's make some things clear: </p>
<ul>
<li>Having two phases, M2M then M2T, roughly doubles the times for Eclipse and Ruby. All the M2M phase really does is add a pair of accessor operations for each attribute, which in my opinion belongs in the code generation phase anyway. The MetaEdit+ generator is both faster and simpler than the combination of the ATL and MOFScript generators, and IMHO this would continue to be true even for much more complicated generators.</li>
<li>A modeler in MetaEdit+ can just run the generator, which is executed on his model and corresponding metamodel in memory. In Eclipse, he must first save the model (I'm assuming above the time for that is zero), then the generator must parse that XML file, and the corresponding metamodel. For M2M stages (Eclipse and MDA proponents often envisage many), the generator must also read the metamodel for the output format, and perhaps serialize the result into XML to write a temporary model for input to the next stage. I believe the MetaEdit+ approach is better suited to what developers actually need.</li><li>For a nightly build, or other occasions when the model is not already open in MetaEdit+, it would have to be read first. This adds 0.276ms, although that figure may be rather unfair to MetaEdit+. We are loading a full UML class with all its information, as opposed to just the class name and attribute names and types in the Eclipse XML file. If all the extra class and attribute information was filled in, MetaEdit+ would be hardly any slower, but the Eclipse and Ruby tools' time to parse the XML models would increase considerably.</li><li>I could include the time to import the Eclipse XML file into MetaEdit+, but that seems unfair: it's the native format for the Eclipse tools and the Ruby DSLs here, so MetaEdit+ too should start from its native format, as a modeler would. If the Eclipse guys build an importer that reads MetaEdit+ repositories, we can include and compare the times for &quot;import from other tool&quot;. For the record: reading the XML file took 5ms, executing the translation to MXM, which MetaEdit+ can import, took 146ms, and importing  the MXM file to the MetaEdit+ repository took 1.72s. Building the translator from XMI to MXM took a little under an hour, and used MERL's reverse engineering features, <a href="http://www.metacase.com/news/45sr1.html">new in 4.5 SR1</a>.</li></ul>
<p>Of course, the Eclipse tools will get faster -- as will MetaEdit+. I think the main difference is one of architecture, though, and internal data structures and algorithms. Changing some of those should be possible, but some -- like EMF -- will be hard to rip out of Eclipse modeling without breaking absolutely everything else. </p><p>It would be interesting to see the results for other tools like oAW or Microsoft's DSL Tools' T4. Any competitive natures in those teams? :-). Finally, many thanks are due to Jes&uacute;s Cuadrado, who provided me the models and generators used in his article, as well as the details of the environment from their tests, to make mine as comparable as possible.</p></div>]]></description>
			<guid isPermaLink="false">3385914921</guid>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.metacase.com/blogs/stevek/blogView/servlet/CommentAPIServlet?guid=3385914921</wfw:comment>
		</item>
	</channel>
</rss>
