Results 1  10
of
23
On the Unification Problem for Cartesian Closed Categories (Extended Abstract)
 IN PROCEEDINGS, EIGHTH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE
, 1989
"... Cartesian closed categories (CCC's) have played and continue to play an important role in the study of the semantics of programming languages. An axiomatization of the isomorphisms which hold in all Cartesian closed categories discovered independently by Soloviev and Bruce and Longo leads to seven e ..."
Abstract

Cited by 19 (5 self)
 Add to MetaCart
Cartesian closed categories (CCC's) have played and continue to play an important role in the study of the semantics of programming languages. An axiomatization of the isomorphisms which hold in all Cartesian closed categories discovered independently by Soloviev and Bruce and Longo leads to seven equalities. We show that the unification problem for this theory is undecidable, thus settling an open question. We also show that an important subcase, namely unification modulo the linear isomorphisms, is NPcomplete. Furthermore, the problem of matching in CCC's is NPcomplete when the subject term is irreduc...
Retrieving Library Functions By Unifying Types Modulo Linear Isomorphism
, 1992
"... An improved method to retrieve a library function via its Hindley/Milner type is described. Previous retrieval systems have identified types that are isomorphic in any Cartesian closed category (CCC), and have retrieved library functions of types that are either isomorphic to the query, or have ..."
Abstract

Cited by 18 (0 self)
 Add to MetaCart
An improved method to retrieve a library function via its Hindley/Milner type is described. Previous retrieval systems have identified types that are isomorphic in any Cartesian closed category (CCC), and have retrieved library functions of types that are either isomorphic to the query, or have instances that are. Sometimes it is useful to instantiate the query too, which requires unification modulo isomorphism. Although unifiability modulo CCCisomorphism is undecidable, it is decidable modulo linear isomorphism, that is, isomorphism in any symmetric monoidal closed (SMC) category. We argue that the linear isomorphism should retrieve library functions almost as well as CCCisomorphism, and we report experiments with such retrieval from the Lazy ML library. When unification is used, the system retrieves too many functions, but sorting by the sizes of the unifiers tends to place the most relevant functions first. R'esum'e Ce papier pr'esente une nouvelle m'ethode pour la re...
A Logic of Subtyping
, 1996
"... The relation of inclusion between types has been suggested by the practice of programming, as it enriches the polymorphism of functional languages. We propose a simple (and linear) calculus of sequents for subtyping as logical entailment. This allows us to derive a complete and coherent approach to ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
The relation of inclusion between types has been suggested by the practice of programming, as it enriches the polymorphism of functional languages. We propose a simple (and linear) calculus of sequents for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subtyping from a few, logically meaningful, sequents. In particular, transitivity and antisymmetry will be derived from elementary logical principles, which stresses the power of sequents and Gentzenstyle proof methods. Proof techniques based on cutelimination will be at the core of our results. 1 Introduction 1.1 Motivations, Theories and Models In recent years, several extensions of core functional languages have been proposed to deal with the notion of subtyping; see, for example, [CW85, Mit88, BL90, BCGS91, CMMS91, CG92, PS94, Tiu96, TU96]. These extensions were suggested by the practice of programming in computer science. In particular, they were inspired by the notion of inheritance...
Memoization in typedirected partial evaluation
 PROCEEDINGS OF THE 2002 ACM SIGPLAN/SIGSOFT CONFERENCE ON GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, NUMBER 2487 IN LECTURE NOTES IN COMPUTER SCIENCE
, 2002
"... We use a code generator—typedirected partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the function ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
We use a code generator—typedirected partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the functions and typedirected partial evaluation provides a convenient setting to obtain the normal form of their composition. However, offtheshelf typedirected partial evaluation turns out to yield gigantic normal forms. We identify that this gigantism is due to redundancies, and that these redundancies originate in the handling of sums, which uses delimited continuations. We successfully eliminate these redundancies by extending typedirected partial evaluation with memoization capabilities. The result only works for pure functional programs, but it provides an unexpected use of code generation and it yields ordersofmagnitude improvements both in time and in space for type isomorphisms.
Mockingbird: Flexible Stub Compilation from Pairs of Declarations
, 1999
"... Mockingbird is a prototype tool for developing interlanguage and distributed applications. It compiles stubs from pairs of interface declarations, allowing existing data types to be reused on both sides of every interface. Other multilanguage stub compilers impose data types on the application, c ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
Mockingbird is a prototype tool for developing interlanguage and distributed applications. It compiles stubs from pairs of interface declarations, allowing existing data types to be reused on both sides of every interface. Other multilanguage stub compilers impose data types on the application, complicating development. Mockingbird supports C/C++, Java, and CORBA IDL, and can be extended to other languages. Its stubs convert types whose structural equivalence would be missed by other tools, because it interacts with the programmer to refine the original declarations. We show that this kind of tool improves programming productivity, and describe, in detail, Mockingbird's design and implementation.
Inferring Type Isomorphisms Generically
 Proceedings of the 7th International Conference on Mathematics of Program Construction, MPC 2004, volume 3125 of LNCS
"... Datatypes which di#er inessentially in their names and structure are said to be isomorphic; for example, a ternary product is isomorphic to a nested pair of binary products. In some canonical cases, the conversion function is uniquely determined solely by the two types involved. ..."
Abstract

Cited by 11 (7 self)
 Add to MetaCart
Datatypes which di#er inessentially in their names and structure are said to be isomorphic; for example, a ternary product is isomorphic to a nested pair of binary products. In some canonical cases, the conversion function is uniquely determined solely by the two types involved.
Coherence and Transitivity of Subtyping as Entailment
, 1996
"... The relation of inclusion between types has been suggested by the practice of programming as it enriches the polymorphism of functional languages. We propose a simple (and linear) sequent calculus for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subty ..."
Abstract

Cited by 11 (3 self)
 Add to MetaCart
The relation of inclusion between types has been suggested by the practice of programming as it enriches the polymorphism of functional languages. We propose a simple (and linear) sequent calculus for subtyping as logical entailment. This allows us to derive a complete and coherent approach to subtyping from a few, logically meaningful sequents. In particular, transitivity and antisymmetry will be derived from elementary logical principles.
Efficient Type Matching
, 2001
"... Palsberg and Zhao [14] presented an O(n²) time algorithm for matching two recursive types. In this paper, we present an O(n log n) algorithm for the same problem. Our algorithm works by reducing the type matching problem to the wellunderstood problem of finding a sizestable partition of a graph. ..."
Abstract

Cited by 10 (3 self)
 Add to MetaCart
Palsberg and Zhao [14] presented an O(n²) time algorithm for matching two recursive types. In this paper, we present an O(n log n) algorithm for the same problem. Our algorithm works by reducing the type matching problem to the wellunderstood problem of finding a sizestable partition of a graph. Our result may help improve systems, such as Polyspin and Mockingbird, that are designed to facilitate interoperability of software components. We also discuss possible applications of our algorithm to Java. Issues related to subtyping of recursive types are also discussed.
Remarks on isomorphisms in typed lambda calculi with empty and sum types
 In Proc. of the 17 th Annual IEEE Symposium on Logic in Computer Science (LICS’02
, 2002
"... Tarski asked whether the arithmetic identities taught in high school are complete for showing all arithmetic equations valid for the natural numbers. The answer to this question for the language of arithmetic expressions using a constant for the number one and the operations of product and exponenti ..."
Abstract

Cited by 10 (2 self)
 Add to MetaCart
Tarski asked whether the arithmetic identities taught in high school are complete for showing all arithmetic equations valid for the natural numbers. The answer to this question for the language of arithmetic expressions using a constant for the number one and the operations of product and exponentiation is affirmative, and the complete equational theory also characterises isomorphism in the typed lambda calculus, where the constant for one and the operations of product and exponentiation respectively correspond to the unit type and the product and arrow type constructors. This paper studies isomorphisms in typed lambda calculi with empty and sum types from this viewpoint. We close an open problem by establishing that the theory of type isomorphisms in the presence of product, arrow, and sum types (with or without the unit type) is not finitely axiomatisable. Further, we observe that for type theories with arrow, empty and sum types the correspondence between isomorphism and arithmetic equality generally breaks down, but that it still holds in some particular cases including that of type isomorphism with the empty type and equality with zero. 1
Efficient and Flexible Matching of Recursive Types
, 2000
"... Equality and subtyping of recursive types have been studied in the 1990s by Amadio and Cardelli; Kozen, Palsberg, and Schwartzbach; Brandt and Henglein; and others. Potential applications include automatic generation of bridge code for multilanguage systems and typebased retrieval of software m ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
Equality and subtyping of recursive types have been studied in the 1990s by Amadio and Cardelli; Kozen, Palsberg, and Schwartzbach; Brandt and Henglein; and others. Potential applications include automatic generation of bridge code for multilanguage systems and typebased retrieval of software modules from libraries. Auerbach, Barton, and Raghavachari advocate a highly exible combination of matching rules for which there, until now, are no ecient algorithmic techniques. In this paper, we present an ecient decision procedure for a notion of type equality that includes unfolding of recursive types, and associativity and commutativity of product types, as advocated by Auerbach et al. For two types of size at most n, our algorithm decides equality in O(n 2 ) time. The algorithm iteratively prunes a set of type pairs, and eventually it produces a set of pairs of equal types. In each iteration, the algorithm exploits a socalled coherence property of the set of type pairs pr...