Resource usage—the amount of time, memory, and energy a program requires for its execution—is one of the central subjects of computer science. Nevertheless, resource usage often does not play a central role in classical programming-language concepts such as operational semantics, type systems, and program logics. This course revisits these concepts to model and analyze resource usage of programs in a formal and compositional way. The emphasis is on practical, type-based techniques that automatically inform programmers about the resource usage of their code. We also discuss applications of the techniques, in particular in programming languages for digital contracts.

The second part of the course studies probabilistic programming languages. Such languages describe probability distributions and can be used to precisely describe and analyze probabilistic models. The focus of the course is on semantics and analysis of probabilistic language but we also discuss applications of probabilistic programming.


  • Recurrence relations
  • Amortized analysis and the potential method
  • Type systems and type inference
  • Operational semantics
  • Cost semantics for parallel and sequential evaluation
  • Linear type systems
  • Linear automatic amortized resource analysis
  • Automatic amortized resource analysis for higher-order programs
  • Polynomial amortized resource analysis
  • Type inference for automatic amortized resource analysis
  • Resource Aware ML
  • Session types
  • Resource-aware session types
  • Shared session types and modal separation
  • Blockchains and digital contracts
  • Probability theory
  • Probabilistic programming
  • Weakest pre-expectation calculus