The Future of Programming includes Modeling
The last time I made a post about the future of programming (specifically the future of programming languages), I was gently chided for not being bold enough. Well here is the one call that some might find a bit bold: the future of programming includes modeling.
Modeling is frequently used in certain software development domains to help verify the design of software, both formally and informally, before implementation starts.
One of the reasons that this approach hasn't caught on in the programming community at large is that it slows down development and increases the overall cost significantly. You have to maintain separate artifacts that contain largely the same information: the source code and the model. Finally models are often ignored after implementation starts.
This is well-known in the modelling community as the Achilles heal of modeling. Nonetheless modeling is still important enough for creating correct and robust software that it is widely used in many software projects where robustness is important.
It seems to violate basic common sense to have two separate and competing specifications of software (i.e. the model and the source code). It is also unclear how to assure that the specifications are the same (it is in fact not solvable in the general case because it can be reduced down to the halting problem). In the case of disagreement which specification is right? Lots of energy has been devoted to trying to synchronize models and source-code, under the moniker round-trip engineering.
There is however a better solution that already exists: make the code and models synonymous with each other. In other words: make the model the code. This approach is the holy grail of the model-driven architecture (MDA) movement, and only one technology actually offers it today: executable UML (xUML).
The problem with xUML is that it is primarily a diagram based formalism (with some unspecfied syntax thrown in). Most of us programmers hate diagrams. They are slow and cumbersome to develop and manipulate. My view, which I am sure is shared by many of you out there, is this: I wish everyone else in the world could supply me with up to date UML models with their source code, but I don't want to be obliged to do so myself.
So a question one might ask is: why can't we simply generate models from code? Well the problem is that code is too low-level. Just like you can't generate pretty and elegant source code with meaningful symbol information from assembly code, the same is true of models.
There have been a handful of books on xUML (see http://www.heron-language.com/xuml.html for a list), but I know of a handful of companies offering xUML tools for developers today: Kennedy Carter, Mentor Graphics, and PathFinder MDA. The only one I have pricing information for is the Mentor Graphics Graphics Bridgepoint UML suite, which when I last checked was $12,500!! There is a free xUML tool called iUMLite from Kennedy Carter which doesn't appear to have been updated since 2003. Unfortunately this particular tool since is buggy: it locked up after 5 minutes of usage on my dual-processor machine. I suspect that their professional offerings are much better quality (their software was used to develop navigation systems for F-16's, see http://www.omg.org/mda/mda_files/LockheedMartin.pdf) but pricing is not publicly available. I assume if you have to ask, you can't afford it.
Why so expensive? The reason is simple, because the technology works and it really is that good. People who take their models seriously can virtually skip the implementation phase!
However for me the current situation regarding xUML is unacceptable for two reasons:
- I am poor, so I download my development tools for free or I write them myself
- I abolultely hate working with diagrams. Give me a text editor or I'll find a new line of work
So combine these two facts and what happens? A text representation of xUML invented by yours truly. While tool support is still in its pre-alpha phase, I have published a first draft of the specification at http://www.heron-language.com/spec.html.
If you are interested in seeing some screen-shots of software that you can't download yet check out the Heron home page at http://www.heron-language.com/. Also if you would like to learn more about Executable UML, and have a launching pad to other information I have put together a little introduction to xUML at http://www.heron-language.com/xuml.html.