Results 1 - 10
of
17
Operations on records
- Mathematical Structures in Computer Science
, 1991
"... We define a simple collection of operations for creating and manipulating record structures, where records are intended as finite associations of values to labels. A second-order type system over these operations supports both subtyping and polymorphism. We provide typechecking algorithms and limite ..."
Abstract
-
Cited by 136 (12 self)
- Add to MetaCart
We define a simple collection of operations for creating and manipulating record structures, where records are intended as finite associations of values to labels. A second-order type system over these operations supports both subtyping and polymorphism. We provide typechecking algorithms and limited semantic models. Our approach unifies and extends previous notions of records, bounded quantification, record extension, and parametrization by row-variables. The general aim is to provide foundations for concepts found in object-oriented languages, within a framework based on typed lambda-calculus.
Inheritance As Implicit Coercion
- Information and Computation
, 1991
"... . We present a method for providing semantic interpretations for languages with a type system featuring inheritance polymorphism. Our approach is illustrated on an extension of the language Fun of Cardelli and Wegner, which we interpret via a translation into an extended polymorphic lambda calculus. ..."
Abstract
-
Cited by 104 (3 self)
- Add to MetaCart
. We present a method for providing semantic interpretations for languages with a type system featuring inheritance polymorphism. Our approach is illustrated on an extension of the language Fun of Cardelli and Wegner, which we interpret via a translation into an extended polymorphic lambda calculus. Our goal is to interpret inheritances in Fun via coercion functions which are definable in the target of the translation. Existing techniques in the theory of semantic domains can be then used to interpret the extended polymorphic lambda calculus, thus providing many models for the original language. This technique makes it possible to model a rich type discipline which includes parametric polymorphism and recursive types as well as inheritance. A central difficulty in providing interpretations for explicit type disciplines featuring inheritance in the sense discussed in this paper arises from the fact that programs can type-check in more than one way. Since interpretations follow the type...
A Record Calculus Based on Symmetric Concatenation
- In Proc. of the ACM Symp. on Principles of Programming Languages
, 1991
"... Type systems for operations on extensible records form a foundation for statically typed languages addressing some aspects of object oriented programming and database applications. A number of primitive operations have been proposed: extending a record with a new field, overwriting an existing field ..."
Abstract
-
Cited by 55 (2 self)
- Add to MetaCart
Type systems for operations on extensible records form a foundation for statically typed languages addressing some aspects of object oriented programming and database applications. A number of primitive operations have been proposed: extending a record with a new field, overwriting an existing field, removing a field, and various kinds of concatenation. We show here that a record calculus based on a symmetric concatenation operator, where two records may be concatenated only if they have no overlapping fields, also captures the types of many other useful primitive record operations. "Mergeability constraints" are expressed directly using explicit annotations on type variables and constrained second-order type quantification instead of a rule of subsumption; we argue that the resulting system is more straightforward than subsumption-based alternatives. This research was supported in part by the Office of Naval Research and in part by the Defense Advanced Research Projects Agency (DOD), ...
ML With Extended Pattern Matching And Subtypes
, 1989
"... We extend a fragment of the programming language ML by incorporating a more general form of record pattern matching and providing for user-declared subtypes. Together, these two enhancements may be used to support a restricted object-oriented programming style. In keeping with the framework of ML, w ..."
Abstract
-
Cited by 44 (2 self)
- Add to MetaCart
We extend a fragment of the programming language ML by incorporating a more general form of record pattern matching and providing for user-declared subtypes. Together, these two enhancements may be used to support a restricted object-oriented programming style. In keeping with the framework of ML, we present typing rules for the language, and develop a type inference aJgorithm. We prove that the algorithm is sound with respect to the typing rules, and that it infers a most general typing for every typable expression.
Polymorphism and Type Inference in Database Programming
"... In order to find a static type system that adequately supports database languages, we need to express the most general type of a program that involves database operations. This can be achieved through an extension to the type system of ML that captures the polymorphic nature of field selection, toge ..."
Abstract
-
Cited by 37 (10 self)
- Add to MetaCart
In order to find a static type system that adequately supports database languages, we need to express the most general type of a program that involves database operations. This can be achieved through an extension to the type system of ML that captures the polymorphic nature of field selection, together with a technique that generalizes relational operators to arbitrary data structures. The combination provides a statically typed language in which generalized relational databases may be cleanly represented as typed structures. As in ML types are inferred, which relieves the programmer of making the type assertions that may be required in a complex database environment. These extensions may also be used to provide static polymorphic typechecking in object-oriented languages and databases. A problem that arises with object-oriented databases is the apparent need for dynamic typechecking when dealing with queries on heterogeneous collections of objects. An extension of the type system needed for generalized relational operations can also be used for manipulating collections of dynamically typed values in a statically typed language. A prototype language based on these ideas has been implemented. While it lacks a proper treatment of persistent data, it demonstrates that a wide variety of database structures can be cleanly represented in a polymorphic programming language.
Second-Order Signature: A Tool for Specifying Data Models
- Query Processing, and Optimization. Proc. ACM SIGMOD Conf
, 1993
"... We propose a framework for the specification of extensible database systems. A particular goal is to implement a software component for parsing and rule-based optimization that can be used with widely varying data models and query languages as well as representation and query processing systems. T ..."
Abstract
-
Cited by 27 (18 self)
- Add to MetaCart
We propose a framework for the specification of extensible database systems. A particular goal is to implement a software component for parsing and rule-based optimization that can be used with widely varying data models and query languages as well as representation and query processing systems. The key idea is to use second-order signature (and algebra), a system of two coupled many-sorted signatures, where the top-level signature offers kinds and type constructors and the bottom-level signature provides polymorphic operations over the types defined as terms of the top level. Hence the top level can be used to define a data or representation model and the bottom level to describe a query algebra or a query processing algebra. We show the applicability of this framework by examples drawn from relational modeling and query processing.
A Type System that Reconciles Classes and Extents
- In 3rd International Workshop on Database Programming Languages
"... We present a type system that naturally couples two dierent, and apparently contradictory, notions of inheritance that occur in object-oriented databases. To do this we distinguish between the type and a kind of a value. A type describes the entire structure of a value, while a kind describes only ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
We present a type system that naturally couples two dierent, and apparently contradictory, notions of inheritance that occur in object-oriented databases. To do this we distinguish between the type and a kind of a value. A type describes the entire structure of a value, while a kind describes only the availability of certain elds or methods. This distinction allows us to manipulate heterogeneous collections (collections of values with diering types) in a statically type-checked language. Moreover, the type system is polymorphic and types may be inferred using an extension of the technique used in ML. This means that it is easy to express general-purpose operations for the manipulation of heterogeneous collections. We believe that this system not only provides a natural approach to static type-checking in object-oriented databases; it also oers a technique for dealing with external databases in a statically typed language. 1 Introduction The term \inheritance" is used in ...
A Polymorphic Calculus for Views and Object Sharing
- In Proceedings of the 13th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems
, 1994
"... We present a typed polymorphic calculus that supports a general mechanism for view definition and object sharing among classes. In this calculus, a class can contain inclusion specifications of objects from other classes. Each such specification consists of a em predicate determining the subset of o ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
We present a typed polymorphic calculus that supports a general mechanism for view definition and object sharing among classes. In this calculus, a class can contain inclusion specifications of objects from other classes. Each such specification consists of a em predicate determining the subset of objects to be included and a viewing function under which those included objects are manipulated. Both predicates and viewing functions can be any type consistent programs definable in the polymorphic calculus. Inclusion specifications among classes can be cyclic, allowing mutually recursive class definitions. These features achieve flexible view definitions and wide range of class organizations in a compact and elegant way. Moreover, the calculus provides a suitable set of operations for views and classes so that the programmer can manipulate views and classes just the same way as one deals with ordinary records and sets. The proposed calculus uniformly integrates views and classes in a polymorphic type system of a database programming language similar to Machiavelli. The calculus has a type inference algorithm that relieves the programmer from complicated type declarations of views and classes. The polymorphic type system of the calculus is also shown to be sound, which guarantees complete static check of type consistency of programs involving classes and views. Through these properties, the programmer can enjoy full advantages of polymorphism and type inference when writing object-oriented database programs.
Ur: Statically-Typed Metaprogramming with Type-Level Record Computation
"... Dependent types provide a strong foundation for specifying and verifying rich properties of programs through type-checking. The earliest implementations combined dependency, which allows types to mention program variables; with type-level computation, which facilitates expressive specifications that ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
Dependent types provide a strong foundation for specifying and verifying rich properties of programs through type-checking. The earliest implementations combined dependency, which allows types to mention program variables; with type-level computation, which facilitates expressive specifications that compute with recursive functions over types. While many recent applications of dependent types omit the latter facility, we argue in this paper that it deserves more attention, even when implemented without dependency. In particular, the ability to use functional programs as specifications enables statically-typed metaprogramming: programs write programs, and static type-checking guarantees that the generating process never produces invalid code. Since our focus is on generic validity properties rather than full correctness verification, it is possible to engineer type inference systems that are very effective in narrow domains. As a demonstration, we present Ur, a programming language designed to facilitate metaprogramming with firstclass records and names. On top of Ur, we implement Ur/Web, a special standard library that enables the development of modern Web applications. Ad-hoc code generation is already in wide use in the popular Web application frameworks, and we show how that generation may be tamed using types, without forcing metaprogram authors to write proofs or forcing metaprogram users to write any fancy types.
A Study of Semantics, Types, and Languages for Databases and Object Oriented Programming
, 1989
"... The purpose of this thesis is to investigate a type system for databases and object-oriented programming and to design a statically typed programming language for these applications. Such a language should ideally have a static type system that supports: • polymorphism and static type inference, • r ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
The purpose of this thesis is to investigate a type system for databases and object-oriented programming and to design a statically typed programming language for these applications. Such a language should ideally have a static type system that supports: • polymorphism and static type inference, • rich data structures and operations to represent various data models for databases including the relational model and more recent complex object models, • central features of object-oriented programming including user definable class hierarchies, multiple inheritance, and data abstraction, • the notion of extents and object-identities for object-oriented databases. Without a proper formalism, it is not obvious that the construction of such a type system is possible. This thesis attempts to construct one such formalism and proposes a programming language that uniformly integrate all of the above features. The specific contributions of this thesis include: • A simple semantics for ML polymorphism and axiomatization of the equational theory of ML. • A uniform generalization of the relational model to arbitrary complex database objects that

