Example-Based Reasoning about the Realizability of Polymorphic Programs

Publication date

2024-08-15

Authors

Mulleners, NiekORCID 0000-0002-7934-6834ISNI 0000000524246328
Jeuring, J.T.ISNI 0000000110063265
Heeren, B.J.ISNI 0000000396075391

Editors

Advisors

Supervisors

Document Type

Article
Open Access logo

License

cc_by

Abstract

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 unrealizable. 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 polymorphic 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.

Keywords

parametricity, container functors, unrealizability, program synthesis, example propagation, Software, Safety, Risk, Reliability and Quality

Citation

Mulleners, N, Jeuring, J & Heeren, B 2024, 'Example-Based Reasoning about the Realizability of Polymorphic Programs', Proceedings of the ACM on Programming Languages, vol. 8, no. ICFP, 247, pp. 317-337. https://doi.org/10.1145/3674636