Software Transformation Systems

May 12, 2006

Together with Magne Haveraaen, Jim Cordy, and Jan Heering, I am organizing the next Workshop on Software Transformation Systems (STS'06), which will be co-located with GPCE and OOPSLA in Portland, Oregon in October. If you are interested in the design, implementation, and use of transformation systems you should consider submitting an abstract. (Note that the webpage is being updated, so check back on details of submissions.) If it will be like last time, it promisses to be a lively day full of interesting discussions.

Transformations for Abstractions (Looking for a Postdoc or PhD student)

May 10, 2006

Recently I got notice from NWO, the dutch research funding organization, that the project proposal `Transformations for Abstractions (TFA)' that I submitted last September was accepted. (In a very competitive round; only 15% of proposals was accepted this year.) As a consequence, I have funding for a three year postdoc or a four year PhD student position. The topic of the project is language extensions (abstractions), in general, and extension of transformations on/for language extensions, in particular. Here is the summary of the proposal:

This proposal is about techniques at the intersection of two areas of software engineering. (1) In order to automate software engineering we would like to automate the process of producing programs by means of automatic transformations, thereby computing with programs as we do with other data. (2) In order to improve the expressivity of programming languages to the concepts and notations of specific application domains, we would would like to extend general-purpose languages with domain-specific abstractions. Combining these desiderata leads to the need to extend transformations for new domain-specific abstractions.

The goal of this project is to develop a systematic approach to the extension of general purpose languages with domain-specific abstractions, integrating those abstractions in the syntax and transformations of the programming environment. This requires research into the following issues:

  • strategies for the definition of domain abstractions
  • mechanisms for open extensibility of transformations
  • methods and patterns for design of open transformations
  • constraints for independent extensibility of transformations
  • derivation of transformation extensions from definitions of abstractions

We approach this goal by analyzing a variety of existing domain-specific languages and transformations, developing generic extensibility mechanisms, and validating these first in an `in vitro' setting and then in a programming environment for the Java language. The project builds on a solid body of work from the Stratego/XT project that will allow us to concentrate on the core of the problem, rather than being distracted by infrastructural issues.

If you are interested in the project, either as a candidate for the position or as a collaborator, I would like to hear from you. Further information (such as the full project proposal) is available on request.

Image Transformation

May 7, 2006

After many years, I finally have a new picture for my home page. Here is the transformation from December 1998 to May 2006:

self => self => self


Clearly the main reason for a new picture was the quality of the old one; I don't look a day older, do I;-)

My renewed interest in photography was sparked by the discovery of autostitch, a tool that stitches together pictures from different parts of the same scene. It allows easy composition of panoramas such as the following picture of a canal in Amersfoort:

canal / bridge
It is composed from a bunch (10?) pictures taken by hand (no tripod) with my not so fantastic Samsung digital camera. Autostitch discovers how to put the pieces together.

It does not only work for landscape panoramas, as illustrated by the following 180 degrees interior shot:

interior

It can also be used for funny things such as the following composition of three pictures I took back in 2004 at OOPSLA/GPCE in Vancouver of Martin Bravenboer and Jurgen Vinju:

Bravenboer & Vinju

Or even more surrealistic compositions with multiple occurrences of the same people:

garden

See my autostitch experiments for more examples.

That was a fun diversion in the past week. I've neglected this blog for a while. Much has happened in the meantime, and there are many plans for new (program) transformation work. Now that I've found time for messing around with picture transformation, I expect I'll find time for new blogs as well in the near future. Stay tuned. (I will mainly publish new photos at my flickr account.)

MetaBorg in Action

September 15, 2005

This morning Rene de Groot presented his thesis work in our Software Technology Colloquium. He has worked on two case studies of embedding domain-specific languages in Java --- applying and refining our MetaBorg approach to `concrete syntax for objects'.

In the first case study Rene elaborated the JavaSwul extension of Java with the SWing Userinterface Language. Rather than the usual spaghetti code of Swing method invocations, the language allows you to follow the hierarchical structure of the Swing class hierarchy to create userinterface objects. For example, the following GUI

is produced by this Java program

import javax.swing.*;
import java.awt.*;

public class Test3 {
  public static void main(String[] ps) {
    JFrame frame = frame {
      title = "Welcome!"
      content = panel of border layout {
        center = label { text = "Hello World" }
        south = panel of grid layout {
          row = {
            button { text = "cancel" }
            button { text = "ok"}
          }
        }
      }
    };
    frame.pack();
    frame.setVisible(true);
  }
}

The JavaSwul Examples page contains a number of other cool examples including the creation of menus with eventhandlers and gridbags with a semi-visual layout syntax.

The second case study is the extension of Java with concrete syntax for regular expressions. First it provides a syntax for regular expressions and checks regular expressions in a program against that syntax at compile-time. Second because of the explicit syntax extension, there is no need for escaping special characters as has to be done when encoding regular expressions using strings. Finally, the extension provides syntax for defining string rewrite rules and combining those into compound string rewrite operations (analogously to rewriting strategy combinators in Stratego). Here is an example, with some wiki-like rewrite rules:

public String publish(String page) {
  regex body = [/ <body[^>]*?> .* </body> /]

  regex amp = [/ & /] -> [/ &amp; /] ;
  regex lt  = [/ < /] -> [/ &lt;  /] ;
  regex gt  = [/ > /] -> [/ &gt;  /] ;

  regex escape = amp <+ lt <+ gt

  regex noattach  = [/ <a[^>]*?> \s* Attach \s* </a> /]
                 -> [/ <strike> Attach </strike> /] ;
  regex edittopic = [/ %EDITTOPIC% /]
                 -> [/ <a href="${editAction}"><b> Edit </b></a> /] ;
  input ~= one( body
                <~>
                all( edittopic <+ noattach <+ escape  )
              )
  return input ;
}

In addition to the syntactic extensions of Java and their definition using transformations, the implementations include an extension of Martin Bravenboer's typechecker for Java, so that Java programs using the extensions are typechecked before transformation.

A preview of the work is presented in MetaBorg in Action, a paper for the Summer School on Generative and Transformational Techniques in Software Engineering (GTTSE'05) that was held in Braga, Portugal last Summer.

Rene's thesis is due soon.

Service Configuration Management

September 5, 2005

Today our sysadmin asked me to setup a new wiki for use in some course. (Due to early wiki enthusiasm I became wiki master in our department. In fact it took quite some time to convince people that not having a single web master was a good idea.) When I set up my first wikis, one for our Software Technology research group and the other for Program-Transformation.Org, it took me quite some time to get everything installed in the right place, customize the configuration file, and such misery. For instance, on the webserver of our department perl was not installed in /usr/bin as was expected by the CGI scripts of TWiki, but rather in /sw/bin. This required patching all scripts each time I upgraded the installation. Also the directories containing the site were mounted on a different path in the webserver than on the user server. Thus, scripts that were invoked via cron job (for example to update statistics) needed a different path configuration than scripts running on the server. As a result, updating the site was not something to look forward to, let alone adding new installations.

Today I didn't flinch a second when receiving the request to create a new wiki. I just copied the 60 line Nix file of another wiki, changed the name of the wiki, the directories in which to store the wiki data, the port at which to approach the wiki on the server, and customized a few other options. Then I called the install script, and there I had a new wiki set up and running. Well, actually I had to ask sysadmin to open the new port, but then it was just there.

This is all thanks to service configuration management with Nix. In this paper that Eelco Dolstra will present tomorrow morning at SCM-12 in Lisbon (Portugal), we show that the management of services requires the integrated management of software and configuration. By treating software configurations just like any other software components, rather than as state managed in global directories, one can uniquely and reproducibly describe a specific instance of a service. We have used this to succesfully deploy quite a few services already, including a subversion version management server, a Jira issue tracking server, a buildfarm and automatic release management system. The description of the machine specific parts of the deployment of these services is factored out into a small Nix expression, such that I could create a combined subversion/wiki server on my little home machine with the push of a button (well almost).

So if you don't have a chance to attend Eelco's talk tomorrow morning, at least have a look at the paper.

Previous123...21222324252627282930313233343536Next