A Framework for Automated Concurrency Verification

Total Page:16

File Type:pdf, Size:1020Kb

A Framework for Automated Concurrency Verification A Framework for Automated Concurrency Verification Matthew Bernard Windsor Ph.D University of York Computer Science April 2019 Abstract Reasoning systems based on Concurrent Separation Logic make verifying complex concurrent algorithms readily possible. Such algorithms contain subtle protocols of permission and resource transfer between threads; to cope with these intricacies, modern concurrent separation logics contain many moving parts and integrate many bespoke logical components. Verifying concurrent algorithms by hand consumes much time, effort, and expertise. As a result, computer-assisted verification is a fertile research topic, and fully automated verification is a popular research goal. Unfortunately, the complexity of modern concurrent separation logics makes them hard to automate, and the proliferation and fast turnover of such logics causes a downward pressure against building tools for new logics. As a result, many such logics lack tooling. This dissertation proposes Starling: a scheme for creating concurrent pro- gram logics that are automatable by construction. Starling adapts the existing Concurrent Views Framework for sound concurrent reasoning systems, overlay- ing a framework for reducing concurrent proof outlines to verification conditions in existing theories (such as those accepted by off-the-shelf sequential solvers). This dissertation describes Starling in a bottom-up, modular manner. First, it shows the derivation of a series of general concurrency proof rules from the Views framework. Next, it shows how one such rule leads to the Starling framework itself. From there, it outlines a series of increasingly elaborate frontends: ways of decomposing individual Hoare triples over atomic actions into verification conditions suitable for encoding into backend theories. Each frontend leads to a concurrent program logic. Finally, the dissertation presents a tool for verifying C-style concurrent proof outlines, based on one of the above frontends. It gives examples of such outlines, covering a variety of algorithms, backend solvers, and proof techniques. 2 Contents Abstract 2 Contents 3 Listings 5 Acknowledgements 7 Declaration 9 Collaboration history . 9 Publication history . 10 1 Introduction 11 1.1 Contribution . 13 1.2 Structure . 14 2 Background 15 2.1 Atomicity and atomic actions . 15 2.2 Formal methods . 16 2.3 Floyd/Hoare-style program logics . 19 2.4 The Views framework . 24 2.5 Automating program-logic proofs . 30 3 Proof-Specific Views Instances 33 3.1 Disposable views instances . 34 3.2 Decomposing proof outlines . 34 3.3 Case study: Peterson’s algorithm . 37 3.4 Free views instances . 40 3.5 Axiomatisation templates . 41 3.6 Automation-friendly templates . 42 3.7 Summary . 48 4 The Starling Framework 49 4.1 Backends . 51 4.2 Frontends . 55 3 CONTENTS 4.3 Syntactic definers . 56 4.4 µStarling . 58 4.5 Summary . 59 5 Adding Local-State Reasoning 61 5.1 The Local Views Framework .......................... 62 5.2 The LVF programming language . 68 5.3 Soundness of the LVF . 71 5.4 Embedding the LVF in the CVF . 75 5.5 Local states in backends . 77 5.6 loStarling . 79 5.7 Atomicity of local actions . 82 5.8 Summary . 84 6 A Practical Starling Frontend 85 6.1 Practical views semigroups . 86 6.2 View expressions . 89 6.3 Structured propositions . 95 6.4 Guarded views . 103 6.5 Guarded syntactic definers . 107 6.6 The gStarling frontend . 113 6.7 Iterated views and other extensions . 120 6.8 Summary . 123 7 Automating Proofs with Starlingtool 125 7.1 The Cview language . 125 7.2 The Starlingtool frontend . 131 7.3 Summary . 138 8 Case Studies and Validation 139 8.1 Case studies . 139 8.2 Testing Starlingtool ............................... 162 8.3 Mechanisation . 163 8.4 Related work . 164 8.5 Summary . 168 9 Conclusions and Further Work 169 9.1 Conclusions . 169 9.2 Further work . 170 A Additional Definitions 177 A.1 Trivial definitions . 177 A.2 Backend interfaces . 177 A.3 Syntactic definers . 179 A.4 Derivation of outline flattening . 179 4 A.5 Operations on view lists . 182 A.6 Cview ....................................... 182 A.7 Full Circular Buffer . 185 B Proofs 187 B.1 The free views instance . 187 B.2 Views algebras . 187 B.3 Local Views Framework . 199 Glossaries 201 Glossary . 201 Symbols . 204 Bibliography 207 Listings 2.1 Owicki–Gries multiple counter (incomplete) . 21 2.2 Owicki–Gries multiple counter (corrected) . 21 7.1 Ticket lock (static) . 132 8.1 Peterson’s algorithm: Cview proof using Z3 . 141 8.2 Circular buffer (static) . 144 8.3 ARC (static) . 147 8.4 ARC (GRASShopper auxiliary) . 149 8.5 ARC (dynamic) . 149 8.6 Auxiliary GRASShopper module clh­module.spl............. 153 8.7 CLH lock: Cview proof using GRASShopper . 153 8.8 Ticket lock: modified constraint set for use with HSF . 156 8.9 Ticket lock: induced specification failure . 158 8.10 Ticket lock: induced code failure . 158 8.11 Peterson’s algorithm: induced code failure . 160 8.12 Attempted proof of a flawed mutual exclusion algorithm [1] . 160 8.13 Ticket lock (CAPER) . 166 8.14 Peterson (Threader) . 167 Full circular buffer . 185 5 Acknowledgements This work would not have been possible without the input and guidance from my two su- pervisors, Mike Dodds (from 2014 to 2017) and Radu Calinescu (2017 onwards). Both have gone above and beyond the call of duty to help me in my journey — especially in times where the path has been unclear, or fraught. I am grateful to them for not giving up on me, especially when times have been difficult — and whenever I was a challenging student! I’m grateful to Jeremy Jacob and Ana Cavalcanti for several reasons. Jeremy, my internal assessor, has been a reassuring and stabilising force throughout my PhD journey; Ana, my undergraduate project supervisor in 2014, helped me to start the journey in the first place. My gratitude goes back earlier, though: Jeremy and Ana’s Programming: Correctness by Construction course taught me the beauty and elegance of formal methods, and was a fundamental influence on the direction I have taken ever since. I also thank Matthew Parkinson for his invaluable contributions throughout the PhD. This dissertation builds extensively on both his published work and insights he and Mike have shared with me over the four years. When I did not understand part of the Views framework, or was struggling with a piece of Starling’s theory, ‘MattP’ was often the first port of call. Many more people have helped me on my journey, and I cannot thank them all in one page. I especially thank: Ben Simner for his work as an undergraduate intern on Starlingtool; Claudio Russo for hosting me as an intern at Microsoft Research, Cambridge; John Wicker- son and Alastair Donaldson, my bosses at Imperial College, London; my office-mates Ivaylo, Rudy, Michael, Gia, Tim, and José; and all of my friends who have helped me survive my PhD. I gratefully note that an EPSRC Doctoral Training Grant funded my PhD. I also thank the Interface Reasoning for Interacting Systems project, which funds my post-doctoral work. Finally, I thank my family, especially my parents Angela (1966–2018) and Stephen. They never gave up on me, even at my worst and my lowest, always seeing the best in me. I hope this dissertation does them proud. 7 ACKNOWLEDGEMENTS To Mum 8 Declaration I, Matthew Bernard Windsor, declare: that this dissertation presents original work; that I identify parts of said work developed in collaboration, and the collaborating parties, below this declaration; that I am the sole author of the dissertation, though parts of its text draw heavily from publications written in collaboration with other authors, which I also identify below this declaration; that I acknowledge all sources, including said publications, as refer- ences; and that this work has not been presented for a previous award at this, or any other, university. Collaboration history • Starling, in general, develops a previously unpublished idea by Matthew Parkinson and Mike Dodds; • The definitions of the thread-local semantic judgement and multi-threaded action judgement in § 5.2 stem from conversations between the author and Matthew Parkinson in March 2018. The local-state action judgement is original work, but based on a thread- aware version suggested by Matthew Parkinson; • Discussion of Starling’s relationship with thread modularity, and its contrasts with that of Owicki-Gries, stem from a conversation with Andreas Podelski at CAV’2017; • Starlingtool is mainly the author’s own work, but contains code written by Mike Dodds (including initial GRASShopper support, and examples including the lock-coupling list and allocatable ARC); Matthew Parkinson (including efficiency optimisations, bug-fixes, and initial phase timing support); and Ben Simner (including colourised error formatting, optimisation passes, continuous integration and regression testing infrastructure, initial support for iterated views, and work on the ARC proof )1; • The mechanisation is entirely the author’s own work, except for the adapted use of parts of the original mechanisation of the Starling proof rule contributed by Mat- thew Parkinson. The mechanisation’s treatment of the Concurrent and Local Views frameworks take inspiration, but not direct code, from the original Concurrent Views Framework Coq mechanisation. 1See also: https://github.com/MattWindsor91/starling-tool/graphs/contributors. 9 DECLARATION Publication history The following parts of the dissertation have been previously published, in some form, as the paper Starling: Lightweight Concurrency Verification with Views [2]: • the deriving-views proof rule (Definition 3.12), and its derivation from Views axiom soundness; • discussion of Starlingtool’s Z3 and GRASShopper backends (included here in the relev- ant case studies); • the ARC and CLH lock proofs (Listing 8.3, Listing 8.5, Listing 8.7) 10 Chapter 1 Introduction.
Recommended publications
  • A Systematic Study of Groebner Basis Methods
    A Systematic Study of Gr¨obner Basis Methods Vom Fachbereich Informatik der Technischen Universit¨at Kaiserslautern genehmigte Habilitationsschrift von Dr. Birgit Reinert Datum der Einreichung: 6. Januar 2003 Datum des wissenschaftlichen Vortrags: 9. Februar 2004 arXiv:0903.2462v2 [math.RA] 29 Mar 2009 Dekan: Prof. Dr. Hans Hagen Habilitationskommission: Vorsitzender: Prof. Dr. Otto Mayer Berichterstatter: Prof. Dr. Klaus E. Madlener Prof. Dr. Teo Mora Prof. Dr. Volker Weispfenning Vorwort Die vorliegende Arbeit ist die Quintessenz meiner Ideen und Erfahrungen, die ich in den letzten Jahren bei meiner Forschung auf dem Gebiet der Gr¨obnerbasen gemacht habe. Meine geistige Heimat war dabei die Arbeitsgruppe von Profes- sor Klaus Madlener an der Technischen Universit¨at Kaiserslautern. Hier habe ich bereits im Studium Bekanntschaft mit der Theorie der Gr¨obnerbasen gemacht und mich w¨ahrend meiner Promotion mit dem Spezialfall dieser Theorie f¨ur Monoid- und Gruppenringe besch¨aftigt. Nach der Promotion konnte ich im Rahmen eines DFG-Forschungsstipendiums zus¨atzlich Problemstellungen und Denkweisen an- derer Arbeitsgruppen kennenlernen - die Arbeitsgruppe von Professor Joachim Neub¨user in Aachen und die Arbeitsgruppe von Professor Theo Mora in Genua. Meine Aufenthalte in diesen Arbeitsgruppen haben meinen Blickwinkel f¨ur weit- ergehende Fragestellungen erweitert. An dieser Stelle m¨ochte ich mich bei allen jenen bedanken, die mich in dieser Zeit begleitet haben und so zum Entstehen und Gelingen dieser Arbeit beigetragen haben. Mein besonderer Dank gilt meinem akademischen Lehrer Professor Klaus Madlener, der meine akademische Ausbildung schon seit dem Grundstudium be- gleitet und meine Denk- und Arbeitsweise wesentlich gepr¨agt hat. Durch ihn habe ich gelernt, mich intensiv mit diesem Thema zu besch¨aftigen und mich dabei nie auf nur einen Blickwinkel zu beschr¨anken.
    [Show full text]
  • Recursion Theory Notes, Fall 2011 0.1 Introduction
    Recursion Theory Notes, Fall 2011 Lecturer: Lou van den Dries 0.1 Introduction Recursion theory (or: theory of computability) is a branch of mathematical logic studying the notion of computability from a rather theoretical point of view. This includes giving a lot of attention to what is not computable, or what is computable relative to any given, not necessarily computable, function. The subject is interesting on philosophical-scientific grounds because of the Church- Turing Thesis and its role in computer science, and because of the intriguing concept of Kolmogorov complexity. This course tries to keep touch with how recursion theory actually impacts mathematics and computer science. This impact is small, but it does exist. Accordingly, the first chapter of the course covers the basics: primitive recur- sion, partial recursive functions and the Church-Turing Thesis, arithmetization and the theorems of Kleene, the halting problem and Rice's theorem, recur- sively enumerable sets, selections and reductions, recursive inseparability, and index systems. (Turing machines are briefly discussed, but the arithmetization is based on a numerical coding of combinators.) The second chapter is devoted to the remarkable negative solution (but with positive aspects) of Hilbert's 10th Problem. This uses only the most basic notions of recursion theory, plus some elementary number theory that is worth knowing in any case; the coding aspects of natural numbers are combined here ingeniously with the arithmetic of the semiring of natural numbers. The last chapter is on Kolmogorov complexity, where concepts of recursion theory are used to define and study notions of randomness and information content.
    [Show full text]
  • Mathematical Society
    Notices of the American Mathematical Society November 1983, Issue 229 Volume 30, Number 7, Pages 713-840 Providence, Rhode Island USA ISSN 0002-9920 Calendar of AMS Meetings THIS CALENDAR lists all meetings which have been approved by the Council prior to the date this issue of the Notices was sent to press. The summer and annual meetings are joint meetings of the Mathematical Association of America and the Ameri· can Mathematical Society. The meeting dates which fall rather far in the future are subject to change; this is particularly true of meetings to which no numbers have yet been assigned. Programs of the meetings will appear in the issues indicated below. First and second announcements of the meetings will have appeared in earlier issues. ABSTRACTS OF PAPERS presented at a meeting of the Society are published in the journal Abstracts of papers presented to the American Mathematical Society in the issue corresponding to that of the Notices which contains the program of the meet­ ing. Abstracts should be submitted on special forms which are available in many departments of mathematics and from the office of the Society in Providence. Abstracts of papers to be presented at the meeting must be received at the headquarters of the Society in Providence, Rhode Island, on or before the deadline given below for the meeting. Note that the deadline for ab­ stracts submitted for consideration for presentation at special sessions is usually three weeks earlier than that specified below. For additional information consult the meeting announcement and the list of organizers of special sessions.
    [Show full text]
  • Part IV: Turing Machines and Undecidability
    Part IV: Turing Machines and Undecidability We are about to begin our exploration of the two outer circles of the language hierarchy, as well as the background, the area outside all of the circles. Up until now, we have been placing limitations on what we could do in order that we could discover simple solutions when they exist. Now we are going to tear down all the barriers and explore the full power of formal computation. We will discover a whole range of problems that become solvable once we do that. We will also discover that there are fundamental limitations on what we can compute, regardless of the specific model with which we choose to work. Part IV 264 Turing Machines and Undecidability 17 Turing Machines We need a new kind of automaton that has two properties: • It must be powerful enough to describe all computable things. In this respect, it should be like real computers and unlike FSMs and PDAs. • It must be simple enough that we can reason formally about it. In this respect, it should be like FSMs and PDAs and unlike real computers. 17.1 Definition, Notation and Examples In our discussion of pushdown automata, it became clear that a finite state controller augmented by a single stack was not powerful enough to be able to execute even some very simple programs. What else must be added in order to acquire the necessary power? One answer is a second stack. We will explore that idea in Section 17.5.2. 17.1.1 What Is a Turing Machine? A more straightforward approach is to eliminate the stack and replace it by a more flexible form of infinite storage, a writeable tape.
    [Show full text]
  • Computing the Maximum Using (Min,+) Formulas∗
    Electronic Colloquium on Computational Complexity, Report No. 20 (2018) Computing the maximum using (min,+) formulas∗ Meena Mahajan1, Prajakta Nimbhorkar2, and Anuj Tawari1 1The Institute of Mathematical Sciences, HBNI, Chennai, India , fmeena,[email protected] 2Chennai Mathematical Institute, India , [email protected] January 23, 2018 Abstract We study computation by formulas over (min; +). We consider the computation of maxfx1; : : : ; xng over N as a difference of (min; +) formulas, and show that size n + n log n is sufficient and nec- essary. Our proof also shows that any (min; +) formula computing the minimum of all sums of n − 1 out of n variables must have n log n leaves; this too is tight. Our proofs use a complex- ity measure for (min; +) functions based on minterm-like behaviour and on the entropy of an associated graph. 1 Introduction A (min; +) circuit is a directed acyclic graph (DAG) in which the leaves are labeled by variables or constants. The internal nodes are gates labeled by either min or +. A min gate computes the minimum value among its inputs while a + gate simply adds the values computed by its inputs. If the underlying DAG is a tree, then the circuit is a (min; +) formula. Such formulas can compute any function expressible as the minimum over several linear polynomials with non- negative integer coefficients. That is, they can compute any polynomial over the the tropical − semirings Min = (N; min; +; 1; 0) and Min = (Z; min; +; 1; 0). In this work, we consider the following setting. Suppose we are given n input variables x1; x2; : : : ; xn and we want to find a formula which computes the maximum value taken by these variables, max(x1; x2; : : : ; xn).
    [Show full text]
  • Server Administration Webfocus Reporting Server Release 8205 Datamigrator Server Release 7709
    Server Administration WebFOCUS Reporting Server Release 8205 DataMigrator Server Release 7709 May 20, 2019 Active Technologies, EDA, EDA/SQL, FIDEL, FOCUS, Information Builders, the Information Builders logo, iWay, iWay Software, Parlay, PC/FOCUS, RStat, Table Talk, Web390, WebFOCUS, WebFOCUS Active Technologies, and WebFOCUS Magnify are registered trademarks, and DataMigrator and Hyperstage are trademarks of Information Builders, Inc. Adobe, the Adobe logo, Acrobat, Adobe Reader, Flash, Adobe Flash Builder, Flex, and PostScript are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Due to the nature of this material, this document refers to numerous hardware and software products by their trademarks. In most, if not all cases, these designations are claimed as trademarks or registered trademarks by their respective companies. It is not this publisher's intent to use any of these names generically. The reader is therefore cautioned to investigate all claimed trademark rights before using any of these names other than to refer to the product described. Copyright © 2019, by Information Builders, Inc. and iWay Software. All rights reserved. Patent Pending. This manual, or parts thereof, may not be reproduced in any form without the written permission of Information Builders, Inc. Contents Preface ........................................................................ 15 Conventions ........................................................................16 Related Publications
    [Show full text]
  • Proofs, Computability, Undecidability, Complexity, and the Lambda Calculus an Introduction
    Proofs, Computability, Undecidability, Complexity, And the Lambda Calculus An Introduction Jean Gallier and Jocelyn Quaintance Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104, USA e-mail: [email protected] c Jean Gallier Please, do not reproduce without permission of the author April 28, 2020 2 Preface The main goal of this book is to present a mix of material dealing with 1. Proof systems. 2. Computability and undecidability. 3. The Lambda Calculus. 4. Some aspects of complexity theory. Historically, the theory of computability and undecidability arose from Hilbert's efforts to completely formalize mathematics and from G¨odel'sfirst incompleteness theorem that showed that such a program was doomed to fail. People realized that to carry out both Hilbert's program and G¨odel'swork it was necessary to define precisely what is the notion of a computable function and the notion of a mechanically checkable proof. The first definition given around 1934 was that of the class of computable function in the sense of Herbrand{ G¨odel{Kleene. The second definition given by Church in 1935-1936 was the notion of a function definable in the λ-calculus. The equivalence of these two definitions was shown by Kleene in 1936. Shortly after in 1936, Turing introduced a third definition, that of a Turing- computable function. Turing proved the equivalence of his definition with the Herbrand{ G¨odel{Kleenedefinition in 1937 (his proofs are rather sketchy compared to Kleene's proofs). All these historical papers can be found in a fascinating book edited by Martin Davis [25].
    [Show full text]
  • Author Index
    Author Index Alagic, S. 104 -Eukasiewics 172 Arbib, M. A. 104 McCuIloch, Warren 126 Boden, Margaret 43 De Morgan, Augustus 11 Boole, George 3 Newman, James R. 178 Cantor, Georg 161 Nilsson, N. J. 126 Descartes, Rene 5 Peano, Giuseppe 34 Euclid 4 Peterson, G. R. 126 Euler, Leonhard 178 Pitts, WaIter 126 Fibonacci 96 Stone, MarshaIl 160 Hill, F. J. 126 Vacroux, A. G. 124 Leonardo of Pisa 96 Venn, John 7 Notation Index .- 1 An 19 xdiv y 2 A~B 19, 160 xmody 2 g·f 20 Z 2 A 20,41 N 3 /\ 47,112 XEA 3 1\ 156 x$A 3 XA 21 PA 3, 111 Q 23 cp 3 .1 23, 158 AcB 3 Pfn[A, B] 23 D 5 ..:... 23 AxB 5 ~ 25 R 5 R 25 2A 6 Ixl 29 IAI 6, 160, 161 n! 35 &l'A 6 (J 38,48,177 AuB 7,43,201 X* 41 AnB 8 In 41 A-B 8 A·B 43,201 Al + ... + An 8 A* 43,44,201 V 47,113 8 U Ai 155 l'5.is.n V 15 48 A 9 qo 48 rnn 12 15* 49,204 f(A) 16 T(M) 50 f:A -+ B 16 v-+w l lw 2 1···IWn 55 a Hf(a) 16 =• 55 n 19 = 55 212 Notation Index .. - 59 O'(n) 115 X* 60 $m 115 e 60 plq 122 {} 63 NAND 122 T 65 NAND-gate 122 ISATOM 66 NOR 123 HEAD 67 L 123 TAIL 67 (P L q) 123 CONS 68 NOR-gate 127 CAR 68 COND 129 CDR 68 A=> B 132 EQ 68 = 133 EQUAL 68 p => q 135 COND 68 (Vx) 141 LxJ 78 (3x) 141 P(n, r) 82 R:A~A 146 nPr 82 ~A 146 nCr 83 n : n' mod m 146 (~) 83 id A 146 T 111 [a] 147 F 111 A modulo: 149 NOT 112 AI: 149 AND 112 :=:; 150 OR 112 Pfo 151 $ 112 (A, v, A) 157 15 112 T 158 -,p 112 ~o 162 NOT-gate 114 ScopeT(v) 169 AND-gate 114 v(w) 169 OR-gate 114 nn 170 max 114 c5 w 171 min 114 0'0 177 Zm 115 0'1 177 n mod m 115 T(M) 200 Subject Index A axiomatization 138 complete 140 absolute value 29 sound 139
    [Show full text]
  • CSCE 355 — Foundations of Computation
    CSCE 355 | Foundations of Computation Stephen A. Fenner January 7, 2020 Abstract These notes are based on two lectures per week. Sections beginning test test with a star (*) are optional. The date above is the date of this document's most recent modification. 1 Contents 1 Lecture 1 5 1.0.1 Biconditionals . 6 1.1 Methods of proof . 7 1.1.1 Direct proofs . 7 2 Lecture 2 8 2.0.1 Proof by cases . 8 2.0.2 Proof by induction . 8 2.0.3 Proof by contradiction . 11 3 Lecture 3 12 3.1 Strong induction and the well-ordering principle . 12 3.1.1 * Equivalencep of strong induction and the well-ordering principle . 12 3.2 Proof that 2 is irrational . 13 4 Lecture 4 14 4.1 Describing sets . 14 4.1.1 Listing the elements of a set . 14 4.1.2 Set formers . 15 4.1.3 Don't confuse a set with its members! . 16 4.2 Subsets and the empty set . 16 4.2.1 Proving two sets equal . 17 4.3 Boolean set operations . 17 4.4 Sets of sets, ordered pairs, Cartesian product . 19 4.4.1 * Ordered pairs as sets . 20 4.5 Relations and functions . 21 4.6 The pigeonhole principle . 21 5 Lecture 5 22 5.1 Alphabets, strings, and languages . 22 5.1.1 The concatenation operator . 23 5.1.2 The empty string . 23 5.1.3 Languages . 23 5.1.4 Languages as decision problems . 24 6 Lecture 6 25 6.1 Finite automata .
    [Show full text]
  • Provenance for Aggregate Queries
    Provenance for Aggregate Queries Yael Amsterdamer Daniel Deutch Val Tannen University of Pennsylvania University of Pennsylvania University of Pennsylvania and Tel Aviv University and Ben Gurion University ABSTRACT R We study in this paper provenance information for queries EmpId Dept Sal with aggregation. Provenance information was studied in the 1 d1 20 p1 Dept context of various query languages that do not allow for ag- 2 d1 10 p2 d1 p1 + p2 + p3 gregation, and recent work has suggested to capture prove- 3 d1 15 p3 d2 r1 + r2 nance by annotating the different database tuples with ele- 4 d2 10 r1 ments of a commutative semiring and propagating the anno- 5 d2 15 r2 (b) tations through query evaluation. We show that aggregate queries pose novel challenges rendering this approach inap- (a) plicable. Consequently, we propose a new approach, where we annotate with provenance information not just tuples but Figure 1: Projection on annotated relations also the individual values within tuples, using provenance to ate the polynomials in the security semiring, and propagate describe the values computation. We realize this approach the security annotations through query evaluation (see Sec- in a concrete construction, first for “simple” queries where tion 2.1), assigning security levels to query results. the aggregation operator is the last one applied, and then for Let us briefly illustrate deletion propagation as an appli- arbitrary (positive) relational algebra queries with aggrega- cation of provenance. Consider a simple example of an em- tion; the latter queries are shown to be more challenging in ployee/department/salary relation R shown in Figure 1(a).
    [Show full text]
  • Programming and Symbolic Computation in Maude
    Programming and Symbolic Computation in Maude Francisco Dur´ana, Steven Ekerb, Santiago Escobarc, Narciso Mart´ı-Olietd, Jos´eMeseguere, Rub´enRubiod, Carolyn Talcottb aUniversidad de M´alaga,Spain. bSRI International, CA, USA. cUniversitat Polit`ecnica de Val`encia,Spain. dUniversidad Complutense de Madrid, Spain. eUniversity of Illinois at Urbana-Champaign, IL, USA. Abstract Rewriting logic is both a flexible semantic framework within which widely dif- ferent concurrent systems can be naturally specified and a logical framework in which widely different logics can be specified. Maude programs are exactly rewrite theories. Maude has also a formal environment of verification tools. Symbolic computation is a powerful technique for reasoning about the correct- ness of concurrent systems and for increasing the power of formal tools. We present several new symbolic features of Maude that enhance formal reasoning about Maude programs and the effectiveness of formal tools. They include: (i) very general unification modulo user-definable equational theories, and (ii) symbolic reachability analysis of concurrent systems using narrowing. The pa- per does not focus just on symbolic features: it also describes several other new Maude features, including: (iii) Maude's strategy language for controlling rewriting, and (iv) external objects that allow flexible interaction of Maude object-based concurrent systems with the external world. In particular, meta- interpreters are external objects encapsulating Maude interpreters that can in- teract with many other objects. To make the paper self-contained and give a reasonably complete language overview, we also review the basic Maude features for equational rewriting and rewriting with rules, Maude programming of con- current object systems, and reflection.
    [Show full text]
  • 12.2% 128000 150M Top 1% 154 5200
    We are IntechOpen, the world’s leading publisher of Open Access books Built by scientists, for scientists 5,200 128,000 150M Open access books available International authors and editors Downloads Our authors are among the 154 TOP 1% 12.2% Countries delivered to most cited scientists Contributors from top 500 universities Selection of our books indexed in the Book Citation Index in Web of Science™ Core Collection (BKCI) Interested in publishing with us? Contact [email protected] Numbers displayed above are based on latest data collected. For more information visit www.intechopen.com 20 K-Relations and Beyond Melita Hajdinjak and Andrej Bauer University of Ljubljana Slovenia 1. Introduction Although the theory of relational databases is highly developed and proves its usefulness in practice every day Garcia-Molina et al. (2008), there are situations where the relational model fails to offer adequate formal support. For instance, when querying approximate data Hjaltason & Brooks (2003); Minker (1998) or data within a given range of distance or similarity Hjaltason & Brooks (2003); Patella & Ciaccia (2009). Examples of such similarity-search applications are databases storing images, fingerprints, audio clips or time sequences, text databases with typographical or spelling errors, and text databases where we look for documents that are similar to a given document. A core component of such cooperative systems is a treatment of imprecise data Hajdinjak & Miheliˇc(2006); Minker (1998). At the heart of a cooperative database system is a database where the data domains come equipped with a similarity relation, to denote degrees of similarity rather than simply ‘equal’ and ‘not equal’.
    [Show full text]