Tutorial we presented at PLDI 2011
Introduction to McLab, a compiler and VM framework for MATLAB
Click here to get our slides
Presenters: Laurie Hendren, Rahul Garg and Nurudeen Lameed
MATLAB is a popular dynamic programming language used for scientific and
numerical programming. As a language, it has evolved from a small scripting
language intended as an interactive interface to numerical libraries, to a very
popular language supporting many language features and libraries. The
overloaded syntax and dynamic nature of the language, plus the somewhat organic
addition of language features over the years, makes static analysis of modern
MATLAB quite challenging. Furthermore, there is a real lack of
publicly-available tools which has inhibited research on this very important
The purpose of this tutorial is to introduce McLab, a new publicly-available
toolkit for analyzing and executing MATLAB programs. The tutorial starts
by introducing the MATLAB language and the particular challenges the language
presents for compiler developers. It then presents the McLab front-end,
which supports both standard MATLAB, prebuilt extensions such as AspectMatlab,
and the ability to create new language extensions. The middle part of the
tutorial focuses on the IRs and analysis framework along with some example analyses.
The final part of the tutorial presents the back-ends, with a particular
emphasis on the McVM JIT.
Structure of the Tutorial
The tutorial follows the structure of the toolkit. There are
four major parts:
- Introduce the MATLAB language and the specific challenges this language
raises for compiler researchers.
- Introduce the front-end, showing the overall structure and the basics of
how to make a language extension.
- Describe the analysis framework and some sample analyses.
- Give an overview of McFor and McVM as examples of static and dynamic backends.