| Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, 1996. |
....any compile time type errors. This can be done either with respect to a specific schema (type checking) or just based on the structure of the query independent of any schema information (type inference) Both problems have been studied broadly for various languages during the last 30 years [BO96, Dam85, Gun92, Mil78, Sul00, Tof87] Typability issues have been considered for query languages in both relational and object oriented frameworks. A discussion about type checking an OQL query can be found in the ODMG standard [CBB 00] Unfortunately, this presentation of the type system is ....
....added as part of the OQL language in order to flatten the list of bags of elements into a list of elements in a system specific way. As far as type inference is concerned, the canonical reference for work on type systems for database programming languages is the work of Buneman and Ohori [BO96] The goals of their type inference algorithm are identical to those when inferring the type of OQL queries, as presented in the next chapter; both approaches infer the most general type of an expression (if one exists) without accessing any schema information, and in this sense determine the ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, March 1996.
....report is the type system for ODMG OQL described in an earlier paper [3] Alagi c [2] independently gave a number of typing rules for OQL; see our earlier paper for a comparison. The canonical reference for work on type systems for database programming languages is the work of Buneman and Ohori [5]. The goals of their type inference algorithm are identical to ours; both approaches infer the most general type of an expression (if one exists) without accessing any schema information, and in this sense determine the constraints placed on the schema by the query. However, the underlying ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30-76, March 1996.
....product, one relation needs to rename those attributes. The join ( operator is especially introduced to make it easier to specify the most common products where renaming would be necessary. Besides only covering the most common cases, it is notoriously hard to typecheck join expressions [3] and we haven t found a way to embed those typing rules within Haskell. However, why not use the same approach as SQL We will introduce a binding mechanism (monad comprehensions) for qualifying relations. Instead of identifying attributes just by name, we will use both a name and relation. The ....
Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, March 1996
....from the particular instance. Type inference can be helpful in telling for which schemas a given query is suitable. Ohori, Buneman and Breazu Tannen were probably the first to introduce type inference in the context of database programming languages, in their work on the language Machiavelli [15, 14]. Machiavelli features polymorphic field selection from nested records, as well as a polymorphic join operator. However, the inference of principal types for fullfledged relational algebra expressions was not taken up in that work. We should also mention the work of Stemple et al. 18] who ....
A. Ohori and P. Buneman. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, 1996.
....nature of a method through inferring the principal type of the method, it achieves more general and rigorous model for method sharing. The IS A relation is then regarded as a special case of method applicability represented by polymorphic typing for methods. As demonstrated by Machiavelli [OBBT89, BO92] this paradigm can be successfully applied to database programming for various forms of complex objects. We believe that a similar situation exists for object sharing. Extent inclusion through IS A relation is certainly useful for many cases. However, there are others where a simple partial ....
....singleton set of a new object whose raw object is the same as that of argument objects and whose view encodes the views of both e 1 and e 2 in a product type. If e 1 and e 2 have di erent raw objects then the result is the empty set. This operation is inspired by a similar operation considered in [BO92] and is regarded as a generalization of equality test for objects. Relation object creation: relobj(l 1 =e 1 , l n =en ) This creates a relation object from the given set of objects. Di erent from all the previous operations, this creates a new raw object, and therefore new identity. The ....
[Article contains additional citation context not shown here]
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. Technical report., Universities of Glasgow and Pennsylvania, 1992. To appear in ACM Transaction on Database Systems.
....involved an experimental type system, the unfamiliarity of which limited its adoption. Nevertheless, it was probably subjected to the most extensive evaluation of any of the academic research languages [25] Other persistent languages experiments with advanced type systems include Machiavelli [171, 37], Fibonacci [4] Tycoon [147] PM3 [101] Theta [141] BETA [144, 131] VML [130] Leontiev [134] has recently made progress with such type systems. These all seek to achieve both persistence and a comprehensive type system covering polymorphism and inheritance. Their novel type systems, and their ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, March 1996.
....most SSDB applications) practically the most likely useful definition is one that says whenever both components have defined values for any common attribute, then they must agree. We note that this definition of natural join is in the spirit of the polymorphic join defined by Buneman and Ohori [12]. Formally, we say that a pair (C; C 0 ) of components of T 1 ; T 2 respectively, is natural joinable, provided for every attribute A, if there are nodes u 2 C and v 2 C 0 such that their associated attribute is A and their associated values are both defined, then they are equal. Define the ....
Buneman, P., and A. Ohori. Polymorphism and Type Inference in Database Programming. ACM TODS, 21:30--76, 1996.
....domains for object types with more than one function (in Sec. 3.1) together with the definitions in gain and destroy . 4 Relationship to functional models In this section we discuss the similarities between object algebras (such as BCOOL) and functional models (such as ML [15] and Machiavelli [7, 16]) On the one hand they have enough in common that a combination of both is possible; on the other hand the challenge is whether the advantages of either model can be preserved in the integration. We show (i) how to add full orthogonality and genericity to BCOOL and (ii) discuss how to extend ....
.... to work on single objects (denoted by 0 ) such that they can be used not only within sets: e : f 0 1 ; f 0 m ] project 0 [f1 ; fn ] e) f1 ; fn ] E[ project 0 [f1 ; fn ] e) E[ e ] Then, if a set iterator map is provided (akin to hom in Machiavelli [7], replace [1] or pump in FAD [5] the previous set oriented operations can, for example, be derived as 16 : project [f1 ; fn ] S) j map[project 0 [f1 ; fn ] e) e : S) Now we can easily extend BCOOL to work on lists of objects. After defining the constructors and deconstructors ....
[Article contains additional citation context not shown here]
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 1993. to appear.
....most SSDB applications) practically the most likely useful definition is one that says whenever both components have defined values for any common attribute, then they must agree. We note that this definition of natural join is in the spirit of the polymorphic join defined by Buneman and Ohori [12]. Formally, we say that a pair (C; C 0 ) of components of T 1 ; T 2 respectively, is natural joinable, provided for every attribute A, if there are nodes u 2 C and v 2 C 0 such that their associated attribute is A and their associated values are both defined, then they are equal. Define the ....
Buneman, P., and A. Ohori. Polymorphism and Type Inference in Database Programming. ACM TODS, 21:30--76, 1996.
....of individuals, and no function types. This discrepancy between program and database design motivates the present inquiry into type systems for databases. Types do appear quite prominently in database programming languages that are extensions of functional programming languages (Trinder 1990, Buneman and Ohori 1996). Their type system is that of simple type theory. But we nd opportunities to push types way deeper into databases, by the use of dependent types as introduced in constructive type theory (Martin Lf 1984) Our main contribution is to show how to specify consistency constraints in typed databases. ....
Buneman, P. and Ohori, A. Polymorphism and Type Inference in Database Programming. In ACM Transactions on Database Systems, 21:3076, 1996.
....developmentenvironment is unified, strict type checking can be done at the time of compilation of application programs. However, the type system of ASN.1 has its own peculiar property, i.e. meta types. This makes it difficult to check types in a straightforward way. Fortunately, Machiavelli [3, 9], which is the database programming language derived from language ML[6] can handle the type system including types which have compatible expressiveness with the meta types of ASN.1. Therefore we employMachiavelli s type checking algorithms so that we can checktypes of ASN.1 PL programs ....
....it prints all information about persons whose names are equal to the name given as the command. 4. 4 Type inference mechanisms in ASN.1 PL To check strictly the types of the programs written in ASN.1 PL, the compiler employs the type inference algorithms which are originally provided in Machiavelli[3, 9]. Machiavelli is a polymorphic language which extends type inference algorithms of ML fun nameof(x) x.name; fun univPersons( select x from x Person where x.belongTo isa University; fun compPersons( select x from x Person where x.belongTo isa Company; fun whois(name) ....
Buneman, O.P. and Ohori, A.: "Polymorphism and Type Inference in Database Programming", ACM Transactions on Database Systems (to appear) .
....can be used to construct the set of all persons names as follows: 1 map [name] P ersons) Notice that the above operations are algebra like extensions. Instead, COCOON can be brought closer to functional languages by introducing a more general set iterator (such as homu in Machiavelli [OBBT89, BO93] and pump in FAD [BBKV87] that need not necessarily return sets, but executes retrieval expressions similar to the apply to all iterator that executes updates in a set oriented way. 4.2.2 Tuples The inclusion of tuples in COCOON could, above all, be motivated by the following two objectives: ....
....gain and lose arbitrary types) this would introduce two levels of sorts types information: a sort would be a higher level concept, objects can not change sorts. However, below each sort, there would be a whole lattice of types in our sense. Several other models, for example [HFW90, AH87, BO93] have similar concepts. The technical consequence is that we have to introduce more than one type (sub ) lattice, one per sort. The sorts will be the top elements of their sublattices and dynamic type changes will be restricted to one sublattice. The modifications of the formal model are rather ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 1993. to appear.
....programming languages, once their particularities are understood many ideas from general purpose languages are seen to specialize profitably for query languages. This is true for concepts related to type systems, a point of view strongly advocated by Peter Buneman and his associates over the years [34, 5, 8, 4, 9, 7, 6]. According to the type orthogonality principle, the design of a language is structured around its type system. The primitives of the languages are divided in groups according to the type constructs they support. Adding new type constructs is as easy as adding a set of primitives. The expressive ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems. To appear.
....object oriented. Amber [Car86] is also ML based. It has structural subtyping and is partially reflexive since it is able to examine (but not change) types at run time. Amber is not object oriented and does not provide clear distinction between interface and implementation. Machiavelli [OBBT89] PA96] is also a database programming language based on ML. It has impressive type system specifically designed to support database applications complete with union, intersection, and functional types. However, it is not object oriented, so the issues of inheritance and dispatch do not arise there. ....
Buneman P and Ohori A, Polymorphism and type inference in database programming, ACM Transactions on Database Systems 21 (1996), no. 1, 30--76.
....from object oriented programming in Modula 3: all of these approaches would require objects to be wrapped as dynamics, losing some accuracy in type checking (In the example in Fig. 1, we do not try to narrow arbitrary values to integer value objects, only objects in the Value abstract class) Buneman and Ohori (1996) have considered another extension of dynamics, which they refer to as partial dynamics. Superficially partial dynamics appear very similar to weak dynamics; however they are in fact quite different in motivation and mechanism. A partial dynamic contains a value of some record type, and exports a ....
....(Duggan and Ophel 1995) this would be relatively easy to add if we only had recursion at the type level. On the other hand, recursion at the type level does not overcome a single one of the problems with recursing over dynamic data structures, that are our concern. Similarly, the work of Buneman and Ohori (1996) does not address the problems that are our concern. Their concern is with providing heterogeneous collections in languages without subtyping. Harper and Morrisett (1995) have proposed an approach to compilation with intensional polymorphism (and in fact we use the term coined by them for ....
Buneman, P. and A. Ohori (1996). Polymorphism and type inference in database programming. ACM Transactions on Database Systems. To appear.
....programming languages, once their particularities are understood many ideas from general purpose languages specialize profitably for query languages. This is true for concepts related to type systems, a point of view strongly advocated by Peter Buneman and his associates over the years [41, 9, 13, 8, 12, 11, 10]. According to the type orthogonality principle, the design of a language is structured around its type system. The primitives of the languages are divided in groups according to the type constructs they support. Adding 4 Davidson et al. new type constructs is as easy as adding a set of ....
Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, 1996.
....on Programming Languages and Systems, 1995. A Polymorphic Record Calculus and Its Compilation 849 generalize the relational natural join operation to general record structures [Buneman et al. 1991; Ohori 1990] and to extend a polymorphic type system with the generalized natural join [Buneman and Ohori 1995; Ohori and Buneman 1988] However, we are not sure that such an operation should be in the polymorphic core of programming languages. The operations considered in this article support a wide range of programming with records while maintaining the existence of an ecient compilation method. We ....
....1 : ffl : t 1 intgggfx : t 1 g (x l) x : int, the typability on closed terms does not change and therefore does not create any problems. Also, if we extend the type system to recursive types using regular trees [Courcelle 1983] allowing those cyclic kind assignments would become essential. Buneman and Ohori [1995] discusse possible usefulness of recursive programming with record polymorphism, and Vasconcelos recent work [Vasconcelos 1994] extends our kinded uni cation to in nite regular trees. 3.5 The Type Inference Algorithm Using the kinded uni cation, Milner s [1978] type inference algorithm is ....
[Article contains additional citation context not shown here]
Buneman, P. and Ohori, A. 1995. Polymorphism and type inference in database programming.
....of type variables may be constraint to subtypes of a given type. Due to the re nement of kinded typing, ML style parametric polymorphism can scale up to large and complicated practical software development such as database programming, where labeled data structures are essential (see, for example, [5] for discussion on polymorphism in database programming. It is highly desirable to develop a practical programming language that supports exible polymorphic typing. However, polymorphism inherently con icts with run time eciency of programs another essential feature of programming languages. ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30-74, 1996.
....of that field. We call the typing mechanism refined with kinds kinded typing. Due to this refinement, ML style parametric polymorphism can scale up to large and complicated practical software development such as database programming, where labeled data structures are essential (see, for example, [3] for discussion on polymorphism in database programming. It is highly desirable to develop a practical programming language that supports flexible polymorphic typing. However, polymorphism inherently conflicts with run time efficiency of programs another essential feature of programming ....
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--74, 1996.
....nature of a method through inferring the principal type of the method, it achieves more general and rigorous model for method sharing. The IS A relation is then regarded as a special case of method applicability represented by polymorphic typing for methods. As demonstrated by Machiavelli [OBBT89, BO92] this paradigm can be successfully applied to database programming for various forms of complex objects. We believe that a similar situation exists for object sharing. Extent inclusion through IS A relation is certainly useful for many cases. However, there are others where a simple partial ....
....set of a new object whose raw object is the same as that of argument objects and whose view encodes the views of both e 1 and e 2 in a product type. If e 1 and e 2 have different raw objects then the result is the empty set. This operation is inspired by a similar operation considered in [BO92] and is regarded as a generalization of equality test for objects. Relation object creation: relobj(l 1 =e 1 , l n =en ) This creates a relation object from the given set of objects. Different from all the previous operations, this creates a new raw object, and therefore new identity. ....
[Article contains additional citation context not shown here]
P. Buneman and A. Ohori. Polymorphism and type inference in database programming. Technical report., Universities of Glasgow and Pennsylvania, 1992. To appear in ACM Transaction on Database Systems.
....as follows: M as X is allowed only if M has type t, X is the name for the value of type class(s) and the equivalence relation s =S t holds. 3. 5 Reduction Operation Following approaches for querying database collections [TBN91, BNTW95] and set operations in database programming languages [BBKV88, BO96], we include the following general aggregate operation: reduce X with unit=ffl, op= Omega where X has type ftg with t = 2 S, Omega is an associative and commutative binary operation on the values of type that returns a value of type , and ffl is a unit element for the binary operation. ....
....of their extents. A conventional approach is to represent both of them by simple subtype relation [Car88] This appracoh can certainly be adopted to our model. A more promissing approach would be to integrate the model presented here with a polymorphic type system for database programming language [BO96] based on record polymorphism [Oho95] As demonstrated in [BO96] method inheritance and extent inclusion can be more accurately represented by polymorphic typing of record structures. We believe that these features can be cleanly integrated with our model of objects. We have not provided an ....
[Article contains additional citation context not shown here]
Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1), 30-76, 1996.
....comments on this language: 1. We have used lambda terms (anonymous function definition) Read x :e as that function of x whose value is e . In general e will be an expression involving x : 2. We have given an explicitly typed language. However polymorphic type inference is possible [22, 24, 26, 10], which justifies our presentation of a practical language without type annotations. 3. The boolean values true and false are represented by f[ g and fg respectively, where [ is the empty record. These are the two values of type f[ g. This simplifies translation from comprehensions, because a ....
P. Buneman and A. Ohori. Polymorphism and Type Inference in Database Programming, ACM Transactions on Database Systems, to appear.
No context found.
Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21(1):30--76, 1996.
No context found.
Peter Buneman and Atsushi Ohori. Polymorphism and type inference in database programming. ACM Transactions on Database Systems, 21#1#:30#76, 1996.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC