Which simple types have a unique inhabitant?

Gabriel Scherer, Didier Rémy

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

We study the question of whether a given type has a unique inhabitant modulo program equivalence. In the setting of simplytyped lambda-calculus with sums, equipped with the strong βη-equivalence, we show that uniqueness is decidable. We present a saturating focused logic that introduces irreducible cuts on positive types "as soon as possible". Backward search in this logic gives an effective algorithm that returns either zero, one or two distinct inhabitants for any given type. Preliminary application studies show that such a feature can be useful in strongly-typed programs, inferring the code of highly-polymorphic library functions, or "glue code" inside more complex terms.

Original languageEnglish
Title of host publicationICFP 2015 - Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming
EditorsKathleen Fisher, John Reppy
PublisherAssociation for Computing Machinery
Pages243-255
Number of pages13
ISBN (Electronic)9781450336697
DOIs
Publication statusPublished - 29 Aug 2015
Externally publishedYes
Event20th ACM SIGPLAN International Conference on Functional Programming, ICFP 2015 - Vancouver, Canada
Duration: 31 Aug 20152 Sept 2015

Publication series

NameProceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP
Volume2015-August

Conference

Conference20th ACM SIGPLAN International Conference on Functional Programming, ICFP 2015
Country/TerritoryCanada
CityVancouver
Period31/08/152/09/15

Keywords

  • Calculus
  • Canonicity
  • Code inference
  • Focusing
  • Proof search
  • Saturation
  • Simply
  • Sums
  • Typed lambda
  • Unique inhabitants

Fingerprint

Dive into the research topics of 'Which simple types have a unique inhabitant?'. Together they form a unique fingerprint.

Cite this