MOCKA Modula-2 Compiler System, originally by GMD
Follows the 3rd edition of Wirth's Programming in Modula-2, aka PIM3 [1, 2]
The MOCKA Modula-2 compiler was developed between 1988 and 1992 by the former German National Research Centre for Computer Science (GMD) [3] at its former research lab at the University of Karlsruhe [4]. GMD has since been dissolved. All its research institutes were merged into and all its assets transferred to Fraunhofer Society.
GMD followed a dual-licensing approach:
- MOCKA compilers for commercial Unix platforms and architectures were sold as closed source commercial software and included industrial strength optimisation through AST transformations prior to code-generation*.
- The Linux and BSD version of MOCKA with a backend for the 32-bit Intel x86 architecture but without optimisation was released open-source under GPL licensing free of charge.
The software in this repository is a derivative of the aforementioned open-source version.
- Intel x86 32-bit
- generates AT&T syntax assembly output
- Linux and BSD with ELF executable and linkable format
- Conditional compilation
- Lowline
_in identifiers - Types
BYTEandLONGCARD FOREIGN DEFINITION MODULEfor interfacing to C
- Version 1807, updated July 2018
For version change log, see CHANGES
- last maintenance release 0605 from Uni Karlsruhe in May 2006
- minor release 1208 by Chr. Maurer in August 2012, based on 0605
- clean-up release 1807 by B.Kowarsch in July 2018, based on 1208
In its current form, MOCKA is no longer supported and will not be further maintained.
MOCKA's backend was generated by a proprietary backend generator. This backend only supports the 32-bit Intel x86 architecture and the front-end was designed to map to a 32-bit IR. In order to support any modern 64-bit architecture, a large part of the front-end would need to be rewritten, a new 64-bit IR would need to be designed and a new backend generated. This would take considerable time and effort, only to result in a compiler for legacy code that is written in an outdated dialect of Modula-2. The outcome would not justify the effort.
Any major effort should instead be directed at implementing the revised and modernised Modula-2 R10 dialect. This would require a rewrite based on the existing M2C front-end for Modula-2 R10, the development of two new backends, one each for AMD64 and ARM64, to be generated with BEG, and the integration of the front-end with these backends. Whilst highly desirable, this will require funding. We are currently in the process of preparing grant applications at several funding agencies and foundations that support such projects.
If and when funding has been obtained, the current code base in this repository will be moved to a legacy repository and archived, and this repository will then become the home of a new MOCKA64 project. Until then keep your fingers crossed, thumbs pressed, knock on wood!
In order to compile and run example code from the Modula-2 literature on modern 64-bit platforms, or to migrate any remaining legacy Modula-2 code, it is entirely sufficient to use migration tools such as the Mtc2 Modula-2 to C89 Translator. With some adjustments, legacy code written for MOCKA could also be compiled using GNU Modula-2 with compiler option --fpim3. Other migration tools are being pursued such as the M2-Redux Syntax Reducer and the MOTTO Reduced-PIM Modula-2 to C99 Translator projects.
Backwards compatibility is the mother of all evil in software. There will be no backwards compatibility! Use a legacy tool.
[*] The BEG backend generator used to generate backends for MOCKA does not perform any optimisations.
[1] Wikipedia entry on the Modula-2 programming language
[2] Programming in Modula-2, 3rd edition, N.Wirth, Springer, 1988
[3] Google translation of Wikipedia entry on the former GMD
[4] Former MOCKA project page at University of Karlsruhe
All Sites | Previous Site | Next Site | Random Site | Join the Webring
[END OF FILE]