/report/future.tex
LaTeX | 74 lines | 54 code | 20 blank | 0 comment | 0 complexity | 729d2fd59c8742b571de25c31f34a1ee MD5 | raw file
- \section{Future work}
- \subsection{Rewrite the deserializer to proper RPython}
- The deserializer is currently not written in proper RPython.
- Converting the code to RPython will allow it to be compiled to a JIT interpreter by
- the RPython toolchain. This should not be a very big task, but it requires understanding
- of the RPython coding style. There are also restrictions on how one may use the PyPy parser
- tools.
- \subsection{Implement basic Haskell libraries}
- Implementing Haskell libraries is necessary to run any Haskell program passed
- through GHC. One option may be to implement (or automatically generate from GHC code) Haskell
- primitive types, and to convert the Haskell base libraries to JSCore. Compiling GHC with the
- $-fext-core$ flag should be possible, and should generate
- External-core files for all library modules.
- \subsection{Linking functionality}
- Currently no thought has been given to the linking between multiple modules. This
- must be implemented for any non-trivial Haskell programs to function.
- \subsection{Test suite and benchmarking}
- A framework for testing and benchmarking should be set up. Allowing us to compare
- speed to other implementations, and progress of development. GHC uses a test framework
- relying on Python and GNU Make that should be looked into.
- \subsection{Optimize JIT compiler for Haskell-Python}
- Further optimization of the JIT compiler for the Haskell-Python interpreter will be
- necessary to achieve good speed.
- \begin{comment}
- \subsection{Map GHC encoded Types to Haskell-Python}
- Figure out how to create encoded types for Haskell-Python. It may be possible to
- autogenerate these from GHC files.
- "2.) understanding how GHC encodes types. The Core Haskell of the previous steps encodes the types of all functions in slightly low-level
- ways. This needs to be understood and a mapping of these types to what
- the Python Haskell interpreter provides needs to be written."
- \subsection{Set up GHC test environment for Haskell-Python}
- Setting up the GHC test environment for Haskell-Python would be very valuable
- for development and bug fixing.
- "3.) the actual interpretation of the Core language is mostly
- implemented. There are probably some things missing, which will be
- discovered by running some Haskell programs. For that end, it would be
- good to find out whether there is a Haskell implementation test suite
- and get it to run."
- \subsection{Add built in Haskell types to run some Haskell benchmarks}
- "4.) what is missing to run more non-pure Haskell programs are all the
- built-in functions (e.g. those that perform arithmetic, I/O, call C
- functions, etc) and built-in types (e.g. integers, floats, C-level types
- like arrays and structs). These should be added step by step. This is an
- essentially open-ended task. It would be good to add as many built-ins
- so that some of the Haskell benchmarks can run."
- \subsection{Optimize PyPy JIT for Haskell-Python}
- "5.) JIT work: While the JIT of PyPy can mostly be automatically applied,
- in practice a lot of careful work is needed to make sure that the
- generated code is optimal (or at least good). To do that, a test suite
- of Haskell snippets that explicitly compares the generated machine code
- with what it should look like is needed, and then the careful adding of
- some tests to this suite, together with the better placement of JIT
- hints. This is both the hardest step, as well as the most exciting one."
- \end{comment}