Friday, November 13. 2009Composing Domain-Specific Languages
Last week I was in Bergen (Norway) for the PhD thesis defense of Anya Bagge and the opening of the Bergen Language Design Laboratory.
For the occasion of the opening a few people where asked to talk about the history and future of programming language design.
Don Sannella talked about the failure of the Extended ML formal methods project.
Bjarne Stroustrup 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).
Paul Klint gave a flavour of his new Rascal meta-programming language.
Horacio Bouzas and Carl Seger talked about the role of languages in oil exploration and chip design.
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 Stratego or WebDSL, 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.
Composing Domain-Specific Languages
View more documents from eelcovisser. Saturday, October 24. 2009An Eclipse Editor for WebDSL
This afternoon I created an Eclipse editor for WebDSL from just its syntax definition
using Spoofax/IMP 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.
Sunday, October 18. 2009Take the red PIL (or choose any other color you like)
The Platform Independent Language PIL now has its own website 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.
Saturday, October 10. 2009The Big Scheme of Things: Episode 2 -- Templates
While attending GPCE, SLE, and MoDELS 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 WebDSL, a domain-specific language for web applications.
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.
Continue reading "The Big Scheme of Things: Episode 2 -- Templates" Monday, October 5. 2009Integration of Data Validation and User Interface Concerns in a DSL for Web Applications
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.
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 Software Language Engineering (SLE 2009) we describe how we have extended WebDSL with declarative data validation rules that are checked automatically and for which error messages are injected in the UI.
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.
[researchr]
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.
Posted by Eelco Visser
in domain-specific languages, web engineering, webdsl
at
11:34
| Comments (0)
| Trackbacks (0)
Sunday, October 4. 2009Quine In Stratego
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 pre-blog and at the Stratego/XT site, but not in this blog. Since it was a fun example, I thought it deserved a place on my official blog. Here goes:
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.
The basic ideaThe 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
----------------------------------
module quine
imports lib
strategies
main =
!["prefix", "suffix"]
; \ [x, y] -> [x, x, y, y] \
; concat-strings
;
Compiling and running this program produces:
prefixprefixsuffixsuffix Quoting the sourceNext 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.
------------------------------------------------------------------------------------------
module quine
imports lib
strategies
main =
!["module quine imports lib strategies main = ![",
"]; \\ [x, y] -> [x, x, y, y] \\; concat-strings;
The output of this program is
------------------------------------------------------------------ module quine imports lib strategies main = ![module quine imports lib strategies main = ![]; \ [x, y] -> [x, x, y, y] \; concat-strings;which is starting to look good, but not quite there, since it doesn't compile. Getting the quotes rightWhat 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.
------------------------------------------------------------------------------------------
module quine
imports lib
strategies
main =
!["module quine imports lib strategies main = ![\"",
"\"]; \\ [x, y] -> [x, x, y, y] \\; concat-strings;
The output of this program is
------------------------------------------------------------------ module quine imports lib strategies main = !["module quine imports lib strategies main = !["",""]; \ [x, y] -> [x, x, y, y] \; concat-strings;which still does not compile because of the doublequotes embedded in the string. Getting the quotes more rightWe need to escape the embedded strings. This can be achieved easily by using the escape strategy from the library, which escapes doublequotes and backslashes.
------------------------------------------------------------------------------------------
module quine
imports lib
strategies
main =
!["module quine imports lib strategies main = ![\"",
"\"]; \\ [x, y] -> [x,
This produces (without the newlines)
----------------------------------------------------------------------------- module quine imports lib strategies main = !["module quine imports lib strategies main = ![\"","\"]; \\ [x, y] -> [x, BootstrappingNow the last program is not exactly the same as its predecessor, but if we compile and run it, it produces its own source literally.Saturday, October 3. 2009Abstractions for Mobile Applications (Postdoc Position)
(Update: the position has been filled)
Yesterday, I had an interesting phone discussion with researchers from T-Mobile, which strengthened me in my plan to make the next MoDSE case study about abstractions for mobile applications, and to make that the focus for the open postdoc position in the project.
The Software Engineering Research Group of Model-Driven Software Evolution (MoDSE)” project funded by the Jacquard Software Engineering Research program of NWO.
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 WebDSL case study.
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.
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.
How to apply: Send applications consisting of an application letter and a detailed CV in PDF by email to Eelco Visser
Monday, September 21. 2009The Big Scheme of Things: Episode 1
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 webdsl.org.
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 "Hello web!" app running.
Continue reading "The Big Scheme of Things: Episode 1 "
(Page 1 of 12, totaling 91 entries)
» next page
|
Calendar
Recent EntriesComposing Domain-Specific Languages
Friday, November 13 2009 An Eclipse Editor for WebDSL Saturday, October 24 2009 Take the red PIL (or choose any other color you like) Sunday, October 18 2009 The Big Scheme of Things: Episode 2 -- Templates Saturday, October 10 2009 Integration of Data Validation and User Interface Concerns in a DSL for Web Applications Monday, October 5 2009 Quine In Stratego Sunday, October 4 2009 Abstractions for Mobile Applications (Postdoc Position) Saturday, October 3 2009 The Big Scheme of Things: Episode 1 Monday, September 21 2009 PIL: A Platform Independent Language for Retargetable DSLs Wednesday, September 9 2009 Weaving Web Applications with WebDSL Thursday, August 27 2009 CategoriesSyndicate This BlogQuicksearchBlog Administration |
||||||||||||||||||||||||||||||||||||||||||
