Results 1 -
9 of
9
A Calculus for Overload Functions with Subtyping
-
, 1992
"... We present a simple extension of typed -calculus where functions can be overloaded by putting different "branches of code" together. When the function is applied, the branch to execute is chosen according to a particular selection rule which depends on the type of the argument. The crucial featu ..."
Abstract
-
Cited by 131 (28 self)
- Add to MetaCart
We present a simple extension of typed -calculus where functions can be overloaded by putting different "branches of code" together. When the function is applied, the branch to execute is chosen according to a particular selection rule which depends on the type of the argument. The crucial feature of the present approach is that the branch selection depends on the "run-time type" of the argument, which may differ from its compile-time type, because of the existence of a subtyping relation among types. Hence overloading cannot be eliminated by a static analysis of code, but is an essential feature to be dealt with during computation. We obtain in this way a type-dependent calculus, which differs from the various -calculi where types do not play any role during computation. We prove Confluence and a generalized Subject-Reduction theorem for this calculus. We prove Strong Normalization for a "stratified" subcalculus. The definition of this calculus is guided by the understand...
Divergence of F≤ Type Checking
"... System F≤ is an extension of second-order typed lambda calculus, where a subtype hierarchy among types is defined, and bounded second-order lambda abstraction is allowed. This language is a basis for much of the current research on integration of typed functional languages with subtypes and inherita ..."
Abstract
-
Cited by 14 (4 self)
- Add to MetaCart
System F≤ is an extension of second-order typed lambda calculus, where a subtype hierarchy among types is defined, and bounded second-order lambda abstraction is allowed. This language is a basis for much of the current research on integration of typed functional languages with subtypes and inheritance. An algorithm to perform type checking for F≤ expressions has been known since the language Fun was defined. The algorithm has been proved complete, by the author and P.-L. Curien, which means that it is a semi-decision procedure for the type-checking problem. In this paper we show that this algorithm is not a decision procedure, by exhibiting a term which makes it diverge. This result was the basis of Pierce's proof of undecidability of typing for F≤. We study the behavior of the algorithm to show that our diverging judgement is in some sense contained in any judgement which makes the algorithm diverge. On the basis of this result, and of other results in the paper, we claim that the c...
A Type System for Computer Algebra
- Journal of Symbolic Computation
, 1994
"... ing RationalFun from Rational yields a higher order type operator that, given a specification, forms the type of objects that satisfy it. Philip Santas DeclareDomain := (Fun: Type-?Category) +? (((Rep: Type) +? with(Rep,Fun(Rep))) SomeRep) The type of Rational objects can now be expressed by applyi ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
ing RationalFun from Rational yields a higher order type operator that, given a specification, forms the type of objects that satisfy it. Philip Santas DeclareDomain := (Fun: Type-?Category) +? (((Rep: Type) +? with(Rep,Fun(Rep))) SomeRep) The type of Rational objects can now be expressed by applying the DeclareDomain constructor to the specification RationalFun: Rational := DeclareDomain(RationalFun) or the shortcut: Rational : RationalFun In order to give proper treatment to the interaction between representations and subtyping, it is necessary to separate Rational into the specifications of its functions and the operators which capture the common structure of all object types. This separation is also important for the semantical construction of categories and the definition of the internal structures of the types. 2.1. Multiple Representations Rationals are created using the function box, which captures the semantics of dynamic objects in object oriented programming.A rational...
Subtyping Recursive Types in Kernel Fun
- In IEEE Symposium on Logic in Computer Science (LICS
, 1999
"... The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17]. ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
The problem of defining and checking a subtype relation between recursive types was studied in [3] for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only negative results are known [17].
Combining Inheritance and Parametric Polymorphism in a Functional Database Language
- in Proc. 13th British National Conference on Databases (BNCOD-13
, 1995
"... . We consider extending a functional database language to support subtyping, inheritance and method overloading. We do so by extending previous work on type inference with subtypes for the pure calculus to cater for structured types, ML-style parametric polymorphism and overloaded function definiti ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
. We consider extending a functional database language to support subtyping, inheritance and method overloading. We do so by extending previous work on type inference with subtypes for the pure calculus to cater for structured types, ML-style parametric polymorphism and overloaded function definitions. We attach semantics to overloaded functions by developing a generalisation of best-fit pattern-matching. Although developed for a specific language, our approach is applicable to other functional database languages, for example languages with a functional data model. 1 Introduction Two major trends in recent database research have been deductive databases and object-oriented databases. Deductive databases extend the relational data model with rules that enable the derivation of intentional relations from the stored, extensional, relations. Object-oriented databases typically start off with a semantic data model [HK87] supporting object identity and complex objects, and extend it with f...
Adding Axioms to Cardelli-Wegner Subtyping
, 1994
"... Cardelli and Wegner developed a simple theory of object subtyping which was later to form the basis for a second-order theory of bounded quantification [Card84, CW85, Ghel90] and the higher-order theory of F-bounded quantification explored by Cook and others [CCHO89a, CHC90]. In all of these present ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Cardelli and Wegner developed a simple theory of object subtyping which was later to form the basis for a second-order theory of bounded quantification [Card84, CW85, Ghel90] and the higher-order theory of F-bounded quantification explored by Cook and others [CCHO89a, CHC90]. In all of these presentations, the abstract type of objects is only expressed syntactically, in terms of an external interface of function signatures. Here, we re-introduce semantic descriptions for objects, in terms of sets of axioms constraining the operation of some invocations of their functions. We use the well-understood technique of definition by comprehension to motivate subtyping rules for object axioms and prove how these rules interact properly with Cardelli-Wegner style subtyping rules. For languages like Eiffel [Meye88, Meye92] and Sather [Omoh94] in which programmers can write object axioms, rules governing the addition of preconditions, postconditions and data type invariants can now be motivated fr...
A Semantics for Stratified λ&-early
, 1994
"... The role of λ-calculus as core functional language is due to its nature as "pure" theory of functions. In the present approach we use the functional expressiveness of typed λ-calculus and extend it with our understanding of some relevant features of a broadly used programming style: Object-Oriented ..."
Abstract
- Add to MetaCart
The role of λ-calculus as core functional language is due to its nature as "pure" theory of functions. In the present approach we use the functional expressiveness of typed λ-calculus and extend it with our understanding of some relevant features of a broadly used programming style: Object-Oriented Programming (OOP). The core notion we focus on, yields a form of "dependency on input types" (or "on the types of the inputs") and formalizes "overloading" as implicitly used in OOP. The basis of this work has been laid in [CGL92], where the main syntactic properties of this extension have been shown. In this paper, we investigate an elementary approach to its mathematical meaning. The approach is elementary, as we tried to follow the most immediate semantic intuition which underlies our system; yet it gives a rigorous mathematical model. Indeed, our semantics provides an understanding of a slightly modified version of the normalizing system in [CGL92]: we had, so far, to restrict our att...
A Semantics for a Stratified λ&-Early: A Calculus with Overloading and Early Binding
, 1993
"... The role of λ-calculus as core functional language is due to its nature as "pure" theory of functions. In the present approach we use the functional expressiveness of typed λ-calculus and extend it with our understanding of some relevant features of a broadly used programming style: Object-Oriented ..."
Abstract
- Add to MetaCart
The role of λ-calculus as core functional language is due to its nature as "pure" theory of functions. In the present approach we use the functional expressiveness of typed λ-calculus and extend it with our understanding of some relevant features of a broadly used programming style: Object-Oriented Programming (OOP). The core notion we focus on, yields a form of "dependency on input types" (or "on the types of the inputs") and formalizes "overloading" as implicitly used in OOP. The basis of this work has been laid in [CGL92], where the main syntactic properties of this extension have been shown. In this paper, we investigate an elementary approach to its mathematical meaning. The approach is elementary, as we tried to follow the most immediate semantic intuition which underlies our system; yet it gives a rigorous mathematical model. Indeed, our semantics provides an understanding of a slightly modified version of the normalizing system in [CGL92]: we had, so far, to restrict our att...
Subtyping, Recursion and Parametric Polymorphism in Kernel Fun
, 2003
"... We study subtype checking for recursive types in system kernel Fun, a typed λ-calculus with subtyping and bounded second-order polymorphism. Along the lines of [AC93], we define a subtype relation over kernel Fun recursive types, and prove it to be transitive. We then show that the natural extension ..."
Abstract
- Add to MetaCart
We study subtype checking for recursive types in system kernel Fun, a typed λ-calculus with subtyping and bounded second-order polymorphism. Along the lines of [AC93], we define a subtype relation over kernel Fun recursive types, and prove it to be transitive. We then show that the natural extension of the algorithm introduced in [AC93] to compare first-order recursive types yields a non complete algorithm. Finally, we prove the completeness and correctness of a different algorithm, which lends itself to efficient implementations.

