Mohsen Vakilian's Blog

November 24, 2008

OOPSLA 2008–Scala

Filed under: language — mohsenvakilian @ 11:51 pm

Several papers such as Generics of a Higher Kind, The Visitor Pattern as a Reusable, Generic, Type-Safe Component, and Constrained Types for Object-Oriented Languages at OOPSLA were more or less related to Scala. I hadn’t got the chance to educate myself about Scala until I attended the tutorial “Programming in Scala” offered by Bill Venners.

Scala interoperates with Java. By integrating features of both object oriented programming and functional programming it achieves a concise syntax. Scala is statically typed and OOPSLA papers related to Scala mainly dealt with its type system.

Bill went through concrete Scala examples and explained basic Scala syntax. Then, he went on and explained pattern matching in Scala which models algebraic data types in functional langauges. The tutorial was a good introduction to Scala. And, I hope to learn about more advanced features of Scala such as “Abstract Members”, “Extractors”, “Actors and Concurrency”, “Variance Annotation”, “Lower/Upper Type Bounds”

November 17, 2008

OOPSLA 2008–Architecture as Language

Filed under: architecture,dsl — mohsenvakilian @ 1:18 pm

Markus Voelter presented three tutorials on DSL’s at OOPSLA this year. The one I attended was entitled “Architecture as Language“. In this tutorial, he illustrated how textual DSLs can be used as succinct, precise, technology-independent and tool-processable description of a software architecture.

Markus went through building an example DSL and showed how the approach could be applied to product lines. He actually defined the grammar and added some constraints as he discussed the architecture and got a customized editor (using oAW‘s Xtext tool) at the end.

He defined components in his DSL like the following:

component DelayCalculator {

provides IDelayCalculator

requires IInfoScreen


Then he changed the grammar to express instances of components and wired instances together by expressing relationships between them. To describe relationships between instances and cardinalities of these relationships, he introduced the well-known concept of ports. Ports led to role-specific interfaces. Also, he added namespaces and extended the language to describe the publish/subscribe relationship between components. The resulting language looked like the following:

namespace datacenter {

component DelayCalculator {

provides aircraft: IAircraftStatus

provides managementConsole: IManagementConsole

requires screens[0..n]: IInfoScreen

publishes flights { publication = onchange }



namespace mobile {

component InfoScreen {

provides default: IInfoScreen

consumes flights { init = allĀ update = every(60) }



Describing the architecture in a DSL has the benefit of making clear what the architect means. But, it takes time and effort and usually it’s valuable if some analysis or code generation can be done using the formal description. The oAW tool seems to try to exploit both benefits of an architectural DSL’s. But, I have to further play with the tool to see how it works in action. It’s not clear to me how well it can prevent developers from modifying the generated code.

DSL’s seem to be promising techniques to help customers and developers communicate. And, I’m looking for research opportunities in this field.

Create a free website or blog at