Skip to main content

Specifying type systems

  • Types
  • Conference paper
  • First Online:
Algebraic and Logic Programming (ALP 1996)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1139))

Included in the following conference series:

  • 144 Accesses

Abstract

This paper presents a flexible type system developed for an axiomatic specification language. The type system can be dynamically adapted to different application areas. In particular, it allows the modelling of different kinds of polymorphism, like type classes or subtyping. The type system is based on the concept of qualified types. It allows one to abstract from concrete types by using type variables and to qualify these type variables by type predicates. The properties of the type predicates are described by a specification language based on Horn clauses. The notion of well-typedness is defined via a type inference calculus. We investigate the implementation of the type inference calculus and present an inference algorithm which splits into two phases. The first phase checks the well-formedness of the given term and computes the necessary type predicate restrictions, The second phase uses resolution to prove the computed restrictions to be correct with respect to the type predicate specification. We show that the inference algorithm is correct and complete with respect to the type inference calculus.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Gambihler. Syntaktische Analyse polymorpher Spezifikationen. Master's thesis, Technische Universität München, 1994.

    Google Scholar 

  2. J.A. Goguen and J. Meseguer, Order-Sorted Algebra Solves the Constructor-Selector, Multiple Representation and Coercion Problems. In Logic in Computer Science, IEEE, 1987.

    Google Scholar 

  3. R. Hindley. The Principle Type-Scheme of an Object in Combinatory Logic. Trans. Am. Math. Soc., 146:29–60, December 1969.

    Google Scholar 

  4. P. Hudak, S. Peyton Jones, and P. Wadler, editors. Report on the Programming Language Haskell, A Non-strict Purely Functional Language (Version 1.2). ACM SIGPLAN Notices, May 1992.

    Google Scholar 

  5. M. P. Jones. Qualified Types: Theory and Practice. Technical Monograph PRG-106, Oxford University Computing Laboratory, Programming Research Group, July 1992.

    Google Scholar 

  6. M. P. Jones. An Introduction to Gofer, August 1993.

    Google Scholar 

  7. John W. Lloyd. Foundations of Logic Programming. Springer-Verlag, 1987.

    Google Scholar 

  8. R. Milner. A Theory of Type Polymorphism in Programming. Journal of Computer and System Sciences, 17:348–375, 1978.

    Google Scholar 

  9. P.D. Mosses. The Use of Sorts in Algebraic Specifications. In Proceedings of the 8th Workshop on Abstract Data Types, Dourdan, December 1991.

    Google Scholar 

  10. D. Nazareth. Modelling Inheritance in an Algebraic Specification Language. In Jianping Wu et al., editor, Proceedings of the Third International Conference for Young Computer Scientists, Beijing, pages 9.05–9.08. Tsinghua University Press, July 1993.

    Google Scholar 

  11. D. Nazareth. A Polymorphic Sort System for Axiomatic Specification Languages. PhD thesis, Technische Universität München, 1995. Technical Report TUM-I9515.

    Google Scholar 

  12. J.A. Robinson. A machine-oriented logic based on the resolution principle. Journal of the ACM, 12:23–41, 1965.

    Google Scholar 

  13. S. Thatte. Coercive type isomorphism. In J. Hughes, editor, 5th ACM Conference on Functional Programming Languages and Computer Architektur, volume 523 of Lecture Notes in Computer Science, pages 29–48. Cambridge, MA, Springer-Verlag, 1991.

    Google Scholar 

  14. P. Wadler and S. Blott. How to Make Ad-hoc Polymorphism Less Ad hoc. In 16th ACM Symposium on Principles of Programming Languages, pages 60–76, 1989.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Michael Hanus Mario Rodríguez-Artalejo

Rights and permissions

Reprints and permissions

Copyright information

© 1996 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nazareth, D. (1996). Specifying type systems. In: Hanus, M., Rodríguez-Artalejo, M. (eds) Algebraic and Logic Programming. ALP 1996. Lecture Notes in Computer Science, vol 1139. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61735-3_21

Download citation

  • DOI: https://doi.org/10.1007/3-540-61735-3_21

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-61735-8

  • Online ISBN: 978-3-540-70672-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics