9.5††Improvements to the core Mythryl codebase
“A day will come when beings,
††now latent in our thoughts
††and hidden in our loins,
††shall stand upon Earth
††as a footstool and laugh,
††and reach out their hands
††amidst the stars.”
††††††††††††††††††††††††††††—H.G. Wells, 1902
Closer to home, useful contributions (again in roughly increasing
order of difficulty) include:
Check out the existing libraries like x-kit, see what works, fix what does not, document both, write tutorials and examples.
- Protect existing functionality from bitrot by writing additional unit tests.
- Expand and improve the winix cross-platform OS/filesystem interface to include more functionality common to Windows, MacOS and *nix.
- Improve the GNU autotools based installation logic.
- Grep the codebase for FIXME, pick one, and fix it.
- Do a proper Debian package for Mythryl.
- Clean up the C runtime code so it compiles complaint-free under gcc -Wall. (I did this once, and lost it in a laptop disk futzup. sigh.)
- Change the C runtime to use typedef’d integer types everywhere, as preparation for an AMD-64 port.
- Revive the currently broken backend architecture-description logic adl.
- Do a port to AMD-64. (The biggest short-term win from this would be having a decent number of registers, unlike intel32: Probably good for a 15-30
- Re-activate and maintain the Windows or Mac ports.
- Reduce the start-up time for Mythryl scripts by pre-forking several ready-to-run mythryld processes.
- Implement strings-as-types, to reduce the contortions of phantom type programming.
- Implement a cleaner, more typesafe facility for generating Mythryl source code than just contacatenating strings.
- Rewrite Makelib to cleanly separate parsing and processing.
- Implement OOP support per Bernard Berthomeiu’s paper. (See next section.)
- Revive Fu’s UHawaii 1999 thesis work “Design and Implementation of an Operating system in Standard ML” and port to Mythryl.
(This includes a port of the CMU Fox Project’s SML TCP/IP protocol stack.) Add in the x-kit code to allow standalone Mythryl
applications to function as X clients.
- Implement Generalized Abstract Types. The Peyton Jones/Washburn/Weirich “Wobbly Types” paper is a good starting point.
- Kill the compiler’s overflow checking, except when specifically requested.
- Kill the tagged_int type. It screws up the surface semantics for the sake of a few percent gain in space/time efficiency, which is always a bad idea.
- Kill the sequence headers (SEQHDR) on strings and vectors. These are inordinately expensive in time and space and intrude runtime typing into a system based on compile-time typing.
- Design and implement an application-programmer API for accessing the codebase’s incremental compilation capabilities. The .lib “setup” code has much of the required machinery.
- Clean up the .lib file syntax. I suggest making .lib files into vanilla Mythryl code executed at maketime.
- Make the type-checker an easily replaced generic: There is an enormous amount of good research coming out on improved/alternate typechecking.
- Re-implement typechecking based on Derek Dreyer and Karl Crary’s CMU thesis work: The current stamp-based logic is a hoary kludge whose time has come. This will include phasing out equality types at the surface syntax level.
- Implement alternate typechecking algorithms, selectable by a pragma or such: Dependent types and linear types are attractive targets.
- Re-activate the codebase support for inter-package inlining. Be alert: It was probably disabled for a good reason.
- Do a general tune-up of existing backend code optimization. There is probably a lot of low-hanging fruit here. You’ll want to make/steal a benchmark suite to meaure progress and prevent regression.
- Re/activate some or all of the backend optimizations based on (e.g.) SSA (Static Single Assignment). This will probably break the garbage collector if you’re not careful — so be careful.
- Do a production-quality reimplemention of Mythryl support for parallel compiles of the compiler on multicore machines.
- Do a production-quality rewrite of the c-glue facility (nee’ Matthias Blume’s NLFFI) emphasizing semi-automated interface generation driven by SWIG-like spec files,
rather than fully automatic interface generation driven only by .h files, which is heroic and a great research project, but not ready for prime time, making
the entire facility useless in practice.
- Integrate the Mythryl x-kit (neť eXene) libraries, making them the standard.
- Make the Mythryl codebase more thread-safe by moving the various global variables scattered through it into dynamically allocated records.
- Write a native Mythryl OpenGL widget kit taking x-kit as a model but using the “Adaptive Functional Programming” mechanism for event propagation.
- Re-activate the Mythryl codebase support for multiprocessing, which worked a decade ago on SGI and Sparc machines but has bitrotted since.
- Write Mythryl debugger. (I would start by reviewing David Tarditi’s SML/NJ debugger paper(s), then fold in Xavier LeRoy’s idea of using process forking to implement replay.)
- Write a real-time garbage collector for Mythryl based on Cheng’s 2001 CMU thesis. Make it COW-friendly to maximize shared pages after a fork().
- Implement software transactional memory. The Harris/Marlow/Peyton Jones/Herlihy paper “Composable memory transactions” is a good starting point.