Skip to main content

Basic properties of data types with inequational refinements

Extended abstract

  • Conference paper
  • First Online:
  • 158 Accesses

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

Abstract

In this work we propose a typed functional wide-spectrum (i.e. both programming and specification) language Final, an extension of Cardelli-Wegner's Fun enriched with the fixed-point construction on expressions and inequational refinements (assertions) for types. The inequational assertion has the form ∀ x 1σ 1⋯∀ x nσ n. e 1e 2τ and its intuitive meaning is that if the expression e 1 terminates, then it gives a value that e 2 does but the computation of e 1 may diverge. Hence it may be seen, in some sense, a weaker form of equations in algebraic specification of abstract data types. The type system has a subtype relation as Fun does, and the subtype relation reflects the strength of assertions. We demonstrate that inequationally refined record types nicely model (the representation type of) abstract data types à la algebraic specification by giving some examples. Then we show that the type system is a conservative extension of the original one, and give a domain-theoretic semantics to its sublanguage without existential types. This semantics assures that we can freely use general recursive functions over inequationally refined types, that is, for any function fττ, its least fixed-point belongs to τ even if τ is a refined type. This shows that our language, Final, is an appropriate base language in designing modular wide-spectrum languages with both general recursions and equationally specified data types which allow us to manipulate implementation modules of abstract data types with general recursion as we do for ordinal data like integers.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M. and L. Cardelli: A Semantics of Object Types, 9th IEEE Conf. of Logic in Computer Science, 332–341 (1994).

    Google Scholar 

  2. Barendregt, H. P.: The Lambda Calculus: Its Syntax and Semantics, North-Holland, Amsterdam (1981).

    Google Scholar 

  3. Cardelli, L.: A Semantics of Multiple Inheritances, in [KMP 84], 51–67; a revised version appeared in Inform. Comput. 76, 138–164 (1988).

    Google Scholar 

  4. Cardelli, L. and P. Wegner: On Understanding Types, Data Abstraction, and Polymorphism, ACM Comput. Surv. 17 (1985).

    Google Scholar 

  5. Cardone, F.: Recursive Types for Fun, Theoret. Comput. Sci. 83, 29–56 (1991).

    Article  Google Scholar 

  6. Ehrig, H. and B. Mahr: Fundamentals of Algebraic Specification 1, Springer-Verlag, Berlin (1985).

    Google Scholar 

  7. Kahn, G., D. B. MacQueen, and G. Plotkin (eds.): Semantics of Data Types, Proceedings of International Symposium, Sophia-Antipolis, June 1984, Lecture Notes in Computer Science 173, Springer-Verlag, Berlin (1984).

    Google Scholar 

  8. Lehmann, D. J. and M. B. Smyth: Algebraic Specification of Data Types: A Synthetic Approach, Math. Syst. Theory 14, 97–139 (1981).

    Article  Google Scholar 

  9. Martini, S.: Bounded Quantification Have Interval Models, 1988 ACM Conf. on LISP and Functional Programming, 164–173 (1988).

    Google Scholar 

  10. Martin-Löf, P.: Intuitionistic Type Theory, Bibliopolis, Napoli (1984).

    Google Scholar 

  11. Mitchell, J. G. and G. D. Plotkin: Abstract Types Have Existential Type, 12th ACM Symp. on Principles of Programming Languages, 37–51; a revised version appeared in ACM Trans. Prog. Lang. Syst. 10, 470–502 (1988).

    Google Scholar 

  12. Milner, R. et al.: The Definition of Standard ML, MIT Press, Cambridge MA (1990).

    Google Scholar 

  13. Nordström, B. et al.: Programming in Martin-Löf's Type Theory, Clarendon Press, Oxford (1990).

    Google Scholar 

  14. Pierce, B. C.: Basic Category Theory for Computer Scientists, MIT Press, Cambridge MA (1991).

    Google Scholar 

  15. Plotkin, G. D.: LCF Considered as a Programming Language, Theoret. Comput. Sci. 5, 223–255 (1977).

    Article  Google Scholar 

  16. Plotkin, G.D.: Domains, Advanced Postgraduate Course Notes, Department of Computer Science, University of Edinburgh (1983).

    Google Scholar 

  17. Plotkin, G.D., M. Abadi and L. Cardelli: Subtyping and Parametricity, 9th IEEE Conf. of Logic in Computer Science, 310–319 (1994).

    Google Scholar 

  18. Reynolds, J. C.: Types, Abstraction and Parametric Polymorphism, Information Processing 83 (R. E. A. Mason ed.), 513–523, North-Holland, Amsterdam (1983).

    Google Scholar 

  19. Reynolds, J. C.: Three Approaches to Type Structures, TAPSOFTCAAP '85 (H. Ehrig et al. eds.), Lecture Notes in Computer Science 185, 97–138, Springer-Verlag, Berlin (1985).

    Google Scholar 

  20. Sannella D. and A. Tarlecki: Toward Formal Development of ML Programs: Foundations and Methodology—Preliminary Version, Technical Report ECS-LFCS-89-71, Laboratory for Foundations of Computer Science, Department of Computer Science, University of Edinburgh (1989).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Mariangiola Dezani-Ciancaglini Gordon Plotkin

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kondoh, H. (1995). Basic properties of data types with inequational refinements. In: Dezani-Ciancaglini, M., Plotkin, G. (eds) Typed Lambda Calculi and Applications. TLCA 1995. Lecture Notes in Computer Science, vol 902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0014059

Download citation

  • DOI: https://doi.org/10.1007/BFb0014059

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-59048-4

  • Online ISBN: 978-3-540-49178-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics