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 1≤e 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.
References
Abadi, M. and L. Cardelli: A Semantics of Object Types, 9th IEEE Conf. of Logic in Computer Science, 332–341 (1994).
Barendregt, H. P.: The Lambda Calculus: Its Syntax and Semantics, North-Holland, Amsterdam (1981).
Cardelli, L.: A Semantics of Multiple Inheritances, in [KMP 84], 51–67; a revised version appeared in Inform. Comput. 76, 138–164 (1988).
Cardelli, L. and P. Wegner: On Understanding Types, Data Abstraction, and Polymorphism, ACM Comput. Surv. 17 (1985).
Cardone, F.: Recursive Types for Fun, Theoret. Comput. Sci. 83, 29–56 (1991).
Ehrig, H. and B. Mahr: Fundamentals of Algebraic Specification 1, Springer-Verlag, Berlin (1985).
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).
Lehmann, D. J. and M. B. Smyth: Algebraic Specification of Data Types: A Synthetic Approach, Math. Syst. Theory 14, 97–139 (1981).
Martini, S.: Bounded Quantification Have Interval Models, 1988 ACM Conf. on LISP and Functional Programming, 164–173 (1988).
Martin-Löf, P.: Intuitionistic Type Theory, Bibliopolis, Napoli (1984).
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).
Milner, R. et al.: The Definition of Standard ML, MIT Press, Cambridge MA (1990).
Nordström, B. et al.: Programming in Martin-Löf's Type Theory, Clarendon Press, Oxford (1990).
Pierce, B. C.: Basic Category Theory for Computer Scientists, MIT Press, Cambridge MA (1991).
Plotkin, G. D.: LCF Considered as a Programming Language, Theoret. Comput. Sci. 5, 223–255 (1977).
Plotkin, G.D.: Domains, Advanced Postgraduate Course Notes, Department of Computer Science, University of Edinburgh (1983).
Plotkin, G.D., M. Abadi and L. Cardelli: Subtyping and Parametricity, 9th IEEE Conf. of Logic in Computer Science, 310–319 (1994).
Reynolds, J. C.: Types, Abstraction and Parametric Polymorphism, Information Processing 83 (R. E. A. Mason ed.), 513–523, North-Holland, Amsterdam (1983).
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).
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).
Author information
Authors and Affiliations
Editor information
Rights 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