2015 · 21 citations · 21 references
ComputingComputer ScienceAlgorithmsProgramming LanguagesTheory Of ComputationEquivalence CheckingFunctional ProgrammingRecursion TheoryType CheckingType SystemsPolymorphic CodePolymorphic Type SystemsPolymorphic TypesPolymorphism StudiesProgram EquivalenceStrong TypingType InferenceTyped Lambda Calculus
We study the question of whether a given type has a unique inhabitant modulo program equivalence. In the setting of simply-typed 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.
21
How to make ad-hoc polymorphism less ad hoc
Philip Wadler, Stephen Blott · 1989 · 770 citations · Full text
Contraction-free sequent calculi for intuitionistic logic
Roy Dyckhoff · Journal of Symbolic Logic · 1992 · 281 citations
Type-and-example-directed program synthesis
Peter-Michael Osera, Steve Zdancewic · 2015 · 185 citations · Full text
Complete completion using types and weights
Tihomir Gvero, Viktor Kunčak, Ivan Kuraj et al. · 2013 · 136 citations · Full text