<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>5ise &#187; Andreas Graf</title>
	<atom:link href="http://5ise.quanxinquanyi.de/author/andreas-graf/feed/" rel="self" type="application/rss+xml" />
	<link>http://5ise.quanxinquanyi.de</link>
	<description>Andreas Graf&#039;s Software Engineering Blog</description>
	<lastBuildDate>Fri, 13 Jan 2012 07:51:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Xtext End User / Domain Experts Cheat Sheet</title>
		<link>http://5ise.quanxinquanyi.de/2012/01/13/xtext-end-user-domain-experts-cheat-sheet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=xtext-end-user-domain-experts-cheat-sheet</link>
		<comments>http://5ise.quanxinquanyi.de/2012/01/13/xtext-end-user-domain-experts-cheat-sheet/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 07:51:23 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[PMT-Processes,Methods,Tools]]></category>
		<category><![CDATA[Xtext]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=747</guid>
		<description><![CDATA[The basic idea of domain specific languages is to provide domain experts with an easy to use language for their modeling needs. However, a domain specific language is always tied to a tool for editing the model. With Xtext, this &#8230; <a href="http://5ise.quanxinquanyi.de/2012/01/13/xtext-end-user-domain-experts-cheat-sheet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span>The basic idea of domain specific languages is to provide domain experts with an easy to use language for their modeling needs. However, a domain specific language is always tied to a tool for editing the model. With <span>Xtext</span>, this is obviously Eclipse. Eclipse provides some rich editing features, especially for navigating in models.</span></p>
<p>Most existing cheat sheets refer to the Java IDE of Eclipse, which you cannot give to domain experts because it contains elements not relevant to them (debugging) or have a slightly different meaning.</p>
<p><span>So here is an attempt of a small cheat sheet for <span>Xtext</span> end users (domain experts):</span></p>
<p>&nbsp;</p>
<h1>Editing</h1>
<table border="0" align="left">
<tbody>
<tr>
<td valign="top"><code>ALT-Left and ALT-Right</code></td>
<td valign="top"><code>Back / forward</code></td>
<td valign="top">Go back and forward in history of where you were in editors</td>
</tr>
<tr>
<td valign="top"><code><span>CTRL-<span>PgUp</span> and CTRL-<span>PgDown</span></span></code></td>
<td valign="top">Cycle tabs</td>
<td valign="top"> Cycle through tabs of open editors</td>
</tr>
<tr>
<td valign="top"><code>CTRL-Up and CTRL-Down</code></td>
<td valign="top">Scroll</td>
<td valign="top"> Scroll line up and down</td>
</tr>
<tr>
<td valign="top"><code>CTRL-M</code></td>
<td valign="top">Maximize</td>
<td valign="top"> Maximize / Restore current editor window</td>
</tr>
<tr>
<td valign="top"><code>CTRL-W</code></td>
<td valign="top">Close</td>
<td valign="top">Close Current Editor</td>
</tr>
<tr>
<td valign="top"><code>CTRL-D</code></td>
<td valign="top">Delete Line</td>
<td valign="top">Delete Current Line</td>
</tr>
<tr>
<td valign="top"><code>CTRL-/</code></td>
<td valign="top">Toggle Comment</td>
<td valign="top">Toggle Comment for line / selection</td>
</tr>
<tr>
<td valign="top"><code>CTRL+SHIFT-F</code></td>
<td valign="top">Format</td>
<td valign="top">Auto format</td>
</tr>
<tr>
<td valign="top"><code>ALT-UP / ALT-Down</code></td>
<td valign="top">Move</td>
<td valign="top">Move current line / selection one line up / down</td>
</tr>
<tr>
<td valign="top"><code>CTRL-Q</code></td>
<td valign="top">Last Edit</td>
<td valign="top"><span>Go to last edit location</span></td>
</tr>
<tr>
<td valign="top"><code>CTRL-L</code></td>
<td valign="top"><span><span>Goto</span></span></td>
<td valign="top"><span>Go to line</span></td>
</tr>
</tbody>
</table>
<h1>Model Editing</h1>
<table border="0" align="left">
<tbody>
<tr>
<td valign="top"><code><span><span>Ctrl</span>-Shift-G</span></code></td>
<td valign="top">Find References</td>
<td valign="top">Find all elements that refer to the current element</td>
</tr>
<tr>
<td valign="top"><code>F3</code><span> or CTRL-<span>MouseClick</span></span></td>
<td valign="top">Follow Link</td>
<td valign="top">Follow reference under cursor</td>
</tr>
<tr>
<td valign="top"><code><span><span>Ctrl</span>-O</span></code></td>
<td valign="top">Pop up Outline</td>
<td valign="top">Pops up an outline for easy navigation / filtering</td>
</tr>
<tr>
<td valign="top"><code>CTRL-1</code></td>
<td valign="top">Quick Fix</td>
<td valign="top">Quick Fix of Errors (where provided by DSL designer)</td>
</tr>
<tr>
<td valign="top"><code>CTRL-SPACE</code></td>
<td valign="top">Content Assist</td>
<td valign="top">Get suggestions of possible values</td>
</tr>
<tr>
<td valign="top"><code>ALT-SHIFT-R</code></td>
<td valign="top">Rename</td>
<td valign="top">Rename current element (will rename other occurrences as well.</td>
</tr>
<tr>
<td valign="top"><code>CTRL-SHIFT-F3</code></td>
<td valign="top">Open Model element</td>
<td valign="top">Locate a model element in your workspace (only exported elements are listed)</td>
</tr>
<tr>
<td valign="top"><code>ALT-SHIFT-Up / Down</code></td>
<td valign="top">Expand selection</td>
<td valign="top">Expand selection to containing element</td>
</tr>
</tbody>
</table>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2012/01/13/xtext-end-user-domain-experts-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xtext Global and Local Scoping &#8211; overview</title>
		<link>http://5ise.quanxinquanyi.de/2012/01/05/xtext-global-and-local-scoping-overview/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=xtext-global-and-local-scoping-overview</link>
		<comments>http://5ise.quanxinquanyi.de/2012/01/05/xtext-global-and-local-scoping-overview/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 14:50:21 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MDSD]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=732</guid>
		<description><![CDATA[Just recently I posted a small article with an overview on the Xtext scoping architecture. One of the things that took me a while to understand is the difference of global and local scoping. Several people I discussed this had &#8230; <a href="http://5ise.quanxinquanyi.de/2012/01/05/xtext-global-and-local-scoping-overview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just recently I posted a <a title="My mental Xtext high-level model" href="http://5ise.quanxinquanyi.de/2012/01/04/my-mental-xtext-high-level-model/">small article with an overview on the Xtext scoping architecture</a>. One of the things that took me a while to understand is the difference of global and local scoping. Several people I discussed this had their own ways to explain these. Here is my current way of explaining some types of scoping in Xtext.</p>
<p>Assume that we have a language that supports defining classes, much like in UML: A class can have a name, attributes and it can inherit from another class. And we want to support models that consist of several Xtext files.</p>
<p>Suppose we have the following two files:</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h01_06.png"><img class="alignright size-full wp-image-735" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h01_06.png" alt="" width="177" height="69" /></a><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h01_00.png"><img class="alignright size-full wp-image-734" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h01_00.png" alt="" width="185" height="66" /></a></p>
<p>A simple definition of two classes, with B inheriting from A. So, obviously we are having a reference from B to A (inheritance). In the grammar that could look like</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Class: 'class' name=ID ('inherits' general=[Class|FQN])?</pre></div></div>

<p>and Xtext supports us by providing all the automatic linking when it sees &#8220;inherits&#8221;. But how does it know what to link? If all our models were restricted to be contained in one single file / resource, it would be easy: Just get the current resource and traverse all the contained model elements to find one that matches &#8220;A&#8221; and set up the link.</p>
<h1>Global Scoping</h1>
<p>But now, with models split over several files, what do we have to do:</p>
<ol>
<li>First, find all the model files candidates that could be relevant for our search</li>
<li>Define a strategy to decide if a model file is really considered for traversal</li>
<li>Traverse the model file and find all the candidates that could match our reference to &#8220;A&#8221;</li>
</ol>
<p>We wouldn&#8217;t want to to this manually. Luckily, Xtext does it for you &#8211; actually, it does it a little different, since the approach above would be inefficient &#8211; traversing all the model files for each reference would be slow.</p>
<p>So, every time a file changes, Xtext collects the objects and the names that they are known by and puts this information into the index. So instead of traversing all models in all candidate files, Xtext just has to have a look if there is a matching entry in the index. Assuming that the classes above would be contained in a package called &#8220;P&#8221;. The index could contain:</p>
<table>
<tbody>
<tr>
<th>name</th>
<th>Object</th>
</tr>
<tr>
<td>P</td>
<td>Package &#8220;P&#8221;</td>
</tr>
<tr>
<td>P.A</td>
<td>Class A</td>
</tr>
<tr>
<td>P.A.a</td>
<td>Attribute b</td>
</tr>
<tr>
<td>P.B</td>
<td>Class B</td>
</tr>
<tr>
<td>P.B.b</td>
<td>Attribute b</td>
</tr>
</tbody>
</table>
<p>But would we want to see all the possible candidate elements in our reference (types are automatically checked). In most cases no. So Xtext provides several mechanisms to &#8220;restrict&#8221; the search. Please the the Xtext documentation for details:</p>
<ul>
<li>URI imports: You can have import statements, that actually reference the full URIs of the other files to be considered.</li>
<li>Namespace import: You can define a namespace import. If you than provide something like &#8220;import P.*&#8221; in your grammar, the search will be restricted to those elements whose fully qualified name starts with &#8220;P.&#8221;</li>
<li>Java class path based</li>
</ul>
<p>There is additional ways to tweak and modify Xtext behavior and there is more data stored in the index (references) etc. But I hope this gives you the general idea. However, the story is not finished.</p>
<h2> Local Scoping</h2>
<p>Now suppose we want to have a second grammar, where we define instances of the classes and values for their attributes, just like this:</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h26_43.png"><img class="alignright size-full wp-image-742" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-05-15h26_43.png" alt="" width="141" height="168" /></a>Since the classes are in a separate file, it is obvious that the link from the instance to its defining class is done in the way described above. But also the attributes values are linked to the attribute definition in the class model, so how is this done?</p>
<p>Obviously, we could also just use the index. But we have to restrict the possible references as well, since in instance &#8220;a&#8221;, a reference to attribute &#8220;b&#8221; would not be valid. So what we could do is to get the list of possible references from the index, traverse the class hierarchy and filter out all attributes that are not valid.</p>
<p>But, for finding all valid attributes, we are traversing all attributes in the class hierarchy anyway. So why not forget about the index, and just build up the list of possible references while we traverse the model? This is done by local scoping, which you can easily customize to modify the list of reference candidates. See the Xtext documentation on how to do that.</p>
<p>So, then why do we need the attributes in the index? Simple, we don&#8217;t. The list of possible attribute values is calculated by us, so we don&#8217;t need them there. For our own Xtext grammars, we can override the strategy of what is put into the index and what not. So we decide to not put attributes in the index. Xtext per default cannot know what you want to put in the index, so it puts in everything from your model that has a &#8220;name&#8221; attribute. It might be worthwhile customizing this behavior, since it could save us a lot of CPU and memory.</p>
<h1> Summary</h1>
<p>For me, it is useful to divide scoping in two different aspects:</p>
<ol>
<li>I can find out the possible candidates of a link by traversing references in my model. The traversal can easily span multiple resources/files, as long as the traversal can be done by standard EMF means.</li>
<li>To find the possible candidates, I would have to think about a strategy on which model files to load etc. I cannot access these candidates by traversing the references that I already have, because I might not even reach those models &#8211;&gt; <strong>global scoping</strong>.</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2012/01/05/xtext-global-and-local-scoping-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My mental Xtext high-level model</title>
		<link>http://5ise.quanxinquanyi.de/2012/01/04/my-mental-xtext-high-level-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-mental-xtext-high-level-model</link>
		<comments>http://5ise.quanxinquanyi.de/2012/01/04/my-mental-xtext-high-level-model/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 15:43:52 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MDSD]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=728</guid>
		<description><![CDATA[While Xtext is a powerful tool, it is sometimes easy to loose the big picture of the linking, scoping, global scope etc. For my own mental relief, I have made a little diagram, which might be useful for others (no &#8230; <a href="http://5ise.quanxinquanyi.de/2012/01/04/my-mental-xtext-high-level-model/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While Xtext is a powerful tool, it is sometimes easy to loose the big picture of the linking, scoping, global scope etc. For my own mental relief, I have made a little diagram, which might be useful for others (no guarantee for correctness or level of detail). It applies only to a specific configuration (using Xbase and Imported Namespace Aware Scoping).</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-04-16h27_53.png"><img class="alignright  wp-image-729" style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2012/01/2012-01-04-16h27_53.png" alt="" width="1024" height="779" /></a></p>
<p>&nbsp;</p>
<p>So basically what happens is:</p>
<ol>
<li><strong>Parsing</strong>: The framework parses the model files (Xtext-files). Links between elements are not resolved yet.</li>
<li><strong>Index Building</strong>: The model is traversed, and basically everything reachable that has a name attribute is packed into an EObjectDescription and that is put into an index. What is put there can be customized. <strong>Caveat</strong>: EObjectDescription allows you to have some user data stored with your description in the index. Often the first thought is, to store e.g. some type information or, e.g. in case of class models, some inheritance information. However, references are not yet set up / linked. So you cannot put anything in the user data that would traverse link references!</li>
<li><strong>Lazy Linking / Scoping</strong>: This is where the actual linking is done. In our case (Xbase-based language), this scoping is based on XbaseScopeProvider. This actually delegates to some Guice-configured class, which in our case is an ImportedNamespaceAwareLocalScopeProvider. This looks for model elements with the attribute &#8220;importedNamespace&#8221; in your model and pulls the objects from the index, that match any of the importedNamespace values (you can specify wildcards in the imports).<br />
In addition, in these classes you can add your own scopes, the local scopes, which are derived from the existing model information.</li>
<li><strong>Content assist</strong>: Uses the scoping data for suggesting alternatives.</li>
</ol>
<p>The index is transient in memory and is loaded from / stored to disk on start / stop of Eclipse. During run-time there is no up-to-date representation on disk. The org.eclipse.xtext.ui.shared.Access class can be used as a handle to index data.</p>
<p>&nbsp;</p>
<p><img src="image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAAAyCAIAAAClCBy/AAAC90lEQVR4nO2Zv9HyMAyHXdFQMQAZAjoWoOIuLWtkgUySmkGoWIIB0lFwFBT5Ct1n6SQ7sUMS3jt+T8UFR1bkJ/4DrgPgP+7bCYA/BGwADGwADGwADGwADGwADGwADGwADGwADGwADGwADGwADGwADGwYw+12W61Wp9Pp/X5/OxfN8/nc7XabzeZ+v+fe+6M20HCOK1kHG+bOY+HIsCHIj9rwIbBh3jy+FXkcsKGr69o5p0pQlqVzrmka+qC4Xq++JVXQf1VV1VSRJcFxsgVq23a9XhdF8Xq9eh75crn4HmVM2YtMr2kaFYG6lpmrNtRF0zS+PrajYNFiST4ejyVs8A/mnydWFDtmNN4K/9ifRFZMaIOsshpI6mW/38uhsoNtI8TaHA4HW5b+ohHB4jjnllgpqApURFvi2Bwl75ItbX1zI8cy/NwGe0td1yrboPEyJo20nSBtG3VjVtFkF/7KQvsGeuaqquiD1Dw2ZmVZxhSx60VWZMt8Nthe1LcUsz9JG5ZssJmkFM0WajDzfrJtkAvhYNG70MIZm/dyIweZY6Wwq3ViL4Sd8K0NqovEotEyoRbNpc8UvkwpVqbbkBs5yPK7yJ5e1B5wWhtiNVnUBqqjfapYHunJ5UYOMq0NKjEfNrEXenft/JdoQ8qi8+W5wc9OfpkfzCM4oU0S2WI3X8Hbs2ywEVJsSHw3gjZ0aUXzh/CeVLPIs4FSlzOVyjiYn59vZUsaD39lXGS7m/Pvsa9vcJttbVCh2rbdbrex9uk2yJz9lRQb0ovmvnKmsHtmux9WOyafZexYTA1GR7ZHLNuSSnM+n1NsUCmpOMqwwZUi9ntDig2DRYu1KYrieDzObkPw7aSL8mF8fiohVRq7vo6IHPvzSfZFEeq6zpobOrMHlOmlnylkEPpKZdJjQ3/RPNJ+ihM8nabwo/9ogyCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATCwATD/ACVFr3r10TqYAAAAAElFTkSuQmCC" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2012/01/04/my-mental-xtext-high-level-model/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Learning foreign software terminology with Anki</title>
		<link>http://5ise.quanxinquanyi.de/2011/12/30/learning-foreign-software-terminology-with-anki/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=learning-foreign-software-terminology-with-anki</link>
		<comments>http://5ise.quanxinquanyi.de/2011/12/30/learning-foreign-software-terminology-with-anki/#comments</comments>
		<pubDate>Fri, 30 Dec 2011 18:53:41 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=725</guid>
		<description><![CDATA[Despite English being the lingua franca of software engineering, there are still good reasons to learn to talk in foreign languages if you are doing international business. Locals will often communicate in their mother tongue and not all languages use &#8230; <a href="http://5ise.quanxinquanyi.de/2011/12/30/learning-foreign-software-terminology-with-anki/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Despite English being the lingua franca of software engineering, there are still good reasons to learn to talk in foreign languages if you are doing international business. Locals will often communicate in their mother tongue and not all languages use so many English technical terms like German. France&#8217;s académie fran<cite>ç</cite>aise makes sure that there are technical terms in French and the sheer amount of Chinese speakers and their language structure calls for chinese words.</p>
<p>So, if you are going abroad and want to learn a language, memorizing the vocabulary is one of the most important parts. But instead of writing vocab lists on sheets of paper or on cards, there is a very nice software that supports you in learning: It is called &#8220;Anki&#8221; and it is available for PC, Android, iPhone and others.</p>
<p>It is a software supporting a <a href="http://en.wikipedia.org/wiki/Spaced_repetition">spaced repetition system (SRS)</a>, which essentially means that you&#8217;ll see those entries that you are not good at more often than those which you know well. And you can sync all your cards between PC, Android, iPhone comfortably. A large number of word lists are available for several languages and you can easily define your own deck of cards, e.g. with software terminology or sentence patterns.</p>
<p>And you are not limited to using Anki for learning languages. You can use it for all kinds of studying: physics formulas, law, business, etc.</p>
<p>Anki has become one of my favourite tools.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/12/30/learning-foreign-software-terminology-with-anki/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ReqIF and Word Import</title>
		<link>http://5ise.quanxinquanyi.de/2011/11/29/reqif-and-word-import/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=reqif-and-word-import</link>
		<comments>http://5ise.quanxinquanyi.de/2011/11/29/reqif-and-word-import/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 15:44:20 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[MDSD]]></category>
		<category><![CDATA[PMT-Processes,Methods,Tools]]></category>
		<category><![CDATA[Requirements]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=717</guid>
		<description><![CDATA[About a week ago we&#8217;ve uploaded the initial code contribution to  Requirements Modeling Framework (RMF). In addition, we&#8217;ve been using the tool and created some additional (not published) utilities. Word documents are one popular way to document requirements. We too &#8230; <a href="http://5ise.quanxinquanyi.de/2011/11/29/reqif-and-word-import/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full " style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/07/1312270647_Symbol-Refresh.png" alt="" width="128" height="128" />About a week ago we&#8217;ve uploaded the initial code contribution to  Requirements Modeling Framework (RMF). In addition, we&#8217;ve been using the tool and created some additional (not published) utilities.</p>
<p>Word documents are one popular way to document requirements. We too have some requirements in Word format to be imported into ReqIF format. It takes about one page of source code to implement a tool that takes a Word document and converts it to ReqIF (although we are currently not handling text formatting).</p>
<p>ReqIF uses xhtml to store formatted text. So quite some functionality of a Word to ReqIF conversion would go into this transformation.</p>
<p>We have been asked for a PDF to ReqIF conversion as well. However, my experience with commercial pdf to word conversion tools does not make me too optimistic about the feasibility, because the information in the .pdf is probably too low-level.</p>
<p>It turns out that our framework is a powerful tool to provide tools and functionality around ReqIF.</p>
<address>Icon from: &lt;A href=&#8221;http://www.vistaico.com&#8221;&gt;VistaICO.com&lt;/A&gt;</address>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/11/29/reqif-and-word-import/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Links for the ReqIF Talk at Eclipse Con Europe 2011</title>
		<link>http://5ise.quanxinquanyi.de/2011/11/03/links-for-the-reqif-talk-at-eclipse-con-europe-2011/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=links-for-the-reqif-talk-at-eclipse-con-europe-2011</link>
		<comments>http://5ise.quanxinquanyi.de/2011/11/03/links-for-the-reqif-talk-at-eclipse-con-europe-2011/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 07:15:48 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[PMT-Processes,Methods,Tools]]></category>
		<category><![CDATA[Requirements]]></category>
		<category><![CDATA[VERDE]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=710</guid>
		<description><![CDATA[If you attended my talk at Eclipse Con Europe on the RMF project, here are a few links that might be useful: http://eclipse.org/rmf/ - The project home page http://pror.org/ &#8211; Until RMF has passed the IP review, you might want &#8230; <a href="http://5ise.quanxinquanyi.de/2011/11/03/links-for-the-reqif-talk-at-eclipse-con-europe-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you attended my talk at Eclipse Con Europe on the RMF project, here are a few links that might be useful:</p>
<ul>
<li><a href="http://eclipse.org/rmf/">http://eclipse.org/rmf/ </a>- The project home page</li>
<li><a href="http://pror.org/">http://pror.org/</a> &#8211; Until RMF has passed the IP review, you might want to look at a predecessor, based on RIF (not ReqIF!)</li>
<li><a href="http://www.omg.org/spec/ReqIF/">http://www.omg.org/spec/ReqIF/</a> &#8211; The official spec for ReqIF</li>
<li><a href="http://www.automotive-his.de/rif/doku.php?id=welcomeeng">http://www.automotive-his.de/rif/doku.php?id=welcomeeng</a> &#8211; The predecessor to ReqIF: RIF</li>
<li><a href="http://www.prostep.org/fileadmin/user_upload/ProSTEPiViP/Telegramm/2011/ProSTEP_iViP_Newsletter_July_2011.pdf">http://www.prostep.org/fileadmin/user_upload/ProSTEPiViP/Telegramm/2011/ProSTEP_iViP_Newsletter_July_2011.pdf</a> &#8211; Information on the Implementor&#8217;s Forum</li>
<li><a href="http://www.itea-verde.org/">http://www.itea-verde.org/</a> &#8211; Sponsoring project for RMF core</li>
<li><a href="http://www.deploy-project.eu/">http://www.deploy-project.eu/</a> &#8211; Sponosring project for RMF GUI</li>
</ul>
<h2>Additional Topics</h2>
<ul>
<li><a href="http://www.guersoy.net/knowledge/crema">http://www.guersoy.net/knowledge/crema </a>- Screencast on our traceability framework</li>
</ul>
<h2>Next Chance to see:</h2>
<ul>
<li><a href="http://www.tdse.org/">http://www.tdse.org/</a> &#8211; Talk with more focus on Requirements and DSLs, with Eclipse technologies</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/11/03/links-for-the-reqif-talk-at-eclipse-con-europe-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Graphiti Applications</title>
		<link>http://5ise.quanxinquanyi.de/2011/10/31/debugging-graphiti-applications/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=debugging-graphiti-applications</link>
		<comments>http://5ise.quanxinquanyi.de/2011/10/31/debugging-graphiti-applications/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 15:23:00 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MDSD]]></category>
		<category><![CDATA[PMT-Processes,Methods,Tools]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=704</guid>
		<description><![CDATA[Graphiti is one of the hyped young Eclipse projects. In its current phase, several features are not extensively documented, though the developer support on the Eclipse forums are very nice. One of the features that are too hidden is the &#8230; <a href="http://5ise.quanxinquanyi.de/2011/10/31/debugging-graphiti-applications/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Graphiti is one of the hyped young Eclipse projects. In its current phase, several features are not extensively documented, though the developer support on the Eclipse forums are very nice. One of the features that are too hidden is the nice debugging facility, that a colleague pointed me to.</p>
<p>Basically, in the Eclipse preferences there is a page with several settings for the editor.</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/10/2011-10-31-16h14_40.png"><img class="alignright size-medium wp-image-705" style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/10/2011-10-31-16h14_40-300x270.png" alt="" width="300" height="270" /></a>Amongst others, there are setting to:</p>
<ul>
<li>Show invisible rectangles: They will be drawn with a transparent background and a yellow border, making it easy to find out where they are.</li>
<li>See an outline of the diagram objects in the outline view, and</li>
<li>Have a debug entry in the context menu, which allows you to dump data to the console.</li>
</ul>
<p>All in all a very nice set of features that I should have discovered earlier.</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/10/2011-10-31-16h14_15.png"><img class="alignright size-large wp-image-706" style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/10/2011-10-31-16h14_15-1024x335.png" alt="" width="584" height="191" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/10/31/debugging-graphiti-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New AUTOSAR Open Source Initiative from Asia &#8211; TOPPERS</title>
		<link>http://5ise.quanxinquanyi.de/2011/10/23/new-autosar-open-source-initiative-from-asia/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-autosar-open-source-initiative-from-asia</link>
		<comments>http://5ise.quanxinquanyi.de/2011/10/23/new-autosar-open-source-initiative-from-asia/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 12:38:48 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[Automotive]]></category>
		<category><![CDATA[AUTOSAR]]></category>
		<category><![CDATA[China]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=695</guid>
		<description><![CDATA[Relatively unnoticed by the Western industry, a lot of interesting activities in (automotive) software engineering are currently being launched in Asia. During the China Automotive Forum, the Toppers team from Japan announced their plans to build an open source AUTOSAR &#8230; <a href="http://5ise.quanxinquanyi.de/2011/10/23/new-autosar-open-source-initiative-from-asia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Relatively unnoticed by the Western industry, a lot of interesting activities in (automotive) software engineering are currently being launched in Asia.</p>
<p>During the China Automotive Forum, the Toppers team from Japan announced their plans to build an open source AUTOSAR basic software based on the Toppers OS. The chinese announcement can be found as a PDF <a href="http://www.toppers.jp/docs/TOPPERS_ChinaAutomotiveForum2011.pdf" target="_blank">here</a>, titled &#8220;The current state of developing an AUTOSAR-compliant open-source OS&#8221;.</p>
<p>Basically, they currently have a OSEK/VDX operating system called &#8220;TOPPERS/ATK1&#8243; that is reported to be used in several of Suzuki&#8217;s cars. It is described as MODISTARC and MISRA-C complient, supporting a CAN/LIN middleware and a FlexRay add-on.</p>
<p>The project goal is to &#8220;make public the source code&#8221; in 2012 under the label &#8220;TOPPERS/ATK2&#8243;. In the &#8220;basic phase&#8221; during 2008 until 2010, the project dealt with an AUTOSAR OS (AUTOSAR SC1 to SC3) and multi-core.</p>
<p>Listed participating parties are, amongst others: Toshiba, Renesas, Toyota, Fuji Soft and Denso . There seem to be around 12 technical personnel from the companies involved and about 8 professors and researches from Nagoya university.</p>
<p>The current research phase is from April 2011 until Mar 2012. Depending on the results of this phase, the continuation of the project will be determined. It seems that except for the verification suite, which will be only released to members, other projects results will be released as open source.</p>
<p>Mentioned problematic aspects are the vast size of the standard, which requires a lot of implementation effort, the new multicore aspects and the efforts required to get a grasp of the standard.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/10/23/new-autosar-open-source-initiative-from-asia/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compiling Xtext Expressions and Google Collections&#8217; Function</title>
		<link>http://5ise.quanxinquanyi.de/2011/08/30/compiling-xtext-expressions-and-google-collections-function/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=compiling-xtext-expressions-and-google-collections-function</link>
		<comments>http://5ise.quanxinquanyi.de/2011/08/30/compiling-xtext-expressions-and-google-collections-function/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 10:59:34 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[DSL]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MDSD]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=649</guid>
		<description><![CDATA[In our small DSL for graphiti editors, you can specify simple code with Xtext&#8217;s Expressions. E.g., in the specification for a connection, the color should be green if the domain object has the attribute &#8220;positive&#8221; set, and red otherwise. So &#8230; <a href="http://5ise.quanxinquanyi.de/2011/08/30/compiling-xtext-expressions-and-google-collections-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h38_38.png"><img class="alignright size-medium wp-image-650" style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h38_38-300x34.png" alt="" width="300" height="34" /></a>In our small<a title="A DSL for Graphiti Editors" href="http://5ise.quanxinquanyi.de/2011/08/18/a-dsl-for-graphiti-editors/"> DSL for graphiti editors</a>, you can specify simple code with Xtext&#8217;s Expressions. E.g., in the specification for a connection, the color should be green if the domain object has the attribute &#8220;positive&#8221; set, and red otherwise.</p>
<p>So in the editor, this can be specified by means of an XBlockExpression. The Xtend2 builder also provides support for compiling the expressions in your DSL to Java, however, the standard implementation compiles them to a method body. The result of the expression is always passed back by a <strong>return</strong> statement.</p>
<p>Since modifiying the compiler was too complex and generating an extra class for the calculation would clutter the class structure too much, a simple solution is to wrap the generated code with a google collection <strong>Function</strong>.</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h46_31.png"><img class="alignright size-full wp-image-651" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h46_31.png" alt="" width="794" height="180" /></a></p>
<p>&nbsp;</p>
<p>The generated code looks  like:</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h53_07.png"><img class="alignright size-full wp-image-652" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-30-12h53_07.png" alt="" width="641" height="268" /></a></p>
<p>&nbsp;</p>
<p>On a site note, be aware that you have to work with injections to set up the compile framework in your generator. In the generator class I have a statement</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">    @Inject AddConnectionFeatureGenerator addConnectionFeatureGenerator</pre></div></div>

<p>and the generator is invoked by</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">addConnectionFeatureGenerator.<span style="color: #006633;">generate</span><span style="color: #009900;">&#40;</span>fsa,conn<span style="color: #009900;">&#41;</span></pre></div></div>

<p>. On the contrary, a</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">new</span> AddConnectionFeatureGenerator<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">generate</span><span style="color: #009900;">&#40;</span>fsa,conn<span style="color: #009900;">&#41;</span></pre></div></div>

<p>would not work.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/08/30/compiling-xtext-expressions-and-google-collections-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A DSL for Graphiti Editors</title>
		<link>http://5ise.quanxinquanyi.de/2011/08/18/a-dsl-for-graphiti-editors/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-dsl-for-graphiti-editors</link>
		<comments>http://5ise.quanxinquanyi.de/2011/08/18/a-dsl-for-graphiti-editors/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 17:20:32 +0000</pubDate>
		<dc:creator>Andreas Graf</dc:creator>
				<category><![CDATA[Allgemeines]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MDSD]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[graphiti]]></category>

		<guid isPermaLink="false">http://5ise.quanxinquanyi.de/?p=618</guid>
		<description><![CDATA[For the public funded research projects IMES we are building graphical editors for functional nets and other systems. Since Graphiti is drawing a lot of interest, it is a good occasion for using the new technology. However, it turns out, &#8230; <a href="http://5ise.quanxinquanyi.de/2011/08/18/a-dsl-for-graphiti-editors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_476" class="wp-caption alignright" style="width: 167px"><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2010/12/BMBF_RGB_Gef_M_e.jpg"><img class="size-full wp-image-476" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2010/12/BMBF_RGB_Gef_M_e.jpg" alt="Funded by the BMBF" width="157" height="120" /></a><p class="wp-caption-text">Funded by the BMBF</p></div>
<p>For the public funded research projects IMES we are building graphical editors for functional nets and other systems. Since Graphiti is drawing a lot of interest, it is a good occasion for using the new technology. However, it turns out, that you have to write a lot of code. The Graphiti team seems to address this with a &#8220;Pattern Framework&#8221;, but it is hard to find documentation on this.</p>
<p>So what do you do to avoid writing boilerplate code? Of course, MDD with textual DSLs and M2T (i.e. code generation).</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-18-18h46_02.png"><img class="alignright size-full wp-image-620" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-18-18h46_02.png" alt="A textual DSL for Graphiti Editors" width="876" height="599" /></a></p>
<p>&nbsp;</p>
<p>So the first draft of a language to specify editors was quickly implemented. Here are some core features as seen above:</p>
<ol>
<li>The DSL references the Ecore of the domain model, giving full content assist. This is used to e.g. generate the CreateFeature in Graphiti</li>
<li>The &#8220;label&#8221; references an attribute in the ecore. This attribute is displayed as a label in the diagram. Moreover, the DirectEditingFeature and the Update Feature for the attribute is generated.</li>
<li>In this example, a logical function can be at the root of the model, but it could also be a child of another logical function. So we have two contexts here. When the shape is created on / dragged to the diagram, the domain object is added to the functionNetworkProject.logicalFunction collection. On the other hand, if its container is another logical function, then the collection used is LogicalFunction.subFunction.<br />
This generates code for the Create and Add Feature. In addition, it also creates a move feature, that rewires the containment if the shape is dragged from one container to another. The default behavior of Graphiti is two disallow moving an object out of its container.<br />
With LogicalPorts, there is only the LogicalFunction context, so they cannot be placed on the diagram background, only within logical functions.</li>
<li>Ports are usually placed on the border of the parent shape. In Graphiti, this requires a &#8220;MoveFeature&#8221;, that checks if the new position is valid. The &#8220;OnBorder&#8221; keyword creates such a feature that allows moving the ports on the border shape only.</li>
<li>In the meta-model, a connection (Logical Channel) between to ports is not a reference, but a model element with references to the endpoints. The ObjectMapping specifies which element to create and which references to set for the endpoints.</li>
<li>The channel is owned by the function that owns the functions connected by the channel (so this is two levels up). To allow for complex operations, the AddToModelFunc generates a stub that delegates the adding of the domain object to the model to a method that can be implemented manually.</li>
<li>And finally, the connection has to know which elements / shapes it can connect.</li>
</ol>
<p>And here is a screenshot of the generated editor:</p>
<p><a href="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-18-18h44_22.png"><img class="alignright size-full wp-image-624" style="border: none" src="http://5ise.quanxinquanyi.de/wp-content/uploads/2011/08/2011-08-18-18h44_22.png" alt="" width="992" height="510" /></a></p>
<p>&nbsp;</p>
<p>The DSL/Generator are in an early phase and not designed to cover all use cases. But they will definitely reduce our implementation efforts for editors.</p>
<p>There is also another initiative to create a DSL for Graphiti editors, called &#8220;Spray&#8221;. However, no code has been published yet under &#8220;Spray&#8221; and since we could not wait for initial contributions, we just had to start anyway&#8230;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://5ise.quanxinquanyi.de/2011/08/18/a-dsl-for-graphiti-editors/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

