Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Source code compatible rewrite for MOCKA. Anyone interested joining in?

74 views
Skip to first unread message

trijezdci

unread,
May 19, 2023, 6:11:54 AM5/19/23
to
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

unread,
Dec 30, 2023, 11:26:23 AM12/30/23
to
On Friday, May 19, 2023 at 6:11:54 AM UTC-4, trijezdci wrote:
> 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!
0 new messages