Results 1  10
of
10
A Logical Analysis of Aliasing in Imperative HigherOrder Functions
 INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, ICFP’05
, 2005
"... We present a compositional program logic for callbyvalue imperative higherorder functions with general forms of aliasing, which can arise from the use of reference names as function parameters, return values, content of references and part of data structures. The program logic ..."
Abstract

Cited by 28 (3 self)
 Add to MetaCart
We present a compositional program logic for callbyvalue imperative higherorder functions with general forms of aliasing, which can arise from the use of reference names as function parameters, return values, content of references and part of data structures. The program logic
On the adaptiveness of quicksort
 IN: WORKSHOP ON ALGORITHM ENGINEERING & EXPERIMENTS, SIAM
, 2005
"... Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most programming libraries. Some sorting algorithms are adapti ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
Quicksort was first introduced in 1961 by Hoare. Many variants have been developed, the best of which are among the fastest generic sorting algorithms available, as testified by the choice of Quicksort as the default sorting algorithm in most programming libraries. Some sorting algorithms are adaptive, i.e. they have a complexity analysis which is better for inputs which are nearly sorted, according to some specified measure of presortedness. Quicksort is not among these, as it uses Ω(n log n) comparisons even when the input is already sorted. However, in this paper we demonstrate empirically that the actual running time of Quicksort is adaptive with respect to the presortedness measure Inv. Differences close to a factor of two are observed between instances with low and high Inv value. We then show that for the randomized version of Quicksort, the number of element swaps performed is provably adaptive with respect to the measure Inv. More precisely, we prove that randomized Quicksort performs expected O(n(1+log(1+ Inv/n))) element swaps, where Inv denotes the number of inversions in the input sequence. This result provides a theoretical explanation for the observed behavior, and gives new insights on the behavior of the Quicksort algorithm. We also give some empirical results on the adaptive behavior of Heapsort and Mergesort.
Generic Discrimination  Sorting and Partitioning Unshared Data in Linear Time
, 2008
"... We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that worstcase lineartime discrimination functions (discriminators) can be defined generically, by (co)induction on an expressive language of order denotations. The generic definition yields di ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that worstcase lineartime discrimination functions (discriminators) can be defined generically, by (co)induction on an expressive language of order denotations. The generic definition yields discriminators that generalize both distributive sorting and multiset discrimination. The generic discriminator can be coded compactly using list comprehensions, with order denotations specified using Generalized Algebraic Data Types (GADTs). A GADTfree combinator formulation of discriminators is also given. We give some examples of the uses of discriminators, including a new mostsignificantdigit lexicographic sorting algorithm. Discriminators generalize binary comparison functions: They operate on n arguments at a time, but do not expose more information than the underlying equivalence, respectively ordering relation on the arguments. We argue that primitive types with equality (such as references in ML) and ordered types (such as the machine integer type), should expose their equality, respectively standard ordering relation, as discriminators: Having only a binary equality test on a type requires Θ(n 2) time to find all the occurrences of an element in a list of length n, for each element in the list, even if the equality test takes only constant time. A discriminator accomplishes this in linear time. Likewise, having only a (constanttime) comparison function requires Θ(n log n) time to sort a list of n elements. A discriminator can do this in linear time.
Generic topdown discrimination
, 2009
"... We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that discriminators (discrimination functions) can be defined generically, by structural recursion on order and equivalence expressions denoting a rich class of total preorders and equivalence rel ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
We introduce the notion of discrimination as a generalization of both sorting and partitioning and show that discriminators (discrimination functions) can be defined generically, by structural recursion on order and equivalence expressions denoting a rich class of total preorders and equivalence relations, respectively. Discriminators improve the asymptotic performance of generic comparisonbased sorting and partitioning, yet do not expose more information than the underlying ordering relation, respectively equivalence. For a large class of order and equivalence expressions, including all standard orders for firstorder recursive types, the discriminators execute in worstcase linear time. The generic discriminators can be coded compactly using list comprehensions, with order expressions specified using Generalized Algebraic Data Types (GADTs). We give some examples of the uses of discriminators, including a new mostsignificantdigit lexicographic sorting algorithm and type isomorphism with an associativecommutative operator. Full source code of discriminators and their applications is included. 1 We argue discriminators should be basic operations for primitive and abstract types with equality. The basic multiset discriminator for references, originally due to Paige et al., is shown to be both efficient and fully abstract: it finds all duplicates of all references occurring in a list in linear time without leaking information about their representation. In particular, it behaves deterministically in the presence of garbage collection and nondeterministic heap allocation even when references are represented as raw machine addresses. In contrast, having only a binary equality test as in ML requires Θ(n 2) time, and allowing hashing for performance reasons as in Java, makes execution nondeterministic and complicates garbage collection.
A Portable Cache Profiler Based on SourceLevel Instrumentation,” tech. rep
, 2003
"... 1.2 Algorithms Should Be CacheConscious......................... 2 ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
1.2 Algorithms Should Be CacheConscious......................... 2
Generic Discrimination: Partitioning and Sorting of Complex Data in Linear Time
"... Abstract. We introduce the notion of discrimination, which is a generalized form of partitioning, and present an expressive term language for defining equivalence relations on complex data. The language allows definition of equivalence relations by freely combining structural equivalence, equivalenc ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. We introduce the notion of discrimination, which is a generalized form of partitioning, and present an expressive term language for defining equivalence relations on complex data. The language allows definition of equivalence relations by freely combining structural equivalence, equivalence of lists under commutativity, idempotence (bag and set equivalence), and more. We then show that worstcase lineartime discriminators can be defined generically, by induction on the term language, using multiset discrimination. By employing discriminators for base types such as characters and integer segments that sort their inputs, it can be shown that the inductive construction yields discriminators that both partition and sort their input in linear time for a wide range of total preorders. This amounts to generically bootstrapping pigeonhole sorting for a finite segment of primitive data to lineartime sorting of complex data. We show how these discriminators, both sorting and nonsorting, can be coded up compactly and elegantly using Generalized Algebraic Data Types (GADTs) and list comprehensions and give some examples of applications of the use of discriminators. Finally, we argue that discrimination should replace equality testing as a language primitive for builtin types and abstract types that wish to only make equality observable: they algorithmically generalize equality testing, which is basically just discrimination of 2 elements. Discriminators allow partitioning and even sorting of arbitrary size lists in linear time without comparison operations (as in comparisonbased sorting) or arithmetization of the values (as for hashbased methods). Thus even references in ML could be discriminated in linear time instead of quadratic time, if discrimination were the builtin operation for exposing reference equality, not equality testing.
data structure (abstract of invited lecture). In Fritz Henglein,
"... [2] Rodney M. Burstall. Some techniques for proving correctness of programs ..."
Abstract
 Add to MetaCart
[2] Rodney M. Burstall. Some techniques for proving correctness of programs
Sorting in the Presence of Branch Prediction and Caches Fast Sorting on Modern Computers
, 2005
"... Sorting is one of the most important and studied problems in computer science. Many good algorithms exist which offer various tradeoffs in efficiency, simplicity and memory use. However most of these algorithms were discovered decades ago at a time when computer architectures were much simpler than ..."
Abstract
 Add to MetaCart
Sorting is one of the most important and studied problems in computer science. Many good algorithms exist which offer various tradeoffs in efficiency, simplicity and memory use. However most of these algorithms were discovered decades ago at a time when computer architectures were much simpler than today. Branch prediction and cache memories are two developments in computer architecture that have a particularly large impact on the performance of sorting algorithms. This report describes a study of the behaviour of sorting algorithms on branch predictors and caches. Our work on branch prediction is almost entirely new, and finds a number of important results. In particular we show that insertion sort causes the fewest branch mispredictions of any comparisonbased algorithm, that optimizations such as the choice of the pivot in quicksort can have a large impact on the predictability of branches, and that advanced twolevel branch predictors are usually worse at predicting branches in sorting algorithms than simpler branch predictors. In many cases it is possible to draw links between classical theoretical analyses of algorithms and their branch prediction behaviour. The other main work described in this report is an analysis of the behaviour of sorting algorithms on modern caches. Over the last decade there has been considerable interest in optimizing sorting algorithms to reduce the number of cache misses. We experimentally study the cache performance of both classical
linked data structures; a proof of the SchorrWaite algorithm. In Manfried
, 1973
"... [1] Rodney M. Burstall. Some techniques for proving correctness of programs ..."
Abstract
 Add to MetaCart
[1] Rodney M. Burstall. Some techniques for proving correctness of programs
With Applications to Inplace Resilient Sorting Advisor:
, 2012
"... עש ת לול א To Avital and Lotem i ii Table of Contents Abstract...................................... ..."
Abstract
 Add to MetaCart
עש ת לול א To Avital and Lotem i ii Table of Contents Abstract......................................