Tuesday, March 14, 2006

 

Why writing a transitional compiler

I released SmartEiffel 1.2r6 recently. This is a project that I started last year. It is a sort of manteinance branch of SmartEiffel 1.1 (not official, but approved by the official team) and fixes a handful of bugs without breaking backwards compatibility.

However, my motivations to start the project were not just mantainance and bugfixing (most of the fixed bugs were fixed in 2.x, anyway). I got frustrated trying to do three different things:
  1. Using code that I had written for SmartEiffel 1.1 together with new SmartEiffel 2.x libraries and tools

  2. Porting my libraries to 2.x, without removing support for 1.1 users

  3. Writing new code, using SmartEiffel 2.x, using third party libraries that used to work in SE 1.1.
Both things have lots of difficulties because of not-so-minor incompatibilities between 1.1 and 2.x versions of SmartEiffel. So I started SE12 as a generic solution to the above problems. The idea is having a compiler which is 100% compatible with 1.1, but supporting enough of 2.x to be able to write easily software that works in both releases. Besides, I added lots of warning messages reporting things that still work in 1.2, but will not work in 2.x. With that you can achieve point 2. above, and ease the migration of own code or third party libraries required for 1. and 3.

This last release reached a success milestone: it is able to compile itself, 1.1 software, and it can be compiled with SE2.1. So the compiler itself has been used as a working example of its usefulness as a transitional compiler.

Besides the initial goals, there were some valuable lessons learned:
The last points make me think that it is not unconceivable to adapt an existing Eiffel compiler able to accept most code from all the current Eiffel variants.

Comments:
Daniel, it's very impressive that you can compile SmartEiffel 1.2 with itself and with SmartEiffel 2.1.

Your last paragraph makes me wonder: are you planning to include ISE compatibility hacks in SmartEiffel 1.2?
 
I have no experience with ISE. I have played with the free version but haven't written real software on it. So I wouldn't know what to change

However, I would gladly accept suggestions or patches to support constructs from other compilers, as long as they don't break 1.1 compatibility, and warnings are issued for things that are not 2.x compatible.

In fact, I already have done it in the past with the type-rules for assignment-attempt.
 
Is there anywhere a list of compatibility breaks betwenn version 1 and 2 ?
 
j rehm,

Have a look at the history of changes and compatibility pages on the SmartEiffel website.
 
Thanks i'm looking at these pages. There are also some explanation on the wiki of SEV1.2 with "Changes in the language" and "Changes in the language".

I'm wondering about that because i think there are big and small problemes in all the compatibility breaks.

For example the probleme with Case sensitivity isn't so dramatical IMHO : one can write a small program that take all identifier and rewrite them into the right syntax.

But a change in the basic library are more problematics...

And Daniel congratulation for the new version of SEv1, a very useful thing i think.
 
It is indeed wonderful what you've done Daniel.

I've been playing with the idea of helping you by creating a .msi file of SE + additional libraries such as Gobo and eposix, all precompiled. That would help a lot of users, just what elj-win32 did years ago.

But time, time.
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?