An open API service indexing awesome lists of open source software.

https://github.com/pdmosses/mfps2026-agda

Agda code for an MFPS 2026 paper
https://github.com/pdmosses/mfps2026-agda

agda denotational-semantics formalisation mechanisation postulates synthetic-domain-theory

Last synced: 7 days ago
JSON representation

Agda code for an MFPS 2026 paper

Awesome Lists containing this project

README

          

# Mechanising Denotational Semantics in Agda

Agda code accompanying a paper ([PDF]) to be [presented] at [MFPS 2026]:

> Peter D. Mosses, Jesper Cockx, Bernhard Reus: *Mechanising Denotational Semantics in Agda*

[PDF]: https://ul-fmf.github.io/mfps-sstt-2026/files/pdfs/mfps/MFPS26-17.pdf
[presented]: https://ul-fmf.github.io/mfps-sstt-2026/programme/#wednesday-june-3-mfps
[MFPS 2026]: https://ul-fmf.github.io/mfps-sstt-2026/mfps/

## Navigation

On **wide displays**, the **top panel** of each page shows:

- [About] – this [README] page, [Background], [Meta-notation]
- [Notation] – postulated types for domain constructors and associated operations
- [Examples] - embedded denotational definitions [Examples.LC], [Examples.PCF], [Examples.Scm]
- [Properties] – postulated equivalences for operations
- [Tests] - proven equivalences of denotations of [Tests.LC] and [Tests.PCF] terms
- [Library] – modules imported from the [standard Agda library] (v2.3)
- [pdmosses/mfps2026-agda] – the **code repository**
- a **toggle** between light, dark, and automatic modes
- a **search** field

The section **navigation hierarchy** is shown on the left.
The **subsections** of the current page are shown on the right.

On **narrow displays**, the window may show only the **navigation hierarchy** button
and the **search** button.

The footer of each page shows links to the **previous** and **next** pages.
When scrolling up, a **back to top** button is shown near the top of the window.

**Agda code blocks**

- **Names** are links to their declarations.
- The **top-level module** on the page is a link to the original page generated by Agda.
- The [agda] directory contains the literate Agda Markdown code;
`--"hide" ... --"/hide"` indicates code elided in the paper.
- The [complete] directory contains the same code as [agda],
but without the `--"hide"` and `--"/hide"` comments.
- The [plain] directory contains the corresponding plain Agda code.
- The [docs] directory contains source code for generating the website.
- The [latex] directory contains files used for generating LaTeX sources.

## Abstract

Mechanisation of a mathematical definition (also referred to as formalisation)
has many benefits. Here, we focus on mechanising denotational semantic definitions
of programming languages by embedding them in the Agda language. The Agda
type-checker detects and reports any issues with the wellformedness and type
correctness of the embedded definitions.

To minimise the effort required, and to facilitate correlation of the original
definition with its Agda embedding, mechanisation should not involve significant
reformulation or extension. Here, we show how to embed conventional Scott–Strachey
denotational definitions in Agda with almost no changes to $\lambda$-notation or
domain equations.

Agda notation for definitions of types and functions corresponds closely
to the conventional meta-notation of denotational semantics. We have developed
a collection of Agda modules with postulated types for commonly used domain
constructors and their associated operations. Some of our postulates are
inconsistent with a classical set-theoretic interpretation of Agda; we conjecture
that they would be consistent with an interpretation of Agda in the higher-order
intuititionistic logic used by Simpson in his work on synthetic domain theory.

We illustrate our approach with mechanisations of three denotational definitions:
Scott’s $D_\infty$ model of the untyped $\lambda$-calculus, Plotkin’s denotational
semantics of PCF, and a semantics of a sublanguage of Scheme. In previous work,
similar mechanisations in Agda have revealed several unsuspected wellformedness
issues in published denotational definitions.

## Contributing

Please report any [issues] that you notice.

Comments and suggestions for improvement are welcome, and can be added as [Discussions].

## Contact

Peter Mosses

[p.d.mosses@tudelft.nl](mailto:p.d.mosses@tudelft.nl)

[pdmosses.github.io](https://pdmosses.github.io)

[Issues]: https://github.com/pdmosses/mfps2026-agda/issues
[Pull requests]: https://github.com/pdmosses/mfps2026-agda/pulls
[Discussions]: https://github.com/pdmosses/mfps2026-agda/discussions

[About]: https://pdmosses.github.io/mfps2026-agda/
[README]: https://github.com/pdmosses/mfps2026-agda/blob/main/docs/README.md
[Background]: https://pdmosses.github.io/mfps2026-agda/Background/
[Meta-notation]: https://pdmosses.github.io/mfps2026-agda/meta-notation/
[Notation]: https://pdmosses.github.io/mfps2026-agda/Notation/
[Examples]: https://pdmosses.github.io/mfps2026-agda/Examples/
[Examples.LC]: https://pdmosses.github.io/mfps2026-agda/Examples/LC/
[Examples.PCF]: https://pdmosses.github.io/mfps2026-agda/Examples/PCF/
[Examples.Scm]: https://pdmosses.github.io/mfps2026-agda/Examples/Scm/
[Properties]: https://pdmosses.github.io/mfps2026-agda/Properties/
[Tests]: https://pdmosses.github.io/mfps2026-agda/Tests/
[Tests.LC]: https://pdmosses.github.io/mfps2026-agda/Tests/LC/
[Tests.PCF]: https://pdmosses.github.io/mfps2026-agda/Tests/PCF/
[Library]: https://pdmosses.github.io/mfps2026-agda/Library/
[Standard Agda library]: https://agda.github.io/agda-stdlib/v2.3/
[pdmosses/mfps2026-agda]: https://github.com/pdmosses/mfps2026-agda/
[agda]: https://github.com/pdmosses/mfps2026-agda/tree/main/agda
[complete]: https://github.com/pdmosses/mfps2026-agda/tree/main/complete
[plain]: https://github.com/pdmosses/mfps2026-agda/tree/main/plain
[docs]: https://github.com/pdmosses/mfps2026-agda/tree/main/docs
[latex]: https://github.com/pdmosses/mfps2026-agda/tree/main/latex