Results 1  10
of
22
Intersection Types and Computational Effects
, 2000
"... We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to letexpressions and re ..."
Abstract

Cited by 65 (6 self)
 Add to MetaCart
We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to letexpressions and requires an additional weakening of the usual subtyping rules. We also present a bidirectional typechecking algorithm for the resulting language that does not require an excessive amount of type annotations and illustrate it through some examples. We further show that the type assignment system can be extended to incorporate parametric polymorphism. Taken together, we see our system and associated typechecking algorithm as a significant step towards the introduction of intersection types into realistic programming languages. The added expressive power would allow many more properties of programs to be stated by the programmer and statically verified by a compiler.
Strongly Typed FlowDirected Representation Transformations (Extended Abstract)
 In ICFP ’97 [ICFP97
, 1997
"... We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be ..."
Abstract

Cited by 29 (13 self)
 Add to MetaCart
We present a new framework for transforming data representations in a strongly typed intermediate language. Our method allows both value producers (sources) and value consumers (sinks) to support multiple representations, automatically inserting any required code. Specialized representations can be easily chosen for particular source/sink pairs. The framework is based on these techniques: 1. Flow annotated types encode the "flowsfrom" (source) and "flowsto" (sink) information of a flow graph. 2. Intersection and union types support (a) encoding precise flow information, (b) separating flow information so that transformations can be well typed, (c) automatically reorganizing flow paths to enable multiple representations. As an instance of our framework, we provide a function representation transformation that encompasses both closure conversion and inlining. Our framework is adaptable to data other than functions.
Relating Typability and Expressiveness in FiniteRank Intersection Type Systems (Extended Abstract)
 In Proc. 1999 Int’l Conf. Functional Programming
, 1999
"... We investigate finiterank intersection type systems, analyzing the complexity of their type inference problems and their relation to the problem of recognizing semantically equivalent terms. Intersection types allow something of type T1 /\ T2 to be used in some places at type T1 and in other places ..."
Abstract

Cited by 21 (9 self)
 Add to MetaCart
We investigate finiterank intersection type systems, analyzing the complexity of their type inference problems and their relation to the problem of recognizing semantically equivalent terms. Intersection types allow something of type T1 /\ T2 to be used in some places at type T1 and in other places at type T2 . A finiterank intersection type system bounds how deeply the /\ can appear in type expressions. Such type systems enjoy strong normalization, subject reduction, and computable type inference, and they support a pragmatics for implementing parametric polymorphism. As a consequence, they provide a conceptually simple and tractable alternative to the impredicative polymorphism of System F and its extensions, while typing many more programs than the HindleyMilner type system found in ML and Haskell. While type inference is computable at every rank, we show that its complexity grows exponentially as rank increases. Let K(0, n) = n and K(t + 1, n) = 2^K(t,n); we prove that recognizing the pure lambdaterms of size n that are typable at rank k is complete for dtime[K(k1, n)]. We then consider the problem of deciding whether two lambdaterms typable at rank k have the same normal form, Generalizing a wellknown result of Statman from simple types to finiterank intersection types. ...
Expansion: the Crucial Mechanism for Type Inference with Intersection Types: Survey and Explanation
 In: (ITRS ’04
, 2005
"... The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying ..."
Abstract

Cited by 17 (7 self)
 Add to MetaCart
The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying out compositional type inference. The fundamental idea of expansion is to be able to calculate the effect on the final judgement of a typing derivation of inserting a use of the intersectionintroduction typing rule at some (possibly deeply nested) position, without actually needing to build the new derivation.
Branching Types
, 2002
"... Although systems with intersection types have many unique capabilities, there has never been a fully satisfactory explicitly typed system with intersection types. We introduce and prove the basic properties of # , a typed #calculus with branching types and types with quantification over type ..."
Abstract

Cited by 11 (5 self)
 Add to MetaCart
Although systems with intersection types have many unique capabilities, there has never been a fully satisfactory explicitly typed system with intersection types. We introduce and prove the basic properties of # , a typed #calculus with branching types and types with quantification over type selection parameters. The new system # an explicitly typed system with the same expressiveness as a system with intersection types. Typing derivations in # use branching types to squash together what would be separate parallel derivations in earlier systems with intersection types.
Faithful Translations between Polyvariant Flows and Polymorphic Types
, 2000
"... Recent work h& s h wn equivalences between various type systems and flow logics. Ideally, th translations upon wh= h such equivalences are basedshd&@ be faithful in th sense the information is not lost in roundtrip translations from flows to types and back or from types to flows and back. B ..."
Abstract

Cited by 11 (2 self)
 Add to MetaCart
Recent work h& s h wn equivalences between various type systems and flow logics. Ideally, th translations upon wh= h such equivalences are basedshd&@ be faithful in th sense the information is not lost in roundtrip translations from flows to types and back or from types to flows and back. Building on t h work of Nielson Nielson and of Palsberg Pavlopoulou, we present t h firstfaithT# translations between a class of finitary polyvariant flow analyses and a type system supporting polymorph@@ in th form of intersection and union types. Additionally, our flow/type correspondence solves several open problems posed by Palsberg Pavlopoulou: (1) it expresses callstring based polyvariance (such as kCFA) as well as argument based polyvariance; (2) it enjoys a subject reduction property for flows as well as for types; and (3) it supports a floworiented perspectiverath# thh a typeoriented one. 1
Polyvariant Flow Analysis with Constrained Types
 In Proc. European Symp. on Programming
, 2000
"... . The basic idea behind improving the quality of a monovariant control flow analysis such as 0CFA is the concept of polyvariant analyses such as Agesen's Cartesian Product Algorithm (CPA) and Shivers' nCFA. In this paper we develop a novel framework for polyvariant flow analysis based on ..."
Abstract

Cited by 10 (6 self)
 Add to MetaCart
. The basic idea behind improving the quality of a monovariant control flow analysis such as 0CFA is the concept of polyvariant analyses such as Agesen's Cartesian Product Algorithm (CPA) and Shivers' nCFA. In this paper we develop a novel framework for polyvariant flow analysis based on AikenWimmers constrained type theory. We develop instantiations of our framework to formalize various polyvariant algorithms, including nCFA and CPA. With our CPA formalization, we show the callgraph based termination condition for CPA will not always guarantee termination. We then develop a novel termination condition and prove it indeed leads to a terminating algorithm. Additionally, we show how data polymorphism can be modeled in the framework, by defining a simple extension to CPA that incorporates data polymorphism. 1 Introduction In this paper we develop a general framework for polyvariant flow analysis, expressing it in terms of AikenWimmers constrained types [4]. It is already known ...
Program Representation Size in an Intermediate Language with Intersection and Union Types
 In Proceedings of the Third Workshop on Types in Compilation (TIC 2000
, 2000
"... The CIL compiler for core Standard ML compiles whole programs using a novel typed intermediate language (TIL) with intersection and union types and ow labels on both terms and types. The CIL term representation duplicates portions of the program where intersection types are introduced and union ..."
Abstract

Cited by 9 (7 self)
 Add to MetaCart
The CIL compiler for core Standard ML compiles whole programs using a novel typed intermediate language (TIL) with intersection and union types and ow labels on both terms and types. The CIL term representation duplicates portions of the program where intersection types are introduced and union types are eliminated. This duplication makes it easier to represent type information and to introduce customized data representations. However, duplication incurs compiletime space costs that are potentially much greater than are incurred in TILs employing typelevel abstraction or quanti cation. In this paper, we present empirical data on the compiletime space costs of using CIL as an intermediate language. The data shows that these costs can be made tractable by using suciently negrained ow analyses together with standard hashconsing techniques. The data also suggests that nonduplicating formulations of intersection (and union) types would not achieve signi cantly better space complexity.
Functioning without Closure: TypeSafe Customized Function Representations for Standard ML
 IN PROC. 2001 INT’L CONF. FUNCTIONAL PROGRAMMING
, 2001
"... The CIL compiler for core Standard ML compiles whole ML programs using a novel typed intermediate language that supports the generation of typesafe customized data representations. In this paper, we present empirical data comparing the relative efficacy of several different flowbased customization ..."
Abstract

Cited by 7 (6 self)
 Add to MetaCart
The CIL compiler for core Standard ML compiles whole ML programs using a novel typed intermediate language that supports the generation of typesafe customized data representations. In this paper, we present empirical data comparing the relative efficacy of several different flowbased customization strategies for function representations. We develop a cost model to interpret dynamic counts of operations required for each strategy. In this cost model, customizing the representation of closed functions gives a 1217% improvement on average over uniform closure representations, depending on the layout of the closure. We also present data on the relative effectiveness of various strategies for reducing representation pollution, i.e., situations where flow constraints require the representation of a value to be less efficient than it would be in ideal circumstances. For the benchmarks tested and the types of representation pollution detected by our compiler, the pollution removal strategies we consider often cost more in overhead than they gain via enabled customizations. Notable exceptions are selective defunctionalization, a function representation strategy that often achieves significant customization benefits via aggressive pollution removal, and a simple form of flowdirected inlining, in which pollution removal allows multiple functions to be inlined at the same call site.
Compiling with Polymorphic and Polyvariant Flow Types
 In ACM SIGPLAN Workshop on Types in Compilation
, 1997
"... Optimizing compilers for functionoriented and objectoriented languages exploit type and flow information for efficient implementation. Although type and flow information (both control and data flow) are inseparably intertwined, compilers usually compute and represent them separately. Partially, th ..."
Abstract

Cited by 5 (1 self)
 Add to MetaCart
Optimizing compilers for functionoriented and objectoriented languages exploit type and flow information for efficient implementation. Although type and flow information (both control and data flow) are inseparably intertwined, compilers usually compute and represent them separately. Partially, this has been a result of the usual polymorphic type systems using 8 and 9 quantifiers, which are difficult to use in combination with flow annotations. In the Church Project, we are experimenting with intermediate languages that integrate type and flow information into a single flow type framework. This integration facilitates the preservation of flow and type information through program transformations. In this paper we describe CIL, an intermediate language supporting polymorphic types and polyvariant flow information and describe its application in program optimiziation. We are experimenting with this intermediate language in a flow and typedirected compiler for a functional language. ...