ABSTRACT
The aim of this work is to widen ML-type polymorphism to a more comprehensive form. Polymorphic type systems as proposed by Milner and implemented in the programming language Standard ML offer rich types, unobtrusive compile time type checking, and type safety in functional languages. However, straightforward application of such a type system to languages can inhibit seriously the characteristic polymorphic nature of an argument occurring twice or more in a function definition. We describe the problems and present a formal type discipline for polymorphic expressions in the context of a simple programming language, and a compile time type-checking algorithm R which enforces the discipline. The algorithm, which is sound and (we believe) complete, introduces a new operator 2229 for handling conjunction types. We also suggest an idea about a unification algorithm for handling type expressions with or without 2229-operators [gho87b].
- bar85.Barendregt, It. "A Filter Lambda Model And The Completeness Of Type Assignment," The Journal of Symbolic Logic 48(4), December (1985).Google Scholar
- car83.Cardelli, L. "ML Under Unix," Polymorphism- The ML/LCF/Hope Newsletter 1(3), Department of Computer Science, University of Edinburgh, December (1983).Google Scholar
- car85.Cardelli, L. "Basic Polymorphic Type Checking," Polymorphism ~ The ML/LCF/Hope Newsletter iI(1), Department of Computer Science, University of Edinburgh, January (1985).Google Scholar
- cop80.Coppo, M. "An Extended Polymorphic Type System :For Applicative Languages," Lecture Notes in Computer Science 88, Rydzyna, Poland, September (1980). Google ScholarDigital Library
- cop83.Coppo, M. "On the Semantics of Polymorphism," Acta {nformatica 20 (1983).Google Scholar
- dam85.Damns, L. M. M. "Type Assignment in Programming Languages," Ph.D. Thesis, Department of Computer Science, CST-33-85, University of Edinburgh, April (1985).Google Scholar
- gho86.Ghosh-Roy, R., et al. "Conjunction Types," summary only, Department of Computational Science, University of St Andrews, December (1986).Google Scholar
- gho87a.Ghosh-Roy, R. "Conjunctional Polymorphlsm," Proceedings of the Tenth Australian Computer Science Conference, Geelong, Australia, February (1987).Google Scholar
- gho87b.Ghosh-Roy, R. "The Unification Algorithm for Conjunction Polymorphism." Personal communications with Professor Rocca (1987).Google Scholar
- gor79.Gordon, M. J. C., et al. "Edinburgh LCF," Lecture Notes in Computer Science 78, Springer- Verlag, Berlin (1979).Google Scholar
- jen87.Jeasen, F. "Type Assignment ia A Polymorphic Type Discipline," Technical Report, Institute of Electronic Systems, Department of Mathematics and Computer Science, Aalborg University Centre, Denmark (1987).Google Scholar
- lei83.Leivant, D. "Polymorphic Type Inference," Proceedlngs of the Tenth Annual Symposium on Principles of Programming Languages, Austin, Texas, January (1983). Google ScholarDigital Library
- mil77.Milner, R. "A Theory of Type Polymorphism in Programming," University of Edinburgh, Department of Computer Science, Internal Report CSR-Google Scholar
- rob65.Robinson, J.A. "A Machine Oriented Logic Based on The Resolution Principle," Journal o{ The Association/'or Computing Machinery 12 (1965). Google ScholarDigital Library
- tur79.Turner, D. A. "A New Implementation Technique for Applicative Languages," Software--Practice and Experience 9, January (1979).Google Scholar
Index Terms
- Conjunctional type assignment in programming languages
Recommendations
A simple and powerful type system for programming languages
Special issue: Applications of statistics in software engineeringA type system serves to guarantee that programs mix data of distinct types only as allowed by programmer declared rules. For example, a function declaration corresponds to one of these rules, providing a way to mix data of distinct types, possibly ...
Comments