[clean-list] .abc file information

Pieter Koopman pieter at cs.ru.nl
Wed Jan 4 10:22:30 MET 2006


Hi lethevert and Niel,

At 15:49 3-1-2006, lethevert wrote:
>I am also looking for information of abc code.
>I found some information in a book below, but it does not seem latest.
>http://www.cs.ru.nl/~clean/contents/Addison__Wesley_book/addison__wesley_book.html
>
>Is there any documents for latest abc code specifications?

Basically the information in the Addison Wesley book is still valid. 
There are a few small extensions. The most important change is that 
the ABC-compiler requires info about the stack layout etc. in the 
form of lines like:
.o 1 0
.d 1 0
Unfortunately I'am not aware of any up to date documentation about 
the ABC-code, but we can provided you with help on the changes 
compared to the version described in the Addison Wesley book.

--- message from Neil Mitchell <ndmitchell at gmail.com>:
> > I was looking for information on the .abc bytecode files, specifically
> > what the effect of each instruction is and how they are structured
> > overall. I couldn't find any documentation on the web, i was wondering
> > if there was something i had missed?
> >
> > The reason I am asking is that I was wondering if a .hbc (haskell byte
> > code) file, as generated by Yhc (http://www.cs.york.ac.uk/~ndm/yhc/),
> > could be easily converted into a .abc file of Clean. The effect of
> > each instruction in a .hbc file is given at
> > http://www-users.cs.york.ac.uk/~ndm/yhc/bytecodes.html . If this
> > translation was relatively easy, then all the clever machinery of .abc
> > -> .exe given by Clean could be reused.

I'am afraid that such a translation would not be very easy due to the 
different abstract machines used. It is not a simple syntax 
translation. However, it is a nice plan to generate ABC-code from 
Haskell. May be it is easier to change the backend of the compiler to 
generate ABC-code instead of HBC-code than to transform the generated 
HBC-code to ABC-code.

Regards,

Pieter Koopman 



More information about the clean-list mailing list