<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">

<channel>
	<title>Planet Stratego</title>
	<link>http://planet.stratego.org/</link>
	<language>en</language>
	<description>Planet Stratego - http://planet.stratego.org/</description>

<item>
	<title>Karl Trygve Kalleberg: Hackathon in Delft: Gone!</title>
	<guid>http://blog.kalleberg.org/post/16823174245</guid>
	<link>http://blog.kalleberg.org/post/16823174245</link>
	<description>&lt;p&gt;I’ve been at it again. In the previous autumn/winter season, I spent &lt;a href=&quot;http://blog.kalleberg.org/post/1463611782/hackathon-in-delft-go&quot;&gt;a month in Delft&lt;/a&gt;, hacking on the &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt;/&lt;a href=&quot;http://spoofax.org&quot;&gt;Spoofax&lt;/a&gt; program transformation infrastructure.&lt;/p&gt;

&lt;p&gt;Now that another winter is here, I’ve had the good fortune to repeat what is slowly becoming a tradition. This year I even found time to reserve two months for a more extended hackathon.&lt;/p&gt;

&lt;p&gt;Many really good things came of out of the stay. A few of the immediate results are:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;A &lt;a href=&quot;http://blog.kalleberg.org/post/15456843436/a-command-line-interpreter-for-spoofax&quot;&gt;command line interpreter for Spoofax&lt;/a&gt; that works on Linux/Unix/Windows. &lt;/li&gt;
&lt;li&gt;An &lt;a href=&quot;http://blog.kalleberg.org/post/16354946489/an-eclipse-console-for-spoofax&quot;&gt;interactive Spoofax console&lt;/a&gt; for Eclipse.&lt;/li&gt;
&lt;li&gt;A major revamp of the &lt;a href=&quot;http://hydra.nixos.org/jobset/spoofax/spoofax-release&quot;&gt;Spoofax&lt;/a&gt; build system that makes both development and bootstrapping a lot easier. &lt;/li&gt;
&lt;li&gt;A highly &lt;a href=&quot;http://hydra.nixos.org/jobset/spoofax/plasticode&quot;&gt;experimental plugin for scripting source code analysis and manipulation&lt;/a&gt; inside of Eclipse. &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I am also involved in several on-going projects for bringing the necessary parts of the Spoofax infrastructure to the web. Interesting results should start popping up over the new few months.&lt;/p&gt;

&lt;p&gt;As is the case for most startups, finding the time to contribute back to the upstream projects we use is always difficult. Whenever this happens, though, the payoff is often substantial.&lt;/p&gt;</description>
	<pubDate>Tue, 31 Jan 2012 17:00:05 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: An Eclipse Console for Spoofax</title>
	<guid>http://blog.kalleberg.org/post/16354946489</guid>
	<link>http://blog.kalleberg.org/post/16354946489</link>
	<description>&lt;p&gt;More good news, everyone! I have found time to integrate the &lt;a href=&quot;http://blog.kalleberg.org/post/15456843436/a-command-line-interpreter-for-spoofax&quot;&gt;command line shell for Spoofax&lt;/a&gt; into Eclipse. You can now have all sorts of tricky conversations with the Spoofax interpreter inside a perfectly innocent-looking Eclipse console:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://media.tumblr.com/tumblr_ly9hbyvyg01qa7x28.png&quot; alt=&quot;A conversiation with Spoofax&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, there are still rough edges to be ironed out. One of them is clearly the color palette. Another is the lack of inline rules, which are not supported yet. Neither are dynamic rules (and it is doubtful they ever will be — we are currently exploring other opportunities for dealing with context-sensitive rewrite rules).&lt;/p&gt;

&lt;p&gt;You can bring up the actual console by using the console page selector in the top right-hand corner of your console, like you do for the other types of consoles:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://media.tumblr.com/tumblr_ly9hvgQnft1qa7x28.png&quot; alt=&quot;Console page selector&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Remember that you can always report the issues you come across in &lt;a href=&quot;http://yellowgrass.org/project/Spoofax&quot;&gt;YellowGrass&lt;/a&gt; and tag me (&lt;code&gt;@karltk&lt;/code&gt;).&lt;/p&gt;</description>
	<pubDate>Mon, 23 Jan 2012 17:34:58 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: Hackathon in Delft: Go!</title>
	<guid>http://blog.kalleberg.org/post/1463611782</guid>
	<link>http://blog.kalleberg.org/post/1463611782</link>
	<description>&lt;p&gt;It’s that time of the year again. The glorious month of intensive parser implementation, compiler engineering and &lt;a href=&quot;http://martinfowler.com/articles/languageWorkbench.html&quot;&gt;language workbenches&lt;/a&gt; — the essentials of any IDE — has arrived. I’ve retreated to the &lt;a href=&quot;http://www.tudelft.nl/&quot;&gt;TU Delft&lt;/a&gt; campus for the month of November to hack on interactive language infrastructure for &lt;a href=&quot;http://kolibrifx.com&quot;&gt;our startup&lt;/a&gt;, and to think big thoughts about IDEs and DSLs in general.&lt;/p&gt;

&lt;p&gt;Our startup is a user of both &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt; and &lt;a href=&quot;http://spoofax.org&quot;&gt;Spoofax&lt;/a&gt;, so it was only natural to join forces with &lt;a href=&quot;http://swerl.tudelft.nl/bin/view/EelcoVisser&quot;&gt;Eelco Visser&lt;/a&gt; and some of his henchmen here in Delft, who are the maintainers of said projects.&lt;/p&gt;

&lt;p&gt;For somewhat practical and somewhat nostalgic reasons, I decided to stay at the TU Delft campus. Campus life here already brings back memories of my year living at &lt;a href=&quot;http://nl.wikipedia.org/wiki/Studentencomplex_Cambridgelaan&quot;&gt;Cambridgelaan&lt;/a&gt;: the access to lightning fast broadband in your dorm room, the four minute walk to the lab, the 24-hour party people (aka &lt;a href=&quot;http://en.wikipedia.org/wiki/Erasmus_Programme&quot;&gt;Erasmus&lt;/a&gt; students), and the freedom to follow your biological clock.&lt;/p&gt;

&lt;p&gt;Time for some commits:)&lt;/p&gt;</description>
	<pubDate>Tue, 02 Nov 2010 19:33:00 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: Prototype of a Scannerless, Generalized Left-to-right Rightmost (SGLR) derivation parser for JavaScript</title>
	<guid>http://blog.kalleberg.org/post/1256702765</guid>
	<link>http://blog.kalleberg.org/post/1256702765</link>
	<description>&lt;p&gt;Need a Scannerless, Generalized Left-to-right Rightmost (&lt;a href=&quot;http://strategoxt.org/Sdf/SGLR&quot;&gt;SGLR&lt;/a&gt;) derivation parser for JavaScript? Then my &lt;a href=&quot;http://bitbucket.org/karltk/jsglr-gwt&quot;&gt;JSGLR-GWT proof-of-concept&lt;/a&gt; might interest you. (If you don’t know what a scannerless GLR parser is, then you are probably not interested in writing modular grammars for your programming language implementation anyway — or you might want to read a few sections down).&lt;/p&gt;

&lt;p&gt;A word of warning: I’m not claiming it is written &lt;em&gt;in&lt;/em&gt; JavaScript, merely &lt;em&gt;for&lt;/em&gt; JavaScript. I simply took our &lt;a href=&quot;http://strategoxt.org/Stratego/JSGLR&quot;&gt;old Java-based SGLR implementation&lt;/a&gt; and massaged it quite heavily until GWT could spit out a working version for the JavaScript interpreters.&lt;/p&gt;

&lt;h3&gt;Performance&lt;/h3&gt;

&lt;p&gt;The performance is, quite frankly, beyond my wildest expectations. I’ve not made a single attempt at performance tweaking for the JavaScript engines yet, and still I manage to parse through 830 lines of Stratego code in ~3 seconds (Chromium 7.0.519.0). For smaller fragments, even Firefox 3.5 manages to keep up: it manages ~20 lines in ~1s (Chromium does that test in 74ms).&lt;/p&gt;

&lt;p&gt;To most people, this probably doesn’t sound very fast at all, but I was much worse off when I initially wrote JSGLR back in 2006 — and that used a term(tree) library that wasn’t hacked together over night. All in all, I think there are plenty of performance tweaking opportunities, and the JavaScript engines are getting faster almost by the minute.&lt;/p&gt;

&lt;p&gt;Now, another reason for my optimism, is my use case. I’m interested only interested in JavaScript port of SGLR for interactive use. Think web IDE. My aim is to attain interactive speeds when editing text. A few optimization ideas off the top of my head:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Tweak the parser to only reparse the lines that have changed. This alone might be enough to survive with the current level of performance.&lt;/li&gt;
&lt;li&gt;Reduce the extreme amount of garbage created currently by using object pools.&lt;/li&gt;
&lt;li&gt;Do the initial parse on the server-side, at least for larger files. &lt;/li&gt;
&lt;/ul&gt;&lt;h3&gt;What is a Scannerless GLR parser anyway?&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;(optional reading)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;SGLR does &lt;em&gt;not&lt;/em&gt; separate your parser into the usual two steps: (1) lexer/tokenizer/scanner followed by (2) LL- or LR-style parsing of the token stream. Instead, SGLR runs the parser on every character. This is why it’s &lt;em&gt;scannerless&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The next point, GLR, is tricker to explain briefly. Remember that a parser takes a string of text and creates a (parse) tree for it. There might, at some stage during the parsing, be multiple possible trees that might fit the text seen so far. This is called an &lt;em&gt;ambiguity&lt;/em&gt;. We don’t yet know what is meant by the text. Only by continue reading, will it (hopefully) become apparent. However, this is where the &lt;em&gt;k&lt;/em&gt; comes in. LL(&lt;em&gt;k&lt;/em&gt;)/LALR(&lt;em&gt;k&lt;/em&gt;) lets you look only &lt;em&gt;k&lt;/em&gt; tokens into the future. GLR allows you to look &lt;em&gt;all&lt;/em&gt; tokens into the future (for SGLR, I should probably say all &lt;em&gt;characters&lt;/em&gt; into the future.).&lt;/p&gt;

&lt;p&gt;Typically, LL and LALR-parsers, such as the archaic Yacc and Bison parsers, force you to contort your grammar a lot to meet the &lt;em&gt;k&lt;/em&gt;-token lookahead. If you have ever run into the dreaded “shift/reduce” conflict, you know what I’m talking about.&lt;/p&gt;

&lt;p&gt;The combination of scannerless and GLR gives us something wonderful: &lt;em&gt;grammars are closed under composition&lt;/em&gt;. So, if you write grammars for languages &lt;em&gt;L1&lt;/em&gt; and &lt;em&gt;L2&lt;/em&gt;, you can just make a new module &lt;em&gt;L3&lt;/em&gt;, include &lt;em&gt;L1&lt;/em&gt; and &lt;em&gt;L2&lt;/em&gt;, et voila — you have &lt;em&gt;L3 = L1 ∪ L2&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Trying such a stunt with LALR will almost invariably push you into the “shift/reduce”-conflict corner. Admittedly, there is a significant trade-off or gotcha with the (S)GLR approach. And it is very similar to the trade-offs/gotchas with early vs late binding, or static vs dynamic typing.&lt;/p&gt;

&lt;p&gt;If, after processing the entire text, there &lt;em&gt;still&lt;/em&gt; are multiple possible parse trees, GLR will give you all of them. So, you catch the ambiguity at runtime. But you can use GLR to say more: the set of grammars you can express with GLR is larger than that of LL(k) and LALR(k).&lt;/p&gt;

&lt;p&gt;The trade-off is simple: with LL(&lt;em&gt;k&lt;/em&gt;)/LALR(&lt;em&gt;k&lt;/em&gt;), you are guaranteed to only have one, &lt;em&gt;unambiguous&lt;/em&gt;, tree at the end — but the you might not be able to express the language you want to design. With SGLR, you are free to express the full class of context-free grammars, but the parsing result might be a forest of trees. It’s up to you to prune the forest afterwards, finding the tree you want.&lt;/p&gt;

&lt;p&gt;I’m not claiming that SGLR is the best solution for all kinds for parsing needs. With great power comes great responsibility. You might not always need great power, and great responsibilty is usually just a liability, anyway;)&lt;/p&gt;

&lt;h3&gt;Implementation Details&lt;/h3&gt;

&lt;p&gt;To interested parties, this is what I did:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;I ripped out the dependence on the &lt;a href=&quot;http://www.cwi.nl&quot;&gt;CWI&lt;/a&gt; &lt;a href=&quot;http://buildfarm.st.ewi.tudelft.nl/releases/meta-environment/channels-v3/aterm-unstable/&quot;&gt;ATerm&lt;/a&gt; library and (yet again) wrote my own. Mostly hacked together based from scratch, but with the &lt;a href=&quot;http://strategoxt.org/Tools/ATermFormat&quot;&gt;Textual ATerm Format (TAF)&lt;/a&gt; parser stolen from the &lt;a href=&quot;https://svn.strategoxt.org/repos/StrategoXT/spoofax/trunk/spoofax/org.spoofax.interpreter.core/src/java/org/spoofax/interpreter/terms/&quot;&gt;BasicStrategoTerm&lt;/a&gt; implementation. &lt;/li&gt;
&lt;li&gt;Ripped out all references to &lt;code&gt;java.io&lt;/code&gt; and replaced with my own stuff, based on strings. &lt;/li&gt;
&lt;li&gt;Wrote a tiny &lt;a href=&quot;http://google-web-toolkit.googlecode.com/svn/javadoc/1.5/com/google/gwt/user/server/rpc/RemoteServiceServlet.html&quot;&gt;RemoteServiceServlet&lt;/a&gt; to allow the client side to access the parse tables from server side.&lt;/li&gt;
&lt;li&gt;Added a tiny hack to also fetch parse tables as TAFs and load these on the client side. &lt;/li&gt;
&lt;li&gt;Various other minor fixes all over the place.&lt;/li&gt;
&lt;/ul&gt;</description>
	<pubDate>Wed, 06 Oct 2010 17:57:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Static Consistency Checking of Web Applications with WebDSL</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/152-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/152-Static-Consistency-Checking-of-Web-Applications-with-WebDSL.html</link>
	<description>&lt;p&gt;&lt;/p&gt;

Zef Hemel, Danny M. Groenewegen, Lennart C. L. Kats, Eelco Visser. Static Consistency Checking of Web Applications with WebDSL. Journal of Symbolic Computation, 2010 [&lt;a href=&quot;http://dx.doi.org/10.1016/j.jsc.2010.08.006&quot;&gt;doi:10.1016/j.jsc.2010.08.006&lt;/a&gt;] [&lt;a href=&quot;http://researchr.org/publication/HemelGKV2010&quot;&gt;researchr&lt;/a&gt; (pre-print)]


&lt;p&gt;&lt;/p&gt;

&lt;strong&gt;Abstract&lt;/strong&gt;

Modern web application development frameworks provide web application developers with high- level abstractions to improve their productivity. However, their support for static verification of applications is limited. Inconsistencies in an application are often not detected statically, but appear as errors at run-time. The reports about these errors are often obscure and hard to trace back to the source of the inconsistency. A major part of this inadequate consistency checking can be traced back to the lack of linguistic integration of these frameworks. Parts of an applications are defined with separate domain-specific languages, which are not checked for consistency with the rest of the application. Examples include regular expressions, query languages and XML- based languages for definition of user interfaces. We give an overview and analysis of typical problems arising in development with frameworks for web application development, with Ruby on Rails, Lift and Seam as representatives.

&lt;p&gt;&lt;/p&gt;

To remedy these problems, in this paper, we argue that domain-specific languages should be designed from the ground up with static verification and cross-aspect consistency checking in mind, providing linguistic integration of domain-specific sub-languages. We show how this approach is applied in the design of WebDSL, a domain-specific language for web applications, by examining how its compiler detects inconsistencies not caught by web frameworks, providing accurate and clear error messages. Furthermore, we show how this consistency analysis can be expressed with a declarative rule-based approach using the Stratego transformation language.</description>
	<pubDate>Mon, 04 Oct 2010 06:36:37 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: Great things in the Eclipse JDT</title>
	<guid>http://blog.kalleberg.org/post/1111675028</guid>
	<link>http://blog.kalleberg.org/post/1111675028</link>
	<description>&lt;p&gt;Since we started with the &lt;a href=&quot;https://kolibrifx.com&quot;&gt;KolibriFX&lt;/a&gt; project six months ago, I have programmed a lot of Scala and Java, plus some  &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt; and JavaScript. I love programming in Scala and Stratego because my implementations are shorter and usually a lot easier to reason about. I often get this warm, fuzzy feeling of having captured something tricky in an elegant fashion.&lt;/p&gt;

&lt;p&gt;However, in day-to-day programming, Java has one killer feature that makes up for a lot of cruft in the language: the Eclipse JDT. I recently spent a few days rewriting some of our Scala code to Java, and that really brought the point home. I find that, at least for our code-base, the JDT offers productivity benefits that far outweigh the linguistic disadvantage Java suffers compared to Scala.&lt;/p&gt;

&lt;p&gt;The points that follow will be an old hat to programmers familiar with the JDT, though they might serve as a reminder that for all its flaws, the JDT is a rather great tool, after all.&lt;/p&gt;

&lt;h3&gt;Realtime Compilation&lt;/h3&gt;

&lt;p&gt;This is probably the biggest tool-provided productivity booster I know of. I’ve always been a huge fan of realtime compilation, because it encourages flow. It brings me into “the zone”, “the flow” or whatever you prefer to call it. Whenever I have to wait for the compiler for more than a few seconds, I lose my flow and switch to another desktop “to remain productive”. This invariably forces an expensive mental context switch, and ultimately reduces my productivity, &lt;em&gt;but without reducing my perception of productivity&lt;/em&gt; — I’m still doing stuff, so I feel I’m moving forward, except I’m not.&lt;/p&gt;

&lt;p&gt;Realtime compiler error messages and warnings, allow me to mindlessly work through the live updated list until it’s empty. At that point, I run my unit tests and continue flowing until they’re all green. I get to decide how quickly I work. The computer (nearly) always follows my pace, so &lt;em&gt;I’m&lt;/em&gt; the performance bottleneck. It makes me feel in control. I easily enter the flow, and I stay there. One thing I use as a flow marker is how often I watch the time. With Scala, 5 minutes rarely go by before I check it, since I’m waiting for the compiler to churn through. With the JDT, an hour may pass, easily.&lt;/p&gt;

&lt;p&gt;This is not a bash on Scala. Stratego has the same problem, but we’re working on an incremental compiler to improve the problem there. I predict that both Scala and Stratego will eventually have compilers working at interactive speeds, and the same degree of flow will be attained as with the JDT compiler.&lt;/p&gt;

&lt;h3&gt;Quick Fixes&lt;/h3&gt;

&lt;p&gt;Beyond realtime compilation, the JDT offers additional inspiration for up-and-coming languages: its refactorings and quick fixes make life with Java easy and nearly enjoyable. Based on my usage the last week, these are my favourite quick fixes (admittedly, this list changes from week to week, based on the nature of the programming tasks):&lt;/p&gt;

&lt;h2&gt;Assign to Field&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;class X {
   X(int y|) {
   }
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With the cursor placed after &lt;code&gt;y&lt;/code&gt;, quick fix suggests the creation of a new field, &lt;code&gt;private final int y&lt;/code&gt;, and also adds the line &lt;code&gt;this.y = y&lt;/code&gt; to the constructor body.&lt;/p&gt;

&lt;h2&gt;Extract to Separate File&lt;/h2&gt;

&lt;p&gt;File &lt;code&gt;X.java&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class X { ... }
class Y| { ... }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;With the cursor after &lt;code&gt;Y&lt;/code&gt;, quick fix suggests that the class &lt;code&gt;Y&lt;/code&gt; be moved to a separate file, &lt;code&gt;Y.java&lt;/code&gt;, and it deals with all the imports at the top of both &lt;code&gt;X.java&lt;/code&gt; and &lt;code&gt;Y.java&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Generate Getters and Setters&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;class X {
   private int x;
   private int y;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates &lt;code&gt;getX&lt;/code&gt;/&lt;code&gt;setX&lt;/code&gt; and &lt;code&gt;getY&lt;/code&gt;/&lt;code&gt;setY&lt;/code&gt;. You can control if you want both &lt;code&gt;get&lt;/code&gt; and &lt;code&gt;set&lt;/code&gt; on a per-variable basis.&lt;/p&gt;

&lt;h2&gt;Change Visibility to ‘x’.&lt;/h2&gt;

&lt;p&gt;File &lt;code&gt;foo/X.java&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package foo;
class X {
   Horoscope computeHoroscope();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;File &lt;code&gt;bar/Y.java&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package bar;
class Y {
   ...
   x.computeHoroscope()|;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you are in another package and invoke, &lt;code&gt;x.computeHoroscope()&lt;/code&gt;, quick fix tells you that friendly access is not possible, and suggests adding &lt;code&gt;public&lt;/code&gt; to the &lt;code&gt;computeHoroscope()&lt;/code&gt; method declaration.&lt;/p&gt;

&lt;h2&gt;Add/remove Argument to Match.&lt;/h2&gt;

&lt;p&gt;File &lt;code&gt;IntPair.java&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class IntPair {
   Pair(int x) {
   }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;File &lt;code&gt;Main.java&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;IntPair x = new IntPair(10, 100)|;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The usage doesn’t match any of the known constructors of &lt;code&gt;IntPair&lt;/code&gt;. Quick fix is going to suggest that another argument is added to &lt;code&gt;IntPair#IntPair(int)&lt;/code&gt;, so that it becomes IntPair#IntPair(int,int).&lt;/p&gt;

&lt;h2&gt;Change type of ‘x’ to match expression.&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;String currentTime = new Set&gt;();
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The type mismatch prompts quick fix to suggest replacing &lt;code&gt;String&lt;/code&gt; with &lt;code&gt;Set&gt;&lt;/code&gt; for the variable &lt;code&gt;currentTime&lt;/code&gt;. You may also sometimes get away with&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;currentTime| = new Set&gt;();
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and ask quick fix to &lt;code&gt;create new local variable&lt;/code&gt; with the cursor placed near &lt;code&gt;currentTime&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;Infer generic arguments&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;Map map = new HashMap()|;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here, quick fix can compute the correct generic arguments for Map (&lt;code&gt;&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;Import Type ‘x’.&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;new HashMap&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Quick fix may be used to quickly import java.util.HashMap. It allows you to stop fussing about the endless imports lists, and it actually works flawlessly 99% of the time (sometimes, it may insert the import in a funny place if your code is not parseable at the time you ask for an import).&lt;/p&gt;

&lt;h3&gt;Wrapping Up&lt;/h3&gt;

&lt;p&gt;Most of the above features are great when writing fresh code. However, they’re even better when you need to change code — especially the realtime compilation feature. Refactorings that may take hours in Stratego or Scala are usually done in minutes in Java, thanks to the IDE support. Imagine where we may go with that kind of IDE support for the newer languages…&lt;/p&gt;</description>
	<pubDate>Sun, 12 Sep 2010 21:50:50 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: "Parsing is considered a solved problem. Unfortunately, this view is naïve, rooted in the widely..."</title>
	<guid>http://blog.kalleberg.org/post/951923192</guid>
	<link>http://blog.kalleberg.org/post/951923192</link>
	<description>“Parsing is considered a solved problem. Unfortunately, this view is naïve, rooted in the widely believed myth that programming languages exist.”&lt;br /&gt;&lt;br /&gt; - &lt;em&gt;Al Bessey, Ken Block, Ben Chelf, Andy Chou, Bryan Fulton, Seth Hallem, Charles Henri-Gros, Asya Kamsky, Scott McPeak, Dawson Engler, in &lt;em&gt;A Few Billion Lines of Code Later: Using Static Analysis to Find Bugs in the Real World&lt;/em&gt;.&lt;/em&gt;</description>
	<pubDate>Sat, 14 Aug 2010 10:43:59 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: TOOLS 2010 Portraits</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/150-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/150-TOOLS-2010-Portraits.html</link>
	<description>I finally got back into the photo processing game by mastering selection with Adobe Bridge; first make a selection of photos and then only process the ones with highest rank; separation of duties. I shot some photos at last week's &lt;a href=&quot;http://malaga2010.lcc.uma.es/&quot;&gt;TOOLS 2010&lt;/a&gt; conference, mostly during the dinners, since I was busy at other times. I uploaded the selection to a &lt;a href=&quot;http://bit.ly/91sjRm&quot;&gt;flickr set&lt;/a&gt;; here is a selection from the selection:

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4772370824/&quot; title=&quot;Jean Bezivin by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4077/4772370824_79b9fec445_m.jpg&quot; width=&quot;240&quot; height=&quot;160&quot; alt=&quot;Jean Bezivin&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;
&lt;p&gt;&lt;/p&gt;
&lt;center&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4772574884/&quot; title=&quot;Bertrand Meyer by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4099/4772574884_a1504e804c_m.jpg&quot; width=&quot;240&quot; height=&quot;240&quot; alt=&quot;Bertrand Meyer&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;
&lt;p&gt;&lt;/p&gt;
&lt;center&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4772015507/&quot; title=&quot;Michael Ernst by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4098/4772015507_49a99e382d_m.jpg&quot; width=&quot;160&quot; height=&quot;240&quot; alt=&quot;Michael Ernst&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;
&lt;p&gt;&lt;/p&gt;
&lt;center&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4771938107/&quot; title=&quot;Florian Heidenreich by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4122/4771938107_b974b955ff_m.jpg&quot; width=&quot;240&quot; height=&quot;161&quot; alt=&quot;Florian Heidenreich&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;
&lt;p&gt;&lt;/p&gt;
&lt;center&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4772762752/&quot; title=&quot;Dennis Wagelaar by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm5.static.flickr.com/4078/4772762752_af0f341fb2_m.jpg&quot; width=&quot;161&quot; height=&quot;240&quot; alt=&quot;Dennis Wagelaar&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Thu, 08 Jul 2010 07:37:19 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Lambdas in Spoofax</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/149-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/149-Lambdas-in-Spoofax.html</link>
	<description>Today I've been participating in the &lt;a href=&quot;http://planet-research20.org/ttc2010/index.php?Itemid=132&quot;&gt;Transformation Tool Contest 2010&lt;/a&gt;, which is  held as part of the TOOLS 2010 conference in Malaga. The plan for my participation was the use of &lt;a href=&quot;http://researchr.org&quot;&gt;researchr&lt;/a&gt; for use in the evaluation of the results of the contest. Then it turned out that the example problem for the live part of the contest was evaluation of lambda terms. An excellent problem to tackle with &lt;a href=&quot;http://spoofax.org&quot;&gt;Spoofax&lt;/a&gt;. So after doing some last improvements of researchr, I spent the afternoon creating a little lambda language environment. 

&lt;p&gt;&lt;/p&gt;

The &lt;a href=&quot;https://svn.strategoxt.org/repos/StrategoXT/spoofax-contrib/lambda/trunk&quot;&gt;source code&lt;/a&gt; of the project is part of the Spoofax contributions directory.

&lt;p&gt;&lt;/p&gt; 

Here is the Eclipse editor:

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/lambda-environment1.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

In the figure example.lam is the input for the transformation in concrete syntax; example.aterm is the abstract syntax for example.lam; example.nf.aterm is the result of normalizing example.aterm; finally, example.nf.lam is the result of pretty-printing the normal form. The result should be the correct addition of the lambda numeral for 2 with itself.

&lt;p&gt;&lt;/p&gt;

The syntax of the language is defined in SDF:

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/lambda-syntax.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

The Lambda.sdf module contains the definition of the concrete syntax. The Lambda.str module is automatically derived from Lambda.sdf and defines the abstract syntax (as an algebraic signature in Stratego).

&lt;p&gt;&lt;/p&gt;

The transformation is defined in Stratego. Here are the rules for pretty-printing and beta reduction:

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/lambda-beta2.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

Renaming rules are used to introduce the bindings of bound variables. The check rule verifies that no two definitions for the same name are given. The warning rule finds free variables and gives a warning in the editor.

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/lambda-rename.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

Here's a screencast with a little demo to give an impression of the environment:

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;

&lt;/center&gt;
&lt;center&gt;
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/spoofax/ttc-lambda-spoofax.mov&quot;&gt;download&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Thu, 01 Jul 2010 15:12:29 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: mobl</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/148-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/148-mobl.html</link>
	<description>In my keynote talk at the &lt;a href=&quot;http://www.kybele.etsii.urjc.es/mose2010/&quot;&gt;Model-Driven Service Engineering&lt;/a&gt; workshop in Malaga (co-located with ICMT and TOOLS) I gave a presentation of &lt;a href=&quot;http://mobl-lang.org&quot;&gt;mobl&lt;/a&gt;, the domain-specific language for mobile (web) application development that we (&lt;a href=&quot;http://zef.me&quot;&gt;Zef Hemel&lt;/a&gt;) are developing.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;div id=&quot;__ss_4642628&quot;&gt;&lt;/div&gt;&lt;/center&gt;</description>
	<pubDate>Tue, 29 Jun 2010 14:58:36 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Pure and Declarative Syntax Definition: Paradise Lost and Regained</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/146-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/146-Pure-and-Declarative-Syntax-Definition-Paradise-Lost-and-Regained.html</link>
	<description>&quot;In the beginning were the words, and the words were trees,
and the trees were words. All words were made through
grammars, and without grammars was not any word made
that was made. Those were the days of the garden of Eden.
And there where language engineers strolling through the
garden. They made languages which were sets of words by
making grammars full of beauty. And with these grammars,
they turned words into trees and trees into words. And the
trees were natural, and pure, and beautiful, as were the grammars.

&lt;p&gt;&lt;/p&gt;

Among them were software engineers who made software
as the language engineers made languages. And they
dwelt with them and they were one people. The language engineers
were software engineers and the software engineers
were language engineers. And the language engineers made
language software. They made recognizers to know words,
and generators to make words, and parsers to turn words
into trees, and formatters to turn trees into words.

&lt;p&gt;&lt;/p&gt; 
But the software they made was not as natural, and pure,
and beautiful as the grammars they made. So they made software
to make language software and began to make language
software by making syntax definitions. And the syntax definitions
were grammars and grammars were syntax definitions.
With their software, they turned syntax definitions into
language software. And the syntax definitions were language
software and language software were syntax definitions. And
the syntax definitions were natural, and pure, and beautiful,
as were the grammars.&quot;

&lt;p&gt;&lt;/p&gt; 

Thus starts our essay on declarative syntax definition, which has been accepted for presentation at the Onward! 2010 conference:

&lt;blockquote&gt;
Lennart C. L. Kats, Eelco Visser, Guido Wachsmuth. 
&lt;a href=&quot;http://researchr.org/publication/KWV10&quot;&gt;Pure and Declarative Syntax Definition: Paradise Lost and Regained.&lt;/a&gt;
In Proceedings of Onward! 2010. ACM, 2010. 
(&lt;a href=&quot;http://researchr.org/publication/KWV10&quot;&gt;draft of final version&lt;/a&gt;)
&lt;/blockquote&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;


&lt;b&gt;Abstract&lt;/b&gt; 

Syntax definitions are pervasive in modern software systems,
and serve as the basis for language processing tools
like parsers and compilers. Mainstream parser generators
pose restrictions on syntax definitions that follow from their
implementation algorithm. They hamper evolution, maintainability,
and compositionality of syntax definitions. The
pureness and declarativity of syntax definitions is lost. We
analyze how these problems arise for different aspects of
syntax definitions, discuss their consequences for language
engineers, and show how the pure and declarative nature of
syntax definitions can be regained.</description>
	<pubDate>Mon, 21 Jun 2010 18:55:46 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Building DSLs with Spoofax Language Workbench</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/145-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/145-Building-DSLs-with-Spoofax-Language-Workbench.html</link>
	<description>The slides of my keynote talk at Code Generation 2010 with an appendix about model-to-model transformation and transformation strategies.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;div id=&quot;__ss_4534414&quot;&gt;&lt;/div&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 18 Jun 2010 10:38:27 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Strategies for Design &amp; Implementation of Domain-Specific Languages</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/144-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/144-Strategies-for-Design-Implementation-of-Domain-Specific-Languages.html</link>
	<description>In the fifth lecture in the &lt;a href=&quot;http://department.st.ewi.tudelft.nl/course/in4308&quot;&gt;Model-Driven Software Development&lt;/a&gt; course at TU Delft I talked about strategies for design and implementation of domain-specific languages, illustrated with a sketch of the mapping from &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; to Java.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;div id=&quot;__ss_4486836&quot;&gt;&lt;/div&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Sun, 13 Jun 2010 09:59:19 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Encapsulating Software Platform Logic by Aspect-Oriented Programming</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/143-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/143-Encapsulating-Software-Platform-Logic-by-Aspect-Oriented-Programming.html</link>
	<description>The &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt; transformation language was originally developed on and for the C/Linux platform. A couple of years ago we started porting the language and the Stratego/XT infrastructure to Java, which eventually enabled us to build the &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/139-Spoofax-0.5.html&quot;&gt;Spoofax Language Workbench&lt;/a&gt;. The back-end of the Stratego compiler was fairly unproblematic; the &lt;a href=&quot;https://svn.strategoxt.org/repos/StrategoXT/strategoxt/trunk/strc-core/lib/stratego/strc/c/s2c-ng.str&quot;&gt;back-end for C&lt;/a&gt; is a bit over 1000 lines of code translating the compact Stratego Core language. Porting this was a matter of replacing the translation scheme. However, the extensive library, partly consisting on primitives implemented in C, depended on the Linux platform. To adapt the library to the Java platform, we extended Stratego with a simple aspect mechanism. Using &lt;em&gt;override&lt;/em&gt; and &lt;em&gt;proceed&lt;/em&gt; stragey definitions from libraries can be replaced with new definitions. The aspect extension and its application for achieving portability is discussed in the following paper (which has been accepted for the &lt;a href=&quot;http://www2010.ieee-scam.org/&quot;&gt;SCAM 2010&lt;/a&gt; conference):

&lt;blockquote&gt;
Lennart C. L. Kats, Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/KatsVisser-SCAM-2010&quot;&gt;Encapsulating Software Platform Logic by Aspect-Oriented Programming: A Case Study in Using Aspects for Language Portability.&lt;/a&gt; In Cristina Marinescu, Jurgen J. Vinju, editors, Proceedings of the Tenth IEEE International Working Conference on Source Code Analysis and Manipulation 2010. 2010. 
&lt;/blockquote&gt;

&lt;p&gt;&lt;/p&gt;

&lt;b&gt;Abstract:&lt;/b&gt;

Software platforms such as the Java Virtual Machine or the CLR .NET virtual machine have their own ecosystem of a core programming language or instruction set, libraries, and developer community. Programming languages can target multiple software platforms to increase interoperability or to boost performance. Introducing a new compiler backend for a language is the first step towards targeting a new platform, translating the language to the platform's language or instruction set. Programs written in modern languages generally make extensive use of APIs, based on the runtime system of the software platform, introducing additional portability concerns. They may use APIs that are implemented by platform-specific libraries. Libraries may perform platform-specific operations, make direct native calls, or make assumptions about performance characteristics of operations or about the file system.

This paper proposes to use aspect weaving to invasively adapt programs and libraries to address such portability concerns, and identifies four classes of aspects for this purpose. We evaluate this approach through a case study where we retarget the Stratego program transformation language towards the Java Virtual Machine.</description>
	<pubDate>Fri, 11 Jun 2010 13:18:58 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Web Abstractions</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/142-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/142-Web-Abstractions.html</link>
	<description>The third and fourth lectures in the &lt;a href=&quot;http://department.st.ewi.tudelft.nl/course/in4308&quot;&gt;course on model-driven software development&lt;/a&gt; that I teach at TU Delft. I talked about domain-specific abstractions in the domain of web programming, as incarnated in the design of &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;div id=&quot;__ss_3390321&quot;&gt;
&lt;/div&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;/center&gt;


&lt;p&gt;&lt;/p&gt;

The material is based on the following publications:

&lt;ul&gt;

&lt;li&gt; Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/Visser07&quot;&gt;WebDSL: A Case Study in Domain-Specific Language Engineering&lt;/a&gt;. GTTSE 2007: 291-373

&lt;li&gt; Danny M. Groenewegen, Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/GroenewegenV08&quot;&gt;Declarative Access Control for WebDSL: Combining Language Integration and Separation of Concerns&lt;/a&gt;. ICWE 2008: 175-188 &lt;br /&gt;

&lt;li&gt; Zef Hemel, Ruben Verhaaf, Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/HemelVV08&quot;&gt;WebWorkFlow: An Object-Oriented Workflow Modeling Language for Web Applications&lt;/a&gt;. MoDELS 2008: 113-127 &lt;br /&gt;

&lt;li&gt;
Danny M. Groenewegen, Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/GroenewegenV-SLE-2009&quot;&gt;Integration of Data Validation and User Interface Concerns in a DSL for Web Applications&lt;/a&gt;. SLE 2009: 164-173 

&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;</description>
	<pubDate>Wed, 09 Jun 2010 23:15:54 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Code Generation by Model Transformation</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/141-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/141-Code-Generation-by-Model-Transformation.html</link>
	<description>The journal version of our &lt;a href=&quot;http://researchr.org/publication/HemelKV08&quot;&gt;ICMT 2008&lt;/a&gt; paper has finally and officially been published in the &lt;a href=&quot;http://www.springerlink.com/content/109378/?p=d417fe32d72d4bd393ec08bf53eab60a&amp;amp;pi=0&quot;&gt;Software and Systems Modeling&lt;/a&gt; journal. 

&lt;blockquote&gt;
Zef Hemel, Lennart C. L. Kats, Danny M. Groenewegen, Eelco Visser. &lt;a href=&quot;http://researchr.org/publication/HemelKGV-2010&quot;&gt;Code generation by model transformation: a case study in transformation modularity.&lt;/a&gt; Software and Systems Modeling, 9(3):375-402, June 2010. 
&lt;/blockquote&gt;

&lt;p&gt;&lt;/p&gt;

The big contribution with respect to the earlier paper is a new approach to type checking with Stratego. Instead of defining a type checker as a single traversal that takes care of name resolution, type analysis, error checking and generation of error messages, these aspects are defined separately and can also be &lt;em&gt;used&lt;/em&gt; separately. This allows a much cleaner style for defining type checkers and it enables a smooth combination of type analysis and normalizing transformations. The style also turned out to work very well in &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/138-The-Spoofax-Language-Workbench.html&quot;&gt;Spoofax&lt;/a&gt; setting where analyses such as name resolution are used for multiple purposes in the IDE.

&lt;p&gt;&lt;/p&gt;

The paper is published under the &lt;em&gt;open access&lt;/em&gt; regime, so you can read it even without subscription to the journal.


&lt;p&gt;&lt;/p&gt;

&lt;b&gt;Abstract&lt;/b&gt;

The realization of model-driven software development requires effective techniques for implementing code generators for domain-specific languages. This paper identifies techniques for improving separation of concerns in the implementation of generators. The core technique is code generation by model transformation, that is, the generation of a structured representation (model) of the target program instead of plain text. This approach enables the transformation of code after generation, which in turn enables the extension of the target language with features that allow better modularity in code generation rules. The technique can also be applied to ‘internal code generation’ for the translation of high-level extensions of a DSL to lower-level constructs within the same DSL using model-to-model transformations. This paper refines our earlier description of code generation by model transformation with an improved architecture for the composition of model-to-model normalization rules, solving the problem of combining type analysis and transformation. Instead of coarse-grained stages that alternate between normalization and type analysis, we have developed a new style of type analysis that can be integrated with normalizing transformations in a fine-grained manner. The normalization strategy has a simple extension interface and integrates non-local, context-sensitive transformation rules. We have applied the techniques in a realistic case study of domain-specific language engineering, i.e. the code generator for WebDSL, using Stratego, a high-level transformation language that integrates model-to-model, model-to-code, and code-to-code transformations. 

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Tue, 08 Jun 2010 11:39:26 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Domain Analysis &amp; Data Modeling</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/140-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/140-Domain-Analysis-Data-Modeling.html</link>
	<description>Second lecture in the &lt;a href=&quot;http://department.st.ewi.tudelft.nl/course/in4308&quot;&gt;course on model-driven software development&lt;/a&gt; that I teach at TU Delft. I talked about domain analysis, interaction design, and domain-driven design.

&lt;center&gt;
&lt;div id=&quot;__ss_3140146&quot;&gt;&lt;/div&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 31 May 2010 20:30:22 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Spoofax 0.5</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/139-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/139-Spoofax-0.5.html</link>
	<description>We're pleased to announce the 0.5 release of the &lt;a href=&quot;http://strategoxt.org/Spoofax/WebHome&quot;&gt;Spoofax language workbench&lt;/a&gt;, an Eclipse plugin that seamlessly integrates Java versions of Stratego and SDF into Eclipse. Spoofax can be used to develop new languages and transformations based on SDF and Stratego in the Eclipse environment. 

&lt;p&gt;&lt;/p&gt;

Stratego and SDF have traditonally been implemented using C, but to increase portability we have developed Java versions of the &lt;a href=&quot;http://strategoxt.org/Stratego/STRJ&quot;&gt;Stratego compiler&lt;/a&gt; and &lt;a href=&quot;http://strategoxt.org/Stratego/JSGLR&quot;&gt;the JSGLR parser for SDF&lt;/a&gt;. These new implementations are seamlessly integrated into the Spoofax environment, but can also be used as stand-alone tools.

&lt;p&gt;&lt;/p&gt;

IDE support has become essential for developers to be productive with programming languages. Spoofax provides IDE support for Stratego and SDF for developers of languages and transformations. It also aids in the development of IDE support for new languages: from the first version of an !SDF grammar, an editor can be created for the language and used &lt;a href=&quot;http://strategoxt.org/Spoofax/Features&quot;&gt;side-by-side&lt;/a&gt; with the definition in Eclipse. Using Stratego, the editor can be enhanced with transformations and semantic editor services such as reference resolving and content completion.

The screenshot below illustrates some of the IDE features supported by editors created with Spoofax:

&lt;center&gt;
&lt;img src=&quot;http://strategoxt.org/pub/Spoofax/Features/screenshot-annotated-small.png&quot; alt=&quot;Spoofax editor features&quot; width=&quot;800&quot; height=&quot;349&quot; /&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

Spoofax can be downloaded from &lt;a href=&quot;http://www.spoofax.org&quot;&gt;spoofax.org&lt;/a&gt; or &lt;a href=&quot;http://www.strategoxt.org/Spoofax&quot;&gt;strategoxt.org/Spoofax&lt;/a&gt;. When installed in Eclipse, the plugin provides a &quot;New project&quot; wizard that creates a new skeleton project illustrating some of the Spoofax features. The website also includes a &lt;a href=&quot;http://strategoxt.org/Spoofax/Tour&quot;&gt;tour&lt;/a&gt; further showcasing the features of the workbench. For migrating C-based Stratego projects to Spoofax, please read our &lt;a href=&quot;http://strategoxt.org/Spoofax/FAQ&quot;&gt;FAQ&lt;/a&gt; or contact us in case of other questions.

&lt;p&gt;&lt;/p&gt;

An overview of the architecture of Spoofax and how Spoofax can be used in the development of new languages and IDE services is given in the paper &lt;a href=&quot;http://researchr.org/publication/KatsVisser2010&quot;&gt;The Spoofax Language Workbench. Rules for Declarative Specification of Languages and IDEs&lt;/a&gt; by Lennart Kats and Eelco Visser, accepted for publication at &lt;a href=&quot;http://www.splashcon.org/&quot;&gt;SPLASH/OOPSLA 2010&lt;/a&gt;. Further documentation can be found on the Spoofax website.

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Fri, 28 May 2010 21:41:07 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Performing Systematic Literature Reviews with Researchr</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/137-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/137-Performing-Systematic-Literature-Reviews-with-Researchr.html</link>
	<description>Eelco Visser. Performing Systematic Literature Reviews with Researchr: Tool Demonstration. Technical Report TUD-SERG-2010-010, Software Engineering Research Group, Delft University of Technology, Delft, The Netherlands, May 2010. [&lt;a href=&quot;http://researchr.org/publication/Visser2010&quot;&gt;researchr&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;

In this paper, I describe the integrated workflow for performing systematic reviews
with researchr, a web application for management of bibliographic data. Researchr
semantically links publications to authors, journals, proceedings, and conferences, supporting
reliable browsing. Publications can be classified using public (shared) tags. Researchr
has over a million publication records, mainly in computer science. The core of
the collection is based on the DBLP database (as provided via its XML export), but is
extended with contributions from users. Researchr is open for contributions; users can
contribute missing publications and can make corrections to publication records in the
database and add missing information such as abstracts and citations. The quality of
such modifications is guarded by a reputation system. Users can use researchr to provide
a profile of their research with publications. More importantly, the site supports
literature reviews, by creating bibiographies, collections of publications about a topic
of choice. In this paper I describe the elements of the systematic reviewing workflow in
researchr.

Performing a systematic review consists of creating a bibliography, defining and executing
a search strategy, defining classification schemes, and reviewing and classifying
papers.

&lt;p&gt;&lt;/p&gt;</description>
	<pubDate>Mon, 03 May 2010 13:13:35 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Model-Driven Software Development: Introduction</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/136-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/136-Model-Driven-Software-Development-Introduction.html</link>
	<description>I'll be posting my slides from a course on model-driven software development that I'm teaching at Delft University of Technology. Here's the first, introducing the course.

&lt;center&gt;
&lt;div id=&quot;__ss_3061258&quot;&gt;&lt;strong&gt;&lt;a href=&quot;http://www.slideshare.net/eelcovisser/modeldriven-software-development-introduction-overview-3061258&quot; title=&quot;Model-Driven Software Development - Introduction &amp;amp; Overview&quot;&gt;Model-Driven Software Development - Introduction &amp;amp; Overview&lt;/a&gt;&lt;/strong&gt;&lt;div&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot;&gt;presentations&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/eelcovisser&quot;&gt;Eelco Visser&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;
&lt;/center&gt;</description>
	<pubDate>Fri, 30 Apr 2010 19:35:47 +0000</pubDate>
</item>
<item>
	<title>Karl Trygve Kalleberg: English as a Programming Language, part I</title>
	<guid>http://blog.kalleberg.org/post/515284578</guid>
	<link>http://blog.kalleberg.org/post/515284578</link>
	<description>&lt;p&gt;Together with &lt;a href=&quot;http://einarbrum.tumblr.com&quot;&gt;Einar&lt;/a&gt;, I’ve been deeply immersed in domain analysis for our upcoming trading language for the past month — i.e., analyzing the domain of trading. One of the crucial things we’ve been focusing on, is the rich vocabulary you are likely to hear when listening to traders working together. Their vocabulary captures how trading ideas are transmitted between humans. As the philosopher &lt;a href=&quot;http://en.wikipedia.org/wiki/Hans-Georg_Gadamer&quot;&gt;Gadamer&lt;/a&gt; might have argued, we think in words. And traders have invested time and effort into learning “the trading words”, because with language comes the knowledge and vice versa.&lt;/p&gt;

&lt;p&gt;We want to capitalize on their investment by exposing the raw computing power of modern computers using a familiar language. If our target group were mathematicians, the language and notation of choice would be + - / * f(x), and all the other weird symbols we learned in school (and many we didn’t learn). If our target group were programmers, formal languages like Java or C++ would be an good starting point for inventing a new variant for trading.&lt;/p&gt;

&lt;p&gt;But our future users are traders first, then a little bit of mathematician, then programmers as a distant third. With this in mind, we have done some serious consideration into using natural language as a basis for expressing trading rules. As part of this consideration, I did a (perhaps too short, but very enlightening) survey of the state of the art of using English as a programming language. I’m sharing my findings here, since they might be of broader interest.&lt;/p&gt;

&lt;h3&gt;Background&lt;/h3&gt;

&lt;p&gt;Let me give you a very concrete idea of what we want: Our motivation for using English as a programming language is to be able to support trading rules written almost exactly like regular English sentences, e.g.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if seeing more than 3 news headlines
   from distinct sources
   containing 'Hurricane' and 'US'
   within 1 minute:
    flatten positions
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Again, our users (c.f. &lt;a href=&quot;http://kolibrifx.com/2010/03/29/methodology-part-1-meet-takuya/&quot;&gt;Takuya&lt;/a&gt;) are domain experts, but not programmers. They will mostly likely be reading code more often than they write it. They will not be coding every day, only now and again. They’re usually not interested in spending all that much time getting into that specific frame of mind for solving complex problems that regular programmers love so much (you know what I mean only too well, admit it).&lt;/p&gt;

&lt;p&gt;As anybody will tell you, the English language is rather unbounded and pretty rife with ambiguities. I’ve come across a wide range of efforts to manage this problem, and I’ll share some highlights from the various efforts here.&lt;/p&gt;

&lt;h3&gt;Natural Language Programming&lt;/h3&gt;

&lt;p&gt;One of the major selling points of the &lt;a href=&quot;http://en.wikipedia.org/wiki/Natural_language_programming&quot;&gt;Natural Language Programming&lt;/a&gt; technique is the ability to write technical documents shared by computers and humans. The technique exposes to its user an iterative process whereby rules for turning sentences into code are formulated. This multi-step process goes as follows:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Define your taxonomy of concepts — i.e. names of interest in your domain. In our case: prices, instruments, pips, pricing, trends, support, resistance, etc.&lt;/li&gt;
&lt;li&gt;Define top-level sentences using said concepts, e.g. define support if bottom is at same level within X minutes.&lt;/li&gt;
&lt;li&gt;Define top-level sentences in terms of sequences of other sentences which also include said concepts.&lt;/li&gt;
&lt;li&gt;When you reach the most primitive sentences, you define a mapping from these to code in an (any) existing programming language, somewhat like a template system.&lt;/li&gt;
&lt;li&gt;Repeat until there is a mapping for all paths from the top-level sentences to code.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;The example provided at Wikipedia is more detailed:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;If  U_ is 'smc01-control',  then do the following.
Define surface weights Alpha as &quot;[0.5, 0.5]&quot;. Initialise matrix Phi 
   as a 'unit matrix'.
Define J as the 'inertia matrix' of Spc01.
Compute matrix J2 as the inverse of J.
Compute position velocity error Ve and angular velocity error Oe 
   from dynamical state X, guidance reference Xnow.
Define the joint sliding surface G2 from the position velocity error 
   Ve and angular velocity error Oe using the surface weights Alpha.
Compute the smoothed sign function SG2 from the joint sliding 
   surface G2 with sign threshold 0.01.
Compute special dynamical force F from dynamical state  X and 
   surface weights Alpha.
Compute control torque T and control force U from matrix J2, surface 
   weights Alpha, special dynamical force F , smoothed sign function SG2.
Finish conditional actions.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The technique is supported by a system called &lt;a title=&quot;System English&quot; href=&quot;http://www.system-english.com/&quot;&gt;System English&lt;/a&gt;. There is a page listing &lt;a title=&quot;System English Examples&quot; href=&quot;http://www.system-english.com/?page=sepapers&quot;&gt;a few more examples&lt;/a&gt;, all of them in the style of the example above.&lt;/p&gt;

&lt;p&gt;I must admit that this is a rather intriguing technique. My present reservation is that all the examples are rather verbose, and a dreary read. The documents (i.e., programs) are very repetitive, with a lot of sentences starting with either &lt;code&gt;define&lt;/code&gt; or &lt;code&gt;compute&lt;/code&gt;. This might be perfectly fine for technical documentation. I’ll not make any hasty judgments about its applicability to trading before actually having tested it for our domain, though.&lt;/p&gt;

&lt;h3&gt;Maude&lt;/h3&gt;

&lt;p&gt;It might come as a surprise to find &lt;a href=&quot;http://Maude&quot;&gt;Maude&lt;/a&gt; on this list, but let me explain why I included it. Maude is a language for equational and rewriting logic specification and programming. That sounds scary, but let’s focus on the parts of Maude which allow you build sentence fragments, the operators.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;op add _ to _  : Num List -&gt; List
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This defines the operator (sentence fragment) &lt;code&gt;add to&lt;/code&gt;. Assuming list is a list, the definition allows you to write&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;add 1 to list
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which (provided that the &lt;code&gt;add to&lt;/code&gt; operator does its job correctly), will add 1 to a list of numbers.&lt;/p&gt;

&lt;p&gt;Since you are free to define any operator, you can also start defining your own mathematical operators&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;op _ + _ : Num Num -&gt; Num
op _ * _ : Num Num -&gt; Num
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This allows you to write expressions &lt;code&gt;a * b + c&lt;/code&gt;, as you might expect. There is one crucial point here, however. The precedence of the operators are not fixed. You are free to define these yourself. This means that the expression just given, will be ambiguous. It’s not (yet) defined whether it should be taken to mean &lt;code&gt;(a * b) + c&lt;/code&gt; or &lt;code&gt;a * (b + c)&lt;/code&gt;. As you might guess, these are wrinkles that are rather important to iron out.&lt;/p&gt;

&lt;p&gt;Maude comes to the rescue with a precedence annotation:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;op _ + _ : Num Num -&gt; Num [prec 35]
op _ * _ : Num Num -&gt; Num [prec 25]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Think of this as a little bit of grammatic chemistry: the operator with the lower precedence will bind stronger to its arguments. With the precedence annotation in place, the expression &lt;code&gt;a * b + c&lt;/code&gt; is now always interpreted as &lt;code&gt;(a * b) + c&lt;/code&gt;, because &lt;code&gt;*&lt;/code&gt; binds stronger than ‘+’.&lt;/p&gt;

&lt;p&gt;The operator &lt;code&gt;+&lt;/code&gt; brings another ambiguity to the table: associativity. When writing &lt;code&gt;a + b + c&lt;/code&gt;, should it be taken to mean &lt;code&gt;(a + b) + c&lt;/code&gt; or &lt;code&gt;a + (b + c)&lt;/code&gt;. The precedence cannot help us, since it will always be the same for the two “competing” pluses (plus competing against itself). As it happens, for the &lt;code&gt;+&lt;/code&gt; operator, it really doesn’t matter. Both alternatives are the same. In mathematics, an operator with this property is called associative. Maude provides the &lt;code&gt;[assoc]&lt;/code&gt; annotation for marking an operator with this property. Commutativity (that &lt;code&gt;x op y&lt;/code&gt; is the same as &lt;code&gt;y op x&lt;/code&gt;) is marked by &lt;code&gt;[comm]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, there may be cases with an operator is not associative, such as the divide operator. The Maude 2.0 Primer suggests that &lt;code&gt;vs&lt;/code&gt; is also such an operator:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;op _ vs _ Player Player -&gt; Player [comm]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let’s assume we’re back in the early 90s and that the following battle is at hand: &lt;a href=&quot;http://en.wikipedia.org/wiki/Chun-Li&quot;&gt;Chun-Li&lt;/a&gt; vs &lt;a href=&quot;http://en.wikipedia.org/wiki/Ryu_(Street_Fighter)&quot;&gt;Ryu&lt;/a&gt; vs &lt;a href=&quot;http://en.wikipedia.org/wiki/Ken_(Street_Fighter)&quot;&gt;Ken&lt;/a&gt;. If we read this is as (Chun-Li vs Ryu) vs Ken the winner of Chun-Li and Ryu will face Ken. In the interpretation Chun-Li vs (Ryu vs Ken), Chun-Li will face the winner of Ken and Ryu. Clearly not the same meaning.&lt;/p&gt;

&lt;p&gt;Again, Maude comes to the rescue with an annotation: &lt;code&gt;gather&lt;/code&gt;. Gather takes a number of flags equal to the number of arguments for your operator (in this case two). Each gather flag tells us something about the precedence of the operator found at  argument. A flag may be either of &lt;code&gt;e&lt;/code&gt; (strictly less), &lt;code&gt;E&lt;/code&gt; (less or equal), &lt;code&gt;&amp;amp;&lt;/code&gt; (any). Confuzzled? Let’s try it out.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;op _ vs _ Player Player -&gt; Player [comm] [prec 33] [gather(e E)]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This defines that the first argument to &lt;code&gt;vs&lt;/code&gt; must be of precedence strictly less than that of &lt;code&gt;vs&lt;/code&gt;. Since the precedence of &lt;code&gt;vs&lt;/code&gt; can never be strictly less than itself; (Chun-Li vs Ryu) vs Ken is therefore not allowed — the only valid interpretation left is Chun-Li vs (Ryu vs Ken). With that ambiguity out of the way, we can proceed to the real action. &lt;a href=&quot;http://en.wikipedia.org/wiki/Street_Fighter&quot;&gt;Fight&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Clearly, these mechanisms make Maude very expressive. In practice, Maude allows programmers to fairly freely define their own language with a rather natural looking syntax for any library they might want to design. The downside is that mastering Maude’s disambiguation mechanics is an art unto its own.&lt;/p&gt;

&lt;h3&gt;Action Semantics&lt;/h3&gt;

&lt;p&gt;Another little language with a very English-like syntax I’ve come across in previous travels is that of Peter D. Mosses’ formalism for defining semantics for programming languages. I.e., a “programming language” for defining the meaning of programming languages. The following, which tells how the identifier &lt;code&gt;I&lt;/code&gt; is to be evaluated, should provide some flavor:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;evaluate I = give the expressible bound to I 
             or 
             enact the abstraction bound to I
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;While not exactly in widespread use, it has been used to define semantics for some non-trivial languages, such as the &lt;a href=&quot;ftp://ftp.brics.dk/Projects/AS/Papers/MossesWatt93DRAFT/pas-0.6.ps.Z&quot;&gt;dynamic semantics for Pascal&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Mosses and colleagues have written research tools to fully generate compilers based on language definitions in the action semantics formalism. The value proposition of &lt;a title=&quot;Action Semantics&quot; href=&quot;http://en.wikipedia.org/wiki/Action_semantics&quot;&gt;Action Semantics&lt;/a&gt; is pretty clear: it allows you define your programming language at a high level, and then generate language tools such as interpreters and compilers (almost) for free — provided your language fits into the AS formalism.&lt;/p&gt;

&lt;h3&gt;Metafor&lt;/h3&gt;

&lt;p&gt;Metafor was a research prototype of a user interface for visualizing interactively typed stories as code (not available for general consumption). The idea was that users type English sentences describing their domain. Metafor then continually analyzes the typed story and maintains a “Python-view”. The Python view contains the structure of the code.&lt;/p&gt;

&lt;p&gt;For example, when the user types the code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;There is a bar with a bartender who makes drinks.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Metafor would generate the following code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;class bar:
    the_bartender = bartender()
class bartender:
    def make(drink): pass
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The “translation” from English to code is done using a slew of natural language processing tricks, including a natural language parser and a large database of  English “common sense” sentences from which “knowledge” about the various words is extracted.&lt;/p&gt;

&lt;p&gt;As far as I know, the system was only ever able to generate the outline of your program. The larger, and perhaps more interesting, problem of writing program logic in English is still left as an exercise to the reader.&lt;/p&gt;

&lt;p&gt;An improved version of Metafor be useful for doing structural/architectural design of code and classes, but the project seems discontinued. Fortunately, some of the appealing properties of Metafor are available in the Inform-series of adventure game/interactive fiction-creators.&lt;/p&gt;

&lt;h3&gt;Inform 7&lt;/h3&gt;

&lt;p&gt;The &lt;a title=&quot;Inform 7&quot; href=&quot;http://inform7.com/&quot;&gt;Inform&lt;/a&gt; system might be seen as a continuation of the good old &lt;a title=&quot;Infocom&quot; href=&quot;http://en.wikipedia.org/wiki/Infocom&quot;&gt;Infocom&lt;/a&gt;-style of games, but on steroids and done really well. Inform is a design system for interactive fiction based on natural language. It comes with an “IDE” for developing interactive fiction, or text-based adventures, if you will.&lt;/p&gt;

&lt;p&gt;You can easily define locations and entities:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;The wood-slatted crate is in the Gazebo.
The crate is a container.
Mr Jones wears a top hat.
The crate contains a croquet mallet.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In the nomenclature of Inform, these are assertions. A number of built-in verbs are used to state assertions: &lt;em&gt;to be&lt;/em&gt;, &lt;em&gt;to have&lt;/em&gt;, &lt;em&gt;to carry&lt;/em&gt;, &lt;em&gt;to wear&lt;/em&gt;, &lt;em&gt;to contain&lt;/em&gt; and &lt;em&gt;to support&lt;/em&gt;. It is possible for users to extend this set of verbs.&lt;/p&gt;

&lt;p&gt;Based on the above sentences, the system will create the objects ‘crate’, ‘Mr Jones’ and ‘croquet mallet’. It will even place the croquet mallet inside the crate, so that the player must open it to find the mallet.&lt;/p&gt;

&lt;p&gt;All in all, the system seems very well crafted and is the most impressive example of natural language programming I have seen to date. Again, I have no practical experience using it, so I cannot offer any advice on how expressive such and approach be might be for areas other than interactive fiction.&lt;/p&gt;

&lt;h3&gt;AppleScript&lt;/h3&gt;

&lt;p&gt;Perhaps the English-like language with the most widespread use, is that of &lt;a title=&quot;AppleScript&quot; href=&quot;http://developer.apple.com/AppleScript/&quot;&gt;AppleScript&lt;/a&gt;, as found on all Apple computers today. AppleScript was designed in the early 90s and is a descendent of the &lt;a title=&quot;HyperCard&quot; href=&quot;http://no.wikipedia.org/wiki/HyperCard&quot;&gt;HyperCard&lt;/a&gt; hype of the late 80s. According to its creators, AppleScript is aimed at “casual programmers”. This includes programmers of all experience levels who are primarily out to solve problems, not write programs.&lt;/p&gt;

&lt;p&gt;A simple AppleScript program for manipulating Excel:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;tell application ‘‘ Excel ’’ on machine x
    put 3.14 into cell 1 of row 2 of window 1
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Another script for doing a bit of cut-n-pasting:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;copy the name of the first window of application ‘‘ Excel ’’
to the end of the first paragraph of app ‘‘ Scriptable Text Editor ’’
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I came across this excellent report: &lt;em&gt;AppleScript. William R. Cook, University of Texas at Austin With contributions from Warren Harris, Kurt Piersol, Dave Curbow, Donn Denman, Edmund Lai, Ron Lichty, Larry Tesler, Mitchell Gass &amp;amp; Donald Olson September 29, 2006.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This report is a really interesting read to anyone who considers using English as a programming language. To set the stage, let’s start with their conclusion:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Many of the current problems in AppleScript can be traced to the use of syntax based on natural language; however, the ability to create pluggable dialects may provide a solution in the future, by creating a new syntax based on conventional programming languages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The English-like syntax, initially touted as a great way to capture the minds and souls of non-programmer and programmer alike, turned out to be the major Achilles heel of the language. Hmmm.&lt;/p&gt;

&lt;p&gt;In the discussion, the authors go into a bit more detail:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The experiment in designing a language that resembled natural languages (English and Japanese) was not successful. It was assume that scripts should be presented in “natural language” so that average people could read and write them. […] In the end the syntactic variations and flexibility did more to confuse programmers than to help them out. The main problem is that AppleScript only appears to be a natural language. In fact is an artificial language, like any other programming language. […] It is easy to read AppleScript, but quite hard to write it.&lt;/p&gt;
  
  &lt;p&gt;When writing programs or scripts, users prefer a more conventional programming language structure. Later versions of AppleScript dropped support for dialects. In hindsight, we believe that AppleScript should have adopted the Professional Dialect that was developed but never shipped.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, the main problem seems to stem from AppleScript not providing “English as we know it”. It has a surface syntax which reads pretty much like English. However, when trying express yourself in AppleScript, most of the grammar rules, idioms, proverbs and personal style you are accustomed to, is simply not there. Instead, you are forced to mould your ideas into a sort of Pidgin English, the AppleScript English, which doesn’t really behave like you expect. And the worst thing programmers know is when things don’t behave as they expect.&lt;/p&gt;

&lt;p&gt;In retrospect, this might not come as a surprise. Many, if not most, programming languages are designed to be somewhat syntactically and grammatically minimal. There is often only one, or at most a few, ways of stating the basic things. Based on a set of core language constructs, you can build successively larger programs. But the set of core constructs behave rather simply and predictably. (Yes, Perl is a rather famous example of the opposite.)&lt;/p&gt;

&lt;h3&gt;The Osmosian Order&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;http://www.osmosian.com/&quot;&gt;Osmosian Order&lt;/a&gt; is not as much a project as it appears to be a movement. According to their manifesto:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The Osmosian Order of Plain English Programmers is a group of like-minded developers and educators dedicated to the rescue of computer science from the pervasive fog of confusion engulfing it today.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They even have a plan:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Our initial goal is to see Plain English (and other natural-language variants, such as Plain Spanish and Plain German) adopted as de facto standard languages.&lt;/p&gt;&lt;/blockquote&gt;


&lt;p&gt;To that end, they have (allegedly) written a compiler and development environment for programming using Plain English. An example Plan English program is given below:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;To create the background:
    Draw the screen's box with the white color.
    Loop.
    Pick a spot anywhere in the screen's box.
    Pick a color between the lightest gray color and the white color.
    Dab the color on the spot.
    If a counter is past 80000, break.
    If the counter is evenly divisible by 1000, refresh the screen.
    Repeat.
    Extract the background given the screen's box. 
       \or Create the background from the screen.
    Or something.

To finish a work:
    If the work is nil, exit.
    If the work is finished, exit.
    Create a picture given the work's URL.
    If the picture is nil, exit.
    Resize the picture to 5-1/2 inches by 5-1/2 inches.
    Center the picture in the screen's box.
    Draw the background.
    Draw the picture.
    Loop.
    Pick a spot anywhere near the picture's box.
    Mix a color given the spot.
    Dab the color on the spot.
    If a counter is past 20000, break.
    Repeat.
    Extract the work's painting given the picture's box.
    Destroy the picture.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Reputedly, The Order provides a fast compiler which is able to turn the stylized English above into an executable Windows program. The compiler isn’t freely downloadable, but their web page says you can get it by e-mail.&lt;/p&gt;

&lt;h3&gt;Tentative conclusion&lt;/h3&gt;

&lt;p&gt;Using English as a programming language is definitely not a no-brainer. There are some hard trade-offs to be juggled.&lt;/p&gt;

&lt;p&gt;My present thinking is that if the price of predictability is the cost of learning a new language, people with extensive scripting needs will pay it gladly. If this cost is kept low by providing a set of core language constructs already known from other programming languages, getting started with scripting becomes trivial. While the ultimate goal will always be do-what-I-mean (and not as I think or say) computers, an intermediate step seems to be where most computer literates have a working knowledge of scripting. As long as most scripting languages resemble each other, it’s sort of like knowing any one of the Scandinavian languages — you can easily get by in all of Scandinavia knowing just one of them.&lt;/p&gt;</description>
	<pubDate>Mon, 12 Apr 2010 08:45:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Talk about the Researchr Digital Library</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/129-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/129-Talk-about-the-Researchr-Digital-Library.html</link>
	<description>At the recent &lt;a href=&quot;http://www.smart-generators.org/do/view/WG211/WebHome&quot;&gt;IFIP WG 2.11&lt;/a&gt; meeting in St Andrews, I gave a talk about &lt;a href=&quot;http://researchr.org&quot;&gt;researchr&lt;/a&gt;, the digital library application I have been working on in the past year. Here is the recording of that talk, which gives an introduction to the features of the tool.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;

&lt;/center&gt;
&lt;center&gt;
Download:
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/researchr/researchr-wg211-75.mov&quot;&gt;768x576&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Mon, 15 Mar 2010 11:04:07 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Spoofax: The Language Workbench</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/128-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/128-Spoofax-The-Language-Workbench.html</link>
	<description>At the recent &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/feeds/categories/2-software-engineering.rss&quot;&gt;IFIP WG 2.11&lt;/a&gt; meeting in St Andrews, I gave a demonstration talk about the &lt;a href=&quot;http://strategoxt.org/Spoofax&quot;&gt;Spoofax language workbench&lt;/a&gt;. I made a recording. The talk is, eh, a little, eh, rough, but should be useful to give an impression of the basic features of Spoofax.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;

&lt;/center&gt;
&lt;center&gt;
Download:
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/spoofax/spoofax-wg211-50.mov&quot;&gt;512x384&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/spoofax/spoofax-wg211-75.mov&quot;&gt;768x576&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/spoofax/spoofax-wg211-100.mov&quot;&gt;1024x768&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Sun, 14 Mar 2010 22:20:38 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: The Unbearable Fragility of Software Configuration</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/127-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/127-The-Unbearable-Fragility-of-Software-Configuration.html</link>
	<description>&lt;a href=&quot;http://yellowgrass.org/issue/Spoofax/52&quot;&gt;Issue 52&lt;/a&gt; of the &lt;a href=&quot;http://strategoxt.org/Spoofax&quot;&gt;Spoofax&lt;/a&gt; project in &lt;a href=&quot;http://yellowgrass.org&quot;&gt;YellowGrass&lt;/a&gt; is a perfect illustration of the fragility of software configuration; the presence or absence of a line break makes the difference between a working and a failing system. What is worse is that the error is very hard to detect and requires a hunch from an expert.

If the eclipse.ini file would have a proper syntax and static semantic constraints, the error could be caught right on load time, or preferably when editing the file in the first place.

Configuration files are models in a domain-specific language that should be treated just like the classes of a Java program.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;a href=&quot;http://yellowgrass.org/issue/Spoofax/52&quot;&gt;
&lt;img width=&quot;512&quot; src=&quot;http://blog.eelcovisser.net/uploads/spoofax-issue-52.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Sat, 13 Mar 2010 17:44:13 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Publication Clouds</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/126-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/126-Publication-Clouds.html</link>
	<description>Previously &lt;a href=&quot;http://researchr.org&quot;&gt;researchr&lt;/a&gt; supported 'tag cloud' views for &lt;a href=&quot;http://researchr.org/bibliography/strategoxt&quot;&gt;bibliographies&lt;/a&gt; providing a quick overview of the important and lesser important topics in a set of publications collected in a bibliography. Similarly, an 'author cloud' gives an overview of the authors of a bibliograpy, emphasizing authors with many papers.

&lt;p&gt;&lt;/p&gt;

Now clouds are not just provided for tags and authors, but also for year, publication type, and publication venue.

Furthermore, cloud views are provided for all 'publication lists' in researchr: &lt;a href=&quot;http://researchr.org/profile/lennartclkats/publications&quot;&gt;author profile&lt;/a&gt;, &lt;a href=&quot;http://researchr.org/alias/bernd-fischer&quot;&gt;alias page&lt;/a&gt; (publications authored by author with same name), bibliography, &lt;a href=&quot;http://researchr.org/tag/webdsl&quot;&gt;tag&lt;/a&gt;, and also for the &lt;a href=&quot;http://researchr.org/conferenceseries/gpce/publications&quot;&gt;publications of the editions of a conference&lt;/a&gt;. The latter provides a nice overview of the community and topics of a conference series.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;a href=&quot;http://researchr.org/profile/lennartclkats/publications&quot;&gt;
&lt;img width=&quot;512&quot; src=&quot;http://blog.eelcovisser.net/uploads/publication-clouds.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/a&gt;
&lt;/center&gt;</description>
	<pubDate>Sat, 27 Feb 2010 21:01:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Coloring Language Aspects</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/125-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/125-Coloring-Language-Aspects.html</link>
	<description>I was looking for a way to illustrate the integration of different language aspects in &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;. After tedious experimentation with graphical editors to highlight the parts of a program, it dawned on me that the syntax coloring configuration of the &lt;a href=&quot;http://strategoxt.org/Spoofax&quot;&gt;Spoofax&lt;/a&gt; editor for WebDSL is the perfect tool for the job. Spoofax provides DSL for syntactic editor services, such as syntax coloring. The Spoofax generator, generates default configurations for the various services. For instance, for syntax coloring the following settings (left) are generated. To illustrate the role of data models, user interface templates, and expressions/actions I added the following customization of the default (right):

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/default-spoofax-colors.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;

&lt;img src=&quot;http://blog.eelcovisser.net/uploads/spoofax-coloring.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

The result can be seen in the following fragments consisting of an entity declaration (data model) and a page definition with form and action:

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;img src=&quot;http://blog.eelcovisser.net/uploads/page-data-model.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;

&lt;img src=&quot;http://blog.eelcovisser.net/uploads/edit-page.png&quot; border=&quot;0&quot; align=&quot;center&quot; /&gt;
&lt;/center&gt;

I find it hard to choose good colors (e.g. yellow provides bad contrast on white), but this example nicely show how Spoofax allows assigning colors to syntactic categories, not just tokens.</description>
	<pubDate>Sat, 20 Feb 2010 20:17:04 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: WebDSL Applications</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/124-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/124-WebDSL-Applications.html</link>
	<description>&lt;a href=&quot;http://researchr.org&quot;&gt;&lt;img width=&quot;768&quot; src=&quot;http://blog.eelcovisser.net/uploads/researchr.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;http://yellowgrass.org&quot;&gt;&lt;img width=&quot;768&quot; src=&quot;http://blog.eelcovisser.net/uploads/yellowgrass.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;http://webdsl.org&quot;&gt;&lt;img width=&quot;768&quot; src=&quot;http://blog.eelcovisser.net/uploads/webdslorg.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;http://department.st.ewi.tudelft.nl&quot;&gt;&lt;img width=&quot;768&quot; src=&quot;http://blog.eelcovisser.net/uploads/department.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;http://tweetview.net&quot;&gt;&lt;img width=&quot;768&quot; src=&quot;http://blog.eelcovisser.net/uploads/tweetview.png&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</description>
	<pubDate>Fri, 19 Feb 2010 09:48:39 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Building IDEs for Domain-Specific Languages with Spoofax/IMP</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/123-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/123-Building-IDEs-for-Domain-Specific-Languages-with-SpoofaxIMP.html</link>
	<description>At the IFIP WG 2.11 meeting in March I'll give a talk on &lt;a href=&quot;http://strategoxt.org/Spoofax&quot;&gt;Spoofax/IMP&lt;/a&gt;; I'll try to record the talk and post it here.

&lt;p&gt;&lt;/p&gt;

Domain-specific languages are a key component of program generation.
While we have ample experience building code generators and compilers,
modern software developers expect integrated development environments
such as Eclipse and Visual Studio to boost their productivity. To
achieve the productivity gain promised by domain-specific languages,
it is required that they come with strong IDE support. Since the
production of DSLs cannot afford the effort that is put into IDEs for
general-purpose languages, better tools are needed.

&lt;p&gt;&lt;/p&gt;

In this talk I present Spoofax/IMP, an Eclipse plugin for creating
Eclipse plugins for custom (domain-specific) languages. Spoofax
integrates several domain-specific languages for language definition.
SDF supports modular, declarative definition of syntax with arbitrary
context-free grammars integrating lexical syntax. A new implementation
of the SGLR parser for SDF supports sophisticated error recovery.
Stratego supports model transformation, code generation, static
analysis, and refactoring with rewrite rules and programmable
strategies. Editor service DSLs support declaration and customization
of syntactic editor services such as syntax highlighting, folding,
outline views, and semantic editor services such as error checking,
cross references, content completion, and refactorings.

&lt;p&gt;&lt;/p&gt;

I'll introduce Spoofax by discussing a definition for a subset of the
WebDSL web programming language. The talk will be partly slides and
partly demonstration.</description>
	<pubDate>Fri, 12 Feb 2010 15:00:48 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Composing Domain-Specific Languages</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/122-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/122-Composing-Domain-Specific-Languages.html</link>
	<description>&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/4100722166/&quot; title=&quot;Eelco Visser by Eelco Visser, on Flickr&quot;&gt;&lt;img align=&quot;right&quot; src=&quot;http://farm3.static.flickr.com/2514/4100722166_f608b1eb70_m.jpg&quot; width=&quot;240&quot; height=&quot;181&quot; alt=&quot;Eelco Visser&quot; /&gt;&lt;/a&gt;

Last week I was in Bergen (Norway) for the &lt;a href=&quot;http://bldl.ii.uib.no/phd/bagge.html&quot;&gt;PhD thesis defense&lt;/a&gt; of &lt;a href=&quot;http://www.ii.uib.no/~anya/&quot;&gt;Anya Bagge&lt;/a&gt; and the opening of the &lt;a href=&quot;http://bldl.ii.uib.no/bldl-opening.html&quot;&gt;Bergen Language Design Laboratory&lt;/a&gt;. 

For the occasion of the opening a few people where asked to talk about the history and future of programming language design.

&lt;a href=&quot;http://homepages.inf.ed.ac.uk/dts/&quot;&gt;Don Sannella&lt;/a&gt; talked about the failure of the &lt;a href=&quot;http://homepages.inf.ed.ac.uk/dts/eml/&quot;&gt;Extended ML&lt;/a&gt; formal methods project.

&lt;a href=&quot;http://en.wikipedia.org/wiki/Bjarne_Stroustrup&quot;&gt;Bjarne Stroustrup&lt;/a&gt; talked about social issues of language design such as the (enormous) impact of C++ and the hassles of language standardization (and took my picture during the BLDL dinner).

&lt;a href=&quot;http://homepages.cwi.nl/~paulk/&quot;&gt;Paul Klint&lt;/a&gt; gave a flavour of his new &lt;a href=&quot;http://www.meta-environment.org/Meta-Environment/Rascal&quot;&gt;Rascal&lt;/a&gt; meta-programming language.

Horacio Bouzas and Carl Seger talked about the role of languages in oil exploration and chip design.

&lt;p&gt;&lt;/p&gt; 

As a long time collaborator of the Bergen group, I also was asked to shine my light on language design. Instead of giving a straight up talk about &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt; or &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;, I decided to try to give a somewhat more general slant on the currently dominant theme of our research at TU Delft: composition of domain-specific languages. Today I extended the talk for delivery at the TU Eindhoven CS colloquium. I like the style of the talk and it gave rise to a good discussion about the trade-offs between internal and external DSLs afterwards. This is also the start of the development of a lectures series for my MDSD course in the Spring semester. Since there was an expression of interest, I've uploaded my slides. They're presentation-zenish, so there's not a whole lot of explanatory text and may not be useful without me talking about them. Feedback is welcome.

 

&lt;center&gt;
&lt;div id=&quot;__ss_2488110&quot;&gt;&lt;a href=&quot;http://www.slideshare.net/eelcovisser/composing-domainspecific-languages-2488110&quot; title=&quot;Composing Domain-Specific Languages&quot;&gt;Composing Domain-Specific Languages&lt;/a&gt;&lt;div&gt;View more &lt;a href=&quot;http://www.slideshare.net/&quot;&gt;documents&lt;/a&gt; from &lt;a href=&quot;http://www.slideshare.net/eelcovisser&quot;&gt;eelcovisser&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;
&lt;/center&gt;




&lt;p&gt;&lt;/p&gt;

&lt;b&gt;Abstract&lt;/b&gt;

The history of programming languages shows a progressive development from low-level programming languages close to the machine, to high-level languages close to the problems being solved with software. Domain-specific languages take this a step further than general purpose programming languages by making assumptions about the class of applications for which the language is intended. Complete applications typically require programs in multiple (technical) domains, which can be catered for by separate domain-specific languages. While such separation of concerns is beneficial for domain expressivity, it often leads to loose coupling and lack of static verification. Hence, the design of individual DSLs needs to be complemented with their linguistic integration.

&lt;p&gt;&lt;/p&gt;

In this talk, I illustrate these ideas with the design of WebDSL, a domain-specific language for data centric web applications. WebDSL linguistically integrates the definition of data models, user interfaces, actions, access control rules, data validation rules, styling rules, and workflow definitions. While maintaining separation between these concerns through specialized sub-languages, linguistic integration ensures static consistency checking and correct code generation. The language allows developers to concentrate on the essential design of web applications, abstracting from accidental complexity, such as the details of data persistence. The combination of high-level and low-level constructs ensures high expressivity, while supporting customization to application requirements.</description>
	<pubDate>Fri, 13 Nov 2009 00:06:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: An Eclipse Editor for WebDSL</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/121-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/121-An-Eclipse-Editor-for-WebDSL.html</link>
	<description>This afternoon I created an Eclipse editor for &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; from just its syntax definition
using &lt;a href=&quot;http://strategoxt.org/Stratego/Spoofax-IMP&quot;&gt;Spoofax/IMP&lt;/a&gt; in a matter of minutes.

The editor provides syntactic editor services such as syntax highlighting, folding, outlining, error recovery; all out of the box. 

Here's a screenshot with an impression.

&lt;p&gt;&lt;/p&gt;

&lt;center&gt;
&lt;a href=&quot;http://blog.eelcovisser.net/uploads/webdsl-editor.png&quot;&gt;&lt;img src=&quot;http://blog.eelcovisser.net/uploads/webdsl-editor.png&quot; width=&quot;700px&quot; /&gt;&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

Note how my decision to include 'sections' in WebDSL turns out to play very nice with code folding. 

Spoofax/IMP also supports semantic error services such as displaying type check errors and cross-references, but that requires the WebDSL compiler to be refactored from a batch compiler to an incremental compiler.</description>
	<pubDate>Fri, 23 Oct 2009 23:16:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Take the red PIL (or choose any other color you like)</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/120-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/120-Take-the-red-PIL-or-choose-any-other-color-you-like.html</link>
	<description>&lt;a href=&quot;http://pil-lang.org&quot;&gt;&lt;img src=&quot;http://pil-lang.org/images/PIL-logo.png&quot; align=&quot;right&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

The Platform Independent Language PIL now has its own &lt;a href=&quot;http://pil-lang.org&quot;&gt;website&lt;/a&gt; with a manual for the language and downloads of the compiler.

You can use PIL as target for your domain-specific language and have it work on all PIL supported platforms. 

Currently only Java and Python are supported, but creation of PIL back-ends is cheap, probably much cheaper than making dedicated back-ends for your own DSL.

You can get involved and contribute a new back-end for a new platform. 

To start we would like to have back-ends for PHP, C#, C, and Objective C, but any others are welcome too.</description>
	<pubDate>Sun, 18 Oct 2009 20:35:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: The Big Scheme of Things: Episode 2 -- Templates</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/119-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/119-The-Big-Scheme-of-Things-Episode-2-Templates.html</link>
	<description>While attending &lt;a href=&quot;http://www.hope.cs.rice.edu/twiki/bin/view/GPCE09/WebHome&quot;&gt;GPCE&lt;/a&gt;, &lt;a href=&quot;http://planet-sl.org/sle2009/&quot;&gt;SLE&lt;/a&gt;, and &lt;a href=&quot;http://www.modelsconference.org/&quot;&gt;MoDELS&lt;/a&gt; in Denver, I recorded episode 2 of The Big Scheme
of Things screencast series. Using a simple to-do application as
example application, I illustrate various aspects of the use of &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;, a domain-specific language for web applications. 

&lt;p&gt;&lt;/p&gt;

In this episode, I show the use of templates to divide a page definition into smaller fragments, the definition of action in templates, and the use of icons as actions.

&lt;p&gt;&lt;/p&gt;
&lt;center&gt;

&lt;/center&gt;
&lt;center&gt;
Download:
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e2-50.mov&quot;&gt;512x384&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e2-75.mov&quot;&gt;768x576&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e2.mov&quot;&gt;1024x768&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

[This is as much an experiment in screencasting, as it is a WebDSL tutorial. Feedback is welcome. Thanks for the feedback on the previous episode. For this recording I have used a proper microphone (Rode Podcaster) instead of the built-in microphone of my MacBook; sound quality should be better. I still have to look into other formats than Quicktime; suggestions for useful formats are welcome. An iTunes feed is in the planning as well. There was a request for a start and end tune; apart from the requirement that such a tune should be copyright free, music is not my strong point; suggestions are welcome.]




 &lt;br /&gt;&lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/119-The-Big-Scheme-of-Things-Episode-2-Templates.html#extended&quot;&gt;Continue reading &quot;The Big Scheme of Things: Episode 2 -- Templates&quot;&lt;/a&gt;</description>
	<pubDate>Sat, 10 Oct 2009 13:53:23 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Integration of Data Validation and User Interface Concerns in a DSL for Web Applications</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/118-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/118-Integration-of-Data-Validation-and-User-Interface-Concerns-in-a-DSL-for-Web-Applications.html</link>
	<description>One of the tricky aspects of getting a web application right, is data validation. That  is, checking that inputs to forms is correct in some sense that is relevant for the application. For example, the input for a year field should be an integer that represents a year that sensible in the context of the application. Data validation actually goes beyond checking validity of single input fields in a form and includes invariants over the data model that should be maintained, and assertions that should hold at some point in processing input data. 

&lt;p&gt;&lt;/p&gt;

The problem of data validation is two-fold. First, we'd like a declarative way to specify validation rules. Second, the checking of these rules should be integrated in the rest of the application. In particular, injecting error messages in the UI.

In a paper that Danny Groenewegen will present this afternoon at the &lt;a href=&quot;http://planet-sl.org/sle2009/&quot;&gt;Software Language Engineering (SLE 2009)&lt;/a&gt; we describe how we have extended &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; with declarative data validation rules that are checked automatically and for which error messages are injected in the UI.

&lt;p&gt;&lt;/p&gt;

Danny M. Groenewegen, Eelco Visser. Integration of Data Validation and User Interface Concerns in a DSL for Web Applications. In Mark G. J. van den Brand, Jeff Gray, editors, Software Language Engineering, Second International Conference, SLE 2009, Denver, USA, October, 2009. Revised Selected Papers. Lecture Notes in Computer Science, Springer, 2009. 

[&lt;a href=&quot;http://researchr.org/publication/GroenewegenV:SLE:2009&quot;&gt;researchr&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;

Abstract: Data validation rules constitute the constraints that data input and processing must adhere to in addition to the structural constraints imposed by a data model. Web modeling tools do not address data validation concerns explicitly, hampering full code generation and model expressivity. Web application frameworks do not offer a consistent interface for data validation. In this paper, we present a solution for the integration of declarative data validation rules with user interface models in the domain of web applications, unifying syntax, mechanisms for error handling, and semantics of validation checks, and covering value well-formedness, data invariants, input assertions, and action assertions. We have implemented the approach in WebDSL, a domain-specific language for the defi- nition of web applications.</description>
	<pubDate>Mon, 05 Oct 2009 09:34:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Quine In Stratego</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/117-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/117-Quine-In-Stratego.html</link>
	<description>Tonight I was reminiscing with Tijs van der Storm about conferences of the past, in particular the day that I wrote a Quine in Stratego at OOPSLA 2004. I reported about that in my &lt;a href=&quot;http://swerl.tudelft.nl/bin/view/EelcoVisser/HotSpots&quot;&gt;pre-blog&lt;/a&gt; and at the &lt;a href=&quot;http://strategoxt.org/Stratego/QuineInStratego&quot;&gt;Stratego/XT&lt;/a&gt; site, but not in this blog. Since it was a fun example, I thought it deserved a place on my official blog. Here goes:

&lt;p&gt;&lt;/p&gt;

After GPCE/OOPSLA in Vancouver Tijs van der Storm challenged me to write a Stratego
program that prints its own source. So I set to work, with the following result. 
I'll make it educational and reconstruct the design process.

&lt;h4&gt;The basic idea&lt;/h4&gt;

The core of a self printing program is that it should contain its own source
and duplicate that. The following program implements this idea, but with
'prefix' and 'suffix' instead of the 

&lt;pre&gt;
----------------------------------
module quine 
imports lib
strategies
  main =
    ![&quot;prefix&quot;, &quot;suffix&quot;]
    ; \ [x, y] -&gt; [x, x, y, y] \ 
    ; concat-strings
    ; (stdout, [])
    ;  0
-----------------------------------
&lt;/pre&gt;

Compiling and running this program produces:

&lt;pre&gt;
prefixprefixsuffixsuffix
&lt;/pre&gt;

&lt;h4&gt;Quoting the source&lt;/h4&gt;

Next we replace 'prefix' and 'suffix' by the prefix and suffix of the program
with respect to the list. Note that we don't bother with the layout of the
quoted fragment. Note that the backslashes of the anonymous rewrite rule need
to be escaped in the string.

&lt;pre&gt;
------------------------------------------------------------------------------------------
module quine 
imports lib
strategies
  main =
    ![&quot;module quine imports lib strategies main = ![&quot;, 
      &quot;]; \\ [x, y] -&gt; [x, x, y, y] \\; concat-strings; (stdout, []);  0&quot;]
    ; \ [x, y] -&gt; [x, x, y, y] \ 
    ; concat-strings
    ; (stdout, [])
    ;  0
------------------------------------------------------------------------------------------
&lt;/pre&gt;

The output of this program is

&lt;pre&gt;
------------------------------------------------------------------
module quine imports lib strategies main = ![module quine 
imports lib strategies main = ![]; \ [x, y] -&gt; [x, x, y, y] \; 
concat-strings; (stdout, []);  0]; \ [x, y] -&gt; 
[x, x, y, y] \; concat-strings; (stdout, []);  0
------------------------------------------------------------------
&lt;/pre&gt;

which is starting to look good, but not quite there, since it doesn't compile.

&lt;h4&gt;Getting the quotes right&lt;/h4&gt;

What we have to do now is introduce quotes in the printed program, such that the pieces
of code in the list are actually parsed as strings.

&lt;pre&gt;
------------------------------------------------------------------------------------------
module quine 
imports lib
strategies
  main =
    ![&quot;module quine imports lib strategies main = ![\&quot;&quot;, 
      &quot;\&quot;]; \\ [x, y] -&gt; [x, x, y, y] \\; concat-strings; (stdout, []);  0&quot;]
    ; \ [x, y] -&gt; [x, x, &quot;\&quot;,\&quot;&quot;, y, y] \ 
    ; concat-strings
    ; (stdout, [])
    ;  0
------------------------------------------------------------------------------------------
&lt;/pre&gt;

The output of this program is

&lt;pre&gt;
------------------------------------------------------------------
module quine imports lib strategies main = ![&quot;module quine 
imports lib strategies main = ![&quot;&quot;,&quot;&quot;]; \ [x, y] -&gt; [x, x, y, y] \; 
concat-strings; (stdout, []);  0&quot;]; \ [x, y] -&gt; 
[x, x, y, y] \; concat-strings; (stdout, []);  0
------------------------------------------------------------------
&lt;/pre&gt;

which still does not compile because of the doublequotes embedded in the string.

&lt;h4&gt;Getting the quotes more right&lt;/h4&gt;

We need to escape the embedded strings. This can be achieved easily by using the
escape strategy from the library, which escapes doublequotes and backslashes.

&lt;pre&gt;
------------------------------------------------------------------------------------------
module quine 
imports lib
strategies
  main =
    ![&quot;module quine imports lib strategies main = ![\&quot;&quot;, 
      &quot;\&quot;]; \\ [x, y] -&gt; [x, x, \&quot;\\\&quot;,\\\&quot;\&quot;, y, y] \\; concat-strings; (stdout, []);  0&quot;]
    ; \ [x, y] -&gt; [x, x, &quot;\&quot;,\&quot;&quot;, y, y] \ 
    ; concat-strings
    ; (stdout, [])
    ;  0
------------------------------------------------------------------------------------------
&lt;/pre&gt;

This produces (without the newlines)

&lt;pre&gt;
-----------------------------------------------------------------------------
module quine imports lib strategies main = ![&quot;module quine imports 
lib strategies main = ![\&quot;&quot;,&quot;\&quot;]; \\ [x, y] -&gt; [x, x,
 \&quot;\\\&quot;,\\\&quot;\&quot;, y, y] \\; concat-strings; (stdout
, []);  0&quot;]; \ [x, y] -&gt; [x, x, &quot;\&quot;,\&quot;&quot;, y, y] \; 
concat-strings; (stdout, []);  0
-----------------------------------------------------------------------------
&lt;/pre&gt;

&lt;h4&gt;Bootstrapping&lt;/h4&gt;

Now the last program is not exactly the same as its predecessor, but if we
compile and run it, it produces its own source literally.</description>
	<pubDate>Sun, 04 Oct 2009 21:18:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Abstractions for Mobile Applications (Postdoc Position)</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/116-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/116-Abstractions-for-Mobile-Applications-Postdoc-Position.html</link>
	<description>(Update: the position has been filled)

&lt;p&gt;&lt;/p&gt;
Yesterday, I had an interesting phone discussion with researchers from T-Mobile, which strengthened me in my plan to make the next &lt;a href=&quot;http://swerl.tudelft.nl/bin/view/MoDSE/WebHome&quot;&gt;MoDSE&lt;/a&gt; case study about abstractions for mobile applications, and to make that the focus for the open &lt;a href=&quot;http://blog.eelcovisser.net/bit.ly/KTSQz&quot;&gt;postdoc position&lt;/a&gt; in the project.

&lt;p&gt;&lt;/p&gt;

The &lt;a href=&quot;http://swerl.tudelft.nl/bin/view/Main/WebHome&quot;&gt;Software Engineering Research Group&lt;/a&gt; of &lt;a href=&quot;http://www.tudelft.nl&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;&gt;Delft University of Technology&lt;/a&gt; has a vacancy for a postdoc position in the “&lt;a href=&quot;http://swerl.tudelft.nl/bin/view/MoDSE/WebHome&quot;&gt;Model-Driven Software Evolution (MoDSE)&lt;/a&gt;” project funded by the Jacquard Software Engineering Research program of NWO.

&lt;p&gt;&lt;/p&gt;

Job description: The candidate will lead the next MoDSE case study in domain-specific language engineering into the domain of mobile applications. The case study will consist of finding high-level, platform independent abstractions for mobile applications and creating a collection of domain-specific languages covering the domain, building on the experience and tools from the &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; case study.

&lt;p&gt;&lt;/p&gt;

Requirements: The candidate should have a PhD degree in Computer Science with a strong background in software engineering, specifically software language engineering, model-driven engineering, and/or programming languages. Ideally the candidate has experience with language design and implementation.

&lt;p&gt;&lt;/p&gt;
Contract: 2 years, 8 months
Salary: Maximum of €3755 per month gross depending on past experience.

TU Delft offers an attractive benefits package, including a flexible work week, free high-speed Internet access from home, and the option of assembling a customized compensation and benefits package (the 'IKA'). Salary and benefits are in accordance with the Collective Labour Agreement for Dutch Universities.

&lt;p&gt;&lt;/p&gt;
How to apply: Send applications consisting of an application letter and a detailed CV in PDF by &lt;a href=&quot;mailto:e.visser@tudelft.nl&quot;&gt;email&lt;/a&gt; to &lt;a href=&quot;http://eelcovisser.org&quot;&gt;Eelco Visser&lt;/a&gt;</description>
	<pubDate>Sat, 03 Oct 2009 01:06:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: The Big Scheme of Things: Episode 1</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/115-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/115-The-Big-Scheme-of-Things-Episode-1.html</link>
	<description>WebDSL is a domain-specific language for building web applications. WebDSL
avoids the boilerplate that is common in other web technologies by
providing tuned domain-specific notations for the concerns of web
development. Furthermore, the consistency of these concerns is verified
at compile-time.

WebDSL is available from &lt;a href=&quot;http://webdsl.org&quot;&gt;webdsl.org&lt;/a&gt;.

There you can also find instructions for installing the compiler and the
other components that you need to run WebDSL applications.

In this series of screencasts I will illustrate the use of WebDSL, by
building a web application from scratch. The application we are going to
build is called 'The Big Scheme of Things', a to-do list application.

In this first episode I keep it really simple and create a single page
app that allows us to add and remove tasks. First I show how to get an
even simpler &quot;Hello web!&quot; app running. 

&lt;p&gt;&lt;/p&gt;
&lt;center&gt;

&lt;/center&gt;
&lt;center&gt;
Download:
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e1-50.mov&quot;&gt;512x384&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e1-75.mov&quot;&gt;768x576&lt;/a&gt;,
&lt;a href=&quot;http://www.st.ewi.tudelft.nl/~eelco/bigscheme/bigscheme-e1.mov&quot;&gt;1024x768&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

(This is as much an experiment in screencasting, as it is a WebDSL tutorial. Feedback is welcome.)

 &lt;br /&gt;&lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/115-The-Big-Scheme-of-Things-Episode-1.html#extended&quot;&gt;Continue reading &quot;The Big Scheme of Things: Episode 1 &quot;&lt;/a&gt;</description>
	<pubDate>Mon, 21 Sep 2009 08:14:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: PIL: A Platform Independent Language for Retargetable DSLs</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/113-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/113-PIL-A-Platform-Independent-Language-for-Retargetable-DSLs.html</link>
	<description>&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/3617366353/&quot; title=&quot;zef hemel by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm3.static.flickr.com/2445/3617366353_e6a6ffe05f_m.jpg&quot; width=&quot;240&quot; height=&quot;160&quot; alt=&quot;zef hemel&quot; align=&quot;right&quot; /&gt;&lt;/a&gt;

&lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; is not the first domain-specific language I have designed and implemented. 

With each language the question is which platform to develop the language for. That is, which language should the compiler generate or should the interpreter be written in and which libraries to use with that language as run-time system.

After the first generation of the &lt;a href=&quot;http://meta-environment.org&quot;&gt;ASF+SDF MetaEnvironment&lt;/a&gt; that was written in LeLisp, we decided in the 1990's that the second generation should target C as a fairly portable and ubiquitous 'assembly language'. Thus, the prototype implementation of the SGLR parser for &lt;a href=&quot;http://www.syntax-definition.org/&quot;&gt;SDF&lt;/a&gt; was written in C. 

For my next project, the transformation language &lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego&lt;/a&gt;, I also chose C as platform with the &lt;a href=&quot;http://www.meta-environment.org/Meta-Environment/ATerms&quot;&gt;ATerm&lt;/a&gt; library as run-time system providing term representation and garbage collection.

When I started work on WebDSL in 2007, Java and the JVM provided the best platform for web application development. Thus, Java is the target language generated from WebDSL applications. (The set frameworks used to create the run-time system is &lt;a href=&quot;http://researchr.org/publication/GroenewegenHKV08:DSM&quot;&gt;subject to change&lt;/a&gt;.)

&lt;p&gt;&lt;/p&gt;
 
SDF, Stratego, and WebDSL transcend the platforms they are implemented on. Each of the languages provides abstractions that are independent of the implementation platform and could easily be used on other platforms as well. 

However, creating back-ends for all sorts of platforms is a tedious and laborious undertaking, and then maintaining the consistency of these back-ends is worse.

This problem is not unique to languages that I come up with, but is rather a universal problem for domain-specific languages.

&lt;p&gt;&lt;/p&gt;

To address this problem as part of our work on a &lt;a href=&quot;http://swerl.tudelft.nl/bin/view/MoDSE/WebHome&quot;&gt;general approach to the development and evolution of domain-specific languages&lt;/a&gt;, we are developing PIL, a &lt;em&gt;platform independent language&lt;/em&gt; that abstracts from the differences between object-oriented languages.

Back-ends that translate PIL to languages such as Java and Python are much smaller than the back-end of the WebDSL compiler, which encapsulates a lot of domain-specific implementation knowledge about the domain of web applications.

With PIL we hope that we can not only develop domain-specific platform-independent abstractions, but also provide portable implementations for a variety of platforms.

A paper about PIL has been accepted for the second conference on Software Language Engineering:

&lt;p&gt;&lt;/p&gt;

Zef Hemel, Eelco Visser. PIL: A Platform Independent Language for Retargetable DSLs. In Mark G. J. van den Brand, Jeff Gray, editors, &lt;em&gt;Software Language Engineering, Second International Conference, SLE 2009&lt;/em&gt;, Denver, USA, October, 2009. Lecture Notes in Computer Science, Springer, 2009. (to appear) 

[&lt;a href=&quot;http://researchr.org/publication/HemelVisser:2009&quot;&gt;researchr&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;

Abstract:

Intermediate languages are used in compiler construction to simplify
retargeting compilers to multiple machine architectures. In the
implementation of domain-specific languages (DSLs), compilers
typically generate high-level source code, rather than low-level
machine instructions.  DSL compilers target a software platform, i.e.
a programming language with a set of libraries, deployable on one or
more operating systems.  DSLs enable targeting multiple
software platforms if its abstractions are platform independent. While
transformations from DSL to each targeted platform are often
conceptually very similar, there is little reuse between
transformations due to syntactic and API differences of the target
platforms, making supporting multiple platforms expensive. In this
paper, we discuss the design and implementation of PIL, a Platform
Independent Language, an intermediate language providing a layer of
abstraction between DSL and target platform code, abstracting from
syntactic and API differences between platforms, thereby removing the
need for platform-specific transformations. We discuss the use of PIL
in an implemementation of WebDSL, a DSL for building web applications.</description>
	<pubDate>Wed, 09 Sep 2009 18:25:06 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Weaving Web Applications with WebDSL</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/111-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/111-Weaving-Web-Applications-with-WebDSL.html</link>
	<description>&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/3335471863/&quot; title=&quot;danny groenewegen by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3330/3335471863_b3c075dae4_m.jpg&quot; width=&quot;240&quot; height=&quot;160&quot; alt=&quot;danny groenewegen&quot; align=&quot;right&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;
At &lt;a href=&quot;http://www.oopsla.org/oopsla2009/&quot;&gt;OOPSLA&lt;/a&gt; this year, Danny Groenewegen and I will be giving demonstrations of &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;. 

There will probably be two slots scheduled in the program for the demonstration, and we'll be happy to give unscheduled demonstrations throughout the conference.

We wrote a little &lt;a href=&quot;http://researchr.org/publication/GroenewegenV:OOPSLA:2009//&quot;&gt;paper&lt;/a&gt; for the &lt;a href=&quot;http://researchr.org/publication/oopsla:2009c//&quot;&gt;proceedings&lt;/a&gt; that gives an impression of what we will be showing.

&lt;p&gt;&lt;/p&gt;

Abstract:

WebDSL is a domain-specific language for the development of web applications that integrates data-models, userinterface models, actions, validation, access control, and workflow. The compiler verifies the consistency of applications and generates complete implementations in Java or Python. We illustrate the key concepts of the language with a small web application.</description>
	<pubDate>Thu, 27 Aug 2009 07:59:08 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Stratego/XT 0.17 Released</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/106-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/106-StrategoXT-0.17-Released.html</link>
	<description>Stratego/XT 0.17 is now available from

&lt;blockquote&gt;
 &lt;a href=&quot;http://www.stratego-language.org/Stratego/StrategoRelease017&quot;&gt;http://www.stratego-language.org/Stratego/StrategoRelease017&lt;/a&gt;
&lt;/blockquote&gt;

Stratego/XT 0.17 introduces major improvements across the board,
including language additions, a new compiler library, numerous
improvements to the compiler, significant changes to the library
handling, new libraries for parsing, pretty printing and term
validation, 64-bit support, stack traces and more.

&lt;p&gt;&lt;/p&gt;

For this release, over 200 outstanding issues have been addressed,
much thanks to the efforts of external bug reporters and contributors.

&lt;p&gt;&lt;/p&gt;

The manual has been updated to reflect the changes made to the
language and libraries, and the new libraries come with up-to-date
source code documentation.

&lt;p&gt;&lt;/p&gt;

This release of Stratego/XT has taken a while to be promoted to a
major release.  After the release of 0.16 we had decided that
'major releases' were an archaic notion, since most users subscribe
to the continuous integration builds produced by the buildfarm.
However, major releases do provide stable baselines and a better
indication of progress of the project. To improve clarity and
stability we are changing the release policy. Our goal is to release
a new major version of Stratego/XT every few months.</description>
	<pubDate>Wed, 08 Jul 2009 09:35:20 +0000</pubDate>
</item>
<item>
	<title>Eric Bouwers: Migration to the nine-headed monster</title>
	<guid>tag:blogger.com,1999:blog-28873279.post-3566145402118884983</guid>
	<link>http://ericbouwers.blogspot.com/2009/03/migration-to-nine-headed-monster.html</link>
	<description>After some &lt;a href=&quot;http://mail.cs.uu.nl/pipermail/psat-dev/2009q1/000055.html&quot;&gt;recent&lt;/a&gt; &lt;a href=&quot;http://mail.cs.uu.nl/pipermail/psat-dev/2009q1/000056.html&quot;&gt;activity&lt;/a&gt; on the &lt;a href=&quot;http://mail.cs.uu.nl/mailman/listinfo/psat-dev&quot;&gt;psat-dev&lt;/a&gt; mailinglist I became aware of the (lack of) available builds for &lt;a href=&quot;http://www.php-sat.org&quot;&gt;php-sat&lt;/a&gt;. Even though the development speed is not what I would want it to be (so much fun things to do, so little hours in a day!) I still believe it is important to &lt;a href=&quot;http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html&quot;&gt;release early and often&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Fortunately, &lt;a href=&quot;http://www.st.ewi.tudelft.nl/~dolstra/&quot;&gt;Eelco Dolstra&lt;/a&gt; had some time to migrate php-front, php-sat and php-tools to &lt;a href=&quot;http://hydra.nixos.org/&quot;&gt;Hydra&lt;/a&gt;, the new Nix-based continuous build system. After some tweaking we now again have access to unstable build for all &lt;a href=&quot;http://hydra.nixos.org/project/psat&quot;&gt;PSAT&lt;/a&gt;-projects. Go Hydra!&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://hydra.nixos.org/&quot;&gt;&lt;img src=&quot;http://hydra.nixos.org/static/images/hydra.png&quot; /&gt;&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/28873279-3566145402118884983?l=ericbouwers.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 07 Jul 2009 22:19:47 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Preventing injection attacks with syntax embeddings</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/105-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/105-Preventing-injection-attacks-with-syntax-embeddings.html</link>
	<description>Our paper on &lt;a href=&quot;http://strategoxt.org/Stratego/StringBorg&quot;&gt;StringBorg&lt;/a&gt; is being published by Science of Computer programming:

&lt;blockquote&gt;
M. Bravenboer, E. Dolstra, and E. Visser. &lt;a href=&quot;http://dx.doi.org/10.1016/j.scico.2009.05.004&quot;&gt;Preventing Injection Attacks with Syntax Embeddings. A Host and Guest Language Independent Approach.&lt;/a&gt; Science of Computer Programming, 2009.
&lt;/blockquote&gt;

StringBorg is a technique for embedding 'string' languages in general purpose languages in a safe way, to avoid injection attacks.

The paradigmatic example is the embedding of SQL queries, which typically is done using string literals as in the following example:

&lt;pre&gt;
  String userName = getParam(&quot;userName&quot;);
  String password = getParam(&quot;password&quot;);
  String query = &quot;SELECT id FROM users &quot;
                      + &quot;WHERE name = ’&quot; + userName + &quot;’ &quot;
                      + &quot;AND password = ’&quot; + password + &quot;’&quot;;
   if (executeQuery(query).size() == 0)
      throw new Exception(&quot;bad user/password&quot;);
&lt;/pre&gt;

In these approaches it is very easy to forget to escape SQL meta characters in the values obtained from the client. This opens the
door to an attack through a query that escapes from the programmed query.

StringBorg prevents such attacks by syntactically embedding the query language in the host language. For example, the query
above can then be written as follows:

&lt;pre&gt;
  SQL q = | SELECT id FROM users
                    WHERE name = ${userName} AND password = ${password} |&gt;;
  if (executeQuery(q.toString()).size() == 0) ...
&lt;/pre&gt;

Now, the syntax of the query is checked statically. But more importantly, at run-time the query is constructed by a query
API that ensures that the query constructed has the same syntactic structure as the one defined by the programmer.
Furthermore, it enforces escaping meta-characters in values spliced into the query, thus guaranteeing that no injection
attacks can occur.

&lt;p&gt;&lt;/p&gt;

The paper does not just provide a solution for embedding SQL in Java, but offers a generic approach for embedding &lt;em&gt;any&lt;/em&gt;
guest language in &lt;em&gt;any&lt;/em&gt; host language with little more effort than providing syntax definitions for host and guest language.

&lt;p&gt;&lt;/p&gt;

Abstract: Software written in one language often needs to construct sentences in another language, such as SQL queries, XML output, or shell command invocations. This is almost always done using unhygienic string manipulation, the concatenation of constants and client-supplied strings. A client can then supply specially crafted input that causes the constructed sentence to be interpreted in an unintended way, leading to an injection attack. We describe a more natural style of programming that yields code that is impervious to injections by construction. Our approach embeds the grammars of the guest languages (e.g. SQL) into that of the host language (e.g. Java) and automatically generates code that maps the embedded language to constructs in the host language that reconstruct the embedded sentences, adding escaping functions where appropriate. This approach is generic, meaning that it can be applied with relative ease to any combination of context-free host and guest languages.</description>
	<pubDate>Wed, 10 Jun 2009 08:38:03 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Stratego/XT Machine for Code Generation 2009</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/103-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/103-StrategoXT-Machine-for-Code-Generation-2009.html</link>
	<description>For the participants of our hands-on tutorial on
&lt;a href=&quot;http://www.codegeneration.net/cg2009/sessioninfo.php?session=51&quot;&gt;Creating DSLs with Stratego/XT&lt;/a&gt; 
at the 
&lt;a href=&quot;http://blog.eelcovisser.net/index.php?/feeds/categories/2-software-engineering.rss&quot;&gt;Code Generation 2009&lt;/a&gt; conference, 
we (i.e. Rob Vermaas) created a 
&lt;a href=&quot;http://virtualbox.org&quot;&gt;VirtualBox&lt;/a&gt; 
image with all the software needed during the tutorial.

In particular, it contains a full installation of
&lt;a href=&quot;http://strategoxt.org&quot;&gt;Stratego/XT&lt;/a&gt; 
with compiler, libraries, and auxiliary packages such as java-front.

In addition, the image contains a built-from-source installation of
the &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt; 
language for building web applications, and an installation of tomcat
for deploying created web apps.

&lt;p&gt;&lt;/p&gt;

The image and instructions for its installation are available from 

&lt;center&gt;&lt;a href=&quot;http://strategoxt.org/Stratego/CodeGeneration2009Tutorial&quot;&gt;http://strategoxt.org/Stratego/CodeGeneration2009Tutorial&lt;/a&gt;
&lt;/center&gt;

&lt;p&gt;&lt;/p&gt;

During the tutorial additional material will be handed out with concrete exercises.

&lt;p&gt;&lt;/p&gt;

The virtual machine is also useful for exploring Stratego/XT and WebDSL outside the context of this particular tutorial.</description>
	<pubDate>Sat, 30 May 2009 17:41:44 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Domain-Specific Languages for Composable Editor Plugins</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/102-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/102-Domain-Specific-Languages-for-Composable-Editor-Plugins.html</link>
	<description>&lt;a href=&quot;http://www.strategoxt.org/Stratego/Spoofax-IMP&quot;&gt;Spoofax/IMP&lt;/a&gt; is a toolset for the creation of interactive development environments for custom languages based on domain-specific languages for editor services. The toolset is especially aimed at the developers of domain-specific languages, allowing them to provide IDE support for their specialist language under development. An important feature of Spoofax/IMP is the support for language &lt;em&gt;composition&lt;/em&gt;, i.e. for languages consisting of multiple, syntactically different, sub-languages. Furthermore, the toolset allows the customization of heuristically generated editor services without loosing the ability to regenerate these services when a language evolves.

&lt;p&gt;&lt;/p&gt;

At &lt;a href=&quot;http://ldta.info/&quot;&gt;LDTA 2009&lt;/a&gt; we presented a paper about Spoofax/IMP. The final version of that paper is now finished, and a pre-print is available.

&lt;p&gt;&lt;/p&gt;

&lt;a href=&quot;http://www.lclnet.nl/&quot;&gt;L. C. L. Kats&lt;/a&gt;, &lt;a href=&quot;http://www.boblycat.org/~karltk/&quot;&gt;K. T. Kalleberg&lt;/a&gt;, and &lt;a href=&quot;http://eelcovisser.org&quot;&gt;E. Visser&lt;/a&gt;. Domain-Specific Languages for Composable Editor Plugins. 
In T. Ekman and J. Vinju, editors, Proceedings of the &lt;a href=&quot;http://ldta.info/&quot;&gt;Ninth Workshop on Language Descriptions, Tools, and Applications (LDTA 2009)&lt;/a&gt;, 
Electronic Notes in Theoretical Computer Science. Elsevier Science Publishers, April 2009.

[&lt;a href=&quot;http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2009-003.pdf&quot;&gt;pdf&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;

Abstract: 
Modern IDEs increase developer productivity by incorporating many
different kinds of editor services. These can be purely syntactic,
such as syntax highlighting, code folding, and an outline for
navigation; or they can be based on the language semantics, such as
in-line type error reporting and resolving identifier declarations.
Building all these services from scratch requires both the extensive
knowledge of the sometimes complicated and highly interdependent APIs
and extension mechanisms of an IDE framework, and an in-depth
understanding of the structure and semantics of the targeted language.
This paper describes Spoofax/IMP, a meta-tooling suite that provides
high-level domain-specific languages for describing editor services,
relieving editor developers from much of the framework-specific
programming.  Editor services are defined as composable modules of
rules coupled to a modular SDF grammar. The composability provided by
the SGLR parser and the declaratively defined services allows embedded
languages and language extensions to be easily formulated as
additional rules extending an existing language definition.  The
service definitions are used to generate Eclipse editor plugins.  We
discuss two examples: an editor plugin for WebDSL, a domain-specific
language for web applications, and the embedding of WebDSL in
Stratego, used for expressing the (static) semantic rules of WebDSL.</description>
	<pubDate>Sat, 23 May 2009 11:29:42 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Adding  Error Recovery to Scannerless Generalized-LR Parsing</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/101-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/101-Adding-Error-Recovery-to-Scannerless-Generalized-LR-Parsing.html</link>
	<description>We just got the notification that our submission to &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/feeds/categories/2-software-engineering.rss&quot;&gt;OOPSLA 2009&lt;/a&gt; has been accepted. 
The paper presents a solution to error recovery for the SGLR parsing algorithm. Here's the full citation and abstract  (pre-print will follow later):

&lt;p&gt;&lt;/p&gt;

Lennart C. L. Kats, Maartje de Jonge, Emma Nilsson-Nyman, and Eelco Visser.
&quot;Providing Rapid Feedback in Generated Modular Language Environments. Adding  Error Recovery to Scannerless Generalized-LR Parsing&quot;
In Gary T. Leavens, editor, Proceedings of the 24th ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications (OOPSLA 2009), New York, NY, USA, October 2009. ACM. (to appear).

&lt;p&gt;&lt;/p&gt;

Abstract: Integrated Development Environments (IDEs) increase programmer
productivity, providing rapid, interactive feedback based on the
syntax and semantics of a language.  A heavy burden lies on developers
of new languages to provide adequate IDE support.  Code generation
techniques provide a viable, efficient approach to semi-automatically
produce IDE plugins. Key components for the realization of plugins are
the language's grammar and parser.  For embedded languages and
language extensions, constituent IDE plugin modules and their grammars
can be combined.  Unlike conventional parsing algorithms, scannerless
generalized-LR parsing supports the full set of context-free grammars,
which is closed under composition, and hence can parse language
embeddings and extensions composed from separate grammar modules.  To
apply this algorithm in an interactive environment, this paper
introduces a novel error recovery mechanism, which allows it to be
used with files with syntax errors -- common in interactive
editing. Error recovery is vital for providing rapid feedback in case
of syntax errors, as most IDE services depend on the parser -- from
syntax highlighting to semantic analysis and cross-referencing.  We
base our approach on the principles of island grammars, and
automatically generate new productions for existing grammars, making
them more permissive of their inputs.  To cope with the added
complexity of these grammars, we adapt the parser to support
backtracking.  We evaluate the recovery quality and performance of our
approach using a set of composed languages, based on Java and
Stratego.</description>
	<pubDate>Sun, 10 May 2009 22:19:59 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: A Textual DSL for creating Visual Diagrams</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/99-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/99-A-Textual-DSL-for-creating-Visual-Diagrams.html</link>
	<description>I have been playing around for a couple of minutes with &lt;a href=&quot;http://yuml.me/&quot;&gt;yUML&lt;/a&gt;, an online service by &lt;a href=&quot;http://www.tobinharris.com/past/2009/4/30/yuml-for-not-sketching-uml-diagrams-online-/&quot;&gt;Tobin Harris&lt;/a&gt; for creating UML diagrams using a textual input language.

The diagram below is generated while you load this page.

The input needed to generate the diagram is the following list of relations:

&lt;pre&gt;
  [Publication]++-&gt;*[Author], 
  [AbstractAuthor]^[Author], 
  [AbstractAuthor]*-&gt;1[Person], 
  [AbstractAuthor]*-&gt;1[Affiliation], 
  [Person]*-&gt;*[Publication], 
  [Publication]^[PrintPublication], 
  [PrintPublication]^[Article], 
  [PrintPublication]^[InProceedings], 
  [Publication]^[PublishedVolume], 
  [PublishedVolume]^[Proceedings], 
  [InProceedings]-&gt;[Proceedings], 
  [AbstractAuthor]^[Editor], 
  [PublishedVolume]++-&gt;*[Editor], 
  [Person]*-&gt;*[PublishedVolume], 
  [PublishedVolume]^[Book], 
  [PrintPublication]^[InCollection], 
  [Book]-&gt;*[InCollection] .
&lt;/pre&gt;

This diagram documents a (small) subset of the data model underlying the &lt;a href=&quot;http://researchr.org/researchr/profile/EelcoVisser/publications&quot;&gt;researchr.org&lt;/a&gt; application for bibliography sharing and reviewing.

&lt;center&gt;
&lt;img src=&quot;http://yuml.me/diagram/class/[Publication]++-&gt;*[Author], [AbstractAuthor]^[Author], [AbstractAuthor]*&lt;-&gt;1[Person], [AbstractAuthor]*&lt;-&gt;1[Affiliation], [Person]*-&gt;*[Publication], [Publication]^[PrintPublication], [PrintPublication]^[Article], [PrintPublication]^[InProceedings], [Publication]^[PublishedVolume], [PublishedVolume]^[Proceedings], [InProceedings]&lt;-&gt;[Proceedings], [AbstractAuthor]^[Editor], [PublishedVolume]++-&gt;*[Editor], [Person]*-&gt;*[PublishedVolume], [PublishedVolume]^[Book], [PrintPublication]^[InCollection], [Book]&lt;-&gt;*[InCollection] .&quot; /&gt;*[Author], [AbstractAuthor]^[Author], [AbstractAuthor]*-&gt;1[Person], [AbstractAuthor]*-&gt;1[Affiliation], [Person]*-&gt;*[Publication], [Publication]^[PrintPublication], [PrintPublication]^[Article], [PrintPublication]^[InProceedings], [Publication]^[PublishedVolume], [PublishedVolume]^[Proceedings], [InProceedings]-&gt;[Proceedings], [AbstractAuthor]^[Editor], [PublishedVolume]++-&gt;*[Editor], [Person]*-&gt;*[PublishedVolume], [PublishedVolume]^[Book], [PrintPublication]^[InCollection], [Book]-&gt;*[InCollection] .&quot; /&gt;*[Author], [AbstractAuthor]^[Author], [AbstractAuthor]*-&gt;1[Person], [AbstractAuthor]*-&gt;1[Affiliation], [Person]*-&gt;*[Publication], [Publication]^[PrintPublication], [PrintPublication]^[Article], [PrintPublication]^[InProceedings], [Publication]^[PublishedVolume], [PublishedVolume]^[Proceedings], [InProceedings]-&gt;[Proceedings], [AbstractAuthor]^[Editor], [PublishedVolume]++-&gt;*[Editor], [Person]*-&gt;*[PublishedVolume], [PublishedVolume]^[Book], [PrintPublication]^[InCollection], [Book]-&gt;*[InCollection] .&quot; /&gt;*[Author], [AbstractAuthor]^[Author], [AbstractAuthor]*-&gt;1[Person], [AbstractAuthor]*-&gt;1[Affiliation], [Person]*-&gt;*[Publication], [Publication]^[PrintPublication], [PrintPublication]^[Article], [PrintPublication]^[InProceedings], [Publication]^[PublishedVolume], [PublishedVolume]^[Proceedings], [InProceedings]-&gt;[Proceedings], [AbstractAuthor]^[Editor], [PublishedVolume]++-&gt;*[Editor], [Person]*-&gt;*[PublishedVolume], [PublishedVolume]^[Book], [PrintPublication]^[InCollection], [Book]-&gt;*[InCollection] .&quot; /&gt;
&lt;/center&gt;</description>
	<pubDate>Sat, 02 May 2009 09:28:33 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: WebDSL: A Domain-Specific Language for Web Applications</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/98-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/98-WebDSL-A-Domain-Specific-Language-for-Web-Applications.html</link>
	<description>I have been invited to give a talk at the
&lt;a href=&quot;http://people.few.eur.nl/frasincar/workshops/wism2009/&quot;&gt;Sixth International Workshop on Web Information Systems Modeling (WISM 2009)&lt;/a&gt;, 
which will be held in June in Amsterdam (co-located with &lt;a href=&quot;http://caise09.thenetworkinstitute.eu/&quot;&gt;CAiSE 2009&lt;/a&gt;). 
Here's the abstract I wrote for the talk.

&lt;p&gt;&lt;/p&gt;

&lt;em&gt;Abstract:&lt;/em&gt;
In this talk I give an overview of the design and application of
WebDSL, a domain-specific language for data centric web applications.
WebDSL linguistically integrates the definition of data models, user
interfaces, actions, access control rules, data validation rules,
styling rules, and workflow definitions.  While maintaining separation
between these concerns through specialized sub-languages, linguistic
integration ensures static consistency checking and correct code
generation.  The language allows developers to concentrate on the
essential design of web applications, abstracting from accidental
complexity, such as the details of data persistence.  The combination
of high-level and low-level constructs ensures high expressivity,
while supporting customization to application requirements.  The
application of WebDSL is illustrated using the researchr.org
application for bibliography sharing and reviewing.

&lt;p&gt;&lt;/p&gt;

Links:

&lt;ul&gt;
  &lt;li&gt; &lt;a href=&quot;http://webdsl.org&quot;&gt;webdsl.org&lt;/a&gt; &lt;/li&gt;
  &lt;li&gt; &lt;a href=&quot;http://researchr.org&quot;&gt;researchr.org&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;</description>
	<pubDate>Thu, 30 Apr 2009 09:38:28 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Blog Abstraction (Twitter)</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/97-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/97-Blog-Abstraction-Twitter.html</link>
	<description>It was probably unavoidable. Tweetie app on iPod makes it easy. It seems &lt;a href=&quot;http://twitter.com/EelcoVisser&quot;&gt;I'm tweeting&lt;/a&gt;.

&lt;p&gt;&lt;/p&gt;

Blogging for the lazy. Let's see if I have more to say, or more frequently at least, on twitter than on this blog.</description>
	<pubDate>Mon, 13 Apr 2009 12:23:54 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Creating Domain-Specific Languages with Stratego/XT</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/96-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/96-Creating-Domain-Specific-Languages-with-StrategoXT.html</link>
	<description>At the &lt;a href=&quot;http://www.codegeneration.net/cg2009/index.php&quot;&gt;Code Generation 2009&lt;/a&gt; conference, 
Lennart Kats and I will give a &lt;a href=&quot;http://www.codegeneration.net/cg2009/sessioninfo.php?session=51&quot;&gt;hands-on tutorial&lt;/a&gt;
about building DSLs with Stratego/XT. The program says it thus:

&lt;p&gt;&lt;/p&gt;

Stratego/XT is a state-of-the art language and toolset for the development of domain-specific language implementations. In this session the participants learn to use Stratego/XT, by developing a generator for a small DSL for web applications generating PHP. The tutorial covers declarative syntax definition with SDF, code generation by model transformation, and model-to-model transformation by rewriting. The tutorial is based on a course in model-driven software development developed at Delft University of Technology.

&lt;p&gt;&lt;/p&gt;

NB Since this is a hands-on session places are strictly limited. Please let us know whether you plan to attend this session when you book your conference place. Places will be allocated on a first-come first-served basis.</description>
	<pubDate>Mon, 06 Apr 2009 20:35:45 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Example-Driven Research</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/93-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/93-Example-Driven-Research.html</link>
	<description>&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/3329755042/&quot; title=&quot;jan heering by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3565/3329755042_0ba6be7fc8_m.jpg&quot; width=&quot;160&quot; height=&quot;240&quot; alt=&quot;jan heering&quot; border=&quot;0&quot; align=&quot;right&quot; /&gt;&lt;/a&gt;

These days I am writing a book on ‘domain-specific language engineering’ for use
in a master’s course at Delft University. The book is about the design and implementation
of domain-specific languages, i.e. the definition of their syntax, static
semantics, and code generators. But it also contains a dose of linguistic reflection,
by studying the phenomenon of defining languages, and of defining languages for
defining languages (which is called meta-modelling these days).

&lt;p&gt;&lt;/p&gt;

Writing chapters on syntax definition and modeling of languages, takes me
back to my days as a PhD student at the University of Amsterdam. Our quarters
were in the university building at theWatergraafsmeer, which was connected to the
CWI building via a bridge. Since the ASF+SDF group of Paul Klint was divided
over the two locations, meetings required a walk to the other end of the building.
So, I would regularly wander to the CWI part of the building to chat. 

[While the third application we learned to use in our Unix course in 1989 was talk, with which
one could synchronously talk with someone else on the internet (the first application was probably
csh and the second email), face-to-face meetings were still the primary mode of communication;
as opposed to the use of IRC to talk to one’s officemate.]

Often I
would look into Jan Heering’s office to say hi, and more often than not would end
up spending the rest of the afternoon discussing research and meta-research.

&lt;p&gt;&lt;/p&gt;

One of the recurring topics in these conversations was the importance of examples.
Jan was fascinated by the notion of ‘programming by example’, i.e. deriving
a program from a bunch of examples of its expected behaviour, instead of a rigorous
and complete definition for all cases. But the other use of examples was for
validation, a word I didn’t learn until long after writing my thesis.

&lt;p&gt;&lt;/p&gt;

The culture of the day (and probably location?) was heavily influenced by
mathematics and theoretical computer science. The game was the definition, preferably
algebraically, of the artifacts of interest, and then, possibly proving interesting
properties. The application minded would actually implement stuff. As a language
engineer I was mostly interested in making languages with cool features. The motivation
for these features was often highly abstract. The main test example driving
much of the work on the ASF+SDF MetaEnvironment was creating an interactive
environment for the Pico language (While with variable declarations). The idea
being that once an environment for Pico was realized, creating one for a more realistic
language would be a matter scaling up the Pico definition (mere engineering).
Actually making a language (implementation) and using that to write programs
would be a real test. To be fair, there were specifications of larger languages undertaken,
such as ones of (mini-) ML [8] and Pascal [6]. As a student I had developed a
specification of the syntax and static semantics of the object-oriented programming
language Eiffel [16], but that was so big it was not usable at the Sun workstations
we had at that time.

&lt;p&gt;&lt;/p&gt;

Time and again, Jan Heering would stress the importance of real examples to
show the relevance of a technique and/or to discover the requirements for a design.
While I thought it was a cool idea, I didn’t have examples. At least not to sell the
design and implementation of SDF2, the syntax definition formalism that turned
out to be the main contribution of my PhD thesis [20].




 &lt;br /&gt;&lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/93-Example-Driven-Research.html#extended&quot;&gt;Continue reading &quot;Example-Driven Research&quot;&lt;/a&gt;</description>
	<pubDate>Thu, 05 Mar 2009 10:20:09 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: MODELS + GPCE + SLE in Denver</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/92-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/92-MODELS-+-GPCE-+-SLE-in-Denver.html</link>
	<description>&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/2935206107/&quot; title=&quot;language engineers by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3177/2935206107_b139f71b07_m.jpg&quot; width=&quot;163&quot; height=&quot;240&quot; alt=&quot;language engineers&quot; align=&quot;right&quot; /&gt;&lt;/a&gt;

If you're doing research into domain-specific languages, model-driven engineering, or program generation, your agenda for the coming months is set. Early October the three main conferences on these topics are co-located in Denver. The deadlines are somewhat spread, so you should be able to submit a paper to each conference:

&lt;p&gt;&lt;/p&gt;

May 10: &lt;a href=&quot;http://www.modelsconference.org/&quot;&gt;Model Driven Engineering Languages and Systems (MODELS'09)&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

May 18: &lt;a href=&quot;http://www.hope.cs.rice.edu/twiki/bin/view/GPCE09/WebHome&quot;&gt;Generative Programming and Component Engineering (GPCE'09)&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

July 10: &lt;a href=&quot;http://planet-sl.org/sle2009/&quot;&gt;Software Language Engineering (SLE 2009)&lt;/a&gt;

&lt;p&gt;&lt;/p&gt;

I'm looking forward to your submission, and to meeting you in Denver.</description>
	<pubDate>Wed, 25 Feb 2009 14:50:13 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Parse Table Composition</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/89-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/89-Parse-Table-Composition.html</link>
	<description>As mentionted &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/90-Talking-about-Parsing.html&quot;&gt;before&lt;/a&gt;,  we've been doing some real parsing research to better support parsers for extensible languages. Parse table composition provides separate compilation for syntax components such that syntax extensions can be provided as plugins to a compiler for a base language. Due to various distractions last Summer I seem to have forgotten to blog about the paper that &lt;a href=&quot;http://martin.bravenboer.name/&quot;&gt;Martin Bravenboer&lt;/a&gt; and I got accepted at the first international conference on &lt;a href=&quot;http://planet-sl.org/sle2008/&quot;&gt;Software Language Engineering&lt;/a&gt; (which Martin was &lt;a href=&quot;http://mbravenboer.blogspot.com/2008/07/new-conference-on-software-language.html&quot;&gt;looking forward too&lt;/a&gt;).

&lt;p&gt;&lt;/p&gt;

M. Bravenboer and E. Visser. Parse Table Composition. Separate Compilation and Binary Extensibility of Grammars. In D. Gasevic and E. van Wyk, editors, &lt;em&gt;First International Conference on Software Language Engineering (SLE 2008)&lt;/em&gt;. To appear in Lecture Notes in Computer Science, Heidelberg, 2009. Springer.

[&lt;a href=&quot;http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2008-043.pdf&quot;&gt;pdf&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/865782744/&quot; title=&quot;submittted by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm2.static.flickr.com/1250/865782744_199d5e893f_m.jpg&quot; width=&quot;240&quot; height=&quot;160&quot; alt=&quot;submittted&quot; border=&quot;0&quot; align=&quot;right&quot; /&gt;&lt;/a&gt;

Abstract:
    Module systems, separate compilation, deployment of binary
    components, and dynamic linking have enjoyed wide acceptance in
    programming languages and systems. In contrast, the syntax of
    languages is usually defined in a non-modular way, cannot be
    compiled separately, cannot easily be combined with the syntax of
    other languages, and cannot be deployed as a component for later
    composition. Grammar formalisms that do support modules use whole
    program compilation.

&lt;p&gt;&lt;/p&gt;
    Current extensible compilers focus on source-level extensibility,
    which requires users to compile the compiler with a specific
    configuration of extensions. A compound parser needs to be
    generated for every combination of extensions. The generation of
    parse tables is expensive, which is a particular problem when the
    composition configuration is not fixed to enable users to choose
    language extensions.

&lt;p&gt;&lt;/p&gt;

    In this paper we introduce an algorithm for &lt;em&gt;parse table
      composition&lt;/em&gt; to support separate compilation of grammars to
    &lt;em&gt;parse table components&lt;/em&gt;. Parse table components can be
    composed (linked) efficiently at runtime, i.e. just before
    parsing. While the worst-case time complexity of parse table
    composition is exponential (like the complexity of parse table
    generation itself), for realistic language combination scenarios
    involving grammars for real languages, our parse table composition
    algorithm is an order of magnitude faster than computation of the
    parse table for the combined grammars.

&lt;p&gt;&lt;/p&gt;

The experimental parser generator is available &lt;a href=&quot;http://strategoxt.org/Stratego/ParseTableComposition&quot;&gt;online&lt;/a&gt;.</description>
	<pubDate>Fri, 19 Dec 2008 09:50:00 +0000</pubDate>
</item>
<item>
	<title>Eric Bouwers: Visualizing the PHP grammar</title>
	<guid>tag:blogger.com,1999:blog-28873279.post-6906569891331227945</guid>
	<link>http://ericbouwers.blogspot.com/2008/12/visualizing-php-grammar.html</link>
	<description>A few weeks ago an e-mail from Didier Garcin popped up on the &lt;a href=&quot;https://mail.cs.uu.nl/mailman/listinfo/stratego&quot;&gt;Stratego mailing list&lt;/a&gt;. He &lt;a href=&quot;http://mail.cs.uu.nl/pipermail/stratego/2008q4/001169.html&quot;&gt;explained&lt;/a&gt; that he had written a python script that could visualize an abstract syntax signature. The script was &lt;a href=&quot;http://mail.cs.uu.nl/pipermail/stratego/2008q4/001171.html&quot;&gt;also send&lt;/a&gt; to the list and I finally had some time to check it out.&lt;br /&gt;&lt;br /&gt;It turned out that I had almost anything installed to use the script, only the &lt;a href=&quot;http://code.google.com/p/pydot/&quot;&gt;pydot&lt;/a&gt; dependency needed some work. This was mostly because the script only seems to work with the 0.9.10 version of this library. After getting the script started it was really simple to generate the signature from the &lt;a href=&quot;http://www.PHP-SAT.org&quot;&gt;PHP-Front&lt;/a&gt; grammar.&lt;br /&gt;&lt;br /&gt;So, here is the one for PHP4:&lt;br /&gt;&lt;a href=&quot;http://www.flickr.com/photos/33405060@N07/3114146562/&quot; title=&quot;PHP4 AST visualization by EricBouwers, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3015/3114146562_137d80c90d_b.jpg&quot; width=&quot;240&quot; height=&quot;222&quot; alt=&quot;PHP4 AST visualization&quot; /&gt;&lt;/a&gt;&lt;br /&gt;And the one for PHP5:&lt;br /&gt;&lt;a href=&quot;http://www.flickr.com/photos/33405060@N07/3113326845/&quot; title=&quot;PHP5 AST visualization by EricBouwers, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3245/3113326845_9b5b9a169f_b.jpg&quot; width=&quot;240&quot; height=&quot;222&quot; alt=&quot;PHP5 AST visualization&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first thing I notices where the big rectangles in both versions. These rectangles are the statements (smaller one) and expressions grouped together. What I also notices was that in both versions we see that the bottom of the graph (which corresponds with the smallest units in the language) looks the most complicated. This corresponds very well with the amount of effort put into the modeling of this part of the language. &lt;br /&gt;&lt;br /&gt;Comparing both grammars to each other we can see that the latest versions is the most complicated one. Furthermore, if we compare both graphs to the graphs shown in &lt;a href=&quot;http://blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammar&quot;&gt;this post&lt;/a&gt; we can see that the Java-graph appears to be the most similar one.&lt;br /&gt;&lt;br /&gt;Actually, I do not think these images show anything, but please explain it to me when you think I just don't see it. Anyway, at least we have some nice pictures now :) &lt;br /&gt;&lt;br /&gt;P.S. for those who are interested, more detailed images (in svg-format) are available &lt;a href=&quot;http://www.st.ewi.tudelft.nl/~bouwers/data/php-grammars.zip&quot;&gt;here&lt;/a&gt;.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/28873279-6906569891331227945?l=ericbouwers.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 16 Dec 2008 21:36:20 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Talking about Parsing</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/90-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/90-Talking-about-Parsing.html</link>
	<description>Last Summer I attended the &lt;a href=&quot;http://www.codegeneration.net/conference/&quot;&gt;Code Generation 2008&lt;/a&gt; conference in Cambridge to give a tutorial on &lt;a href=&quot;http://webdsl.org&quot;&gt;WebDSL&lt;/a&gt;, as case study in &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/77-WebDSL-A-Case-Study-in-Domain-Specific-Language-Engineering.html&quot;&gt;domain-specific language engineering&lt;/a&gt;. The conference was an interesting change from the usual academic conferences I visit, in that the majority of the audience were from industry. It was good to see the interest in code generation  in industry, but also disconcerting to observe the gap between academic research and industrial practice; but more about that some other time.

&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/790497340/&quot; title=&quot;agent tratt by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm2.static.flickr.com/1352/790497340_754f9bdb85_t.jpg&quot; width=&quot;100&quot; height=&quot;100&quot; alt=&quot;agent tratt&quot; align=&quot;right&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

During the conference I was interviewed by &lt;a href=&quot;http://tratt.net/laurie/&quot;&gt;Laurence Tratt&lt;/a&gt;
for &lt;a href=&quot;http://se-radio.net/&quot;&gt;Software Engineering Radio&lt;/a&gt; about &lt;em&gt;parsing&lt;/em&gt;.
The interview podcast recently appeared as 
&lt;a href=&quot;http://se-radio.net/podcast/2008-11/episode-118-eelco-visser-parsers&quot;&gt;Episode 118&lt;/a&gt;.

&lt;p&gt;&lt;/p&gt;

It was a long time ago (1997) that I defended my PhD thesis, which was mostly about syntax definition and parsing. 

In particular, I introduced SDF2, which radically integrates lexical and context-free syntax, and the SGLR parsing algorithm for parsing arbitrary 'character-level' context-free grammars.

Since finishing my thesis I have done quite a bit of `applied parsing research', using SDF and SGLR for applications such as &lt;a href=&quot;http://strategoxt.org/Stratego/MetaProgrammingWithConcreteObjectSyntax&quot;&gt;meta-programming with concrete object syntax&lt;/a&gt; and &lt;a href=&quot;http://doi.acm.org/10.1145/1028976.1029007&quot;&gt;DSL embedding&lt;/a&gt;, but I don't consider myself a hard-core parsing researcher any more. 

So I had to dig deep in my memory to talk about Noam Chomsky's language hierarchy, grammars as string rewrite systems, and parsing algorithms. I find the result a bit awkward to listen to, but people assure me that is because it is my own voice I'm listening too.

&lt;p&gt;&lt;/p&gt;

In the meantime my relation to parsing is changing again. 
While SDF/SGLR still provides the best approach to declarative definition of composite languages (in my opinion at least), 
it has some fundamental limitations which have never been addressed.
A first step in addressing these limitations was taken in the  SLE 2008 paper with Martin Bravenboer on parse table 
composition (see upcoming blog) to provide separate compilation for grammars. 
With a new PhD student starting in the new year, I hope to address other limitations such as the lack of error recovery.</description>
	<pubDate>Mon, 15 Dec 2008 21:11:00 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Decorated Attribute Grammars</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/88-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/88-Decorated-Attribute-Grammars.html</link>
	<description>The paper &quot;Decorated Attribute Grammars&quot; by Lennart Kats, Tony Sloane and Eelco Visser has been accepted for presentation at the &lt;a href=&quot;http://www.brics.dk/~mis/CC2009&quot;&gt;International Conference on Compiler Construction (CC 2009)&lt;/a&gt; to be held in March 2009 in York (UK).

[&lt;a href=&quot;http://swerl.tudelft.nl/twiki/pub/Main/TechnicalReports/TUD-SERG-2008-038.pdf&quot;&gt;pdf&lt;/a&gt;]

&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;http://www.flickr.com/photos/eelcovisser/2751229502/&quot; title=&quot;lennart by Eelco Visser, on Flickr&quot;&gt;&lt;img src=&quot;http://farm4.static.flickr.com/3125/2751229502_348d1d558e_t.jpg&quot; width=&quot;68&quot; height=&quot;100&quot; alt=&quot;lennart&quot; align=&quot;right&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;

Abstract:

        Attribute grammars are a powerful specification formalism for
        tree-based computation, particularly for software language
        processing. Various extensions have been proposed to abstract
        over common patterns in attribute grammar
        specifications. These include
        various forms of copy rules to support non-local dependencies,
        collection attributes, and expressing dependencies that are
        evaluated to a fixed point. Rather than implementing
        extensions natively in an attribute evaluator, we propose
        &lt;em&gt;attribute decorators&lt;/em&gt; that describe an abstract
        evaluation mechanism for attributes, making it possible to
        provide such extensions as part of a library of
        decorators. Inspired by strategic programming, they are
        specified using generic traversal operators. To demonstrate
        their effectiveness, we describe how to employ decorators in
        name, type, and flow analysis.

&lt;p&gt;&lt;/p&gt;

The ideas have been implemented in Aster, an extension of Stratego
with reference attribute grammars.</description>
	<pubDate>Fri, 12 Dec 2008 09:45:30 +0000</pubDate>
</item>
<item>
	<title>Martin Bravenboer: Why the JVM Spec defines checkcast for interface types</title>
	<guid>tag:blogger.com,1999:blog-6943366.post-7674963467625906327</guid>
	<link>http://mbravenboer.blogspot.com/2008/12/why-jvm-spec-defines-checkcast-for.html</link>
	<description>&lt;p&gt;
I'm working on the specification of pointer analysis for Java using Datalog. Basically, a pointer analysis computes for each variable in a program the set of objects it may point to at run-time.
&lt;/p&gt;

&lt;p&gt;
For this purpose I need to express parts of the JVM Spec in Datalog as well. As a simple example, the following Datalog rules define when a class is a subclass of another class.
&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
/**
 * JVM Spec:
 * - A class A is a subclass of a class C if A is a direct 
 *   subclass of C
 */
Subclass(?c, ?a) &amp;lt;-
  DirectSubclass[?a] = ?c.

/**
 * JVM Spec:
 * - A class A is a subclass of a class C if there is a direct
 *   subclass B of C and class A is a subclass of B
 */
Subclass(?c, ?a) &amp;lt;-
  Subclass(?b, ?a),
  DirectSubclass[?b] = ?c.
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;
As you can see, this is remarkably close to the original specification (quoted in comments). You can clearly see the relationship between the spec and the code, even if you are not familiar with Datalog.
&lt;/p&gt;

&lt;p&gt;
Recently, I was working on the specification of the &lt;code&gt;checkcast&lt;/code&gt; instruction. This instruction performs the run-time check if an object can be cast to some type. The &lt;a href=&quot;http://java.sun.com/docs/books/jvms/second_edition/html/Instructions2.doc2.html&quot;&gt;JVM Spec&lt;/a&gt; for checkcast first defines some variables:
&lt;/p&gt;

&lt;blockquote&gt;
  The following rules are used to determine whether an objectref that
  is not null can be cast to the resolved type: if S is the class of
  the object referred to by objectref and T is the resolved class,
  array, or interface type, checkcast determines whether objectref can
  be cast to type T as follows:
&lt;/blockquote&gt;

&lt;p&gt;
So, this basically says that we're checking the cast &lt;code&gt;(T)
S&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
The first rule for this cast is straightforward:
&lt;/p&gt;

&lt;blockquote&gt;
If S is an ordinary (nonarray) class, then:
&lt;ul&gt;
  &lt;li&gt;If T is a class type, then S must be the same class as T, or a
  subclass of T.&lt;/li&gt;
  &lt;li&gt;If T is an interface type, then S must implement interface
  T.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

Well, if you're somewhat familiar with Java, or object-oriented
programming, then this part is obvious. Again, the specification in
Datalog is easy:

&lt;blockquote&gt;
&lt;pre&gt;
CheckCast(?s, ?s) &amp;lt;-
  ClassType(?s).

CheckCast(?s, ?t) &amp;lt;-
  Subclass(?t, ?s).

CheckCast(?s, ?t) -
  ClassType(?s),
  Superinterface(?t, ?s).
&lt;/pre&gt;
&lt;/blockquote&gt;

However, the next alternative in the specification is confusing:

&lt;blockquote&gt;
If S is an interface type, then:
&lt;ul&gt;
  &lt;li&gt;If T is a class type, then T must be Object.&lt;/li&gt;

  &lt;li&gt;If T is an interface type, then T must be the same interface as
  S or a superinterface of S.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;
The specification is crystal clear, but how can S ever be an interface
type? S is the type of the object that is being cast, and how can an
object ever have a run-time type that is an interface? Of course, the
static type of an expression can be an interface, but we're talking
about the run-time here!
&lt;/p&gt;

&lt;p&gt;
I &lt;a href=&quot;http://www.google.com/search?hl=en&amp;amp;q=checkcast+%22If+S+is+an+interface+type%22&quot;&gt;searched
the web&lt;/a&gt;, which only resulted in a few hits. There was one &lt;a href=&quot;http://forums-beta.sun.com/thread.jspa?messageID=4335864&amp;amp;tstart=0&quot;&gt;question on a Sun forum&lt;/a&gt; years ago, where the one answer didn't make a lot of sense.
&lt;/p&gt;

&lt;p&gt;
It turns out that this is indeed an `impossible' case. The reason why
this item is in the specification, is because checkcast is recursively
defined for arrays:
&lt;/p&gt;

&lt;blockquote&gt;
If S is a class representing the array type SC[], that is, an array of
components of type SC, then:
&lt;ul&gt;
  &lt;li&gt;...&lt;/li&gt;
  &lt;li&gt;If T is an array type TC[], that is, an array of components of
  type TC, then one of the following must be true:
  &lt;ul&gt;
    &lt;li&gt;...&lt;/li&gt;
    &lt;li&gt;TC and SC are reference types, and type SC can be cast to TC
    by recursive application of these rules.&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;
So, if you have an object of type &lt;code&gt;List[]&lt;/code&gt; that is cast to
an &lt;code&gt;Collection[]&lt;/code&gt;, then the rules for checkcast get
recursively invoked for the types &lt;code&gt;S = List&lt;/code&gt; and &lt;code&gt;T =
Collection&lt;/code&gt;. Notice that List is an interface, but an object can
have type List[] at run-time. If have not verified this with the JVM
Spec maintainers, but as far as I can see, this is the only reason why
the rule for interface types is there.
&lt;/p&gt;

&lt;p&gt;
Just to show a little bit more of my specifications, here is the rule
for the array case I just quoted from the JVM Spec:
&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
CheckCast(?s, ?t) &amp;lt;-
  ComponentType[?s] = ?sc,
  ComponentType[?t] = ?tc,
  ReferenceType(?sc),
  ReferenceType(?tc),
  CheckCast(?sc, ?tc).
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;
Isn't it beautiful how this &lt;em&gt;exactly&lt;/em&gt; corresponds to the formal
specification?
&lt;/p&gt;

&lt;p&gt;
Unfortunately, even formal specifications can have errors, so I also
specified a large testsuite that checks the specifications with
concrete code. Here are some of the tests for CheckCast.
&lt;/p&gt;

&lt;blockquote&gt;
&lt;pre&gt;
test Casting to self
  using database tests/hello/Empty.jar
  assert
    CheckCast(&quot;java.lang.Integer&quot;, &quot;java.lang.Integer&quot;)

test Casting to superclasses
  using database tests/hello/Empty.jar
  assert
    CheckCast(&quot;java.lang.Integer&quot;, &quot;java.lang.Number&quot;)
    CheckCast(&quot;java.lang.Integer&quot;, &quot;java.lang.Object&quot;)

test Cast ArrayList to various superinterfaces
  using database tests/hello/Arrays.jar
  assert
    CheckCast(&quot;java.util.ArrayList&quot;, &quot;java.util.List&quot;)
    CheckCast(&quot;java.util.ArrayList&quot;, &quot;java.util.Collection&quot;)
    CheckCast(&quot;java.util.ArrayList&quot;, &quot;java.io.Serializable&quot;)

test Cast class[] to implemented interface[]
  using database tests/hello/Arrays.jar
  assert
    CheckCast(&quot;java.util.ArrayList[]&quot;, &quot;java.util.List[]&quot;)
    CheckCast(&quot;java.lang.Integer[]&quot;, &quot;java.io.Serializable[]&quot;)

test Cast interface[] to superinterface[]
  using database tests/hello/Arrays.jar
  assert
    CheckCast(&quot;java.util.List[]&quot;, &quot;java.util.Collection[]&quot;)
&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;
The tests are specified in a little domain-specific language for
unit-testing Datalog that I implemented, initially for &lt;a href=&quot;http://www.iris-reasoner.org&quot;&gt;IRIS&lt;/a&gt; and later for &lt;a href=&quot;http://www.logicblox.com&quot;&gt;LogicBlox&lt;/a&gt;. This tool is similar to
&lt;a href=&quot;http://releases.strategoxt.org/strategoxt-manual/unstable/manual/chunk-chapter/tutorial-sdf.html#sdf-unit-testing&quot;&gt;parse-unit&lt;/a&gt;,
a tool I wrote earlier for testing parsers in &lt;a href=&quot;http://www.strategoxt.org&quot;&gt;Stratego/XT&lt;/a&gt;. The concise syntax
of a test encourages you to write a lot of tests. Domain-specific
languages rock for this purpose!
&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6943366-7674963467625906327?l=mbravenboer.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Thu, 04 Dec 2008 15:03:48 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: WebWorkFlow: An Object-Oriented Workflow Modeling Language for Web Applications</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/85-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/85-WebWorkFlow-An-Object-Oriented-Workflow-Modeling-Language-for-Web-Applications.html</link>
	<description>The paper &quot;WebWorkFlow: An Object-Oriented Workflow Modeling Language for Web Applications&quot; by Zef Hemel, Ruben Verhaaf and Eelco Visser has been accepted for presentation at the conference on &lt;a href=&quot;http://www.modelsconference.org/&quot;&gt;Model Driven Engineering Languages and Systems (MODELS 2008)&lt;/a&gt; to be held in Toulouse, France at the end of September 2008.

&lt;p&gt;&lt;/p&gt;

Abstract:
        Workflow languages are designed for the high-level description
        of processes and are typically not suitable for the generation
        of complete applications.
        In this paper, we present WebWorkFlow, an object-oriented
        workflow modeling language for the high-level description of
        workflows in web applications.  
        Workflow descriptions define procedures operating on domain
        objects. Procedures are composed using sequential and
        concurrent process combinators. 
        WebWorkFlow is an embedded language, extending WebDSL, a
        domain-specific language for web application development, with
        workflow abstractions.
        The extension is implemented by means of model-to-model
        transformations.
        Rather than providing an exclusive workflow language,
        WebWorkFlow supports interaction with the underlying WebDSL
        language. WebWorkFlow supports most of the basic workflow
        control patterns.</description>
	<pubDate>Fri, 11 Jul 2008 19:39:08 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: Heterogenous Coupled Evolution</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/84-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/84-Heterogenous-Coupled-Evolution.html</link>
	<description>The paper &quot;Heterogenous Coupled Evolution&quot; by Sander Vermolen and Eelco Visser has been accepted for presentation at the conference on &lt;a href=&quot;http://www.modelsconference.org/&quot;&gt;Model Driven Engineering Languages and Systems (MODELS 2008)&lt;/a&gt; to be held in Toulouse, France at the end of September 2008.

&lt;p&gt;&lt;/p&gt;

Abstract: As most software artifacts, meta-models can evolve. Their evolution 
requires conforming models to co-evolve along with them. Coupled 
evolution supports this. Its applicability is not limited to the 
modeling domain. Other domains are for example evolving grammars or 
database schema. Existing approaches to coupled evolution focus on a 
single, homogeneous domain. They solve the co-evolution problems 
locally and repeatedly. In this paper we will present a systematic, 
heterogeneous approach to coupled evolution. It provides an 
automatically derived domain specific transformation language; a means 
of executing transformations at the top level; a derivation of the 
coupled bottom level transformation; and the ability to generically 
abstract from elementary transformations. The feasibility of the 
architecture is evaluated by applying it to data model evolution as 
well as grammar evolution.</description>
	<pubDate>Fri, 11 Jul 2008 19:35:05 +0000</pubDate>
</item>
<item>
	<title>Martin Bravenboer: New Conference on Software Language Engineering</title>
	<guid>tag:blogger.com,1999:blog-6943366.post-7964712993697270374</guid>
	<link>http://mbravenboer.blogspot.com/2008/07/new-conference-on-software-language.html</link>
	<description>&lt;p&gt;
This year is special. There is a new and exciting conference: the &lt;a href=&quot;http://planet-sl.org/sle2008/&quot;&gt;International Conference on Software Language Engineering (SLE)&lt;/a&gt;. The deadline for submission of papers is July 14th, which is coming up soon! Before I start raving about the topics covered by this conference, here is the disclaimer: I'm on the program committee of this conference, and as such I believe it's my duty to advertise the conference.
&lt;/p&gt;

&lt;p&gt;
Anyway, if done right, this conference has the potential to become a major and prestigious conference. The conference fills a clear gap: the topics of software language engineering do not exactly fit in major programming language conferences like OOPSLA, PLDI, POPL, and ECOOP.  Nor do they fit exactly in the area of compiler construction (CC). CC does typically not accept more engineering or methodology-oriented papers. For OOPSLA and ECOOP the work more or less has to be in the context of object-oriented programming, for POPL it immediately has to be a principle (whatever that is), and for PLDI there are usually just a few slots available for papers that don't do something with memory management, garbage collection, program analysis, or concurrency. Personally, I've been pretty successful at getting papers in the area of software language engineering accepted at OOPSLA, but a full conference devoted to this topic is much better!
&lt;/p&gt;

&lt;p&gt;
Another reason why I think that this conference has a lot of potential is that if I look at the list of topics of interest in the &lt;a href=&quot;http://planet-sl.org/sle2008/index.php?option=com_content&amp;amp;task=view&amp;amp;id=4&amp;amp;Itemid=4&quot;&gt;call for papers&lt;/a&gt;, then I can only think of one summary: everything that's fun! I'm convinced I'm not the only one who thinks these topics are fun. When talking to colleagues, I notice again and again most of us just love languages. The engineering of those languages is an issue for almost all computer scientists and many programmers in industry, and this conference will be the most obvious target for papers about this!
&lt;/p&gt;

&lt;p&gt;
Also, the formalisms and used for the specification and implementation of (domain-specific) languages are still very much an open research topic. Standardization of languages is still far from perfect, as discussed by many posts on this blog. Also, new language implementation techniques are being proposed all the time, and extensible compilers for developing language extensions are more popular than ever. Not to mention the increasing interest in using domain-specific languages to help solve the software development problems we're facing.
&lt;/p&gt;

&lt;p&gt;
Earlier in this post I wrote that this conference has major potential &lt;em&gt;if done right&lt;/em&gt;. There are few risks. First, the conference has been started by two relatively small communities: ATEM and LDTA. I think the conference should attract a much larger community than the union of those two communities. I hope lots of people outside of the ATEM and LDTA communities will consider to submit a paper. Second, this year the conference is co-located with MODELS. Many programming language people are slightly allergic to model-driven engineering. I hope they will realize that this conference is &lt;em&gt;not&lt;/em&gt; specifically a model-driven conference. Finally, the whole setup of the conference should be international and varied. I'm sorry to say that at this point I'm not entirely happy with the choice of keynote speakers. This nothing personal: I respect both keynote speakers, but the particular combination of the two speakers is a bit unfortunate. First, they are both Dutch. Second, neither of them is extremely well-known in the communities of OOPSLA, PLDI, or ECOOP. I hope that this will not affect the potential of this interesting conference.
&lt;/p&gt;

&lt;p&gt;
Now go work on your submission!
&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6943366-7964712993697270374?l=mbravenboer.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 01 Jul 2008 08:02:25 +0000</pubDate>
</item>
<item>
	<title>Martin Bravenboer: Dubious Conferences: How do they threat people?</title>
	<guid>tag:blogger.com,1999:blog-6943366.post-7955536333739439693</guid>
	<link>http://mbravenboer.blogspot.com/2008/06/dubious-conferences-how-do-they-threat.html</link>
	<description>&lt;p&gt;
I just got a call for papers for the &lt;a href=&quot;http://www.ieccs.net&quot;&gt;International e-Conference on Computer Science&lt;/a&gt; 2008 (IeCCS 2008). The IeCCS conference organizers and committee members are one of a kind! The submission deadline for papers is the 20th of June. Notification of acceptance is 25th of June. That's 5 days for reviewing. The camera ready deadline is 27th of June. That's 2 days for revising your paper. You've got to love the efficiency of these people! The 2007 edition of this conference has a program of 11 pages of accepted papers. When I review papers, I rarely get more than 2 done per day. If the IeCCS committee want to accept a similar number of papers this year, then they'd better make sure to get enough coffee (or tea, as advised in my Ph.D. thesis).
&lt;/p&gt;

&lt;p&gt;
Now, if you are a computer science researcher such emails are hardly surprising. I delete several of them every week. Everybody is aware of conferences with questionable reviewing practices (see the &lt;a href=&quot;http://pdos.csail.mit.edu/scigen/&quot;&gt;SCIgen paper generator&lt;/a&gt;). What surprised me about the IeCCS call for papers is that there is actually a researcher on the committee who I vaguely know from when I was a student. So, I searched the web a bit to see how obvious the evidence is that the reviewing practices of IeCCS are questionable. Interestingly, I could find only one reference that mentions IeCCS as a conference where you'd better not submit to. It's an interesting &lt;a href=&quot;http://pike.psu.edu/presentations/oracle.pdf &quot;&gt;presentation&lt;/a&gt; of somebody at the PSU.
&lt;/p&gt;

&lt;p&gt;
It seems that lists of conferences with a dubious reputation (also known as fake conferences) are impossible to keep up. I've seen a few lists in the past, but they've all disappeared. What interests me is why those lists are taken down. The most well known list, by Arlindo Oliveira, was &lt;a href=&quot;http://www.inesc-id.pt/~aml/trash.html&quot;&gt;taken down&lt;/a&gt; after receiving threats by conference organizers. I've never quite understood that: how serious can such a threat be? Maybe they'll publish a random paper with my name? They'll put me on the program committee next year?
&lt;/p&gt;

&lt;p&gt;
So well, here we go. Let's see what happens.
&lt;/p&gt;

&lt;p&gt;
Notice: IeCCS is not fake. It is very real!
&lt;/p&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;img width=&quot;1&quot; height=&quot;1&quot; src=&quot;https://blogger.googleusercontent.com/tracker/6943366-7955536333739439693?l=mbravenboer.blogspot.com&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;</description>
	<pubDate>Tue, 03 Jun 2008 07:14:55 +0000</pubDate>
</item>
<item>
	<title>Eelco Visser: The Nix Build Farm: A Declarative Approach to Continuous Integration</title>
	<guid>http://blog.eelcovisser.net/index.php?/archives/83-guid.html</guid>
	<link>http://blog.eelcovisser.net/index.php?/archives/83-The-Nix-Build-Farm-A-Declarative-Approach-to-Continuous-Integration.html</link>
	<description>The paper &quot;The Nix Build Farm: A Declarative Approach to Continuous Integration&quot; by Eelco Dolstra  and Eelco Visser
has been accepted for presentation at the
&lt;a href=&quot;http://smallwiki.unibe.ch/wasdett2008/&quot;&gt;International Workshop on Advanced Software Development Tools and Techniques&lt;/a&gt;
co-located with &lt;a href=&quot;http://2008.ecoop.org/&quot;&gt;ECOOP 2008&lt;/a&gt; in 

&lt;p&gt;&lt;/p&gt;

The paper is the first to come out of the 3TU CEDICT &lt;a href=&quot;http://blog.eelcovisser.net/index.php?/archives/36-Bootfarm.html&quot;&gt;buildfarm project&lt;/a&gt; (which badly needs a webpage).

&lt;p&gt;&lt;/p&gt;

Abstract:
There are many tools to support continuous integration (the process of
automatically and continuously building a project from a version
management repository).  However, they do not have good support for
variability in the build environment: dependencies such as compilers,
libraries or testing tools must typically be installed manually on all
machines on which automated builds are performed.  The &lt;em&gt;Nix
  package manager&lt;/em&gt; solves this problem: it has a purely functional
language for describing package build actions and their dependencies,
allowing the build environment for projects to be produced
automatically and deterministically.  We have used Nix to build a
continuous integration tool, the &lt;em&gt;Nix build farm&lt;/em&gt;, that is in use
to continuously build and release a large set of projects.</description>
	<pubDate>Mon, 26 May 2008 20:44:43 +0000</pubDate>
</item>

</channel>
</rss>

