I am a software engineer interested in the implementation of dynamic languages such as
Python. My research during my PhD at the University of Glasgow and subsequently has been focussed on the engineering behind virtual machines for dynamic languages. These virtual machines are large and complex, and the conventional tools, such as C compilers, are often inappropriate for building these machines. My PhD focussed on how to make better tools. My subsequent research has been focussed on ways to dynamically transform dynamic language code to a form more suitable for conventional tools. Current Work --- Bringing Trace-Based Optimisation to the CPython Virtual MachineI am currently working on the HotPy (2) project to port improved versions of the optimisations used in the original HotPy project to the latest version of CPython.In order to apply trace-based optimisations to a dynamic language it is useful to convert the high-level 'fat' bytecodes into a lower-level representation. This can be done in one of three ways:
(HotPy also includes a JIT compiler, but it can optimise without compiling) Improving CPythonIn order to be able trace and optimise bytecodes in the CPython virtual machine, some modifications need to be made. Some of these modifications are specific to HotPy but some would be beneficial to the main CPython distribution. I am currently working on the following improvements to CPython:
Previous Research --- Building Virtual Machines for Dynamic LanguagesVirtual machines consist of many complex, interacting and interwoven parts. Object-oriented languages and even aspect-oriented languages cannot separate these parts. Tools are required. My research aims to demonstrate that using appropriate tools will allow the construction of better virtual machines with less effort. To demonstrate the sorts of tools that are needed and how they are used, I have developed a toolkit for building virtual machines as well as a new virtual machine for Python. The toolkit handles the generation of interpreters and a compiler, as well as managing memory management, which makes the implementation of optimisers and compilers for dynamic languages such as Python much more feasible. Using the toolkit to build the new virtual machine means that its implementation is simplified enough to be able to incorporate powerful optimisations which might otherwise be too time consuming. Combining these optimisations with the compilation ability provided by the toolkit further enhances the performance of the resulting virtual machine. The Glasgow Virtual Machine ToolkitThe Glasgow Virtual Machine Toolkit (GVMT) allows easy construction of virtual machines. It handles garbage collection automatically, and builds interpreters and compilers from a common specification. The toolkit helps the rapid development of various sorts of interpreters, such as bytecode instrumentation and transformation passes, making the implementation of a high-performance virtual machine much easier. You can download from it here. The HotPy Virtual MachineThe HotPy virtual machine is a high-performance virtual machine for Python. HotPy is a recursive acronym for:
The notable features of HotPy are:
HotPy is no longer being developed, see HotPy (2). Publications
Talks
|
