Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • shchen/cs320
  • raveendr/cs320
  • mwojnaro/cs320
3 results
Show changes
Commits on Source (222)
Showing
with 127 additions and 29 deletions
# EPFL CS320 - Computer language processing, 2021
# EPFL CS320 - Computer language processing, Spring 2025
[Moodle](https://moodle.epfl.ch/course/view.php?id=4241), [Coursebook](https://edu.epfl.ch/coursebook/en/computer-language-processing-CS-320)
Links: [Moodle](https://moodle.epfl.ch/course/view.php?id=4241) and [Course Description](https://edu.epfl.ch/coursebook/en/computer-language-processing-CS-320)
**Implement a programming language!** All project based.
Important information:
This repository is the website for EPFL Course CS320, Computer languge processing.
* Midterm exam will take place Friday 4 April within the time block 13:00-17:00 in two rooms: [ELA 2](https://plan.epfl.ch/?room==ELA%202) and [CM 1 120](https://plan.epfl.ch/?room==CM%201%20120). One reminder sheet (2 sided) will be allowed.
Please check here regularly for course updates.
* Please register for project groups on Moodle as soon as this is possible ([Registration link](https://moodle.epfl.ch/mod/choicegroup/view.php?id=1282182))
## Grading
The entire grade is based on project work, which, however, has many aspects: the implementation in [Scala](https://www.scala-lang.org/), a written report, oral presentation, and answers to questions, in presentation and throughout the semester. There will be no written exam.
The grade is based on a midterm (30%) as well as team project work (70%). Please read the [grading policy page](info/grading.md).
## Staff
## Schedule and Materials - Past Weeks
| Role | People |
| :--- | :--- |
| Professors | [Viktor Kunčak](https://people.epfl.ch/viktor.kuncak), [Self-Introduction](https://tube.switch.ch/videos/82f0eb14) |
| Head PhD TA | [Rodrigo Raya](https://people.epfl.ch/rodrigo.raya/)
| PhD TA | [Fereshte Mozafari](https://people.epfl.ch/fereshte.mozafari) |
| MSc Student TAs | [Julie Giunta](http://people.epfl.ch/julie.giunta), Solène Husseini, [Benoît Maillard](https://people.epfl.ch/benoit.maillard), [Noé De Santo](https://people.epfl.ch/noe.desanto), [Alexandre Pinazza](https://people.epfl.ch/alexandre.pinazza) |
| Week | Labs | Day | Date | Time | Room | Topic | Materials | |
| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
| 1 | | Wed | 19.02.2025 | 13:15 | BC 01 | Lecture 1 | [Intro to CLP](https://mediaspace.epfl.ch/media/01-01%2C+Intro+to+Computer+Language+Processing/0_okro5h0v) [(PDF)](info/lectures/lec01a.pdf), [Formal languages](https://mediaspace.epfl.ch/media/01-02%2C+Formal+Languages/0_segfj94w) [(PDF)](info/lectures/lec01b.pdf) |
| | | Fri | 21.02.2025 | 13:15 | ELA 2 | Lecture 2 | [Operations on Formal Languages](https://mediaspace.epfl.ch/media/02-01%2C+Operations+on+Formal+Languages/0_otyeghg6), [Regular Expressions and Idea of a Lexer](https://mediaspace.epfl.ch/media/02-02%2C+Regular+Expressions+and+Lexer+Idea/0_th59v9kx) [(PDF)](info/lectures/lec02.pdf) |
| | 1.... | Fri | 21.02.2025 | 15:15 | ELA 2 | Lab 1 | [Interpreter lab released (due in 2 weeks)](./info/labs/lab01/) |
| 2 | 1.... | Wed | 26.02.2025 | 13:15 | BC 01 | Lecture 3 | [First Symbols. Constructing a Lexer](https://mediaspace.epfl.ch/media/03-01%2C+First+Symbols.+Constructing+a+Lexer/0_a943fw0n) [(PDF)](info/lectures/lec03a.pdf), [From Regular Expressions to Automata](https://mediaspace.epfl.ch/media/03-02%2C+From+Regular+Expressions+to+Automata/0_icjqhfj0) [(PDF)](info/lectures/lec03b.pdf) |
| | 1..... | Fri | 28.02.2025 | 13:15 | ELA 2 | Exercise 1 | [Languages, Automata and Lexers](info/exercises/ex-01.pdf) |
| | 12.... | Fri | 28.02.2025 | 15:15 | ELA 2 | Lab 2 | Lexer lab release |
| 3 | 12.... | Wed | 05.03.2025 | 13:15 | BC 01 | Lecture 4 | [Introduction to Grammars](https://mediaspace.epfl.ch/media/04-01%2C+Introduction+to+Grammars/0_krhjbo09) [(PDF)](info/lectures/lec04-grammars-intro.pdf), [Syntax Trees](https://mediaspace.epfl.ch/media/04-02%2C+Syntax+Trees/0_9h4g5k1c) [(PDF)](info/lectures/lec04-trees.pdf)
| | 12.... | Fri | 07.03.2025 | 13:15 | ELA 2 | Exercises 2 | [Grammar Concepts](info/exercises/ex-02.pdf) [(solutions)](info/exercises/ex-02-sol.pdf) |
| | 123... | Fri | 07.03.2025 | 15:15 | ELA 2 | Lab 3 | [Parser lab](info/labs/lab03/) release |
| 4 | .23... | Wed | 12.03.2025 | 13:15 | BC 01 | Lecture 5 | [LL(1) Parsing](https://mediaspace.epfl.ch/media/04-03%2C+LL%281%29+Parsing/0_se2zd8kt) [(PDF)](info/lectures/lec05-ll1.pdf). [Scallion Tutorial](https://mediaspace.epfl.ch/media/04-10%2C+Scallion+tutorial/0_lypn7l0x) |
## Schedule and material
## Schedule and Materials - Current
Monday slots will typically focus on lecture materials. The remaining slots will focus on labs, **except for the first week's Wednesday and Thursday** when we will have lectures to get basic understanding of the metarial. We will provide an online version of the activity as well. So far, as long as there is demand, the plan is to also be present in the physical room, as scheduled.
| Week | Labs | Day | Date | Time | Room | Topic | Materials | |
| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
| | .23... | Fri | 14.03.2025 | 13:15 | ELA 2 | Lecture 6 | [Name Analysis](https://mediaspace.epfl.ch/media/06-01%2C+Name+Analysis/0_1b9t1hz8) [(PDF)](info/lectures/lec06-name-analysis.pdf), [Type Systems as Inductive Relations](https://mediaspace.epfl.ch/media/07-01%2C+Introduction+to+Types+and+Inductive+Relations/0_3hxblocu) [(PDF)](info/lectures/lec06-inductive.pdf) . [Operational Semantics](https://mediaspace.epfl.ch/media/07-02%2C+Operational+Semantics/0_3ru05nbo) [(PDF)](info/lectures/lec06-operational.pdf) |
| | .23... | Fri | 14.03.2025 | 15:15 | ELA 2 | Lab 3 | Parser lab |
| 5 | ..3... | Wed | 19.03.2025 | 13:15 | BC 01 | Exercises 3 | [LL(1) Grammars](info/exercises/ex-03.pdf) [(solutions)](info/exercises/ex-03-sol.pdf) |
| | ..3... | Fri | 21.03.2025 | 13:15 | ELA 2 | Lecture 7 | Type Checking |
| | ..34.. | Fri | 21.03.2025 | 15:15 | ELA 2 | Lab 4 | Typer lab release |
| 6 | ..34.. | Wed | 26.03.2025 | 13:15 | BC 01 | Exercises 4 | Parsing. Type checking |
| | ..34.. | Fri | 28.03.2025 | 13:15 | ELA 2 | Lecture 8 | Type Inference. Code generation |
| | ..34.. | Fri | 28.03.2025 | 15:15 | ELA 2 | Exercises 5 | Type checking |
| 7 | ...4.. | Wed | 02.04.2025 | 13:15 | BC 01 | Exercise | |
| | ...4.. | Fri | 04.04.2025 | 13:15 | ELA+CM | **EXAM** | |
| | ...4.. | Fri | 04.04.2025 | 15:15 | ELA+CM | **EXAM** | |
| 8 | ...45. | Wed | 09.04.2025 | 13:15 | BC 01 | Lab 5 | Codegen lab release |
| | ...45. | Fri | 11.04.2025 | 13:15 | ELA 2 | Lecture 9 | Code generation |
| | ...45. | Fri | 11.04.2025 | 15:15 | ELA 2 | Lab 5 | Codegen lab |
| 9 | ....56 | Wed | 16.04.2025 | 13:15 | BC 01 | Lab 5 | Codegen lab. Pick projects |
| | | Fri | 18.04.2025 | 13:15 | ELA 2 | **HOLIDAY** | |
| | | Fri | 18.04.2025 | 15:15 | ELA 2 | **HOLIDAY** | |
| - | | Wed | 23.04.2025 | | | **BREAK** | |
| | | Fri | 25.04.2025 | | | **BREAK** | |
| | | Fri | 25.04.2025 | | | **BREAK** | |
| 10 | ....56 | Wed | 30.04.2025 | 13:15 | BC 01 | Labs | |
| | ....56 | Fri | 02.05.2025 | 13:15 | ELA 2 | Labs | |
| | ....56 | Fri | 02.05.2025 | 15:15 | ELA 2 | Lecture 10 | Parsing general grammars |
| 11 | .....6 | Wed | 07.05.2025 | 13:15 | BC 01 | Lecture 11 | Compiler correctness |
| | .....6 | Fri | 09.05.2025 | 13:15 | ELA 2 | Labs | |
| | .....6 | Fri | 09.05.2025 | 15:15 | ELA 2 | Labs | |
| 12 | .....6 | Wed | 14.05.2025 | 13:15 | BC 01 | Labs | |
| | .....6 | Fri | 16.05.2025 | 13:15 | ELA 2 | Labs | |
| | .....6 | Fri | 16.05.2025 | 15:15 | ELA 2 | Labs | |
| 13 | .....6 | Wed | 21.05.2025 | 13:15 | BC 01 | | Project presentations |
| | .....6 | Fri | 23.05.2025 | 13:15 | ELA 2 | | Project presentations |
| | .....6 | Fri | 23.05.2025 | 15:15 | ELA 2 | | Project presentations |
| 14 | .....6 | Wed | 28.05.2025 | 13:15 | BC 01 | | Project presentations |
| | .....6 | Fri | 30.05.2025 | 13:15 | ELA 2 | | Project presentations |
| | .....6 | Fri | 30.05.2025 | 15:15 | ELA 2 | | Project presentations |
The material we cover will be similar to [last year](https://lara.epfl.ch/w/cc20/top).
## Books
Note that slides can be found **underneath each lecture video** on switch tube linkes below.
[Printed and online books](info/books.md) can be helpful, even if our goal is for lectures, exercises, and project instructions to be self-contained.
## Staff
| Week | Day | Date | Time | Room | Topic | Videos & Slides | |
| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
| 1 | Wed | 22.09.2021 | 08:15 | INM202 | Lecture 1 | [Intro to CLP](https://tube.switch.ch/videos/3351ec99), [Formal languages](https://tube.switch.ch/videos/6df3a6ba), [Live Recording](https://tube.switch.ch/videos/N0KUZHSEnt) |
| | Thu | 23.09.2021 | 08:15 | INF119 | Lecture 2 | [Operations on Languages](https://tube.switch.ch/videos/1846c6f2), [Regular Expressions and Lexer Idea](https://tube.switch.ch/videos/c903b9d5), [Live Recording 1](https://tube.switch.ch/videos/cdQxQvZcV8), [Live Recording 2](https://tube.switch.ch/videos/26pmlTMe8j) |
| 2 | Mon | 27.09.2021 | 13:15 | CE1100 | Lecture 3 | [First Symbols. Constructing a Lexer](https://tube.switch.ch/videos/fc864ce0), [Live Recording 1](https://tube.switch.ch/videos/WjS9tOAVex) [From Regular Expressions to Automata](https://tube.switch.ch/videos/a15b1c5f), [Live Recording 2](https://tube.switch.ch/videos/sBurwXgGlO) |
| | Wed | 29.09.2011 | 08:15 | INM202 | Labs 1 | [Labs setup](https://gitlab.epfl.ch/lara/cs320/-/blob/main/labs/labs_setup.md), [Amy Interpreter](https://gitlab.epfl.ch/lara/cs320/-/blob/main/labs/labs_01.md) |
| | Thu | 30.09.2011 | 08:15 | INF119 | Labs 1 | |
| 3 | Mon | 04.10.2021 | 13:15 | CE1100 | Lecture 4 | [Introduction to Grammars](https://tube.switch.ch/videos/ef9ae6c1), [Syntax Trees](https://tube.switch.ch/videos/9314ac16), [LL(1) Parsing](https://tube.switch.ch/videos/38dd46b4) |
| | Wednesday | 06.10.2021 | 8:15 | INM202 | Labs 2 | [Lexer](https://gitlab.epfl.ch/lara/cs320/-/blob/main/labs/labs_02.md) |
| | Thursday | 07.10.2021 | 8:15 | INF119 | Labs 2 | [Lexer](https://gitlab.epfl.ch/lara/cs320/-/blob/main/labs/labs_02.md) |
| 4 | Mon | 11.10.2021 | 13:15 | CE1100 | Lecture 5 | [CYK Algorithm for Parsing General Context-Free Grammars](https://tube.switch.ch/videos/672add06), [Live Recording 1](https://tube.switch.ch/videos/MOGmWUzw1x), [Chomsky Normal Form Transformation](https://tube.switch.ch/videos/2d3503f4), [Live Recording 2](https://tube.switch.ch/videos/1pUjEGgFk7) |
| 5 | Mon | 18.10.2021 | 13:15 | CE1100 | Lecture 6 | [Name Analysis](https://tube.switch.ch/videos/a842b90d), [Live Recording 1](https://tube.switch.ch/videos/SCjOc2ZpTo), [Inductive Relations](https://tube.switch.ch/videos/5d67c147) [Live Recording 2](https://tube.switch.ch/videos/rB0nQIXfV4), [Operational Semantics](https://tube.switch.ch/videos/465af7b1), [Live Recording 3](https://tube.switch.ch/videos/lvOsDDcL1L) |
| | |
|:----------|:----------------------------------------------------------------|
| Professor | [Viktor Kunčak](https://people.epfl.ch/viktor.kuncak) |
| PhD TA | [Samuel Chassot](https://people.epfl.ch/samuel.chassot) |
| PhD TA | [Sankalp Gambhir](https://people.epfl.ch/sankalp.gambhir) |
| MSc TA | [Sidonie Bouthors](https://people.epfl.ch/sidonie.bouthors) |
| MSc TA | [Sébastien Kobler](https://people.epfl.ch/sebastien.kobler) |
| MSc TA | [Marcin Wojnarowski](https://people.epfl.ch/marcin.wojnarowski) |
| MSc TA | [Jacopo Moretti](https://people.epfl.ch/jacopo.moretti/) |
# Selected Books for Computer Language Processing
The following books contain overlapping material with some recommendations for most relevant parts:
* [Modern compiler implementation in ML](http://library.epfl.ch/en/beast?isbn=9781107266391). Read Sections 2.1-2.4 for Lexical analysis, Sections 3.1-3.2 for parsing, and 5.3-5.4 as well as 16.1-16.3 for type checking
* [Introduction to automata theory, languages, and computation](https://epfl.swisscovery.slsp.ch/permalink/41SLSP_EPF/1g1fbol/alma990053993040205516) (3rd Ed.) by Hopcroft, Motwani, Ullman, 2007. First seven chapters are an excellent way to get in-depth understanding of finite automata and context-free grammars. If you need to pick, read sections 2.2, 2.3, 2.5, 3.1, 3.2.3, 4.1, 5.1, 5.2
* [Discrete Mathematics and Its Applications by Kenneth H. Rosen (8th edition)](https://epfl.swisscovery.slsp.ch/discovery/fulldisplay?docid=alma99116968862405516&context=L&vid=41SLSP_EPF:prod&lang=en&search_scope=MyInst_and_CI&adaptor=Local%20Search%20Engine&tab=41SLSP_EPF_MyInst_and_CI&query=any,contains,Discrete%20Mathematics%20and%20Its%20Applications&sortby=date_d&facet=frbrgroupid,include,9018235242682604086&offset=0), available in the library and you may have it already. Useful backround is in sections 1.7, 1.8, 2.1, 2.2, 5.1, 5.3, 9.1, 9.2, 13.1, 13.3, 13.4
* [Basics of Compiler Design](http://hjemmesider.diku.dk/~torbenm/Basics/). Online! Read pages 9-88 (omit Section 2.8) for lexical analysis and parsing
* [Compilers, principle, techniques and tools](http://library.epfl.ch/en/beast?isbn=9781292024349)
.PHONY = all clean
OUT_DIR ?= $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
DIRS := $(wildcard src/ex-??)
EXPDFS := $(patsubst src/ex-%,ex-%.pdf,$(DIRS))
SOLPDFS := $(patsubst src/ex-%,ex-%-sol.pdf,$(DIRS))
TEXARGS := -shell-escape -interaction=batchmode
all: $(EXPDFS) $(SOLPDFS)
ex-%.pdf: src/ex-%/main.tex
cd src/ex-$* && \
lualatex $(TEXARGS) -jobname=ex-$* "\def\ANSWERS{0}\input{main.tex}" && \
cp ex-$*.pdf $(OUT_DIR)/ex-$*.pdf
ex-%-sol.pdf: src/ex-%/main.tex
cd src/ex-$* && \
lualatex $(TEXARGS) -jobname=ex-$*-sol "\def\ANSWERS{1}\input{main.tex}" && \
cp ex-$*-sol.pdf $(OUT_DIR)/ex-$*-sol.pdf
clean:
rm -f $(EXPDFS) $(SOLPDFS)
for d in $(DIRS); do \
pushd $$d && rm -f *.aux *.log *.out main.pdf; popd; \
done
File added
File added
File added
File added
File added
File added
# Past Exercises
This is the collection of the exercises used in previous iterations of the
course. They are here if you wish to try additional exercises, but note that not
everything may necessarily match the current content of the course.
File added
# Exercise sheet 1
For exercise session on 28 September
we propose to solve selected exercise from the textbook:
http://hjemmesider.diku.dk/~torbenm/Basics/
In particular, we propose the following ones:
* Exercise 2.1
* Exercise 2.2
* Exercise 2.7
* Exercise 2.11
* Exercise 2.16
Most of them already have solutions provided; we will
provide solution to 2.16. Please also check the discussion forum.
File added
File added
File added
File added
File added
File added
File added
File added