Back to search

McMaster University

Dependent Types as a Medium for Domain Modelling: Case Studies and Lessons from Agda

Abstract

dc:description.abstract

Dependent types are commonly presented as a foundation for program verification, enabling precise specifications and machine-checked proofs of correctness. In practice, however, much of the intellectual effort in formal methods is spent not on proving properties of programs, but on modelling: deciding how a domain should be structured, which distinctions should be represented, and which constraints should be enforced explicitly. This thesis investigates dependent types as a modelling medium, rather than primarily as a verification technology. The central claim is that dependent typing can reshape domain models by forcing structural assumptions, invariants, and semantic commitments to be made explicit, and that the benefits and costs of this explicitness only become visible through extended modelling practice. The study is conducted through a series of case studies developed in Agda, spanning multiple domains: a railway system modelled at both problem-space and solution-space levels, a structure-aware version control system, file and order management systems, and a typed calculator serving as a low-payoff baseline. Across these models, recurring patterns are identified, including semantic refinement, projection between modelling levels, and the relocation of invariants from predicates into type structure. Cross-case analysis suggests that dependent types can significantly improve clarity and local reasoning by making ill-formed states unrepresentable, but at the cost of increased proof burden, reduced modelling flexibility, and higher refactoring effort. The thesis concludes by distilling practical design guidance for future modellers, outlining when dependent types are likely to aid domain understanding, and when their use is unwarranted or counterproductive.

Degree

thesis:*
Department dc:contributor.department
Computing and Software
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • An, Nan
Advisor dc:contributor.advisor
  • Carette, Jacques

Subjects

dc:subject × 6

Rights

dc:rights
Statement dc:rights
  • Attribution 4.0 International
Language dc:language.iso
en_US

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
McMaster University
Base URL
macsphere.mcmaster.ca/server/oai/request
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

An, Nan. Dependent Types as a Medium for Domain Modelling: Case Studies and Lessons from Agda. 2026. https://hdl.handle.net/11375/33480