# Planning of the compilation course (CAP, Compilation and Program Analysis)
_Academic first semester 2022-2023_

# Week 1:

- :book: First Course session: Wednesday 07/09/2022, 10h15-12h15. Amphi B (Gabriel Radanne)
  
  * Introduction: [transparents](course/capmif_cours01_intro_et_archi.pdf).
  * ISA [ref pdf RISCV](course/riscv_isa.pdf).
  * [Demo Assembly](course/demo20.s).
  * Lexing, Parsing, [slides](course/capmif_cours02_lexing_parsing.pdf).
  * [Demo Parsing](course/ANTLRExamples.tar.xz).

- :book: Second Course session: Friday 09/09/2022, 10:15. Amphi B (Gabriel Radanne)

  * Interpreters [slides in english](course/capmif_cours03_interpreters.pdf).
  * [Demo files](course/ANTLRExamples.tar.xz).
  * [Grammar exercise](course/TD2.pdf).

- :rocket: Additional ressources (mainly in english)

  * A nice YT video on [structural induction](https://www.youtube.com/watch?v=2o3EzvfgTiQ) by F. Pereira.
  * Fernando Pereira's other videos on operational semantics : [video1](https://www.youtube.com/watch?v=bOzbRhXvtlY), [video2](https://www.youtube.com/watch?v=aiBKOuM5iEA).

# Week 2:

- :hammer: Lab 1: Wednesday 14/09/2021, 10h15-12h15. Rooms B1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Introduction to RISCV [TP01](TP01/tp1.pdf).
  * Code in [TP01/](TP01/).
  * ISA [ref pdf RISCV](course/riscv_isa.pdf).

- :book: Third Course session: Friday 16/09/2022, 10:15. Amphi B (Ludovic Henrio)

  * Semantics [slides in english](course/cap_cours03b_semantics.pdf).

# Week 3:

- :hammer: Lab 2: Wednesday 21/09/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Lexing & Parsing with ANTLR4 [TP02](TP02/tp2.pdf).
  * Code in [TP02/](TP02/).

- :book: 4th Course session: Friday 23/09/2022, 10:15. Amphi B (Ludovic Henrio)

  * Typing [slides in english](course/CAP_cours04_typing.pdf).

# Week 4:

- :hammer: Lab 3: Wednesday 28/09/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Interpreter & Typer [TP03](TP03/tp3.pdf).
  * Code in [TP03/](TP03/) and [MiniC/TP03/](MiniC/TP03/).
  * Graded lab due on https://etudes.ens-lyon.fr/course/view.php?id=5249 before 2022-10-04 23:59

- :book: 5th Course session: Friday 30/09/2022, 10:15. Amphi B (Gabriel Radanne)

  * 3A Code Generation [slides in english](course/capmif_cours05_3ad_codegen.pdf).
  * CFG (first section) [slides in english](course/capmif_cours06_irs.pdf).

# Week 5:

- :hammer: Lab 4a: Wednesday 05/10/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Syntax directed code generation [TP04](MiniC/TP04/tp4.pdf).
  * Code in [MiniC/TP04/](MiniC/TP04/).
  * Documentation [here](docs/index.html).

- :book: 5th Course session: Friday 70/10/2022, 10:15. Amphi B (Gabriel Radanne)

  * CFG [slides in english](course/capmif_cours06_irs.pdf).

# Week 6:

- :hammer: Lab 4b: Wednesday 12/10/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Control Flow Graph [TP04b](MiniC/TP04/tp4b.pdf).
  * Code in [MiniC/TP04/](MiniC/TP04/).
  * Documentation (updated) [here](docs/index.html).

- :book: 7th Course session: Friday 14/10/2022, 10:15. Amphi B (Gabriel Radanne)

  * SSA [slides in english](course/cap_cours06a_ssa.pdf).

# Week 7:

- :hammer: Lab 5a: Wednesday 19/10/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

  * Control Flow Graph under SSA Form [TP05a](MiniC/TP05/tp5a.pdf).
  * Code in [MiniC/TP05/](MiniC/TP05/).
  * Documentation (updated) [here](docs/index.html).

# Week 8:

- :hammer: Lab 5b (1/2): Wednesday 26/10/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia)

    * Smart Register Allocation [TP05b](MiniC/TP05/tp5b.pdf)
    * Code in [MiniC/TP05/](MiniC/TP05/).

