Home | Resistence is Futile ... You will be Translated >>


Cyrus Montakab

On Legacy Modernization

I am the technical director at SoftwareMining. We specialize in tools for translation of COBOL applications to what we believe is maintainable Java code. The development of the SoftwareMining tools has taken a lot of effort over many years. I spearheaded most of the design and development.

The material that I will publish in this blog is bound to have some bias towards "SoftwareMining" way of doing things, but I promise not to try to sell anything here.

The reason that I am starting this blog page is that I have a different view most others in this industry about legacy modernization.  I believe re-hosting is not a long term solution, rewrite is too risky and expensive (specially for extraction of Rete type rules), and as to postponing the problem for next year (and maybe next IT director), well what can I say ... 

My Background - Who am I ?

I'll start with a bit of background. My first degree was in Chemical Engineering ... which is to do with chemical plants for manufacturing chemicals: from washing up liquid and food processing to petro-chemicals. As you can imagine - the control of Chemical plants are computerized. A process-control computers need to detect if/when the temperature in a reactor gets too high, and opens the cooling system. 

My PhD was to do with an Artificial Intelligence (AI) system which could write the "process-control" program - for a given chemical plant. The functional specification was provided in from a semi-formal language (a subset of English).  We needed to produce some real-time ("C" like) control program.

The question was - what did we need to teach the AI and what was the necessary deep of knowledge? It started with domain knowledge on chemicals and their reaction, Reactors, heat-exchanges, natural language processing, programming. We built a prototype and it worked.

A lot of the concepts from my PhD ended up in SoftwareMining's core Translation product: designing a system which can read a formal specification in form of a existing (COBOL) application code, and write new code in a new language - C++, Delphi, java, C# (the C++ and Delphi modules have long been discontinued).

This was not going to work by simply plugging a parser and code-generator together. For it to have any commercial value, it had to be more intelligent. It had be able to model it's world (ie all the variable and statements), and to have some understanding of it, analyze, and look for patterns, then apply clean up, and re-structuring before rewriting it in the new language.

The creation of a tool capable of modeling, analysis and pattern recognition was only half of the problem, and was resolved through use of AI in LISP language - arguable the best language for Artificial Intelligence.

Another problem that had to be addressed was how to make the new code maintainable, and what constitutes a good design ? These questions can are best answered by developers with good experience.  In my case, the experience was gained by working for large organizations in the financial center of London. The applications were typically performance sensitive, some with a VERY large user-base, some successful ones and some not-so-successful ones. All work was in Object-Oriented and Java. In all cases, the experiences gained was feedback to the Translation tool. Of course I am only one of the team - I am not claiming all the credit for SoftwareMining tools. We have had many highly experienced and talented developers working together to perfect it. But I am the technical director, and as they say - the buck stops here :)

The first version of the translator contained a Parser, a Code-Generator and very little analysis and refactoring. That first version took 20% of the overall development time. The rest of the 80% has been spent in handling special (and not so special) cases !!!. For example, in COBOL the EQUALS keyword can be used to compare integers, decimals or numbers. In java, depending on whether you are working with "String", "int", or BigDecimal, you can use "==" or ".equals"  method. There are thousands and thousands of little patterns like this one which give the generated code a "hand-made" feel.

Not all translators are created equally 

So, I hear you ask - where am I going with all this? I know there has been a lot of translators and code-generators in software Industry. I know a lot of them have not produced high quality code and have left a bad name for all such work. But here, in this blog, I am going to champion the technical and business case for high-quality translators - producing maintainable code. It can be done! We do have some very satisfied clients.

Add a comment Send a TrackBack