BASE DE LA PROGRAMMATION FONCT ET TRADUCTION DES LANGAGES
Objectives
The objective of the UE is twofold. The student must master the principles of algorithmic and without side effect programming using functional programming. In particular, he must master the concepts of recursion, complexity and termination of the algorithms. It must be able to handle lists and iterators, as well as modules and functors. The associated programming language is the OCaml language.
He must also master the different stages of language translation: lexical analysis, syntaxic analysis and semantic analysis. In the particular case of compilation, he must know four phases of the semantic analysis: the resolution of the identifiers thanks to a table of symbols, the typing, the memory placement of the variables and the code generation. The student will create a compiler that will take a sub-part of C into input language, which will produce code for an abstract stack machine. The compiler will itself be written in OCaml.
Bibliography
• OCaml from the very beginning, John Whitington, 2013
• Développement d’applications avec Objective Caml, Emmanuel Chailloux, Pascal Manoury, Bruno Pagano
• Purely Functional Data Structures, Chris Okasaki, 1999
• Compilers: Principles, Techniques, and Tools (dragon book), Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman,, 2007