Teaching Assistant – Programming Languages and Environments
Undergraduate course, NOVA School of Science and Technology | NOVA FCT, Department of Informatics, 2025
2nd Semester of 2024/2025
Overview
I taught practical classes and supported theoretical sessions for undergraduate students in the BSc in Computer Science and Engineering. Responsibilities included conducting labs, supervising assessments, providing feedback on assignments, and holding weekly office hours.
Course:
Linguagens e Ambientes de Programação (Programming Languages and Environments) 2025 Edition
Description:
This course covers the fundamentals of programming language design, using functional programming in OCaml as a vehicle to explore broader programming concepts. Students learn to reason about programs, use advanced functional techniques, and understand core programming language constructs such as recursion, higher-order functions, algebraic types, and modular programming.
Learning Objectives
Know:
- Understand functional programming concepts and the OCaml language.
- Learn key programming language design principles and implementation techniques.
- Become familiar with OCaml development tools (VSCode, Jupyter, REPL).
Know-how:
- Define and evaluate functions, including higher-order and recursive functions.
- Manipulate structured and algebraic types (records, lists, trees).
- Implement functional programs using pattern matching, polymorphism, and type inference.
- Design, decompose, and implement modular and concurrent programs, managing state, memoization, and asynchronous operations.
- Build interpreters and explore functional reactive programming concepts.
Soft Skills:
- Implement functional programs in OCaml, applying techniques based on side-effect-free computation and polymorphic types.
- Write recursive algorithms and prove their correctness using inductive reasoning.
- Use higher-order functions, such as composition and partial evaluation, in practical programming.
- Work with structured data (tuples, lists, algebraic data types) and iterate over data using
mapandfold. - Design, decompose, and implement modular and concurrent programs, managing state, memoization, and asynchronous operations.
Syllabus
1. History and Structure of Programming Languages
- 1.1 Origins of programming languages: Lambda Calculus
- 1.2 Key concepts in programming languages
- 1.3 Programming paradigms
- 1.4 Introduction to interpreters and compilers
2. Expressions, Values, Functions, and Types
- 2.1 OCaml language overview
- 2.2 Expression-based vs command-based languages
- 2.3 Values and types
- 2.4 Variables (
let) and functions (fun) - 2.5 Polymorphic types and type inference
- 2.6 Library functions
- 2.7 Input/Output
3. Structured Data
- 3.1 Tuples and lists
- 3.2 Algebraic data types
- 3.3 Inductive types and algorithms
- 3.4 Iterating using
mapandfold
4. Recursion and Induction
- 4.1 Recursive algorithms on natural numbers
- 4.2 Inductive reasoning
- 4.3 Verifying correctness
- 4.4 Tail recursion
- 4.5 Comparison with imperative approaches
5. Higher-Order Functions and Composition
- 5.1 Functions as values
- 5.2 Partial evaluation
- 5.3 Function composition
6. Modules, Interfaces, and Functors
- 6.1 OCaml module system
- 6.2 Modularity mechanisms in other languages
7. State, Asynchrony, and Concurrency
- 7.1 Using state in functional programming
- 7.2 Memoization
- 7.3 Asynchronous computation and I/O (Promises)
- 7.4 Concurrent programming in OCaml
8. Machines, Interpreters, and Compilers
- 8.1 Stack-based and register-based machines
- 8.2 Language structure and semantics
- 8.3 Compositional semantics
- 8.4 Implementing interpreters and compilers
