Course 2024-2025

Syntax and semantics of programming languages [IHDCB332]

  • 10 credits
  • 30h+30h
  • 1st and 2nd quarter
Language of instruction: French / Français

Learning outcomes

The student will be able to :

- recognize problems that can be analyzed using regular expressions, context-free grammars, attribute grammars ;

- formalize the problem and use software tools to execute this formalization (e.g. build a small compiler).

 

 
 
 

Objectives

Learn the basics of computer language processors: compilers, interpreters and the associated language theory.

 
 
 

Content

 

  1. Regular expressions and finite state automata
  2. Context-free languages, grammars; LL, LR, and LALR parsers
  3. Static semantics: type checking, attributed grammars.
  4. Code generation
  5. Structured operational semantics.
 
 
 

Table of contents

Syntax

  1. Regular expressions and finite state automata
  2. Context-free languages, grammars; LL, LR, and LALR parsers

    Semantics

  3. Static semantics: type checking, attributed grammars.
  4. Code generation
  5. Structured operational semantics.
 
 
 

Exercises description

A syllabus of exercises will be used: 

Théorie des Langages de Programmation : Syntaxe et Sémantique
Eléments Théoriques et Exercices - 163 pages
Michaël Marcozzi
(c) Presses universitaires de Namur, 2014, D/2014/1881/3, ISBN 978-2-87037-813-7
 
 
 

Teaching methods

Course of lectures (ex-cathedra). Exercises. A large assignment: building a small compiler (2nd semester). The compiler is (partially) evaluated by automated testing.

 
 
 

Evaluations

Written exam (60%). Evaluation of the large assignment (40%).

 
 
 

Recommended readings

  1. AhoSethiUllman: "Compilateurs: principes, techniques et outils", InterEditions/Dunod.
    BUMP #I 412/037.
  2. R. Wilhelm, D. Maurer: "Les compilateurs: théorie, construction, génération", Masson, 1994.
    BUMP #I 412/030, ISBN 2225846154.
  3. John LevineTony Mason & Doug Brown « lex & yacc », ISBN 1-56592-000-7, 366 pages.
  4. M. Hennessy: "The semantics of programming languages: an elementary introduction using structural operational semantics", Wiley, 1990.
  5. G. Winskel: "The Formal Semantics of Programming Languages: An Introduction.", MIT Press, 1993.
  6. T. Parr: "The Definitive ANTLR Reference", The Pragmatic Bookshelf, 2013.
 
 
 

Language of instruction

French / Français

Location for course

NAMUR

Organizer

Faculté d'informatique
rue Grandgagnage 21
5000 NAMUR
P. 081725252
F. 081724967
secretariat.info@unamur.be

Degree of Reference

Undergraduate Degree