Proving Linearizability Using Partial Orders
Linearizability is the commonly accepted notion of correctness for concurrent data structures. It requires that any execution of the data structure is justified by a linearization—a linear order on operations satisfying the data structure’s sequential specification. Proving linearizability is often challenging because an operation’s position in the linearization order may depend on future operations. This makes it very difficult to incrementally construct the linearization in a proof. We propose a new proof method that can handle data structures with such future-dependent linearizations. Our key idea is to incrementally construct not a single linear order of operations, but a partial order that describes multiple linearizations satisfying the sequential specification. This allows decisions about the ordering of operations to be delayed, mirroring the behaviour of data structure implementations. We formalise our method as a program logic based on rely-guarantee reasoning, and demonstrate its effectiveness by verifying several challenging data structures: the Herlihy-Wing queue, the TS queue and the Optimistic set.
- Research Article
25
- 10.1007/s11042-007-0103-1
- Feb 16, 2007
- Multimedia Tools and Applications
Complex multimedia queries, aiming to retrieve from large databases those objects that best match the query specification, are usually processed by splitting them into a set of m simpler sub-queries, each dealing with only some of the query features. To determine which are the overall best-matching objects, a rule is then needed to integrate the results of such sub-queries, i.e., how to globally rank the m-dimensional vectors of matching degrees, or partial scores, that objects obtain on the m sub-queries. It is a fact that state-of-the-art approaches all adopt as integration rule a scoring function, such as weighted average, that aggregates the m partial scores into an overall (numerical) similarity score, so that objects can be linearly ordered and only the highest scored ones returned to the user. This choice however forces the system to compromise between the different sub-queries and can easily lead to miss relevant results. In this paper we explore the potentialities of a more general approach, based on the use of qualitative preferences, able to define arbitrary partial (rather than only linear) orders on database objects, so that a larger flexibility is gained in shaping what the user is looking for. For the purpose of efficient evaluation, we propose two integration algorithms able to work with any (monotone) partial order (thus also with scoring functions): MPO, which delivers objects one layer of the partial order at a time, and iMPO, which can incrementally return one object at a time, thus also suitable for processing top k queries. Our analysis demonstrates that using qualitative preferences pays off. In particular, using Skyline and Region-prioritized Skyline preferences for queries on a real image database, we show that the results we get have a precision comparable to that obtainable using scoring functions, yet they are obtained much faster, saving up to about 70% database accesses.
- Research Article
32
- 10.1145/2480359.2429109
- Jan 23, 2013
- ACM SIGPLAN Notices
There is a trade-off between performance and correctness in implementing concurrent data structures. Better performance may be achieved at the expense of relaxing correctness, by redefining the semantics of data structures. We address such a redefinition of data structure semantics and present a systematic and formal framework for obtaining new data structures by quantitatively relaxing existing ones. We view a data structure as a sequential specification S containing all "legal" sequences over an alphabet of method calls. Relaxing the data structure corresponds to defining a distance from any sequence over the alphabet to the sequential specification: the k-relaxed sequential specification contains all sequences over the alphabet within distance k from the original specification. In contrast to other existing work, our relaxations are semantic (distance in terms of data structure states). As an instantiation of our framework, we present two simple yet generic relaxation schemes, called out-of-order and stuttering relaxation, along with several ways of computing distances. We show that the out-of-order relaxation, when further instantiated to stacks, queues, and priority queues, amounts to tolerating bounded out-of-order behavior, which cannot be captured by a purely syntactic relaxation (distance in terms of sequence manipulation, e.g. edit distance). We give concurrent implementations of relaxed data structures and demonstrate that bounded relaxations provide the means for trading correctness for performance in a controlled way. The relaxations are monotonic which further highlights the trade-off: increasing k increases the number of permitted sequences, which as we demonstrate can lead to better performance. Finally, since a relaxed stack or queue also implements a pool, we actually have new concurrent pool implementations that outperform the state-of-the-art ones.
- Conference Article
111
- 10.1145/2429069.2429109
- Jan 23, 2013
There is a trade-off between performance and correctness in implementing concurrent data structures. Better performance may be achieved at the expense of relaxing correctness, by redefining the semantics of data structures. We address such a redefinition of data structure semantics and present a systematic and formal framework for obtaining new data structures by quantitatively relaxing existing ones. We view a data structure as a sequential specification S containing all legal sequences over an alphabet of method calls. Relaxing the data structure corresponds to defining a distance from any sequence over the alphabet to the sequential specification: the k-relaxed sequential specification contains all sequences over the alphabet within distance k from the original specification. In contrast to other existing work, our relaxations are semantic (distance in terms of data structure states). As an instantiation of our framework, we present two simple yet generic relaxation schemes, called out-of-order and stuttering relaxation, along with several ways of computing distances. We show that the out-of-order relaxation, when further instantiated to stacks, queues, and priority queues, amounts to tolerating bounded out-of-order behavior, which cannot be captured by a purely syntactic relaxation (distance in terms of sequence manipulation, e.g. edit distance). We give concurrent implementations of relaxed data structures and demonstrate that bounded relaxations provide the means for trading correctness for performance in a controlled way. The relaxations are monotonic which further highlights the trade-off: increasing k increases the number of permitted sequences, which as we demonstrate can lead to better performance. Finally, since a relaxed stack or queue also implements a pool, we actually have new concurrent pool implementations that outperform the state-of-the-art ones.
- Research Article
18
- 10.1016/j.apal.2005.03.001
- May 17, 2005
- Annals of Pure and Applied Logic
Equivalence between Fraïssé’s conjecture and Jullien’s theorem
- Research Article
9
- 10.3758/bf03198260
- Nov 1, 1979
- Memory & Cognition
The acquisition of a 14-term partial ordering was compared with the acquisition of a 14-term linear ordering. Learning the partial ordering was found to be more difficult because of two factors: (1) Subjects do not appear to have in their knowledge systems a prototype or rule for representing a long list of comparative relations as a partial ordering structure, and (2) the partial ordering must be presented so that some of the adjacently presented premises do not contain a common element. When these two factors were controlled, the partial ordering was as easy to learn as the linear ordering. It was also found that subjects learning the partial ordering showed no evidence of a serial position learning curve, whereas subjects learning the linear ordering showed some tendency to produce a serial position learning curve.
- Research Article
4
- 10.2307/2372703
- Jul 1, 1954
- American Journal of Mathematics
Let S be an abstract set and K a collection of linear orders defined on S. Define a partial order P on S as follows. For any two elements p and q in S put p < q in P if and only if p < q for each linear order in K. The partial order P so obtained is said to be realized by the linear orders in K. By the dimension of a partial order P on a set S is meant the smallest cardinal number n such that P is realized by m linear orders. The above definition of ' dimension of a partially ordered set' was first stated by Dushnik and Miller in [2]. They showed that each partial order has a dimension. Other papers pertaining to this definition of dimension are [1], [3], [6], and [8]. In [6] Komm defined the A-dimension of a partial order P on a set S as the minimum number of linear extension of P I each of which maps S into the real numbers. He then calculated the A-dimension of several partial orders. The purpose of this note is twofold:
- Research Article
19
- 10.1016/j.apal.2016.11.010
- Nov 25, 2016
- Annals of Pure and Applied Logic
The uniform content of partial and linear orders
- Single Book
- 10.20378/irb-47325
- Jan 1, 2020
- BiblioBoard Library Catalog (Open Research Library)
The reverse engineering of binaries is a tedious and time consuming task, yet mandatory when the need arises to understand the behaviour of a program for which source code is unavailable. Instances of source code loss for old arcade games [1] and the steadily growing amount of malware [2] are prominent use cases requiring reverse engineering. One of the challenges when dealing with binaries is the loss of low level type information, i.e., primitive and compound types, which even state-of-the-art type recovery tools often cannot reconstruct with full accuracy. Further programmers most commonly use high level data structures, such as linked lists, in addition to primitive types. Therefore detection of dynamic data structure shapes is an important aspect of reverse engineering. Though the recognition of dynamic data structure shapes in the presence of tricky programming concepts such as pointer arithmetic and casts – which are both fundamental concepts to enable, e.g., the frequently used Linux kernel list [3] – also bring current shape detection tools to their limits. A recent approach called Data Structure Investigator (DSI) [4] , aims for the detection of dynamic pointer based data structures. While the approach is general in nature, a concrete realization for C programs requiring source code is envisioned as programming constructs such as type casts and pointer arithmetic will stress test the approach. Therefore, the first research question addressed in this dissertation is whether DSI can meet its goal in the presence of the sheer multitude of existing data structure implementations. The second research question is whether DSI can be opened up to reverse engineer C/C++ binaries, even in the presence of type information loss and the variety of C/C++ programming constructs. Both questions are answered positively in this dissertation. The first is answered by realizing the DSI source code approach, which requires detailing fundamental aspects of DSI’s theory to arrive at a working implementation, e.g., handling the consistency of DSI’s memory abstraction and quantifying the interconnections found within a dynamic pointer based data structure, e.g., a parent child nesting scenario, to allow for its detection. DSI’s utility is evaluated on an extensive benchmark including real world examples (libusb [5], bash [6]) and shape analysis examples, [7,8] . The second question is answered through the development of a DSI prototype for binaries (DSIbin). To compensate for the loss of perfect type information found in source code, DSIbin interfaces with the state-of-the-art type recovery tool Howard [9]. Notably, DSIbin improves upon type information recovered by Howard. This is accomplished through a much improved nested struct detection and type merging algorithm, both of which are fundamental aspects for the reverse engineering of binaries. The proposed approach is again evaluated by a diverse benchmark containing real world examples such as, the VNC clipping library, The Computer Language Benchmarks Game and the Olden Benchmark, as well as examples taken from the shape analysis literature. In summary, this dissertation improves upon the state-of-the-art of shape detection and reverse engineering by (i) realizing and evaluating the DSI approach, which includes contributing to DSI’s theory and results in the DSI prototype; (ii) opening up DSI for C/C++ binaries so as to extend DSI to reverse engineering, resulting in the DSIbin prototype; (iii) handling data structures with DSIbin not covered by some related work such as skip lists; (iv) refining the nesting detection and performing type merging for types excavated by Howard. Further, DSIbin’s ultimate future use case of malware analysis is hardened by revealing the presence of dynamic data structures in multiple real world malware samples. In summary, this dissertation advanced the dynamic analysis of data structure shapes with the aforementioned contributions to the DSI approach for source code and further by transferring this new technology to the analysis of binaries. The latter resulted in the additional insight that high level dynamic data structure information can help to infer low level type information. 1. http://kotaku.com/5028197/sega-cant-find-the-source-code-for-your-favorite-old-school-arcade-games 2. https://www.av-test.org/en/statistics/malware/ 3. https://github.com/torvalds/linux/blob/master/include/linux/list.h 4. SWT Research Group, University Bamberg, DFG-Project LU 1748/4-1 5. http://libusb.info/ 6. https://www.gnu.org/software/bash/ 7. Predator: http://www.fit.vutbr.cz/research/groups/verifit/tools/predator/ 8. Forester: http://www.fit.vutbr.cz/research/groups/verifit/tools/forester/ 9. http://www.cs.vu.nl/ herbertb/papers/dde_ndss11-preprint.pdf
- Conference Article
24
- 10.4230/lipics.concur.2016.6
- Aug 1, 2016
- DROPS (Schloss Dagstuhl – Leibniz Center for Informatics)
The semantics of concurrent data structures is usually given by a sequential specification and a consistency condition. Linearizability is the most popular consistency condition due to its simplicity and general applicability. Nevertheless, for applications that do not require all guarantees offered by linearizability, recent research has focused on improving performance and scalability of concurrent data structures by relaxing their semantics. In this paper, we present local linearizability, a relaxed consistency condition that is applicable to container-type concurrent data structures like pools, queues, and stacks. While linearizability requires that the effect of each operation is observed by all threads at the same time, local linearizability only requires that for each thread T, the effects of its local insertion operations and the effects of those removal operations that remove values inserted by T are observed by all threads at the same time. We investigate theoretical and practical properties of local linearizability and its relationship to many existing consistency conditions. We present a generic implementation method for locally linearizable data structures that uses existing linearizable data structures as building blocks. Our implementations show performance and scalability improvements over the original building blocks and outperform the fastest existing container-type implementations.
- Research Article
5
- 10.1090/s0002-9947-2012-05466-3
- Jul 2, 2012
- Transactions of the American Mathematical Society
A linear ordering is scattered if it does not contain a copy of the rationals. Hausdorff characterised the class of scattered linear orderings as the least family of linear orderings that includes the class $ \mathcal B$ of well-orderings and reversed well-orderings, and is closed under lexicographic sums with index set in $ \mathcal B$. More generally, we say that a partial ordering is $ \kappa $-scattered if it does not contain a copy of any $ \kappa $-dense linear ordering. We prove analogues of Hausdorff's result for $ \kappa $-scattered linear orderings, and for $ \kappa $-scattered partial orderings satisfying the finite antichain condition. We also study the $ \mathbb{Q}_\kappa $-scattered partial orderings, where $ \mathbb{Q}_\kappa $ is the saturated linear ordering of cardinality $ \kappa $, and a partial ordering is $ \mathbb{Q}_\kappa $-scattered when it embeds no copy of $ \mathbb{Q}_\kappa $. We classify the $ \mathbb{Q}_\kappa $-scattered partial orderings with the finite antichain condition relative to the $ \mathbb{Q}_\kappa $-scattered linear orderings. We show that in general the property of being a $ \mathbb{Q}_\kappa $-scattered linear ordering is not absolute, and argue that this makes a classification theorem for such orderings hard to achieve without extra set-theoretic assumptions.
- Book Chapter
- 10.1007/978-1-4419-8477-7_9
- Jan 1, 2011
In Chapter 3, we have seen how averaged heights of objects hav(x) can be calculated. Thus partial order provides a method to obtain a linear order without the need of making additional assumptions like weights for indicators. The main computational problem, however, is the huge number of linear extensions, which sometimes makes the calculation of averaged heights and from them the linear order difficult. This chapter discusses different procedures to rank objects.
- Research Article
9
- 10.2307/2273359
- Mar 1, 1980
- Journal of Symbolic Logic
In this paper and the companion paper [9] we describe a number of contrasts between the theory of linear orderings and the theory of two-dimensional partial orderings.The notion of dimensionality for partial orderings was introduced by Dushnik and Miller [3], who defined a partial ordering 〈A, R〉 to be n-dimensional if there are n linear orderings of A, 〈A, L1〉, 〈A, L2〉 …, 〈A, Ln〉 such that R = L1 ∩ L2 ∩ … ∩ Ln. Thus, for example, if Q is the linear ordering of the rationals, then the (rational) plane Q × Q with the product ordering (〈x1, y1〉 ≤Q×Q 〈x2, y2, if and only if x1 ≤ x2 and y1 ≤ y2) is 2-dimensional, since ≤Q×Q is the intersection of the two lexicographic orderings of Q × Q. In fact, as shown by Dushnik and Miller, a countable partial ordering is n-dimensional if and only if it can be embedded as a subordering of Qn.Two-dimensional partial orderings have attracted the attention of a number of combinatorialists in recent years. A basis result recently obtained, independently, by Kelly [7] and Trotter and Moore [10], describes explicitly a collection of finite partial orderings such that a partial ordering is a 2dpo if and only if it contains no element of as a subordering.
- Research Article
3
- 10.1007/bf01190935
- Jun 1, 1995
- Algebra Universalis
In his classical 1963 book on partially ordered algebraic systems, L. Fuchs formulated the following problem (No. 29). It is known that if an abelian groupG (i.e., a group that satisfies an identityxy=yx) can be linearly ordered, then every partial order onG can be extended to a linear order. Fuchs asked whether there exists a similar polynomial identityP=0 for (associative) rings. In other words, does there exist a polynomialP with a following property: if a ringR satisfies the identityP=0, andR can be linearly ordered, then every partial order onR can be extended to a linear order? We prove that no such non-trivial polynomial identity is possible. Namely, we prove that every ringR that satisfies such an identity is a zero-ring (i.e.,xy=0 for allx, y eR).
- Research Article
145
- 10.1023/b:eest.0000027209.93218.d9
- Jun 1, 2004
- Environmental and Ecological Statistics
This paper is concerned with the question of ranking a finite collection of objects when a suite of indicator values is available for each member of the collection. The objects can be represented as a cloud of points in indicator space, but the different indicators (coordinate axes) typically convey different comparative messages and there is no unique way to rank the objects while taking all indicators into account. A conventional solution is to assign a composite numerical score to each object by combining the indicator information in some fashion. Consciously or otherwise, every such composite involves judgments (often arbitrary or controversial) about tradeoffs or substitutability among indicators. Rather than trying to combine indicators, we take the view that the relative positions in indicator space determine only a partial ordering and that a given pair of objects may not be inherently comparable. Working with Hasse diagrams of the partial order, we study the collection of all rankings that are compatible with the partial order (linear extensions). In this way, an interval of possible ranks is assigned to each object. The intervals can be very wide, however. Noting that ranks near the ends of each interval are usually infrequent under linear extensions, a probability distribution is obtained over the interval of possible ranks. This distribution, called the rank-frequency distribution, turns out to be unimodal (in fact, log-concave) and represents the degree of ambiguity involved in attempting to assign a rank to the corresponding object. Stochastic ordering of probability distributions imposes a partial order on the collection of rank-frequency distributions. This collection of distributions is in one-to-one correspondence with the original collection of objects and the induced ordering on these objects is called the cumulative rank-frequency (CRF) ordering; it extends the original partial order. Although the CRF ordering need not be linear, it can be iterated to yield a fixed point of the CRF operator. We hypothesize that the fixed points of the CRF operator are exactly the linear orderings. The CRF operator treats each linear extension as an equal “voter” in determining the CRF ranking. It is possible to generalize to a weighted CRF operator by giving linear extensions differential weights either on mathematical grounds (e.g., number of jumps) or empirical grounds (e.g., indicator concordance). Explicit enumeration of all possible linear extensions is computationally impractical unless the number of objects is quite small. In such cases, the rank-frequencies can be estimated using discrete Markov chain Monte Carlo (MCMC) methods.
- Conference Article
2
- 10.1109/icece.2016.7853907
- Dec 1, 2016
Concurrent data structures may introduce a performance and scalability holdup and thus prevent the effective use of parallel hardware. There is a trade-off between scalable performance and precision in implementing concurrent data structures. A remedy to the scalability problem is to relax the interpretation of concurrent data structures. The construal is given by some notion equivalent to the sequential behaviour. The equivalence is determined by a consistency condition, most commonly linearity, and the sequential behaviour is inherited from the sequential version of the data structure (e.g. the sequential behaviour of a concurrent stack is a regular stack). Therefore, relaxing the semantics of a concurrent data structure extents to either weakening the consistency condition or redefining or relaxing its sequential specification. In this paper, we present a framework for relaxing the synchronization of a Stack data structure in a quantitative manner. A fundamental challenge in using relaxed synchronization is guaranteeing that the relaxed program always produces results with a specified quality. We propose a methodology that addresses this challenge in programming with relaxed synchronization. Using our methodology, results that are of the same quality as the original program, can be produced with a speedup in time.