Feeds

Making pigs from sausages

Need to port a system but think it's too complicated?

  • alert
  • submit to reddit

Security and trust: The backbone of doing business over the internet

Comment Imagine the following situation. Many years ago, your company commissioned a computer system. It is all working perfectly but you want to upgrade it in ways that could not be conceived when it was designed. You may, for example, want management reports or data input via the internet. Then again, perhaps you would like to interface to a new database. Often it is necessary to bite the bullet and port your system onto a new platform.

Now let us add an extra problem and imagine that the original program was written in assembler. No matter how good the quality of the code, one thing you can say about assembler is it is not portable.

Actually, there is a big problem with old assembler programs. Where do we get assembler programmers to maintain them? The young Turks who wrote the system are getting on and they may have retired or they may have been promoted and now they manage rather than do. Assembler is no longer being taught in computer science courses and, worse, someone who has grown up with modern languages, such as Java or C#, will not gain an understanding of essential concepts, such as pointers.

This is not such an uncommon problem as it may seem because a well-written program can go on for years. Over time it is modified until it fits the business perfectly and very often no-one knows exactly what is does. By now, all the people who ran the original manual system have retired and the original documentation has long since been lost. Businesses just cannot afford to commission a new program.

So, we have an assembler program that we cannot afford to replace and in the future we will not be able to maintain it. It is possible to convert the structures of assembler into a suitable higher language and I have done this by hand on several occasions. It is a dreadful business but at least you know that what you have is the same as what you started with and the final package is maintainable. This is fine when you distil 4000 words of assembler into 1000 lines of C but what about the case where you have 1,000,000 words of assembler?

Software Migrations Limited is a St Albans based company that specialises in converting assembler code into computer languages. Currently, it can convert to COBOL and C, but the company is looking to produce other languages in the future. The amazing thing about its process is it produces readable, good quality source code. This is the reverse of the usual process whereby we compile language code into unintelligible Hex machine code. Software Migrations call it "making pigs from sausages".

The process is fully automated after tool customisation. Software Migrations configures its conversion program with the customer's coding standards - both for the original assembler and for the desired output - and then convert the assembler. They will encounter problems, which must be solved and then the process is repeated until it all works.

As part of the analysis, the integrity of the assembler is checked. Very often, one might even say invariably, errors are detected. Often there is unreachable code. Sometimes this is deliberate where a modification has rendered a section obsolete and the programmers have just jumped round it. Occasionally this is the solution to some mysterious problem that has plagued the IT department for years. There have been times when a section of code is pure nonsense. In this case, it may not be possible to generate high-level language code that will compile. On investigation, it is invariably found that this code was never exercised by the test harness and the case it was supposed to action has never come up.

Eventually all the problems are solved and it is possible to do a clean run through. That is when the system is frozen. Up to this point, the system has been running in the usual way. Not only has the day-to-day processing been proceeding but also the programmers have been maintaining it and adding modifications as normal. A time is fixed, generally on a Friday evening, and all the programmers are sent home. The system is converted and all the previous couple of weeks work in adjusting and fixing comes down to a high powered computer throwing numbers around for a few hours.

Once the final checks are made, the new program can be installed. On Monday morning, the programmers come in to work and carry on as before. Now, however, they are working in C or COBOL instead of assembler.

I am very impressed by this product. There are two points in particular that hit me. As stated earlier, I have done this by hand on a small scale and one surprising problem is the comments. Originally, the comments may have been meaningful but many modifications later they can be plain wrong. It is so easy to be misled by them. The Software Migrations system, being fully automated, completely ignores the comments and works solely on the analysis of the code. By the way, the original comments are added to the new source code so that future programmers can be puzzled, amused or edified by them.

The other point is the time taken. Converting by hand takes a very long time and it not only ties up the programmer workforce, but during that time it is virtually impossible to do any maintenance work. The trouble is that any modifications made may render obsolete a whole load of conversion work. Further, once it is done, there must be a huge amount of testing to uncover the errors and let me assure you there will be many errors. With an automated system, the actual conversion is quite speedy so the maintenance work can proceed right up to the wire. Similarly, it is possible to do advanced testing on preliminary conversions and fix the problems ahead of time.

It is never painless to port a system, and porting from assembler to a high level language will always be difficult. However, I think that Software Migrations make about as easy as it can be.

Copyright © 2006, IT-Analysis.com

Providing a secure and efficient Helpdesk

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Secure remote control for conventional and virtual desktops
Balancing user privacy and privileged access, in accordance with compliance frameworks and legislation. Evaluating any potential remote control choice.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.