Talks@DCC
27
Oct 2026
FC6 0.28
14:30

By Professor Pedro Ângelo


On 27 October at 2:30 pm, in FC6 0.28, Pedro Ângelo will give a lecture entitled "Metaprogramming: foundations and applications".


Title: 

Metaprogramming: foundations and applications


Abstract: 

Metaprogramming is the ability to write programs that generate, execute, manipulate and inspect other programs. In languages that support it, programs (usually referred to as code) are treated as first-class citizens. However, metaprogramming comes in many flavours, and each language supports a different combination of these capabilities. These differences lead to very different guarantees about code: some approaches ensure that generated code is well-typed, while others do not; some restrict code to two stages (execution both at compile time and run time), while others allow arbitrarily many.

In this talk, we will introduce metaprogramming and its core concepts, and tour a selection of languages that support it, using example programs to highlight their differences. We will then look at the logical foundations of typed metaprogramming, rooted in modal logic. Finally, we will extend the definition of metaprogramming to include the transmission of programs, and show how this can be achieved by combining metaprogramming with session types.


Bio:

Pedro Ângelo is an Assistant Professor at the Faculdade de Ciências da Universidade do Porto and member of the Laboratory of Artificial Intelligence and Computer Science (LIACC) since February 2026. He completed his integrated Master’s degree in Network and Computer Systems Engineering in 2017 and his PhD in Computer Science in 2024, both at FCUP. Between February 2024 and February 2026, he was a Visiting Assistant Professor at the Faculdade de Ciências da Universidade de Lisboa.

During his PhD, he studied gradual typing and intersection types, and how both techniques can be combined within a single programming language. Since then, his research has focused on substructural type systems, in particular linear type systems, and their application to binary session types, as well as on type systems for languages with metaprogramming. His interests also include just-in-time compilation, the formal specification of network protocols (for example, using session types) and cryptographic protocols, and their interaction with communication and concurrency.