|
ABSTRACT
We investigate the interactions of subtyping and recursive types, in a simply typed &lgr;-calculus. The two fundamental questions here are whether two (recursive)types are in the subtype relation and whether a term has a type. To address the first question, we relate various definitions of type equivalence and subtyping that are induced by a model, an ordering on infinite trees, an algorithm, and a set of type rules. We show soundness and completeness among the rules, the algorithm, and the tree semantics. We also prove soundness and a restricted form of completeness for the model. To address the second question, we show that to every pair of types in the subtype relation we can associate a term whose denotation is the uniquely determined coercion map between the two types. Moreover, we derive an algorithm that, when given a term with implicit coercions, can infer its least type whenever possible.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
AMADiO, R. Formal theones of inheritance for typed funct~onal languages. Tech. Rep. TR 28/89, Dip. dl Informatica, Univ. dl Fisa, Pisa, Italy, 1989.
|
| |
2
|
|
| |
3
|
|
| |
4
|
ARNOLD, A., AND NIVAT, M. The metric space of infinite trees. Algebraic and topological properties. Fundamenta Inf. III. (1980), 445 476.
|
| |
5
|
|
| |
6
|
REAZU-TANNEN, V., GUNTER, C., AND SCEDROV, A. Denotational semantics for subtyping between recursive types. Rep. MS-CIS 89 63, Logic of Computation 12, Dept. of Computer and Information Science, Univ. of Pennsylvania, Philadelphia, 1989.
|
| |
7
|
|
 |
8
|
Peter Canning , William Cook , Walter Hill , Walter Olthoff , John C. Mitchell, F-bounded polymorphism for object-oriented programming, Proceedings of the fourth international conference on Functional programming languages and computer architecture, p.273-280, September 11-13, 1989, Imperial College, London, United Kingdom
[doi> 10.1145/99370.99392]
|
| |
9
|
|
| |
10
|
|
| |
11
|
CARDELLI, L. Typeful programming. In Formal Descrtption of Programming Concepts, E. J. Neuhold and M. Paul, Eds. Springer-Verlag, New York, 1991, 431 507.
|
| |
12
|
CARDELLI, L., AND LONaO, G. A semantic basis for Quest. J. Functional Program. 1, 4 (Oct. 1991), 417-458.
|
 |
13
|
|
| |
14
|
|
| |
15
|
|
| |
16
|
COURCELLE, B. Fundamental properties of infinite trees. Theor. Comput. Sci. 25, (1983), 95-169.
|
| |
17
|
COURCELLE, B. Equivalence and transformation of regular systems--Applications to recursive program schemes and gTammars. Theor. Comput. Sci. 42, (1986), I 122.
|
| |
18
|
CURIEN, P.-L., AND GHELLI, G. Coherence of subsumption, minimum typing and type checking in F<. Math. Struc. Comput. Sci. 2, (1992), 55 91.
|
| |
19
|
H~ANo, M. A small complete category. Ann. Pure Appl. Logic 40, 2, (1989), 135 165.
|
| |
20
|
|
| |
21
|
MmNER, R. A complete inference system for a class of regular behaviors. J. Comput. Syst. Sci. 28 (1984), 439-466.
|
| |
22
|
|
| |
23
|
|
 |
24
|
|
 |
25
|
|
| |
26
|
SCOTT, D. Continuous lattices. In Toposes, Algebraic Geometry and Logic. Lecture Notes in Mathematics 274. Springer-Verlag, New York, 1972, 97 136.
|
| |
27
|
SCOTT, D. Data types as lattices. SIAM J. Comput. 5, (1976), 522-587.
|
| |
28
|
|
| |
29
|
W,OSWORTH, C. The relation between computational and denotational properties for Scott's D~ models ofthe lambda-calculus. SIAM J. Comput. 5, (1976), 488-521.
|
CITED BY 74
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dario Colazzo , Carlo Sartiani , Antonio Albano , Paolo Manghi , Giorgio Ghelli , Luca Lini , Michele Paoli, A typed text retrieval query language for XML documents, Journal of the American Society for Information Science and Technology, v.53 n.6, p.467-488, May, 2002
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Alain Frisch , Giuseppe Castagna , Véronique Benzaken, Semantic subtyping: Dealing set-theoretically with function, union, intersection, and negation types, Journal of the ACM (JACM), v.55 n.4, p.1-64, September 2008
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
INDEX TERMS
Primary Classification:
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.3
Studies of Program Constructs
Subjects:
Program and recursion schemes
Additional Classification:
D.
Software
D.3
PROGRAMMING LANGUAGES
D.3.1
Formal Definitions and Theory
Subjects:
Semantics
D.3.3
Language Constructs and Features
Subjects:
Recursion;
Abstract data types
F.
Theory of Computation
F.3
LOGICS AND MEANINGS OF PROGRAMS
F.3.2
Semantics of Programming Languages
F.4
MATHEMATICAL LOGIC AND FORMAL LANGUAGES
F.4.1
Mathematical Logic
Subjects:
Lambda calculus and related systems
F.4.3
Formal Languages
Subjects:
Classes defined by grammars or automata (e.g., context-free languages, regular sets, recursive sets)
General Terms:
Algorithms,
Languages,
Theory
Keywords:
coercions,
lambda-calculus,
partial-equivalence relations,
recursive types,
regular trees,
subtyping,
tree orderings,
type equivalence,
typechecking algorithm
|