Results 1  10
of
30
Monads for functional programming
, 1995
"... The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating effects found in other languages, such as global state, exception handling, output, or nondeterminism. Three case studies are looked at in detail: how monads ease the modification o ..."
Abstract

Cited by 1353 (38 self)
 Add to MetaCart
The use of monads to structure functional programs is described. Monads provide a convenient framework for simulating effects found in other languages, such as global state, exception handling, output, or nondeterminism. Three case studies are looked at in detail: how monads ease the modification of a simple evaluator; how monads act as the basis of a datatype of arrays subject to inplace update; and how monads can be used to build parsers.
Comprehending Monads
 Mathematical Structures in Computer Science
, 1992
"... Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised t ..."
Abstract

Cited by 467 (14 self)
 Add to MetaCart
Category theorists invented monads in the 1960's to concisely express certain aspects of universal algebra. Functional programmers invented list comprehensions in the 1970's to concisely express certain programs involving lists. This paper shows how list comprehensions may be generalised to an arbitrary monad, and how the resulting programming feature can concisely express in a pure functional language some programs that manipulate state, handle exceptions, parse text, or invoke continuations. A new solution to the old problem of destructive array update is also presented. No knowledge of category theory is assumed.
Escape Analysis for Object Oriented Languages. Application to Java
 IN PROCEEDINGS OF THE 14TH ANNUAL CONFERENCE ON OBJECTORIENTED PROGRAMMING SYSTEMS, LANGUAGES AND APPLICATIONS
, 1999
"... Escape analysis [27, 14, 5] is a static analysis that determines whether the lifetime of data exceeds its static scope. The main originality of our escape analysis is that it determines precisely the effect of assignments, which is necessary to apply it to object oriented languages with promising r ..."
Abstract

Cited by 96 (2 self)
 Add to MetaCart
Escape analysis [27, 14, 5] is a static analysis that determines whether the lifetime of data exceeds its static scope. The main originality of our escape analysis is that it determines precisely the effect of assignments, which is necessary to apply it to object oriented languages with promising results, whereas previous work [27, 14, 5] applied it to functional languages and were very imprecise on assignments. Our implementation analyses the full Java TM Language. We have applied our analysis to stack allocation and synchronization elimination. We manage to stack allocate 13% to 95% of data, eliminate more than 20% of synchronizations on most programs (94% and 99% on two examples) and get up to 44% speedup (21% on average). Our detailed experimental study on large programs shows that the improvement comes more from the decrease of the garbage collection and allocation times than from improvements on data locality [7], contrary to what happened for ML [5].
A provable time and space efficient implementation of nesl
 In International Conference on Functional Programming
, 1996
"... In this paper we prove time and space bounds for the implementation of the programming language NESL on various parallel machine models. NESL is a sugared typed Jcalculus with a set of array primitives and an explicit parallel map over arrays. Our results extend previous work on provable implementa ..."
Abstract

Cited by 73 (8 self)
 Add to MetaCart
(Show Context)
In this paper we prove time and space bounds for the implementation of the programming language NESL on various parallel machine models. NESL is a sugared typed Jcalculus with a set of array primitives and an explicit parallel map over arrays. Our results extend previous work on provable implementation bounds for functional languages by considering space and by including arrays. For modeling the cost of NESL we augment a standard callbyvalue operational semantics to return two cost measures: a DAG representing the sequential dependence in the computation, and a measure of the space taken by a sequential implementation. We show that a NESL program with w work (nodes in the DAG), d depth (levels in the DAG), and s sequential space can be implemented on a p processor butterfly network, hypercube, or CRCW PRAM usin O(w/p + d log p) time and 0(s + dp logp) reachable space. For programs with sufficient parallelism these bounds are optimal in that they give linew speedup and use space within a constant factor of the sequential space. 1
Escape Analysis: Correctness Proof, Implementation and Experimental Results
 In Conference Record of the 25th Annual ACM Symposium on Principles of Programming Languages
, 1998
"... We describe an escape analysis [32, 14], used to determine whether the lifetime of data exceeds its static scope. We give a new correctness proof starting directly from a semantics. Contrary to previous proofs, it takes into account all the features of functional languages, including imperative fea ..."
Abstract

Cited by 64 (3 self)
 Add to MetaCart
(Show Context)
We describe an escape analysis [32, 14], used to determine whether the lifetime of data exceeds its static scope. We give a new correctness proof starting directly from a semantics. Contrary to previous proofs, it takes into account all the features of functional languages, including imperative features and polymorphism. The analysis has been designed so that it can be implemented under the small complexity bound of O(n log 2 n) where n is the size of the analyzed program. We have included it in the Caml Special Light compiler (an implementation of ML), and applied it to very large programs. We plan to apply these techniques to the Java programming language. Escape analysis has been applied to stack allocation. We improve the optimization technique by determining minimal lifetime for stack allocated data, and using inlining. We manage to stack allocate 25% of data in the theorem prover Coq. We analyzed the effect of this optimization, and noticed that its main effect is to improve ...
Escape Analysis for Java. Theory and Practice
, 2003
"... values can either be object names N 2 OName for objects and arrays, or ; for variables of simple types such as integers. ..."
Abstract

Cited by 26 (0 self)
 Add to MetaCart
values can either be object names N 2 OName for objects and arrays, or ; for variables of simple types such as integers.
Escape Analysis for JavaTM: Theory and Practice
 ACM Transactions on Programming Languages and Systems (TOPLAS
"... Escape analysis is a static analysis that determines whether the lifetime of data may exceed its static scope. This paper first presents the design and correctness proof of an escape analysis for JavaTM. This analysis is interprocedural, context sensitive, and as flowsensitive as the static single ..."
Abstract

Cited by 22 (0 self)
 Add to MetaCart
Escape analysis is a static analysis that determines whether the lifetime of data may exceed its static scope. This paper first presents the design and correctness proof of an escape analysis for JavaTM. This analysis is interprocedural, context sensitive, and as flowsensitive as the static single assignment form. So, assignments to object fields are analyzed in a flowinsensitive manner. Since Java is an imperative language, the effect of assignments must be precisely determined. This goal is achieved thanks to our technique using two interdependent analyses, one forward, one backward. We introduce a new method to prove the correctness of this analysis, using aliases as an intermediate step. We use integers to represent the escaping parts of values, which leads to a fast and precise analysis. Our implementation [Blanchet 1999], which applies to the whole Java language, is then presented. Escape analysis is applied to stack allocation and synchronization elimination. In our benchmarks, we stack allocate 13 % to 95 % of data, eliminate more than 20 % of synchronizations on most programs (94 % and 99 % on two examples) and get up to 43 % runtime decrease (21 % on average). Our detailed experimental study on large programs shows that the improvement comes more from the decrease of the garbage collection and allocation times than from improvements on data locality, contrary to what happened for ML. This comes from the difference in the garbage collectors.
Environment Analysis via ∆CFA
, 2006
"... We describe a new programanalysis framework, based on CPS and procedurestring abstractions, that can handle critical analyses which the kCFA framework cannot. We present the main theorems concerning correctness, show an application analysis, and describe a running implementation. ..."
Abstract

Cited by 12 (8 self)
 Add to MetaCart
We describe a new programanalysis framework, based on CPS and procedurestring abstractions, that can handle critical analyses which the kCFA framework cannot. We present the main theorems concerning correctness, show an application analysis, and describe a running implementation.