Results 1  10
of
12
Observers for Linear Types
 ESOP ’92: 4th European Symposium on Programming, Rennes, France, Proceedings
, 1992
"... Linear types provide the framework for a safe embedding of mutable state in functional languages by enforcing the principle that variables of linear type must be used exactly once. A potential disadvantage of this approach is that it places read accesses to suchvariables under the same restrictio ..."
Abstract

Cited by 22 (4 self)
 Add to MetaCart
Linear types provide the framework for a safe embedding of mutable state in functional languages by enforcing the principle that variables of linear type must be used exactly once. A potential disadvantage of this approach is that it places read accesses to suchvariables under the same restriction as write accesses, and thus prevents reads to proceed in parallel. We present here an extension of linear types which augments the usual distinction between linear and nonlinear bya third state, observers of linear variables. Since, unlike linear variables, observers can be duplicated, multiple concurrent reads are made possible. On the other hand, observers must be shortlived enough to never overlap with mutations. The resulting type system is in many aspects similar to the one of ML: It is polymorphic, has principal types, and admits a type reconstruction algorithm. 1 Introduction We are investigating a type system that addresses the update problem in functional languages: How...
Purely Functional RandomAccess Lists
 In Functional Programming Languages and Computer Architecture
, 1995
"... We present a new data structure, called a randomaccess list, that supports array lookup and update operations in O(log n) time, while simultaneously providing O(1) time list operations (cons, head, tail). A closer analysis of the array operations improves the bound to O(minfi; log ng) in the wor ..."
Abstract

Cited by 17 (2 self)
 Add to MetaCart
We present a new data structure, called a randomaccess list, that supports array lookup and update operations in O(log n) time, while simultaneously providing O(1) time list operations (cons, head, tail). A closer analysis of the array operations improves the bound to O(minfi; log ng) in the worst case and O(log i) in the expected case, where i is the index of the desired element. Empirical evidence suggests that this data structure should be quite efficient in practice. 1 Introduction Lists are the primary data structure in every functional programmer 's toolbox. They are simple, convenient, and usually quite efficient. The main drawback of lists is that accessing the ith element requires O(i) time. In such situations, functional programmers often find themselves longing for the efficient random access of arrays. Unfortunately, arrays can be quite awkward to implement in a functional setting, where previous versions of the array must be available even after an update. Since arra...
RealTime Deques, Multihead Turing Machines, and Purely Functional Programming
 In Conference on Functional Programming Languages and Computer Architecture
, 1993
"... We answer the following question: Can a deque (double ended queue) be implemented in a purely functional language such that each push or pop operation on either end of a queue is accomplished in O(1) time in the worst case? The answer is yes, thus solving a problem posted by Gajewska and Tarjan [1 ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
We answer the following question: Can a deque (double ended queue) be implemented in a purely functional language such that each push or pop operation on either end of a queue is accomplished in O(1) time in the worst case? The answer is yes, thus solving a problem posted by Gajewska and Tarjan [14] and by Ponder, McGeer, and Ng [25], and refining results of Sarnak [26] and Hoogerwoord [18]. We term such a deque realtime, since its constant worstcase behavior might be useful in real time programs (assuming realtime garbage collection [3], etc.) Furthermore, we show that no restriction of the functional language is necessary, and that push and pop operations on previous versions of a deque can also be achieved in constant time. We present a purely functional implementation of real time deques and its complexity analysis. We then show that the implementation has some interesting implications, and can be used to give a realtime simulation of a multihead Turing machine in a purel...
Static Analysis for Safe Destructive Updates (Extended Abstract)
 Logic Based Program Synthesis and Transformation (LOPSTR 2001), volume 2372 of LNCS
, 2001
"... this paper is for a generic functional language and requires no prior knowledge of PVS. ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
this paper is for a generic functional language and requires no prior knowledge of PVS.
L.: Staged Static Techniques to Efficiently Implement Array Copy Semantics in a MATLAB JIT Compiler
, 2010
"... Abstract. Matlab has gained widespread acceptance among scientists. Several dynamic aspects of the language contribute to its appeal, but also provide many challenges. One such problem is caused by the copy semantics of Matlab. ExistingMatlab systems rely on referencecounting schemes to create copi ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Abstract. Matlab has gained widespread acceptance among scientists. Several dynamic aspects of the language contribute to its appeal, but also provide many challenges. One such problem is caused by the copy semantics of Matlab. ExistingMatlab systems rely on referencecounting schemes to create copies only when a shared array representation is updated. This reduces array copies, but requires runtime checks. We present a staged static analysis approach to determine when copies are not required. The first stage uses two simple, intraprocedural analyses, while the second stage combines a forward necessary copy analysis with a backward copy placement analysis. Our approach eliminates unneeded array copies without requiring reference counting or frequent runtime checks. We have implemented our approach in the McVM JIT. Our results demonstrate that, for our benchmark set, there are significant overheads for both existing referencecounted and naive copyinsertion approaches, and that our staged approach is effective in avoiding unnecessary copies. 1
Fully Persistent Arrays for Efficient Incremental Updates and Voluminous Reads
 4th European Symposium on Programming
, 1992
"... The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
The array update problem in a purely functional language is the following: once an array is updated, both the original array and the newly updated one must be preserved to maintain referential transparency. We devise a very simple, fully persistent data structure to tackle this problem such that ffl each incremental update costs O(1) worstcase time, ffl a voluminous sequence of r reads cost in total O(r) amortized time, and ffl the data structure use O(n + u) space, where n is the size of the array and u is the total number of updates. A sequence of r reads is voluminous if r is \Omega\Gamma n) and the sequence of arrays being read forms a path of length O(r) in the version tree. A voluminous sequence of reads may be mixed with updates without affecting either the performance of reads or updates. An immediate consequence of the above result is that if a functional program is singlethreaded, then the data structure provides a simple and efficient implementation of funct...
The Higherorder Aggregate Update Problem
"... Abstract. We present a multipass interprocedural analysis and transformation for the functional aggregate update problem. Our solution handles untyped programs, including unrestricted closures and nested arrays. Also, it can handle programs that contain a mix of functional and destructive updates. ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Abstract. We present a multipass interprocedural analysis and transformation for the functional aggregate update problem. Our solution handles untyped programs, including unrestricted closures and nested arrays. Also, it can handle programs that contain a mix of functional and destructive updates. Correctness of all the analyses and of the transformation itself is proved. 1
Structural and FlowSensitive Types for Whiley
, 2011
"... Modern statically typed languages require variables to be declared with a single static type, and that subtyping relationships between useddefined types be made explicit. This contrasts with dynamically typed languages, where variables are declared implicitly, can hold values of different types at ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Modern statically typed languages require variables to be declared with a single static type, and that subtyping relationships between useddefined types be made explicit. This contrasts with dynamically typed languages, where variables are declared implicitly, can hold values of different types at different points and have no restrictions on flow (leading to adhoc and implicit subtyping). We present the flowsensitive and structural type system used in the Whiley language. This permits variables to be declared implicitly, have multiple types within a function, and be retyped after runtime type tests. Furthermore, subtyping between userdefined types is implicit, based purely on structure. The result is a staticallytyped language which, for the most part, has the look and feel of a dynamic language. The typing algorithm operates in a fashion similar to dataflow analysis. Widening must be applied to ensure termination although, surprisingly, there is no loss of precision. We formalise Whiley’s type system and operational semantics, and give proofs of termination and soundness. 1
FOL: An object oriented extension to the SISAL Language (Extended Abstract)
, 1997
"... Marc Pantel, Marcel Gandriau, Patrick Sall'e IRIT/ENSEEIHT, 2, rue Charles Camichel, 31071 TOULOUSE, FRANCE, fpantel,gandri,salleg@irit.fr April 2, 1997 Abstract This paper describes an improvement of the reusability model of the SISAL language. ..."
Abstract
 Add to MetaCart
Marc Pantel, Marcel Gandriau, Patrick Sall'e IRIT/ENSEEIHT, 2, rue Charles Camichel, 31071 TOULOUSE, FRANCE, fpantel,gandri,salleg@irit.fr April 2, 1997 Abstract This paper describes an improvement of the reusability model of the SISAL language.
General Terms
"... PHP is a popular language for serverside applications. In PHP, assignment to variables copies the assigned values, according to its socalled copyonassignment semantics. In contrast, a typical PHP implementation uses a copyonwrite scheme to reduce the copy overhead by delaying copies as much as ..."
Abstract
 Add to MetaCart
PHP is a popular language for serverside applications. In PHP, assignment to variables copies the assigned values, according to its socalled copyonassignment semantics. In contrast, a typical PHP implementation uses a copyonwrite scheme to reduce the copy overhead by delaying copies as much as possible. This leads us to ask if the semantics and implementation of PHP coincide, and actually this is not the case in the presence of sharings within values. In this paper, we describe the copyonassignment semantics with three possible strategies to copy values containing sharings. The current PHP implementation has inconsistencies with these semantics, caused by its naïve use of copyonwrite. We fix this problem by the novel mostly copyonwrite scheme, making the copyonwrite implementations faithful to the semantics. We prove that our copyonwrite implementations are correct, using bisimulation with the copyonassignment semantics. D.3.0 [Programming Lan