Results 1  10
of
15
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 30 (4 self)
 Add to MetaCart
(Show Context)
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 18 (2 self)
 Add to MetaCart
(Show Context)
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 13 (1 self)
 Add to MetaCart
(Show Context)
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 12 (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 8 (1 self)
 Add to MetaCart
(Show Context)
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 7 (2 self)
 Add to MetaCart
(Show Context)
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
(Show Context)
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 2 (1 self)
 Add to MetaCart
(Show Context)
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
Whiley: a Language Combining FlowTyping with Updateable Value Semantics
, 2012
"... Whiley is a statically typed language with the lookandfeel of a dynamically typed language. For example, as with many dynamically typed languages, assignments to variables, fields and list elements always succeed. Key to this is a careful combination of flow typing and updateable value semantics. ..."
Abstract
 Add to MetaCart
Whiley is a statically typed language with the lookandfeel of a dynamically typed language. For example, as with many dynamically typed languages, assignments to variables, fields and list elements always succeed. Key to this is a careful combination of flow typing and updateable value semantics. This enables a programming model that lies between the imperative (where mutable data is passed by reference and updated in place) and the functional (where immutable data is passed by value or by name). In Whiley, mutable data that may be updated in place is passed and returned by value, with the compiler free to eliminate unnecessary copies. Combined with flow typing (where variables may have different types at different program points), this yields an unusually flexible type system. In this paper, we explore the advantages of a programming model built around flow typing and updateable value semantics. Building on our previous work, we develop an extended flow typing calculus capturing the salient features of Whiley. Soundness and termination is proved. Finally, to address concerns that Whiley’s programming model cannot be made efficient, we report on experiments demonstrating that simple optimisations eliminate many unnecessary copies, and that the vast majority of update operations can be performed in place. 1
FOL: An object oriented extension to the SISAL Language (Extended Abstract)
, 1997
"... This paper describes an improvement of the reusability model of the SISAL language. The study ..."
Abstract
 Add to MetaCart
This paper describes an improvement of the reusability model of the SISAL language. The study