Results 1  10
of
47
Alias Types for Recursive Data Structures
, 2000
"... Linear type systems permit programmers to deallocate or explicitly recycle memory, but they are severly restricted by the fact that they admit no aliasing. This paper describes a pseudolinear type system that allows a degree of aliasing and memory reuse as well as the ability to define complex recu ..."
Abstract

Cited by 136 (14 self)
 Add to MetaCart
Linear type systems permit programmers to deallocate or explicitly recycle memory, but they are severly restricted by the fact that they admit no aliasing. This paper describes a pseudolinear type system that allows a degree of aliasing and memory reuse as well as the ability to define complex recursive data structures. Our type system can encode conventional linear data structures such as linear lists and trees as well as more sophisticated data structures including cyclic and doublylinked lists and trees. In the latter cases, our type system is expressive enough to represent pointer aliasing and yet safely permit destructive operations such as object deallocation. We demonstrate the flexibility of our type system by encoding two common compiler optimizations: destinationpassing style and DeutschSchorrWaite or "linkreversal" traversal algorithms.
Proving pointer programs in Hoare Logic
, 2000
"... . It is possible, but difficult, to reason in Hoare logic about programs which address and modify data structures defined by pointers. The challenge is to approach the simplicity of Hoare logic's treatment of variable assignment, where substitution affects only relevant assertion formul. The axio ..."
Abstract

Cited by 99 (7 self)
 Add to MetaCart
. It is possible, but difficult, to reason in Hoare logic about programs which address and modify data structures defined by pointers. The challenge is to approach the simplicity of Hoare logic's treatment of variable assignment, where substitution affects only relevant assertion formul. The axiom of assignment to object components treats each component name as a pointerindexed array. This permits a formal treatment of inductively defined data structures in the heap but tends to produce instances of modified component mappings in arguments to inductively defined assertions. The major weapons against these troublesome mappings are assertions which describe spatial separation of data structures. Three example proofs are sketched. 1 Introduction The power of the Floyd/Hoare treatment of imperative programs [8][11] lies in its use of variable substitution to capture the semantics of assignment: simply, R E x , the result of replacing every free occurrence of variable x in R by...
Lively Linear Lisp  'Look Ma, No Garbage!'
 ACM Sigplan Notices
, 1992
"... Linear logic has been proposed as one solution to the problem of garbage collection and providing efficient "updatein place" capabilities within a more functional language. Linear logic conserves accessibility, and hence provides a mechanical metaphor which is more appropriate for a distributedme ..."
Abstract

Cited by 92 (6 self)
 Add to MetaCart
Linear logic has been proposed as one solution to the problem of garbage collection and providing efficient "updatein place" capabilities within a more functional language. Linear logic conserves accessibility, and hence provides a mechanical metaphor which is more appropriate for a distributedmemory parallel processor in which copying is explicit. However, linear logic's lack of sharing may introduce significant inefficiencies of its own. We show an efficient implementation of linear logic called Linear Lisp that runs within a constant factor of nonlinear logic. This Linear Lisp allows RPLACX operations, and manages storage as safely as a nonlinear Lisp, but does not need a garbage collector. Since it offers assignments but no sharing, it occupies a twilight zone between functional languages and imperative languages. Our Linear Lisp Machine offers many of the same capabilities as combinator/graph reduction machines, but without their copying and garbage collection problems. Intr...
Scheduling Garbage Collection in Embedded Systems
, 1998
"... The complexity of systems for automatic control and other safetycritical applications grows rapidly. Computer software represents an increasing part of the complexity. As larger systems are developed, we need to find scalable techniques to manage the complexity in order to guarantee high product qu ..."
Abstract

Cited by 74 (0 self)
 Add to MetaCart
The complexity of systems for automatic control and other safetycritical applications grows rapidly. Computer software represents an increasing part of the complexity. As larger systems are developed, we need to find scalable techniques to manage the complexity in order to guarantee high product quality. Memory management is a key quality factor for these systems. Automatic memory management, or garbage collection, is a technique that significantly reduces the complex problem of correct memory management. The risk of software errors decreases and development time is reduced. Garbage collection techniques suitable for interactive and soft realtime systems exist, but few approaches are suitable for systems with hard realtime requirements, such as control systems (embedded systems). One part of the problem is solved by incremental garbage collection algorithms, which have been presented before. We focus on the scheduling problem which forms the second part of the problem, i.e. how the work of a garbage collector should be scheduled in order
Derivation of Data Intensive Algorithms by Formal Transformation: The SchorrWaite Graph Marking Algorithm
, 1996
"... In this paper we consider a particular class of algorithms which present certain difficulties to formal verification. These are algorithms which use a single data structure for two or more purposes, which combine program control information with other data structures or which are developed as a comb ..."
Abstract

Cited by 36 (25 self)
 Add to MetaCart
In this paper we consider a particular class of algorithms which present certain difficulties to formal verification. These are algorithms which use a single data structure for two or more purposes, which combine program control information with other data structures or which are developed as a combination of a basic idea with an implementation technique. Our approach is based on applying proven semanticspreserving transformation rules in a wide spectrum language. Starting with a set theoretical specification of "reachability" we are able to derive iterative and recursive graph marking algorithms using the "pointer switching" idea of Schorr and Waite. There have been several proofs of correctness of the SchorrWaite algorithm, and a small number of transformational developments of the algorithm. The great advantage of our approach is that we can derive the algorithm from its specification using only generalpurpose transformational rules: without the need for complicated induction arg...
Event based sequential program development: application to constructing a pointer program
 In Proc. FME 2003
, 2003
"... Abstract. In this article, I present an “event approach ” used to formally develop sequential programs. It is based on the formalism of Action Systems [6] (and Guarded Commands[7]), which is encoded within B [2]. This approach has already been used to develop distributed programs [4]. In the first p ..."
Abstract

Cited by 26 (1 self)
 Add to MetaCart
Abstract. In this article, I present an “event approach ” used to formally develop sequential programs. It is based on the formalism of Action Systems [6] (and Guarded Commands[7]), which is encoded within B [2]. This approach has already been used to develop distributed programs [4]. In the first part, I present the basic concepts. In the second part, I develop a complete example, which is a reshaping of the Shorr and Waite marking technique [1]. This algorithm is interesting because it involves a large number of pointer manipulations. 1
Foundations for a Practical Theory of Program Refinement and Transformation
, 1994
"... A wide spectrum language is presented, which is designed to facilitate the proof of the correctness of refinements and transformations. Two different proof methods are introduced and used to prove some fundamental transformations, including a general induction rule (Lemma 3.9) which enables transfor ..."
Abstract

Cited by 21 (14 self)
 Add to MetaCart
A wide spectrum language is presented, which is designed to facilitate the proof of the correctness of refinements and transformations. Two different proof methods are introduced and used to prove some fundamental transformations, including a general induction rule (Lemma 3.9) which enables transformations of recursive and iterative programs to be proved by induction on their finite truncations. A theorem for proving the correctness of recursive implementations is presented (Theorem 3.21), which provides a method for introducing a loop, without requiring the user to provide a loop invariant. A powerful, general purpose, transformation for removing or introducing recursion is described and used in a case study (Section 5) in which we take a small, but highly complex, program and apply formal transformations in order to uncover an abstract specification of the behaviour of the program. The transformation theory supports a transformation system, called FermaT, in which the applicability conditions of each transformation (and hence the correctness of the result) are mechanically verified. These results together considerably simplify the construction of viable program transformation tools; practical consequences are briefly discussed.
A Simple and Efficient Copying Garbage Collector for Prolog
 Proceedings of the Sixth International Symposium on Programming Language Implementation and Logic Programming, number 844 in LNCS
, 1994
"... We show how to implement efficient copying garbage collection for Prolog. We measure the efficiency of the collector compared to a standard marksweep algorithm on several programs. We then show how to accomodate generational garbage collection and Prolog primitives that make the implementation more ..."
Abstract

Cited by 18 (3 self)
 Add to MetaCart
We show how to implement efficient copying garbage collection for Prolog. We measure the efficiency of the collector compared to a standard marksweep algorithm on several programs. We then show how to accomodate generational garbage collection and Prolog primitives that make the implementation more difficult. The resulting algorithms are simpler and more efficient than the standard marksweep method on a range of benchmarks. The total execution times of the benchmark programs are reduced by 4 to 11 percent. INTRODUCTION Automated storage reclamation for Prolog based on Warren's Abstract Machine (WAM) [14] has several difficulties. Let us consider the architecture of a typical WAM: most data are stored on a global stack (also called the heap), while choice points and environments are stored on a local stack (also referred to as the stack). A trail stack records bindings to be undone on backtracking. We will not consider garbage collection of code space in this paper, atom tables or ...
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.