Results 11 - 20
of
43
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 type-level abstraction or quanti cation. In this paper, we present empirical data on the compile-time space costs of using CIL as an intermediate language. The data shows that these costs can be made tractable by using suciently ne-grained ow analyses together with standard hash-consing techniques. The data also suggests that nonduplicating formulations of intersection (and union) types would not achieve signi cantly better space complexity.
Local CPS conversion in a direct-style compiler (Extended Abstract)
, 2000
"... This paper describes a transformation and supporting analysis that exemplifies the idea of exploiting CPS representation in a DS-based optimizer. In the next section, we describe a motivating example. We then describe our transformation and an analysis for detecting when it is applicable in Section ..."
Abstract
-
Cited by 8 (1 self)
- Add to MetaCart
This paper describes a transformation and supporting analysis that exemplifies the idea of exploiting CPS representation in a DS-based optimizer. In the next section, we describe a motivating example. We then describe our transformation and an analysis for detecting when it is applicable in Section 3. This transformation should be useful for any DS-based optimizer. We are implementing this transformation in our compiler for the MOBY programming language [FR99] and we present a preliminary indication of its usefulness in Section 4. We discuss related work in Section 5 and then conclude.
CEAL: a C-based language for self-adjusting computation
- In ACM SIGPLAN Conference on Programming Language Design and Implementation
, 2009
"... Self-adjusting computation offers a language-centric approach to writing programs that can automatically respond to modifications to their data (e.g., inputs). Except for several domain-specific implementations, however, all previous implementations of self-adjusting computation assume mostly functi ..."
Abstract
-
Cited by 8 (4 self)
- Add to MetaCart
Self-adjusting computation offers a language-centric approach to writing programs that can automatically respond to modifications to their data (e.g., inputs). Except for several domain-specific implementations, however, all previous implementations of self-adjusting computation assume mostly functional, higher-order languages such as Standard ML. Prior to this work, it was not known if self-adjusting computation can be made to work with low-level, imperative languages such as C without placing undue burden on the programmer. We describe the design and implementation of CEAL: a C-based language for self-adjusting computation. The language is fully general and extends C with a small number of primitives to enable writing self-adjusting programs in a style similar to conventional C programs. We present efficient compilation techniques for translating CEAL programs into C that can be compiled with existing C compilers using primitives supplied by a run-time library for self-adjusting computation. We implement the proposed compiler and evaluate its effectiveness. Our experiments show that CEAL is effective in practice: compiled self-adjusting programs respond to small modifications to their data by orders of magnitude faster than recomputing from scratch while slowing down a from-scratch run by a moderate constant factor. Compared to previous work, we
Functioning without closure: Type-safe 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 type-safe customized data representations. In this paper, we present empirical data comparing the relative efficacy of several different flow-based 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 type-safe customized data representations. In this paper, we present empirical data comparing the relative efficacy of several different flow-based 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 12–17 % 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 flow-directed inlining, in which pollution removal allows multiple functions to be inlined at the same call site.
Defining and Implementing Closed, Domain-Specific Languages
- Invited talk at the Workshop on Semantics, Applications and Implementation of Program Generation (SAIG
, 2000
"... A closed domain-speci c language (DSL) is a standalone, declarative language that cannot easily be embedded into an existing, wide-spectrum programming language as a library of combinators. It requires an independent implementation. We advocate defining the semantics of a closed DSL in terms of a un ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
A closed domain-speci c language (DSL) is a standalone, declarative language that cannot easily be embedded into an existing, wide-spectrum programming language as a library of combinators. It requires an independent implementation. We advocate defining the semantics of a closed DSL in terms of a universal set of semantics combinators which form a structure algebra over a suitable domain. By exchanging the domain of this algebra for a domain of abstract machine states, we automatically derive an implementation of the DSL in terms of byte code instructions for an abstract machine. The correctness of this implementation is proved by showing coherence of the operational, abstract machine semantics with the denotational semantics. The technique is illustrated in implementing a DSL for pretty printing.
Space Issues in Compiling with Intersection and Union Types
, 2000
"... The CIL compiler for core Standard ML compiles whole programs using the CIL typed intermediate language with ow labels and intersection and union types. Flow labels embed flow information in the types and intersection and union types support precise polyvariant type and flow information, without the ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
The CIL compiler for core Standard ML compiles whole programs using the CIL typed intermediate language with ow labels and intersection and union types. Flow labels embed flow information in the types and intersection and union types support precise polyvariant type and flow information, without the use of type-level abstraction or quantification. Compile-time representations of CIL types and terms are potentially large compared to those for similar types and terms in systems based on quantified types. The listing-based nature of intersection and union types, together with flow label annotations on types, contribute to the size of CIL 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 multiple representation conventions, but incurs a compile-time space cost. This paper presents empirical data on the compile-time space cos...
Combining Closure Conversion with Closure Analysis using Algebraic Types
- Boston College Computer Science
, 1997
"... Wehave developed a new approachtotyped closure conversion of higher-order monomorphic languages which also provides a useful uniform framework for closure analysis and subsequent optimization. The approach is based on representing closures as ordinary algebraic data constructors, grouped into alg ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Wehave developed a new approachtotyped closure conversion of higher-order monomorphic languages which also provides a useful uniform framework for closure analysis and subsequent optimization. The approach is based on representing closures as ordinary algebraic data constructors, grouped into algebraic datatypes according to source type; no special type system is needed. Closure applications are interpreted in the style of Reynolds #13#. Programs in our closure-converted form can also be viewed as representing the results of a closure analysis, which can be used to support many optimization strategies including partial evaluation, inlining, and stack-allocation of closures. The closure conversion itself provides a #free" level of closure analysis, based on type distinctions in the user program; to our knowledge, no previous system has performed suchatype-based closure analysis. In addition, the results of more precise automated closure analyses can also be recorded in our for...
Refined typechecking with Stardust
- In Workshop on Programming Languages Meets Program Verification (PLPV
, 2007
"... We present Stardust, an implementation of a type system for a subset of ML with type refinements, intersection types, and union types, enabling programmers to legibly specify certain classes of program invariants that are verified at compile time. This is the first implementation of unrestricted int ..."
Abstract
-
Cited by 5 (4 self)
- Add to MetaCart
We present Stardust, an implementation of a type system for a subset of ML with type refinements, intersection types, and union types, enabling programmers to legibly specify certain classes of program invariants that are verified at compile time. This is the first implementation of unrestricted intersection and union types in a mainstream functional programming setting, as well as the first implementation of a system with both datasort and index refinements. The system—with the assistance of external constraint solvers—supports integer, Boolean and dimensional index refinements; we apply both value refinements (to check red-black tree invariants) and invaluable refinements (to check dimensional consistency). While typechecking with intersection and union types is intrinsically complex, our experience so far suggests that it can be practical in many instances.

