CB

C.J.K. Bruin

info

Please Note

2 records found

Declarative dynamic semantics on a VM using scopes as frames

Over the years virtual machines (VMs) have been created to abstract over computer hardware. This simplified code generation and allowed for easy portability between hardware platforms. These VMs are however highly tailored to a particular runtime model. This improves the execution speed, but places restrictions on the types of languages that the VM supports. In this thesis the Frame VM was developed as a VM that supports many different types of languages in a principled way. Achieving this is done by basing the VM on language independent models of memory and control flow. Usage of the scopes-as-frames paradigm and control frames resulted in an instruction set that is relatively small at its core, but does allow for the construction of complex control flow. As an effect, many different programming languages can be compiled to the Frame VM. In addition to this VM, a Domain Specific Language (DSL) for executable semantics of programming languages was created. This language, Dynamix, allows for a modular approach to writing the semantics of a language. Additionally, Dynamix provides a meta-compiler that uses these semantics of a language to compile programs to the Frame VM. To validate the Frame VM, direct compilers for Rust and Prolog have been created in a student project and compilers for Scheme and Tiger were created using Dynamix. Using these semantics of Scheme and Tiger, it was possible to execute programs containing usage of call/cc and a suite of Tiger benchmark programs. Furthermore, the control flow of Tiger was extended with exceptions and generator functions. This extension did not require any changes to the existing semantics, showing the modularity of control achieved when using Dynamix and the Frame VM. ...

Safe Execution of Native Code in WebLab

Bachelor thesis (2017) - Bram Crielaard, Chiel Bruin, Taico Aerts, Danny Groenewegen, Eelco Visser, Otto Visser
WebLab is a system where students can write and test code using an online interface. Course coordinators can create assignments and exams, where they can define automated tests to verify that the student code meets requirements. As WebLab only offered support for programming languages which run on the Java Virtual Machine, it was limited to a specific set of languages. In this project, we have designed a system which enables WebLab to support arbitrary languages, while still being able to guarantee scalability, security and reliability. To limit the scope of this project, the focus was laid on the programming language Python. The designed system uses Docker containers to execute arbitrary code in a safe and isolated way. A test fuzzing system with tamper detection is used to achieve reliable test results. The system is flexible as support for new programming languages can be added with relatively little effort. This report describes the design of the system, the research that was done and the process used. The report concludes with recommendations for future work on this project. ...