On determining the causes of nonunifiability
Journal of Logic Programming
Basic polymorphic typechecking
Science of Computer Programming
Journal of Symbolic Computation
Extending attribute grammar and type inference algorithms
Extending attribute grammar and type inference algorithms
Type inference with polymorphic recursion
ACM Transactions on Programming Languages and Systems (TOPLAS)
Explaining type errors in polymorphic languages
ACM Letters on Programming Languages and Systems (LOPLAS)
Science of Computer Programming
Proofs about a folklore let-polymorphic type inference algorithm
ACM Transactions on Programming Languages and Systems (TOPLAS)
Compositional explanation of types and algorithmic debugging of type errors
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
Finding the source of type errors
POPL '86 Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
A maximum-flow approach to anomaly isolation in unification-based incremental type inference
POPL '86 Proceedings of the 13th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
The Definition of Standard ML
Principal type-schemes for functional programs
POPL '82 Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The Essence of Principal Typings
ICALP '02 Proceedings of the 29th International Colloquium on Automata, Languages and Programming
Generalising Techniques for Type Debugging
SFP '99 Selected papers from the 1st Scottish Functional Programming Workshop (SFP99)
On the Unification of Substitutions in Type Interfaces
IFL '98 Selected Papers from the 10th International Workshop on 10th International Workshop
Unification source-tracking with application to diagnosis of type inference
Unification source-tracking with application to diagnosis of type inference
Scripting the type inference process
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Discriminative sum types locate the source of type errors
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
A visualisation of polymorphic type checking
Journal of Functional Programming
Information and Computation
Information and Computation
Hi-index | 0.00 |
The W algorithm of Milner [Mil78] and its numerous variants [McA98,LY98,YTMW00] implement type reconstruction by building type substitutions. We define an algorithm WE centered around building type equations rather than substitutions. The design of WE is motivated by the belief that reasoning with substitutions is awkward. More seriously, substitutions fail to preserve the exact syntactic form of the type equations they solve. This makes analysing the source of type errors more difficult. By replacing substitution composition with unions of sets of type equations and eliminating the application of substitution to environments, we obtain an algorithm for type reconstruction that is simple and also useful for type error reconstruction. We employ a sequentiality principle for unifier composition and a constructive account of mgu-induced variable occurrence relation to design WE and prove its correctness. We introduce syntax equations as a formal syntax for progam slices. We use a simple constraint generation relation to relate syntax equations with type equations to trace program slices responsible for a type error.