Sunday 4 March 2012

Progams are models

Funny how some themes tend to recur through computer science and a post on "Enso Blog" turned up this gem: Why I don’t consider Programs to be Models:

My main point here, however, is that I prefer to not think of programming languages as modeling languages. The reason is that, for me, a modeling language must be about what behavior is desired, not how to implement that behavior.

I spent a huge amount of time working on this, especially in the context of the MDA and actually trying to convince people that a description in some language such as UML was just as valid and concrete as a description in some executable programming language - though it was ironic often that something in SDL was considered a program but something in UML was considered a model.

At the time there was parallel work on something called 'executable modelling' - though interestingly that particular group never wanted to discuss what they meant by either term 'executable' or 'model'...in the end turned out because of this failing to even attempt to address these terms that particular approach (if it was even a valid approach given its lack of semantics) failed.

The posting mentioned earlier refers to another blog entry on the subject by Zef Hemel in his post Models are Programs. I tend to agree wholly with the point made there and thus indirectly with his PhD thesis: Methods and Techniques for the Design and Implementation of Domain-Specific Languages though a little surprised that mention wasn't made to some of the work in this area on specifications, especially the classic Fuchs' Specifications Are (Preferably) Executable.

However I can see the discussion on specifications versus programs lurking there but whichever way you look at things, a little abstraction reveals these things are all the same anyway.

So, after setting this up, while I don't agree with the first point and agree with the second, I do think there is an interesting taxonomic or ontological question on what makes a model different from a specification from a program - not to mention what makes something "executable" or not.

But to specifically address the point that modelling languages are about desired behaviour and not implementation is flawed in the sense that all programming languages are an abstraction - just depends on how deep you want to go.

Anyway, its late and I'll need to dig out from the recesses of my brain some of the work I made in this area but always nice to see these things haven't been resolved and still stir controversy :-)

References.
 
Johan Lilius , Ian Oliver (2007). Towards a Formal Definition of Model Driven Development (2007). Technical Report. Åbo Akademi.

No comments: