Haskell for the Enterprise (topic for a MSc dissertation?)

Hi All, This is my first post here, so I'll start with a quick introduction... I live and work in Hamburg, Germany. My day job is as a software engineer at Sun Microsystems at the OpenOffice.org development team where I'm mostly doing XML (ODF) related things. Beside of that, I'm currently pursuing an M.Sc degree in software engineering in a part-time post graduate program where I am now nearing the phase where I have to develop a topic for my dissertation. Apart from a little dabbling with Miranda during my undergraduate CS days I haven't touched functional programming ever since and have been doing Java, C# and C++ most of the time. However, I have over the last few month "fallen in love" with the great expressiveness offered by Haskell and through that have gained some great new perspectives and discovered new ways to think when writing programs. Consequently, my idea to combine all of this into a topic for my dissertation is to write about the existing and potential benefits (and shortcomings) of a functional programming language for the development of typical enterprise applications (especially with regards to more and more concepts from functional programming being adopted in imperative languages). I would start off with an existing J2EE application, analyze the abstractions and patterns that it uses. I will then discuss similar and alternative abstractions and patterns available in functional programming which can be applied in order to solve the same problem in a functional setting, leveraging some existing infrastructure, such as HAppS. What would follow is a comparison of the two resulting applications from a software engineering standpoint: How maintainable are these implementations? How can they be tested? Can formal validation techniques be applied to parts of the functional implementation that can be used to establish its correctness. Maybe analysis of performance... One of my potential supervisors for the dissertation has already indicated some interest in the topic so it all looks quite well to me. The overview that I gave above obviously needs much more elaboration, but as I said, I have just started developing topics. I would love to hear your comments on this. Has this been done over and over already? Are there any source which you think of from the top of your head which I should check out? Books that you would want to recommend? As I wrote above, I'm quite new to Haskell. Thus if anyone wants to recommend some readings specifically on the aspect of modeling in a functional environment I'd be happy to hear about that too. All the best, Lars -- Lars Oppermann Hamburg, Germany

Lars Oppermann wrote:
I would love to hear your comments on this. Has this been done over and over already? Are there any source which you think of from the top of your head which I should check out? Books that you would want to recommend?
Sounds interesting. I for one would like to read a study along these lines.
As I wrote above, I'm quite new to Haskell. Thus if anyone wants to recommend some readings specifically on the aspect of modeling in a functional environment I'd be happy to hear about that too.
I'm not sure what you mean by "modelling": functional programmers don't see modelling as separate from coding: the code is the model, and if thats not abstract enough then you didn't do it right. Take a look at some good examples of combinator libraries. Parsec and QuickCheck are good case studies. Examine the interfaces, and see how the model shines through. Understand how monads are used to model different ideas of control flow (especially the list monad, and also backtracking in Parsec). If you can get your head around it you might also look at the continuation monad and see how it can be used as the foundation for arbitrary flow of control concepts. Finally compare the use of monad transformers with "aspect oriented" programming. You might also read the "poor mans concurrency" paper http://www.cs.chalmers.se/~koen/pubs/jfp99-monad.ps. The dialect of Haskell is obsolete, but you'll get the idea. Don't get too hung up on monads. Also study applicative functors and arrows. Applicative functors are probably easier to figure out at first. Arrows are what you get when you cross applicative functors with monads (more or less). Paul.

On 8/15/07, Paul Johnson
I'm not sure what you mean by "modelling": functional programmers don't see modelling as separate from coding: the code is the model, and if thats not abstract enough then you didn't do it right. [...]
With modeling I meant the process of arriving at the abstraction from the initial "business requirements". The concepts that you pointed out would then be the building blocks, from which the application model is derived. The fact, that that model is already the code would be a strong point for actually using FP for enterprise applications as you do not need to get into the whole "executable UML" business of which I am personally not very fond of. Another modeling approach might be to start with formal specification technique like Z and then implement that in Haskell. The code would be much closer to what you'd put down in the formal spec. On the other hand, it may be limiting in expressive power, thus the code may serve as the formal specification too, exampoles of this would be James Clark' RelaxNG validator in Haskell (http://www.thaiopensource.com/relaxng/derivative.html) or the TeX formula layout reimplementation/description in SML (http://rw4.cs.uni-sb.de/~heckmann/abstracts/neuform.html) Thanks a lot for all your suggestions... Lars -- Lars Oppermann Hamburg, Germany

Hi All,
This is my first post here, so I'll start with a quick introduction... I live and work in Hamburg, Germany. My day job is as a software engineer at Sun Microsystems at the OpenOffice.org development team where I'm mostly doing XML (ODF) related things. Beside of that, I'm currently pursuing an M.Sc degree in software engineering in a part-time post graduate program where I am now nearing the phase where I have to develop a topic for my dissertation.
Apart from a little dabbling with Miranda during my undergraduate CS days I haven't touched functional programming ever since and have been doing Java, C# and C++ most of the time. However, I have over the last few month "fallen in love" with the great expressiveness offered by Haskell and through that have gained some great new perspectives and discovered new ways to think when writing programs.
Consequently, my idea to combine all of this into a topic for my dissertation is to write about the existing and potential benefits (and shortcomings) of a functional programming language for the development of typical enterprise applications (especially with regards to more and more concepts from functional programming being adopted in imperative languages). I would start off with an existing J2EE application, analyze the abstractions and patterns that it uses. I will then discuss similar and alternative abstractions and patterns available in functional programming which can be applied in order to solve the same problem in a functional setting, leveraging some existing infrastructure, such as HAppS. What would follow is a comparison of the two resulting applications from a software engineering standpoint: How maintainable are these implementations? How can they be tested? Can formal validation techniques be applied to parts of the functional implementation that can be used to establish its correctness. Maybe analysis of performance...
One of my potential supervisors for the dissertation has already indicated some interest in the topic so it all looks quite well to me. The overview that I gave above obviously needs much more elaboration, but as I said, I have just started developing topics.
I would love to hear your comments on this. Has this been done over and over already? Are there any source which you think of from the top of your head which I should check out? Books that you would want to recommend? There is a lot of scientific literature, but not much has been done with actual engineering in mind. There is no Red Hat, no Suse, no MontaVista and there is no company sponsoring its development in a big way, like Sun. It's not supported by any business consortium or even standardized by any official group. But people are working on an O'Reilly book about Haskell in practice (Real World Haskell). You might also want to read
On Wed, 2007-08-15 at 15:04 +0200, Lars Oppermann wrote: the 'History of Haskell' which has a section on use in industry. Maybe you could talk to some of those people. What I know is that it is being deployed other than in open source, but that fact is not being advertised in the marketing. Maintainability should be excellent in Haskell, due to the fine grained modularity without side effects. Best Regards, Hans van Thiel
As I wrote above, I'm quite new to Haskell. Thus if anyone wants to recommend some readings specifically on the aspect of modeling in a functional environment I'd be happy to hear about that too.
All the best, Lars
-- Lars Oppermann Hamburg, Germany
participants (3)
-
Hans van Thiel
-
Lars Oppermann
-
Paul Johnson