Portugal2025: Difference between revisions

From ifipwg21
No edit summary
mNo edit summary
 
(One intermediate revision by one other user not shown)
Line 112: Line 112:
Johan Jeuring, ''Evidence-based Programming Language Design and Educability'' (Monday, September 8 2025, 11:10 -- 11:56)
Johan Jeuring, ''Evidence-based Programming Language Design and Educability'' (Monday, September 8 2025, 11:10 -- 11:56)
<blockquote>
<blockquote>
[[Media:83_johan_jeuring.pdf|Slides]]
[[Media:83 johan jeuring.pdf|Slides]]


A programming language is a systematic notation by which we describe computational processes to others.
A programming language is a systematic notation by which we describe computational processes to others.
Line 141: Line 141:
Joint work with Ohad Kammar.
Joint work with Ohad Kammar.


[[Media:83_matija.pdf|slides]]
[[Media:83 matija.pdf|slides]]
</blockquote>
</blockquote>


Line 177: Line 177:
and define the semantics of smart handlers.
and define the semantics of smart handlers.


[[Media:83_ningning.pdf|slides]]
[[Media:83 ningning.pdf|slides]]
</blockquote>
</blockquote>


Line 202: Line 202:
Programming, but in a different notation.
Programming, but in a different notation.


[[Media:83_shin.pdf|slides]]
[[Media:83 shin.pdf|slides]]
</blockquote>
</blockquote>


Line 211: Line 211:
The presentation then explores the (approximate) completeness of the resulting logic, discusses some of its deduction rules, and demonstrates its use through the notion of a random walk. It concludes with a discussion of established extensions of the framework and highlights directions of ongoing research.
The presentation then explores the (approximate) completeness of the resulting logic, discusses some of its deduction rules, and demonstrates its use through the notion of a random walk. It concludes with a discussion of established extensions of the framework and highlights directions of ongoing research.


[[Media:83_renato.pdf|slides]]
[[Media:83 renato.pdf|slides]]
</blockquote>
</blockquote>


Line 224: Line 224:
This is joint work with Yunsong Yang. We acknowledge the help of the audience in identifying that our approach is based on viewing the functions on two types as a multimorphism, which is a special case of a hylomorphism.
This is joint work with Yunsong Yang. We acknowledge the help of the audience in identifying that our approach is based on viewing the functions on two types as a multimorphism, which is a special case of a hylomorphism.


[[Media:83_wg21_tom.pdf|slides]]
[[Media:83 wg21 tom.pdf|slides]]
</blockquote>
</blockquote>


Line 244: Line 244:
I’ve been on sabbatical for the academic year 2024-2025, and my sabbatical project has been finally to write the book I’ve been trying to write for more years than I care to remember. It’s called “Patterns in Functional Programming”, and is about folds and unfolds, monads and applicatives, metamorphisms and accumulations, and so on. Essentially no new material, just drawing together previous work, by me and by others, into one place. To be published by Cambridge University Press in 2026.
I’ve been on sabbatical for the academic year 2024-2025, and my sabbatical project has been finally to write the book I’ve been trying to write for more years than I care to remember. It’s called “Patterns in Functional Programming”, and is about folds and unfolds, monads and applicatives, metamorphisms and accumulations, and so on. Essentially no new material, just drawing together previous work, by me and by others, into one place. To be published by Cambridge University Press in 2026.


[[Media:83_jeremy.pdf|slides]]
[[Media:83 jeremy.pdf|slides]]
</blockquote>
</blockquote>


Line 251: Line 251:
Replicated Data Types (RDTs) have emerged as a principled approach for developing replicated implementations of basic data structures such as counter, flag, set, map, etc. While the correctness of RDTs is generally specified using the notion of strong eventual consistency, which guarantees that replicas that have received the same set of updates would converge to the same state, a more expressive specification which relates the converged state to updates received at a replica would be more beneficial to RDT users. Replication-aware linearizability is one such specification, which requires all replicas to always be in a state that can be obtained by linearising the updates received at the replica. In this talk, I discuss recent work on developing a novel fully automated technique for verifying replication-aware linearizability for Mergeable Replicated Data Types (MRDTs).
Replicated Data Types (RDTs) have emerged as a principled approach for developing replicated implementations of basic data structures such as counter, flag, set, map, etc. While the correctness of RDTs is generally specified using the notion of strong eventual consistency, which guarantees that replicas that have received the same set of updates would converge to the same state, a more expressive specification which relates the converged state to updates received at a replica would be more beneficial to RDT users. Replication-aware linearizability is one such specification, which requires all replicas to always be in a state that can be obtained by linearising the updates received at the replica. In this talk, I discuss recent work on developing a novel fully automated technique for verifying replication-aware linearizability for Mergeable Replicated Data Types (MRDTs).


[[Media:83_kc.pdf|slides]]
[[Media:83 kc.pdf|slides]]
</blockquote>
</blockquote>


Line 266: Line 266:
implementations; and 3) additional expressive power is obtained from first-class environments almost for free.
implementations; and 3) additional expressive power is obtained from first-class environments almost for free.


[[Media:83_bruno.pdf|slides]]
[[Media:83 bruno.pdf|slides]]
</blockquote>
</blockquote>


Liam O'Connor, ''Run-time Monitoring via Topology'' (Wednesday, September 10 2025, 11:07 -- 12:15)
Liam O'Connor, ''Run-time Monitoring via Topology'' (Wednesday, September 10 2025, 11:07 -- 12:15)
<blockquote>
<blockquote>
TBD
The literature on runtime “verification” (the activity of monitoring a running process to ensure compliance with a given specification) offers many different definitions of “monitorability” for properties. In a linear-time temporal setting, properties take the form of sets of behaviours (infinite sequences of states). In this talk, I will arrange the various monitorability classes found in the literature into a hierarchy along with well-known classes of properties such as safety and guarantee properties. I then give each of these monitorability classes neat topological characterisations within the topology induced by the "guarantee kernel" interior operator. Lastly, I show that the metric space used by Alpern and Schneider in their famous “Defining Liveness” paper coincides with our topology.
 
[[Media:83 liam.pdf|slides]]
</blockquote>
</blockquote>


Line 280: Line 282:
Joint work with Anton Chernev, Corina Cirstea and Clemens Kupke.
Joint work with Anton Chernev, Corina Cirstea and Clemens Kupke.


[[Media:83_helle.pdf|slides]]
[[Media:83 helle.pdf|slides]]
</blockquote>
</blockquote>


Thomas Sewell, ''A Niche in Reflection'' (Thursday, September 11 2025, 11:03 -- 11:42)
Thomas Sewell, ''A Niche in Reflection'' (Thursday, September 11 2025, 11:03 -- 11:42)
<blockquote>
<blockquote>
[[Media:83_thomas.pdf|slides]]
[[Media:83 thomas.pdf|slides]]
</blockquote>
</blockquote>


Tarmo Uustalu, ''Sorting permutes: how to state and prove this in an intro course to computer-assisted proof?'' (Thursday, September 11 2025, 11:44 -- 12:30)
Tarmo Uustalu, ''Sorting permutes: how to state and prove this in an intro course to computer-assisted proof?'' (Thursday, September 11 2025, 11:44 -- 12:30)
<blockquote>
<blockquote>
I will share some experience from a 3-week intensive (12 lectures of 135 mins each) intro course to computer-assisted proof, based on Agda, that I taught last December as a pilot experiment. I did not want to do software foundations, since this requires that the students know some programming theory, but to concentrate on algorithms and datastructures. I wanted to get past the very basics of lists and natural numbers to some "real stuff" as early in the course as possible, to showcase that one can do much more than the most primitive things and that one can reach there quickly. So I wanted to get to sorting by the 2nd week (the 6th lecture). It is easy to state and prove that sorting algorithms, such as insertion sort, selection sort etc, sort (the output is always sorted), but how to state and prove that they permute, ie do not invent or lose elements? I will argue that the best is to work with the least congruence relation on lists generated by the relation that swaps the head of a list with the next element. Two related lists have the same underlying multiset.
I will share some experience from a 3-week intensive (12 lectures of 135 mins each) intro course to computer-assisted proof, based on Agda, that I taught last December as a pilot experiment. I did not want to do software foundations, since this requires that the students know some programming theory, but to concentrate on algorithms and datastructures. I wanted to get past the very basics of lists and natural numbers to some "real stuff" as early in the course as possible, to showcase that one can do much more than the most primitive things and that one can reach there quickly. So I wanted to get to sorting by the 2nd week (the 6th lecture). It is easy to state and prove that sorting algorithms, such as insertion sort, selection sort etc, sort (the output is always sorted), but how to state and prove that they permute, ie do not invent or lose elements? I will argue that the best is to work with the least congruence relation on lists generated by the relation that swaps the head of a list with the next element. Two related lists have the same underlying multiset.


[https://cs.ioc.ee/~tarmo/Sorting21.zip Agda code]
[https://cs.ioc.ee/~tarmo/Sorting21.zip Agda code]
Line 303: Line 305:
This is joint work with Changjun Li, Mikkel Kragh Mathiesen and Mads Rehof.
This is joint work with Changjun Li, Mikkel Kragh Mathiesen and Mads Rehof.


[[Media:83_fritz.pdf|slides]]
[[Media:83 fritz.pdf|slides]]
</blockquote>
</blockquote>


Line 312: Line 314:
In this paper we present a Programming Language for INtegrity and Knowledge (PlinkPlink), a novel formally verified and strongly-typed DSL for encoding relations as constraint systems for PlonkPlonk, a widely used zkSNARK. PlinkPlink relies on refinement types to both formally specify and statically verify high-level DSL programs and certify the equivalence between the user-written program and the produced constraint system. We use PlinkPlink to implement the SHA-256 hash function and formally verify some of its components, showing that it is expressive enough to encode cryptographic functions commonly used in zkSNARK applications.
In this paper we present a Programming Language for INtegrity and Knowledge (PlinkPlink), a novel formally verified and strongly-typed DSL for encoding relations as constraint systems for PlonkPlonk, a widely used zkSNARK. PlinkPlink relies on refinement types to both formally specify and statically verify high-level DSL programs and certify the equivalence between the user-written program and the produced constraint system. We use PlinkPlink to implement the SHA-256 hash function and formally verify some of its components, showing that it is expressive enough to encode cryptographic functions commonly used in zkSNARK applications.


[[Media:83_niki.pdf|slides]]
[[Media:83 niki.pdf|slides]]
</blockquote>
</blockquote>


Line 337: Line 339:
advancing domain-specific language engineering.
advancing domain-specific language engineering.


[[Media:83_hu.pdf|slides]]
[[Media:83 hu.pdf|slides]]
</blockquote>
</blockquote>


Line 353: Line 355:
can be automated.
can be automated.


[[Media:83_johan2.pdf|slides]]
[[Media:83 johan2.pdf|slides]]
</blockquote>
</blockquote>


Line 360: Line 362:
At Meeting #78 in Taiwan in 2019, I described Richard Bird’s clever cyclic functional implementation of the genuine Sieve of Eratosthenes. Richard contributed this to Melissa O’Neill’s paper, for which he was handling editor; and also included it in his book Thinking Functionally With Haskell. He discussed its productivity as an application of the Approx Lemma, set the completion of the proof as an exercise, and left a hint for the solution. The exercise is fine, but unfortunately the solution hint is wrong: his suggested strategy does not lead to a proof. I have recently published a paper (JFP 35:e5, 2025) giving a complete proof using the Approx Lemma. But while writing about this proof for my book, I realised that appeal to the Approx Lemma is not actually necessary: the same calculations about the same sublemmas directly demonstrate productivity. In this talk, I briefly sketched the more direct proof.
At Meeting #78 in Taiwan in 2019, I described Richard Bird’s clever cyclic functional implementation of the genuine Sieve of Eratosthenes. Richard contributed this to Melissa O’Neill’s paper, for which he was handling editor; and also included it in his book Thinking Functionally With Haskell. He discussed its productivity as an application of the Approx Lemma, set the completion of the proof as an exercise, and left a hint for the solution. The exercise is fine, but unfortunately the solution hint is wrong: his suggested strategy does not lead to a proof. I have recently published a paper (JFP 35:e5, 2025) giving a complete proof using the Approx Lemma. But while writing about this proof for my book, I realised that appeal to the Approx Lemma is not actually necessary: the same calculations about the same sublemmas directly demonstrate productivity. In this talk, I briefly sketched the more direct proof.


[[Media:83_jeremy2.pdf|slides]]
[[Media:83 jeremy2.pdf|slides]]
</blockquote>
</blockquote>



Latest revision as of 15:16, 21 January 2026

IFIP 2.1 Meeting #83 Information

The 83rd meeting will be organised by Jose Oliveira.
Location: Viana do Castelo, Portugal.

Dates

Monday September 8, 2025 to Friday September 12, 2025.
(Meeting starts at 8:50am on that Monday morning.)

Participants

Name Function
Tom Schrijvers secretary
Jose Oliveira organiser
Lambert Meertens
Ningning Xie observer
José Pedro Magalhães
Niki Vazou
Johan Jeuring
Bruno Oliveira
Oleg Kiselyov
Tarmo Uustalu
Patrik Jansson
Matija Pretnar
Zhenjiang Hu
Fritz Henglein
Thomas Sewell observer
Shin-Cheng Mu
Jeremy Gibbons
Peter Hoefner
Renato Neves local observer
Nicolas Wu
Josh Ko observer
Sam Lindley
James McKinna
Helle Hansen observer
Pierre-Evariste Dagand
Liam O'Connor observer
KC Sivaramakrishnan observer

Practical information

Consult the separate “practical” page for more detailed information: precise location, budget, travel advice etc.

Organizational and administrative matters

Friday morning, September 12, 2025.

Membership

These private matters are not recorded in the public version of the minutes.

Formal resolution

To fold, or not to fold, that was the question: Whether ’tis categoric in the mind to suffer The slings and arrows of outrageous fortune, Or to take algebra against a sea of permutations, And by opposing end them: to verify, to prove No more; and by a proof, to say we end The heart-ache, and the thousand mathematical shocks That informal reasoning is heir to? ’Tis a consummation Devoutly to be wished. To verify, to prove.

The members and observers of WG 2.1, present at the 83rd meeting in Viana do Castelo, Portugal, express their sincere gratitude to José Oliveira, Renato Neves, and Patrícia Rouper for having organised a splendid meeting.

Despite the hardest efforts of mathematical program construction, with and without fold, there was a massive SnackOverflow during the meeting. The location was chosen wisely, since local couples “needed to talk in symbols” for centuries. Prize-winning architect Siza Vieira contributed through his careful audio-preserving design, allowing us to eavesdrop on any or all scientific conversations. Our only problem seemed to be that we were nearly late for dinner, thanks to the untimely Spanish time invasion.

Next meetings:

  • M84 (May 2026) Estonia.
  • M85 (Feb 2027) Thailand.
  • M86 To be determined.

Technical presentations in scheduled order

Johan Jeuring, Evidence-based Programming Language Design and Educability (Monday, September 8 2025, 11:10 -- 11:56)

Slides

A programming language is a systematic notation by which we describe computational processes to others. Most committees designing programming languages give suitability for teaching as an important goal of their design. This is in line with Valiant’s notion of educability: humans are unique because they educate, and their main means to educate is language. In this talk I discuss parallels between languages and programming languages. I make a plea for using or referring to evidence-based programming language design approaches in our work, and I give some examples of research where these approaches are applied.

Patrik Jansson, adgAnis noitatum repetiniF | Finite permutations in Agda (Monday, September 8 2025, 12:00 -- 12:29 + 14:13 - 14:30)

Talk slides (joint work with Wouter Swierstra)

Finite permutations are commonly used in mathematics and computing. We explain, specify and implement some common operations on permutations in Agda: identity, composition, inverse, etc. and note the connection to algebra and number systems.

Some may see connections to two 2024-04 WG 2.1 #81 Germany talks: by Pierre-Evariste Dagand and by Alexander Dinges

Matija Pretnar, Symmetric Programming (Monday, September 8 2025, 14:37 -- 15:09)

In computer science, symmetry in data structures such as binary search trees is often handled either by code replication or by clever tricks that unify symmetric cases. This talk explores a mathematical framework based on group actions, which captures such constructions directly and uniformly. It also provides a natural way to express proofs that rely on "without loss of generality" (wlog), a mathematical staple whose computational significance is increasingly important with the proliferation of proof assistants.

Joint work with Ohad Kammar.

slides

Oleg Kiselyov, More Fun with Monoids (Monday, September 8 2025, 15:42 -- 16:34)

We describe interesting ways of representing an inherently sequential accumulation fold as the composition of a map and a monoid reduction. As the result, some seemingly sequential algorithms can run not just in parallel but embarrassingly in parallel: The input sequence can be arbitrarily partitioned (and recursively sub-partitioned, if desired) among workers, which would run in parallel with no races, dependencies or even memory bank conflicts. Such embarrassing parallelism is ideal for multi-core, GPU or distributed processing.

Among those algorithms is Horner rule, Boyer-Moore majority voting and nested grouping-aggregation.

The general principle is well-known; also well-known is that its specific applications require ingenuity.

Web page (whose content include the slides, but has much more explanation and complete code)

Ningning Xie, Smart Handlers: Handling the Selection Monad (Monday, September 8 2025, 16:40 -- 17:57)

This talk presents smart handlers, a version of algebraic effect handlers enriched by computational ideas inspired by the selection monad. The selection monad on a set consists of selection functions. These select an element from the set, based on a loss (dually, reward) function giving the loss resulting from a choice of an element. Specifically, as well as the usual delimited continuations, our new kind of handlers additionally have access to choice continuations, that give the possible future losses. In this way programmers can write operations implementing optimisation algorithms that are aware of the losses arising from their possible choices. I will present a variety of examples and define the semantics of smart handlers.

slides


Josh Ko, Specifying Queue Order Using Parametric Types (Tuesday, September 9 2025, 9:03 -- 10:15)

I use a datatype of ‘ordered’ lists with a lawless ‘ordering’ relation to give precise types to the standard two-list queues, guaranteeing first-in-first-out behaviour. It is likely that the types of the queue operations are all uniquely inhabited (up to extensional equality); as a smaller experiment, I prove that the type of reverse is uniquely inhabited using its free theorem.

Agda code Blog post

Shin-Cheng Mu, A Monadic Notation for Optimisation Problems (Tuesday, September 9 2025, 10:17 -- 11:33)

Relations were introduced into program calculation to allow non-determinism in specifications. The point-free calculus of relations was concise and expressive, but that also made it difficult to learn and to promote. In this talk I present a monadic, pointwise notation for calculating non-deterministic programs. It is more cumbersome, but sufficiently expressive, and probably more approachable to general functional programmers. I demonstrate how to prove the Greedy Theorem in this calculus, which turns out to be the same proof as that in Algebra of Programming, but in a different notation.

slides

Renato Neves, Reasoning Precisely About Imprecision (Tuesday, September 9 2025, 11:36 -- 12:33)

This talk briefly overviews logical foundations for reasoning about distances between lambda-terms. The guiding motivation is that standard program equivalence, treated as a binary notion, is often too rigid, while quantitative approaches may be better suited. In this spirit, the talk introduces a quantitative generalisation of equational logic in the setting of lambda calculus. The key idea is to interpret equality not as a predicate valued in the two-element set, but rather as a predicate ranging over a quantale (a prime example being the metric/Lawvere one).

The presentation then explores the (approximate) completeness of the resulting logic, discusses some of its deduction rules, and demonstrates its use through the notion of a random walk. It concludes with a discussion of established extensions of the framework and highlights directions of ongoing research.

slides

Tom Schrijvers, Calculating QuickSub (Tuesday, September 9 2025, 14:08 -- 14:55)

This talk reports on ongoing work on solving a problem formulated by Bruno Oliveira.

He has presented a new subtyping algorithm QuickSub and proving it sound and complete with respect to an earlier Weadkly Positive Subtyping algorithm. Both algorithms check whether one iso-recursive type is a subtype of another. QuickSub is more efficient. The problem is whether QuickSub can be calculated from Weakly Positive Subtyping (WPS).

Our solution approach consists of translating the WPS algorithm from its definition in terms of inference rule into a functional program. By rendering this program in terms of recursion schemes, and transforming the algebras involved with the help of fold fusion, we show how to derive QuickSub.

This is joint work with Yunsong Yang. We acknowledge the help of the audience in identifying that our approach is based on viewing the functions on two types as a multimorphism, which is a special case of a hylomorphism.

slides

Jose Oliveira, Reducing Logic to Arithmetics - Why not? (Tuesday, September 9 2025, 14:58 -- 15:35)

60 years ago, Lotfi Zadeh introduced fuzzy sets and, in particular, the 'algebraic product' variant of fuzzy logic. Restricted to the classical case, such a variant enables Boolean logic by elementary "arithmetic calculation". This is being considered at the ENSICO 'computing at schools' programme as a way of teaching Boolean logic as a "branch of arithmetics", including a 'MPC'-styled calculation of bit-level arithmetic operators from their specifications (cf. eg. the full-adder implemented using XORs etc). I will also briefly address a related topic, that of doing similar calculations at NN-neuron-level. This opens up the possibility of NN explainability by formal reverse engineering. (Work in progress - slides)

Jeremy Gibbons, Patterns in Functional Programming; or, What I Did on My Sabbatical (Tuesday, September 9 2025, 16:05 -- 16:16)

I’ve been on sabbatical for the academic year 2024-2025, and my sabbatical project has been finally to write the book I’ve been trying to write for more years than I care to remember. It’s called “Patterns in Functional Programming”, and is about folds and unfolds, monads and applicatives, metamorphisms and accumulations, and so on. Essentially no new material, just drawing together previous work, by me and by others, into one place. To be published by Cambridge University Press in 2026.

slides

KC Sivaramakrishnan, Automatically Verifying Replicated Data Types (Tuesday, September 9 2025, 16:21 -- 17:45)

Replicated Data Types (RDTs) have emerged as a principled approach for developing replicated implementations of basic data structures such as counter, flag, set, map, etc. While the correctness of RDTs is generally specified using the notion of strong eventual consistency, which guarantees that replicas that have received the same set of updates would converge to the same state, a more expressive specification which relates the converged state to updates received at a replica would be more beneficial to RDT users. Replication-aware linearizability is one such specification, which requires all replicas to always be in a state that can be obtained by linearising the updates received at the replica. In this talk, I discuss recent work on developing a novel fully automated technique for verifying replication-aware linearizability for Mergeable Replicated Data Types (MRDTs).

slides

Bruno Oliveira, A Case for First-Class Environments (Wednesday, September 10 2025, 9:03 -- 10:28)

In this talk we advocate for formalizing programming languages using a novel style of small-step environment-based semantics, which avoids substitution and is closer to implementations. We present a call-by-value statically typed calculus, called λE, using our small-step environment semantics. With our alter- native environment semantics programming language constructs for first-class environments arise naturally, without creating significant additional complexity. Therefore, λE also adopts first-class environments, adding expressive power that is not available in conventional lambda calculi. Our work shows that the small-step environment semantics that we adopt has three main and orthogonal benefits: 1) it simplifies the notorious binding problem in formalizations and proof assistants; 2) it is closer to implementations; and 3) additional expressive power is obtained from first-class environments almost for free.

slides

Liam O'Connor, Run-time Monitoring via Topology (Wednesday, September 10 2025, 11:07 -- 12:15)

The literature on runtime “verification” (the activity of monitoring a running process to ensure compliance with a given specification) offers many different definitions of “monitorability” for properties. In a linear-time temporal setting, properties take the form of sets of behaviours (infinite sequences of states). In this talk, I will arrange the various monitorability classes found in the literature into a hierarchy along with well-known classes of properties such as safety and guarantee properties. I then give each of these monitorability classes neat topological characterisations within the topology induced by the "guarantee kernel" interior operator. Lastly, I show that the metric space used by Alpern and Schneider in their famous “Defining Liveness” paper coincides with our topology.

slides

Helle Hansen, Thin coalgebras (Thursday, September 11 2025, 9:08 -- 10:30)

In the context of automata-theoretic model checking, unambiguous acceptance is important for certain constructions and decision procedures. However, a regular language of infinite trees is not always accepted by some unambiguous automaton. Thin trees are a subclass that does allow unambiguous acceptance. A tree is thin if it has countably many branches. Aiming to generalise this unambiguity result from trees to other types of structures, we give a definition of thin F-coalgebra for analytic functors F, and provide a domain-specific language for specifying thin F-coalgebra behaviours. We also give a sound and complete axiomatisation and make connections to the Cantor-Bendixson rank of thin trees from descriptive set theory. (Unambiguous acceptance of thin F-coalgebra ensues, but was not presented.)

Joint work with Anton Chernev, Corina Cirstea and Clemens Kupke.

slides

Thomas Sewell, A Niche in Reflection (Thursday, September 11 2025, 11:03 -- 11:42)

slides

Tarmo Uustalu, Sorting permutes: how to state and prove this in an intro course to computer-assisted proof? (Thursday, September 11 2025, 11:44 -- 12:30)

I will share some experience from a 3-week intensive (12 lectures of 135 mins each) intro course to computer-assisted proof, based on Agda, that I taught last December as a pilot experiment. I did not want to do software foundations, since this requires that the students know some programming theory, but to concentrate on algorithms and datastructures. I wanted to get past the very basics of lists and natural numbers to some "real stuff" as early in the course as possible, to showcase that one can do much more than the most primitive things and that one can reach there quickly. So I wanted to get to sorting by the 2nd week (the 6th lecture). It is easy to state and prove that sorting algorithms, such as insertion sort, selection sort etc, sort (the output is always sorted), but how to state and prove that they permute, ie do not invent or lose elements? I will argue that the best is to work with the least congruence relation on lists generated by the relation that swaps the head of a list with the next element. Two related lists have the same underlying multiset.

Agda code

Fritz Henglein, Programming Joins, Simply and Efficiently (Thursday, September 11 2025, 14:00 -- 14:55)

One often has to program relational joins on program data, that is computing the relation (collection) { (x1, …, xn) | F } where F is a relational first-order logic formula built from conjunction over predicate symbols representing input relations. Examples are classical binary joins such as the the products sold by salespeople or the set of triangles { (x1, x2, x3) | R(x1,2) and R(x2, x3) and R(x3, x1)} in a graph (binary relation) R.

We show that all joins are easy to program efficiently using elementary programming techniques: Building nested read-only dictionaries, always iterating over a dictionary with the smallest domain, and nested iteration over the variables x1, …, xn in any order. Employing amortized complexity analysis on inputs padded with ghost data and a weak property of the Atserias-Grohe-Marx fractional edge covering bound we show that this constitutes a simply programmed worst-case optimal join algorithm. The algorithm can be considered a simplified version of Generic Join where one step is left out. We illustrate the resulting 10 line source code for triangles in Python and a corresponding Haskell program and show that these execute multiple orders of magnitude faster on a 'difficult’ class of data than piping the data through any of a number of common SQL engines.

This is joint work with Changjun Li, Mikkel Kragh Mathiesen and Mads Rehof.

slides

Niki Vazou, Plink: Verified Constraint Generation for Zero Knowledge (PLONK) (Thursday, September 11 2025, 14:58 -- 15:41)

A zkSNARK is a cryptographic primitive that allows a prover to convince a verifier that they know some private piece of information satisfying a given mathematical relation RR; however, zkSNARKs require that this relation RR is encoded as an algebraic constraint system, where each constraint is a polynomial equation. Such an encoding is as low-level and unintuitive as machine code, making writing the equations tedious and error-prone. For this reason, high-level Domain-Specific Languages (DSLs) have been developed to specify the relations and translate them into algebraic constraints. However, even with these high-level DSLs, users can still write incorrect programs or correct programs can be compiled to an incorrect constraint system; in either case, the resulting constraint system may be exploited by malicious users.

In this paper we present a Programming Language for INtegrity and Knowledge (PlinkPlink), a novel formally verified and strongly-typed DSL for encoding relations as constraint systems for PlonkPlonk, a widely used zkSNARK. PlinkPlink relies on refinement types to both formally specify and statically verify high-level DSL programs and certify the equivalence between the user-written program and the produced constraint system. We use PlinkPlink to implement the SHA-256 hash function and formally verify some of its components, showing that it is expressive enough to encode cryptographic functions commonly used in zkSNARK applications.

slides

Zhenjiang Hu, Lifting Transformation for Engineering DSLs (Thursday, September 11 2025, 16:39-- 17:22)

In the era of "software defines everything" in information technology, safe and user-friendly domain-specific languages (DSLs) have become increasingly important. These DSLs allow for directly representing problems and algorithms tailored to specific professional fields, while enabling domain experts to craft code using domain-specific terminology and operations intuitively. However, developing DSLs for domain experts remains a challenge. Traditional embedded DSL design methods offer a quick way to prototype DSLs. Yet, the close integration between embedded DSLs and the host language makes it difficult for domain experts who are unfamiliar with the host language. In this talk, we present a new approach to support rapid DSL implementation and the development of an IDE for the DSL. This approach includes an extensible general-purpose core language, a DSL definition technique leveraging syntactic sugars, and importantly, a lifting transformation to generate DSL implementations alongside an IDE optimized for DSL programming. We have created a system called Osazone and used it to develop many DSLs, demonstrating the flexibility, effectiveness, and practicality of our approach in advancing domain-specific language engineering.

slides

Johan Jeuring, Example-Based Reasoning about the Realizability of Polymorphic Programs (Thursday, September 11 2025, 17:28-- 17:48)

Parametricity states that polymorphic functions behave the same regardless of how they are instantiated. When developing polymorphic programs, Wadler’s free theorems can serve as free specifications, which can turn otherwise partial specifications into total ones, and can make otherwise realizable specifications unrealiz- able. This is of particular interest to the field of program synthesis, where the unrealizability of a specification can be used to prune the search space. In this paper, we focus on the interaction between parametricity, input- output examples, and sketches. Unfortunately, free theorems introduce universally quantified functions that make automated reasoning difficult. Container morphisms provide an alternative representation for polymor- phic functions that captures parametricity in a more manageable way. By using a translation to the container setting, we show how reasoning about the realizability of polymorphic programs with input-output examples can be automated.

slides

Jeremy Gibbons, The Genuine Sieve of Eratosthenes, Revisited (Friday, September 12 2025, 11:40-- 12:10)

At Meeting #78 in Taiwan in 2019, I described Richard Bird’s clever cyclic functional implementation of the genuine Sieve of Eratosthenes. Richard contributed this to Melissa O’Neill’s paper, for which he was handling editor; and also included it in his book Thinking Functionally With Haskell. He discussed its productivity as an application of the Approx Lemma, set the completion of the proof as an exercise, and left a hint for the solution. The exercise is fine, but unfortunately the solution hint is wrong: his suggested strategy does not lead to a proof. I have recently published a paper (JFP 35:e5, 2025) giving a complete proof using the Approx Lemma. But while writing about this proof for my book, I realised that appeal to the Approx Lemma is not actually necessary: the same calculations about the same sublemmas directly demonstrate productivity. In this talk, I briefly sketched the more direct proof.

slides

Schedule

Monday, Tuesday, and Thursday:

  • session – 9:00 to 10:30
  • coffee break – 10:30 to 11:00
  • session – 11:00 to 12:30
  • lunch – 12:30 to 14:00
  • session – 14:00 to 15:30
  • coffee break – 15:30 to 16:00
  • session – 16:00 to 18:00

Wednesday (sessions only in the morning):

  • session – 9:00 to 10:30
  • coffee break – 10:30 to 11:00
  • session – 11:00 to 12:30
  • lunch – 12:30 to 14:00

Friday - same as Wednesday, but due to the business meeting taking place in the Gil Eanes ship, schedule may need slight adjustments. The morning session before the 10:30 coffee break is attended by members only.