Discussion:
Source code compatible rewrite for MOCKA. Anyone interested joining in?
(too old to reply)
trijezdci
2023-05-19 10:11:53 UTC
Permalink
MOCKA is DEAD.

The venerable MOCKA compiler[1] was developed as proprietary software. However, a GPL licensed version without the code optimiser was released for the 32-bit Intel x86 architecture running Linux or BSD operating systems.

The backend was generated using an undocumented proprietary backend generator. This means that MOCKA is now stuck in the Intel 32-bit world. In order for MOCKA to be able to generate code for modern 64-bit architectures, its proprietary backend would need to be removed and replaced with new backend which would need to be developed from scratch.

Unfortunately, the AST and how the backend interfaces with it is also mostly undocumented. To reengineer this would almost certainly require far more effort than rewriting a new compiler from scratch.

I have recently revived and repurposed a PIM to C translator project[2] for which I had a working front end back in 2016, and which I had put on hold. I have done quite a bit of work over the last month on the repurposed clone of this project[3] and felt I could back port the code I have changed or added and I could then add a MOCKA compatible mode to the original PIM front end. It would basically be a byproduct of the repurposed clone I am working on anyway.

For maximum portability, the translator is written in C and the backend will output semantically equivalent C code. It is written in a Modulan style though.

If anyone is interested joining me on this MOCKA replacement, please get in touch.

Links
[1] https://github.com/trijezdci/MOCKA
[2] https://github.com/trijezdci/MOTTO
[3] https://github.com/m2sf/m2c

regards
benjamin
Brian Knoblauch
2023-12-30 16:26:22 UTC
Permalink
Post by trijezdci
MOCKA is DEAD.
If anyone is interested joining me on this MOCKA replacement, please get in touch.
Unfortunately I'm still under an inventions contract that effectively prohibits me from writing code (not that I have any time at the moment anyways), however when I get some time again I'll be checking up on the progress!
Loading...