OCaml Forge


From GSoCode 2011 coordination (deprecated) Wiki

Jump to: navigation, search

This is a draft proposal, if you want to apply remove this sentence and write your name in the field Student.


  • Mentor: find a mentor
  • Student: write your name here
  • Summary: Write a compiler for the liquidsoap scripting language
  • Required skills:
    • OCaml
    • Theory of programming languages and type systems


Liquidsoap is a multimedia streaming toolkit presented as a scripting language. To some extent, the scripting language is independent from the streaming aspect, but several advanced features of type systems are used to strongly reflect the constraints of the streaming operators into the language.

Currently, the scripts are interpreted, but there are a few reasons for wanting a compiler. Having an interpreter is not a problem for common uses of liquidsoap, where scripts are executed mostly for the initial construction of the streaming system, and for rare events such as transitions or event hooks. However, that approach makes some things quite inefficient: for example, very little can be done with a map operator (that applies a scripted function to each sample of a stream) before the CPU becomes a limit. Also, writing a separate compiler will ease the development and use of our scripting language outside liquidsoap, and it'd come with a few convenient tools for interfacing OCaml and the scripting language.

Most likely, that project will consist in writing a source-to-source compiler, transforming liquidsoap to OCaml. This should be done efficiently, completely removing artifacts of the source language when possible. Other approaches can be discussed based on the background of the candidate, such as JIT compilation, for example using LLVM.

This project may be merged with the language extension project and should be coordinated with it if both projects are taken.