scispace - formally typeset
Search or ask a question

Showing papers on "Binary heap published in 2013"


Proceedings ArticleDOI
16 Jun 2013
TL;DR: A precise, path-sensitive static analysis for reasoning about heap reachability, that is, whether an object can be reached from another variable or object via pointer dereferences, using a novel mixed representation to achieve both precision and scalability.
Abstract: We present a precise, path-sensitive static analysis for reasoning about heap reachability, that is, whether an object can be reached from another variable or object via pointer dereferences. Precise reachability information is useful for a number of clients, including static detection of a class of Android memory leaks. For this client, we found the heap reachability information computed by a state-of-the-art points-to analysis was too imprecise, leading to numerous false-positive leak reports. Our analysis combines a symbolic execution capable of path-sensitivity and strong updates with abstract heap information computed by an initial flow-insensitive points-to analysis. This novel mixed representation allows us to achieve both precision and scalability by leveraging the pre-computed points-to facts to guide execution and prune infeasible paths. We have evaluated our techniques in the Thresher tool, which we used to find several developer-confirmed leaks in Android applications.

48 citations


Book ChapterDOI
01 Jan 2013
TL;DR: This paper tries to list some of the directions research on priority queues has taken in the last 50 years.
Abstract: Back in 1964 Williams introduced the binary heap as a basic priority queue data structure supporting the operations Insert and ExtractMin in logarithmic time. Since then numerous papers have been published on priority queues. This paper tries to list some of the directions research on priority queues has taken the last 50 years.

34 citations


Proceedings ArticleDOI
23 Feb 2013
TL;DR: This paper enhances Andersen's analysis with QUery-Directed Adaptive heap cloning for optimizing compilers, which has the same precision as the state-of-the-art, FULCRA, a version of QUDA with exhaustive heap cloning, but is significantly more scalable.
Abstract: Andersen's pointer analysis becomes more precise when applied with full heap cloning but unscalable for large, heap-intensive programs. In contrast, k-callsite-sensitive heap cloning can be faster but less precise for some programs. In this paper, we make one step forward by enhancing Andersen's analysis with QUery-Directed Adaptive (QUDA) heap cloning for optimizing compilers. The novelty of our analysis, called QUDA, lies in performing k-callsite-sensitive heap cloning iteratively, starting with k = 0 (without heap cloning), so that an abstract heap object is cloned at iteration k = i + 1 only if some mayalias queries that are not answered positively at iteration k = i may now be answered more precisely. QUDA, which is implemented in Open64, has the same precision as the state-of-the-art, FULCRA, a version of QUDA with exhaustive heap cloning, but is significantly more scalable. For 10 SPEC2000 C benchmarks and 5 C applications (totalling 840 KLOC) evaluated, QUDA takes only 4+ minutes but exhaustive heap cloning takes 42+ minutes to complete. QUDA takes only 75.1 % of the time that Open64 takes on average to compile these 15 programs under “-O2”.

30 citations


Journal ArticleDOI
TL;DR: A simple linear-time on-line algorithm for constructing a position heap for a string was proposed by Ehrenfeucht et al. as mentioned in this paper, which considers the suffixes ordered in the descending order of length.

17 citations


Book ChapterDOI
17 Jun 2013
TL;DR: It is shown that if the authors limit the maximum length of patterns to be sought, then they can also easily limit the height of the heap and reduce the worst-case cost of insertions and deletions.
Abstract: We present several results about position heaps, a relatively new alternative to suffix trees and suffix arrays. First, we show that if we limit the maximum length of patterns to be sought, then we can also easily limit the height of the heap and reduce the worst-case cost of insertions and deletions. Second, we show how to build a position heap in linear time independent of the size of the alphabet. Third, we show how to augment a position heap such that it supports access to the corresponding suffix array, and vice versa. Fourth, we introduce a variant of a position heap that can be simulated efficiently by a compressed suffix array with a linear number of extra bits.

14 citations


Proceedings ArticleDOI
15 Jul 2013
TL;DR: It is found that the heaps of real-world programs are, in practice, fundamentally simple structures that are largely constructed from a small number of simple structures and sharing idioms, such as the sharing of immutable or unique objects.
Abstract: The program heap is fundamentally a simple mathematical concept --- a set of objects and a connectivity relation on them. However, a large gap exists between the set of heap structures that could be constructed and those that programmers actually build. To understand this gap, we empirically study heap structures and sharing relations in large object-oriented programs. To scale and make sense of real world heaps, any analysis must employ abstraction; our abstraction groups sets of objects by role and the aliasing present in pointer sets. We find that the heaps of real-world programs are, in practice, fundamentally simple structures that are largely constructed from a small number of simple structures and sharing idioms, such as the sharing of immutable or unique (e.g., singleton) objects. For instance, we find that, under our abstraction, 53--75% of pointers build tree structures and we classify all but 7--18% of aliasing pointers. These results provide actionable information for rethinking the design of annotation systems, memory allocation/collection, and program analyses.

13 citations


Journal ArticleDOI
TL;DR: This paper presents a novel static analysis for garbage-collected imperative languages that infers accurate upper bounds on the peak heap usage, including exponential, logarithmic and polynomial bounds.

13 citations


Journal ArticleDOI
TL;DR: The Heap Sizing Rule is presented, based on a Heap-Aware Page Fault Equation that models how the number of page faults depends on H and M, and outperforms the default policy used by JikesRVM's heap size manager.

10 citations


Patent
13 Jun 2013
TL;DR: In this paper, the symmetric heap includes a symmetric partition for each process of a partitioned global address space (PGAS) system, where each partition has a same starting virtual memory address and a same global symmetric break.
Abstract: Allocating distributed data structures and managing allocation of a symmetric heap can include defining, using a processor, the symmetric heap. The symmetric heap includes a symmetric partition for each process of a partitioned global address space (PGAS) system. Each symmetric partition of the symmetric heap begins at a same starting virtual memory address and has a same global symmetric break. One process of a plurality of processes of the PGAS system is configured as an allocator process that controls allocation of blocks of memory for each symmetric partition of the symmetric heap. Using the processor executing the allocator process, isomorphic fragmentation among the symmetric partitions of the symmetric heap is maintained.

6 citations


Book ChapterDOI
16 Mar 2013
TL;DR: A minimal programming discipline is developed that enables the programmer to soundly express backpointer conditions, i.e., state conditions that involve heap objects that point to the reachable part of the heap, such as the above-mentioned reference counting invariant.
Abstract: In the verification of programs that manipulate the heap, logics that emphasize localized reasoning, such as separation logic, are being used extensively. In such logics, state conditions may only refer to parts of the heap that are reachable from the stack. However, the correct implementation of some data structures is based on state conditions that depend on unreachable locations. For example, reference counting depends on the invariant that "the number of nodes pointing to a certain node is equal to its reference counter". Such conditions are cumbersome or even impossible to formalize in existing variants of separation logic. In the first part of this paper, we develop a minimal programming discipline that enables the programmer to soundly express backpointer conditions, i.e., state conditions that involve heap objects that point to the reachable part of the heap, such as the above-mentioned reference counting invariant. In the second part, we demonstrate the expressiveness of our methodology by verifying the implementation of concurrent copy-on-write lists (CCoWL). CCoWL is a data structure with observational disjointness, i.e., its specification pretends that different lists depend on disjoint parts of the heap, so that separation logic reasoning is made easy, while its implementation uses sharing to maximize performance. The CCoWL case study is a very challenging problem, to which we are not aware of any other solution.

6 citations


Proceedings ArticleDOI
20 Jun 2013
TL;DR: It is found that both approaches to maintain shadow state for heap objects in Java work reliably but that -- with the contemporary JVM implementation of heap tagging -- the simpler hash map approach has far superior performance.
Abstract: In this paper we compare different approaches to maintain shadow state for heap objects in Java. We identify dynamic analyses that need to shadow heap objects, and we consider their requirements. We describe three very different approaches in detail: using a hash map, heap tagging, and injecting shadow fields.We discuss the tradeoffs between the different approaches, and we empirically evaluate the viability and performance of the hash map and heap tagging approaches, the two approaches that work on Hotspot, the most prevalent JVM. We find that both approaches work reliably, but that -- with the contemporary JVM implementation of heap tagging -- the simpler hash map approach has far superior performance.

Journal ArticleDOI
TL;DR: A simplified implementation of soft heaps that uses less space and avoids Chazelle's dismantling operations is given and an amortized time bound of $O(\lg \frac{1}{\varepsilon})$ for each deleti...
Abstract: In 1998, Chazelle [J. ACM, 47 (2000), pp. 1012--1027] introduced a new kind of meldable heap (priority queue) called the soft heap. Soft heaps trade accuracy for speed: the heap operations are allowed to increase the keys of certain items, thereby making these items bad, as long as the number of bad items in the data structure is at most $\varepsilon m$, where $m$ is the total number of insertions performed so far, and $\varepsilon$ is an error parameter. The amortized time per heap operation is $O(\lg \frac{1}{\varepsilon})$, reduced from $O(\lg n)$, where $n$ is the number of items in the heap. Chazelle used soft heaps in several applications, including a faster deterministic minimum-spanning-tree algorithm and a new deterministic linear-time selection algorithm. We give a simplified implementation of soft heaps that uses less space and avoids Chazelle's dismantling operations. We also give a simpler, improved analysis that yields an amortized time bound of $O(\lg \frac{1}{\varepsilon})$ for each deleti...

Proceedings ArticleDOI
19 Aug 2013
TL;DR: Binary heap trees are introduced in the management structures of the path planning module to reduce computation time and the actual A∗ algorithm for local path planning is replaced by Fringe Retrieving A which reuses previous-step information to fasten the search process.
Abstract: The autonomous onboard navigation system of a Mars exploration robot should be designed to meet mission-specific constraints on energy consumption, memory and computation power, and time costs. The objective of this research is to study dynamic path planning algorithms and their implementation techniques, and to improve the existing navigation software developed in EDRES at CNES. Firstly, binary heap trees are introduced in the management structures of the path planning module to reduce computation time. Secondly, the actual A∗ algorithm for local path planning is replaced by Fringe Retrieving A∗ which reuses previous-step information to fasten the search process. Finally, D∗ Lite algorithm is applied for the global path planning when a-priori information on the global navigation map is available (provided by an orbiter, for example). All developed algorithms have been implemented, tested and evaluated in the CNES EDRES environment.

Posted Content
TL;DR: Approaches and ideas described in this paper present a simple and asymptotically optimal implementation of immutable binary heap.
Abstract: This paper describes a new and purely functional implementation technique of binary heaps A binary heap is a tree-based data structure that implements priority queue operations (insert, remove, minimum/maximum) and guarantees at worst logarithmic running time for them Approaches and ideas described in this paper present a simple and asymptotically optimal implementation of immutable binary heap

Book ChapterDOI
20 Nov 2013
TL;DR: This paper focuses on randomizing the location of heap memory blocks using existing techniques, which requires a large amount of address space reservation, and results in lower location randomization for larger blocks.
Abstract: Heap based buffer overflows are a dangerous class of vulnerability. One countermeasure is randomizing the location of heap memory blocks. Existing techniques segregate the address space into clusters, each of which is used exclusively for one block size. This approach requires a large amount of address space reservation, and results in lower location randomization for larger blocks.

Patent
Kentaro Hara1
10 Sep 2013
TL;DR: In this paper, the authors present configurations for determining a list of wrappers in a new space of a host heap that include a reference to at least one object in a guest heap.
Abstract: The subject technology discloses configurations for determining a list of wrappers in a new space of a host heap that include a reference to at least one object in a guest heap; marking a set of objects in a new space of the guest heap; building an eden graph for the guest heap; marking a set of objects in the new space of the host heap based on a reachability in the eden graph; determining a list of marked wrappers from the host heap that are included in the eden graph of the guest heap; marking a set of wrappers in the new space of the guest heap that are included in the list of marked wrappers in the eden graph; and collecting a set of unmarked objects from the host heap and the guest heap.

Book ChapterDOI
10 Jul 2013
TL;DR: By supporting insert operation in O(1) amortized time, the weak-heap data structure becomes a valuable tool in adaptive sorting leading to an algorithm that is constant-factor optimal with respect to several measures of disorder.
Abstract: A weak heap is a variant of a binary heap where, for each node, the heap ordering is enforced only for one of its two children. In 1993, Dutton showed that this data structure yields a simple worst-case-efficient sorting algorithm. In this paper we review the refinements proposed to the basic data structure that improve the efficiency even further. Ultimately, minimum and insert operations are supported in O(1) worst-case time and extract-min operation in \(O(\lg n)\) worst-case time involving at most \(\lg n + O(1)\) element comparisons. In addition, we look at several applications of weak heaps. This encompasses the creation of a sorting index and the use of a weak heap as a tournament tree leading to a sorting algorithm that is close to optimal in terms of the number of element comparisons performed. By supporting insert operation in O(1) amortized time, the weak-heap data structure becomes a valuable tool in adaptive sorting leading to an algorithm that is constant-factor optimal with respect to several measures of disorder. Also, a weak heap can be used as an intermediate step in an efficient construction of binary heaps. For graph search and network optimization, a weak-heap variant, which allows some of the nodes to violate the weak-heap ordering, is known to be provably better than a Fibonacci heap.

Journal ArticleDOI
Yuan Hu1
TL;DR: An improved algorithm is proposed by experiments, which utilizes characteristics of priority queue and stack and conducts stack pushing on binary tree node, then accesses node successively to call glide adjustment algorithm to improve the adjustment efficiency.
Abstract: In many applications, it is necessary to adjust the node position of complete binary tree, making the data set have the nature of heap. Because when binary tree node data volume is huge, it will be needed apparently for heap adjustment efficiency of repair algorithms which is based on heap linear list to be improved. Now an improved algorithm is proposed by experiments, which utilizes characteristics of priority queue (delete the earliest data) and stack (delete the latest data), and conducts stack pushing on binary tree node, then accesses node successively to call glide adjustment algorithm to improve the adjustment efficiency.

Book ChapterDOI
01 Jan 2013
TL;DR: This chapter touches the Minimum Steiner Tree Problems in Graphs, which can be solved by heuristics based on the Minimum Spanning Tree Problem and/or the Shortest Path Problem using a binary heap that enables to implement a priority queue that substantially increases the algorithm efficiency.
Abstract: Many NP-complete optimization problems may be approximately solved by stochastic or deterministic heuristic methods and it is necessary to find their efficient data representation to minimize iteration computational time. In this chapter, we will touch the Minimum Steiner Tree Problems in Graphs (or Network Steiner Tree Problem), which can be solved by heuristics based on the Minimum Spanning Tree Problem and/or the Shortest Path Problem using a binary heap that enables to implement a priority queue that substantially increases the algorithm efficiency. We will also show a Delaunay triangulation-based way of finding minimal networks connecting a set of given points in the Euclidean plane using straight lines (minimum spanning tree) and its more general case (Steiner minimum tree) where additional points can be considered. Finally, we will deal with visibility graphs, Voronoi diagrams and rapidly exploring trees and focus on their applications in robot motion planning, where the robot should pass around obstacles from a given starting position to a given target position, touching none of them.