Results 1 - 10
of
14
Intensional Polymorphism in Type-Erasure Semantics
, 2002
"... Intensional polymorphism, the ability to dispatch to di#erent routines based on types at run time, enables a variety of advanced implementation techniques for polymorphic languages, including tag-free garbage collection, unboxed function arguments, polymorphic marshalling, and flattened data structu ..."
Abstract
-
Cited by 132 (36 self)
- Add to MetaCart
Intensional polymorphism, the ability to dispatch to di#erent routines based on types at run time, enables a variety of advanced implementation techniques for polymorphic languages, including tag-free garbage collection, unboxed function arguments, polymorphic marshalling, and flattened data structures. To date, languages that support intensional polymorphism have required a type-passing (as opposed to type-erasure) interpretation where types are constructed and passed to polymorphic functions at run time. Unfortunately, type-passing su#ers from a number of drawbacks: it requires duplication of run-time constructs at the term and type levels, it prevents abstraction, and it severely complicates polymorphic closure conversion.
Compiling with Types
, 1995
"... Compilers for monomorphic languages, such as C and Pascal, take advantage of types to determine data representations, alignment, calling conventions, and register selection. However, these languages lack important features including polymorphism, abstract datatypes, and garbage collection. In contr ..."
Abstract
-
Cited by 97 (14 self)
- Add to MetaCart
Compilers for monomorphic languages, such as C and Pascal, take advantage of types to determine data representations, alignment, calling conventions, and register selection. However, these languages lack important features including polymorphism, abstract datatypes, and garbage collection. In contrast, modern programming languages such as Standard ML (SML), provide all of these features, but existing implementations fail to take full advantage of types. The result is that performance of SML code is quite bad when compared to C. In this thesis, I provide a general framework, called type-directed compilation, that allows compiler writers to take advantage of types at all stages in compilation. In the framework, types are used not only to determine efficient representations and calling conventions, but also to prove the correctness of the compiler. A key property of typedirected compilation is that all but the lowest levels of the compiler use typed intermediate languages. An advantage of this approach is that it provides a means for automatically checking the integrity of the resulting code. An important
Abstract Models of Memory Management
, 1995
"... Most specifications of garbage collectors concentrate on the low-level algorithmic details of how to find and preserve accessible objects. Often, they focus on bit-level manipulations such as "scanning stack frames," "marking objects," "tagging data," etc. While these details are important in some c ..."
Abstract
-
Cited by 89 (16 self)
- Add to MetaCart
Most specifications of garbage collectors concentrate on the low-level algorithmic details of how to find and preserve accessible objects. Often, they focus on bit-level manipulations such as "scanning stack frames," "marking objects," "tagging data," etc. While these details are important in some contexts, they often obscure the more fundamental aspects of memory management: what objects are garbage and why? We develop a series of calculi that are just low-level enough that we can express allocation and garbage collection, yet are sufficiently abstract that we may formally prove the correctness of various memory management strategies. By making the heap of a program syntactically apparent, we can specify memory actions as rewriting rules that allocate values on the heap and automatically dereference pointers to such objects when needed. This formulation permits the specification of garbage collection as a relation that removes portions of the heap without affecting the outcome of the evaluation. Our high-level approach allows us to specify in a compact manner a wide variety of memory management techniques, including standard trace-based garbage collection (i.e., the family of copying and mark/sweep collection algorithms), generational collection, and type-based, tag-free collection. Furthermore, since the definition of garbage is based on the semantics of the underlying language instead of the conservative approximation of inaccessibility, we are able to specify and prove the idea that type inference can be used to collect some objects that are accessible but never used.
Tag-free Garbage Collection Using Explicit Type Parameters
- In Proceedings of the 1994 ACM Conference on Lisp and Functional Programming
"... We have constructed a practical tag-free garbage collector based on explicit type parameterization of polymorphic functions, for a dialect of ML. The collector relies on type information derived from an explicitly-typed 2nd-order representation of the program, generated by the compiler as a byproduc ..."
Abstract
-
Cited by 65 (0 self)
- Add to MetaCart
We have constructed a practical tag-free garbage collector based on explicit type parameterization of polymorphic functions, for a dialect of ML. The collector relies on type information derived from an explicitly-typed 2nd-order representation of the program, generated by the compiler as a byproduct of ordinary Hindley-Milner type inference. Runtime type manipulations are performed lazily to minimize execution overhead. We present details of our implementation approach, and preliminary performance measurements suggesting that the overhead of passing type information explicitly can be made acceptably small. 1 Introduction Parametric polymorphic functions, as found in languages such as ML and Haskell, are traditionally compiled into code that executes uniformly regardless of the types of its arguments. This approach requires adopting a uniform data representation for all types. Typically, one pretends that every value fits in a single machine word; values that do not fit must be pointe...
Local Reasoning about a Copying Garbage Collector
- In 31st ACM POPL
, 2004
"... We present a programming language, model, and logic appropriate for implementing and reasoning about a memory management system. We then state what is meant by correctness of a copying garbage collector, and employ a variant of the novel separation logics [18, 23] to formally specify partial correct ..."
Abstract
-
Cited by 58 (7 self)
- Add to MetaCart
We present a programming language, model, and logic appropriate for implementing and reasoning about a memory management system. We then state what is meant by correctness of a copying garbage collector, and employ a variant of the novel separation logics [18, 23] to formally specify partial correctness of Cheney's copying garbage collector [8]. Finally, we prove that our implementation of Cheney's algorithm meets its specification, using the logic we have given, and auxiliary variables [19].
Semantics of memory management for polymorphic languages
- In 1st Workshop on Higher Order Operational Techniques in Semantics, A. Gordon and A. Pitts, Eds. Publications of the Newton Institute
, 1997
"... The views and conclusions contained in this document arethose of the authors and should not be interpreted as representing o cial policies, either expressed or implied, of the Advanced We present a static and dynamic semantics for an abstract machine that evaluates expressions of a polymorphic progr ..."
Abstract
-
Cited by 40 (8 self)
- Add to MetaCart
The views and conclusions contained in this document arethose of the authors and should not be interpreted as representing o cial policies, either expressed or implied, of the Advanced We present a static and dynamic semantics for an abstract machine that evaluates expressions of a polymorphic programming language. Unlike traditional semantics, our abstract machine exposes many important issues of memory management, such as value sharing and control representation. We prove the soundness of the static semantics with respect to the dynamic semantics using traditional techniques. We then show how these same techniques may be used to establish the soundness of various memory management strategies, including type-based, tag-free garbage collection� tail-call elimination � and environment strengthening. Keywords: management Type theory and operational semantics are remarkably e ective tools for programming
Garbage Collection for Strongly-Typed Languages using Run-time Type Reconstruction
- IN ACM CONFERENCE ON LISP AND FUNCTIONAL PROGRAMMING
, 1994
"... Garbage collectors perform two functions: live-object detection and dead-object reclamation. In this paper, we present a new technique for live-object detection based on run-time type reconstruction for a strongly-typed, polymorphic language. This scheme uses compile-time type information together ..."
Abstract
-
Cited by 29 (0 self)
- Add to MetaCart
Garbage collectors perform two functions: live-object detection and dead-object reclamation. In this paper, we present a new technique for live-object detection based on run-time type reconstruction for a strongly-typed, polymorphic language. This scheme uses compile-time type information together with the run-time tree of activation frames to determine the exact type of every object participating in the computation. These reconstructed types are then used to identify and traverse the live heap objects during garbage collection. We describe an implementation of our scheme for the Id parallel programming language compiled for the *T multiprocessor architecture. We present simulation studies that compare the performance of type-reconstructing garbage collection with conservative garbage collection and compilerdirected storage reclamation.
Collecting More Garbage
- LISP 94
, 1994
"... We present a method, adapted to polymorphically typed functional languages, to detect and collect more garbage than existing GCs. It can be applied to strict or lazy higher order languages and to several garbage collection schemes. Our GC exploits the information on utility of arguments provided by ..."
Abstract
-
Cited by 17 (0 self)
- Add to MetaCart
We present a method, adapted to polymorphically typed functional languages, to detect and collect more garbage than existing GCs. It can be applied to strict or lazy higher order languages and to several garbage collection schemes. Our GC exploits the information on utility of arguments provided by polymorphic types of functions. It is able to detect garbage that is still referenced from the stack and may collect useless parts of otherwise useful data structures. We show how to partially collect shared data structures and to extend the type system to infer more precise information. We also present how this technique can plug several common forms of space leaks.
Run time type information in Mercury
- In Proceedings of the 1999 International Conference on the Principles and Practice of Declarative Programming
, 1999
"... . The logic/functional language Mercury uses a strong, mostly static type system based on polymorphic many-sorted logic. For eÆ- ciency, the Mercury compiler uses type specic representations of terms, and implements polymorphic operations such as unications via generic code invoked with descriptions ..."
Abstract
-
Cited by 14 (6 self)
- Add to MetaCart
. The logic/functional language Mercury uses a strong, mostly static type system based on polymorphic many-sorted logic. For eÆ- ciency, the Mercury compiler uses type specic representations of terms, and implements polymorphic operations such as unications via generic code invoked with descriptions of the actual types of the operands. These descriptions, which consist of automatically generated data and code, are the main components of the Mercury runtime type information (RTTI) system. We have used this system to implement several extensions of the Mercury system, including an escape mechanism from static type checking, generic input and output facilities, a debugger, and automatic memoization, and we are in the process of using it for an accurate, native garbage collector. We give detailed information on the implementation and uses of the Mercury RTTI system as well as measurements of the space costs of the system. 1 Introduction Many modern functional and logic programming lang...
Bounded-Space Tagless Garbage Collection for First Order Polymorphic Languages
- Department of Computer Science, Monash University
, 1995
"... By compile-time type analysis of a program written in a statically typed first-order polymorphic language, it is possible to generate a mark-sweep or copying garbage collector for that program which does not require runtime tags on the data, which operates in linear time in the size of the data and ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
By compile-time type analysis of a program written in a statically typed first-order polymorphic language, it is possible to generate a mark-sweep or copying garbage collector for that program which does not require runtime tags on the data, which operates in linear time in the size of the data and stack, and, excepting the use of a per-pointer mark bit, within a small, bounded workspace---desirable in an algorithm which is only invoked when space is exhausted. The basis for the new graph marking algorithm, the compile time type analysis required, and safety in the presence of sharing is described for languages employing a first-order subset of the Hindley-Milner typing discipline; it is also immediately applicable to monomorphic, type-safe programming languages, such as PASCAL. The algorithm is the first tag-free marking algorithm for values of arbitrary algebraic type requiring less than linear space in the worst case. Keywords: polymorphic, tagless, tag-free, garbage collection, gr...

