at 3 at 13 (r1=1 r2=1)

Σχετικά έγγραφα
Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Fractional Colorings and Zykov Products of graphs

Max Planck Institute for Software Systems (MPI-SWS)

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Partial Differential Equations in Biology The boundary element method. March 26, 2013

LTL to Buchi. Overview. Buchi Model Checking LTL Translating LTL into Buchi. Ralf Huuck. Buchi Automata. Example

Reminders: linear functions

Αλγόριθμοι. Α. Υπολογιστικά Προβλήματα. Β. Εισαγωγή στους Αλγόριθμους. Γ. ομή Αλγόριθμων. Δ. ομές εδομένων

ΚΕΦΑΛΑΙΟ 2. Περιγραφή της Κίνησης. 2.1 Κίνηση στο Επίπεδο

C.S. 430 Assignment 6, Sample Solutions

LAD Estimation for Time Series Models With Finite and Infinite Variance

Maude 6. Maude [1] UIUC J. Meseguer. Maude. Maude SRI SRI. Maude. AC (Associative-Commutative) Maude. Maude Meseguer OBJ LTL SPIN

Μηχανική Μάθηση Hypothesis Testing

Every set of first-order formulas is equivalent to an independent set

Lecture 2. Soundness and completeness of propositional logic

The Simply Typed Lambda Calculus

ÔÏÕËÁ ÓÁÑÑÇ ÊÏÌÏÔÇÍÇ

Κεφάλαιο 4 Σημασιολογία μιας Απλής Προστακτικής Γλώσσας

Chap. 6 Pushdown Automata

EE434 ASIC & Digital Systems Arithmetic Circuits

Συστήματα Διαχείρισης Βάσεων Δεδομένων

ο ο 3 α. 3"* > ω > d καΐ 'Ενορία όλις ή Χώρί ^ 3 < KN < ^ < 13 > ο_ Μ ^~~ > > > > > Ο to X Η > ο_ ο Ο,2 Σχέδι Γλεγμα Ο Σ Ο Ζ < o w *< Χ χ Χ Χ < < < Ο

ECE 308 SIGNALS AND SYSTEMS FALL 2017 Answers to selected problems on prior years examinations

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

ES440/ES911: CFD. Chapter 5. Solution of Linear Equation Systems

The Pohozaev identity for the fractional Laplacian

Zigbee. Zigbee. Zigbee Zigbee ZigBee. ZigBee. ZigBee

ΕΙΣΑΓΩΓΗ ΣΤΟΥΣ ΑΛΓΟΡΙΘΜΟΥΣ ΚΑΙ ΣΤΟΝ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΑΙΓΑΙΟΥ ΤΜΗΜΑ ΠΟΛΙΤΙΣΜΙΚΗΣ ΤΕΧΝΟΛΟΓΙΑΣ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑΣ. Διδάσκουσα Δρ Β.

ΓΕΩΜΕΣΡΙΚΗ ΣΕΚΜΗΡΙΩΗ ΣΟΤ ΙΕΡΟΤ ΝΑΟΤ ΣΟΤ ΣΙΜΙΟΤ ΣΑΤΡΟΤ ΣΟ ΠΕΛΕΝΔΡΙ ΣΗ ΚΤΠΡΟΤ ΜΕ ΕΦΑΡΜΟΓΗ ΑΤΣΟΜΑΣΟΠΟΙΗΜΕΝΟΤ ΤΣΗΜΑΣΟ ΨΗΦΙΑΚΗ ΦΩΣΟΓΡΑΜΜΕΣΡΙΑ

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

TMA4115 Matematikk 3

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Srednicki Chapter 55

4.6 Autoregressive Moving Average Model ARMA(1,1)

Πανεπιστήµιο Πειραιώς Τµήµα Πληροφορικής Πρόγραµµα Μεταπτυχιακών Σπουδών «Προηγµένα Συστήµατα Πληροφορικής»

Example Sheet 3 Solutions

Solving an Air Conditioning System Problem in an Embodiment Design Context Using Constraint Satisfaction Techniques

Advanced Subsidiary Unit 1: Understanding and Written Response

ΑΛΕΞΑΝΔΡΟΣ ΠΑΛΛΗΣ SCHOOLTIME E-BOOKS

P AND P. P : actual probability. P : risk neutral probability. Realtionship: mutual absolute continuity P P. For example:

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Matrices and Determinants

ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΒΑΛΕΝΤΙΝΑ ΠΑΠΑΔΟΠΟΥΛΟΥ Α.Μ.: 09/061. Υπεύθυνος Καθηγητής: Σάββας Μακρίδης

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

ΕΠΑΝΑΛΗΠΤΙΚΑ ΘΕΜΑΤΑ 2014

A Note on Intuitionistic Fuzzy. Equivalence Relation

Heisenberg Uniqueness pairs

ΜΑΘΗΜΑ / ΤΑΞΗ : ΔΟΜΗΜΕΝΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ / Γ ΕΠΑΛ ΣΕΙΡΑ: ΗΜΕΡΟΜΗΝΙΑ: 27/01/2013

Commutative Monoids in Intuitionistic Fuzzy Sets

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Access Control Encryption Enforcing Information Flow with Cryptography

ΟΜΟΣΠΟΝ ΙΑ ΕΚΠΑΙ ΕΥΤΙΚΩΝ ΦΡΟΝΤΙΣΤΩΝ ΕΛΛΑ ΟΣ (Ο.Ε.Φ.Ε.) ΕΠΑΝΑΛΗΠΤΙΚΑ ΘΕΜΑΤΑ ΕΠΑΝΑΛΗΠΤΙΚΑ ΘΕΜΑΤΑ 2013

Eight Examples of Linear and Nonlinear Least Squares

Homework for 1/27 Due 2/5

Takeaki Yamazaki (Toyo Univ.) 山崎丈明 ( 東洋大学 ) Oct. 24, RIMS

5 Ι ^ο 3 X X X. go > 'α. ο. o f Ο > = S 3. > 3 w»a. *= < ^> ^ o,2 l g f ^ 2-3 ο. χ χ. > ω. m > ο ο ο - * * ^r 2 =>^ 3^ =5 b Ο? UJ. > ο ο.

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

Solutions to Exercise Sheet 5

Homework 8 Model Solution Section

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Τμήμα Μηχανολόγων Μηχανικών Πανεπιστήμιο Θεσσαλίας ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ Η/Υ. Δομή Επιλογής. Ιωάννης Λυχναρόπουλος Μαθηματικός, MSc, PhD

Εργαστήριο 7: Ο αλγόριθμος ταξινόμησης Radix Sort

Homomorphism of Intuitionistic Fuzzy Groups

derivation of the Laplacian from rectangular to spherical coordinates

Arithmetical applications of lagrangian interpolation. Tanguy Rivoal. Institut Fourier CNRS and Université de Grenoble 1

Προγραμματισμός PASCAL

Προτεινόμενες λύσεις

Teaching and Designing Microarchitecture. in Racket Jay McCarthy UMass Lowell & PLT

Υπολογιστική Φυσική Στοιχειωδών Σωματιδίων

9.09. # 1. Area inside the oval limaçon r = cos θ. To graph, start with θ = 0 so r = 6. Compute dr

Γ ΤΑΞΗ ΗΜΕΡΗΣΙΟΥ ΕΠΑ.Λ ΜΑΘΗΜΑ ΕΙ ΙΚΟΤΗΤΑΣ ΟΜΗΜΕΝΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΚΦΩΝΗΣΕΙΣ

Συνέπεια μνήμης σε πολυπύρηνα/πολυεπεξεργαστικά συστήματα

Ποια ιδιότητα αϖό τις δύο τελευταίες είναι ϖιο ισχυρή;

Capacitors - Capacitance, Charge and Potential Difference

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Το «κλειστό» σύστημα. Ανοικτές επικοινωνίες... Εισαγωγή στην Τεχνολογία της Πληροφορικής. Εισαγωγή στην τεχνολογία της πληροφορικής

Statistical Inference I Locally most powerful tests

Statistics 104: Quantitative Methods for Economics Formula and Theorem Review

PATROL II LCD. Roger S.C. NK Ltd Partners

2 Composition. Invertible Mappings

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΣΧΟΛΗ ΑΝΘΡΩΠΙΣΤΙΚΩΝ ΚΑΙ ΚΟΙΝΩΝΙΚΩΝ ΕΠΙΣΤΗΜΩΝ ΤΜΗΜΑ ΦΙΛΟΛΟΓΙΑΣ

Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008

Generating Set of the Complete Semigroups of Binary Relations

Section 8.3 Trigonometric Equations

ΤΕΧΝΙΚΕΣ ΑΥΞΗΣΗΣ ΤΗΣ ΑΠΟΔΟΣΗΣ ΤΩΝ ΥΠΟΛΟΓΙΣΤΩΝ I

ST5224: Advanced Statistical Theory II

Ανταλλακτικά για Laptop Lenovo

EE512: Error Control Coding

w o = R 1 p. (1) R = p =. = 1

The challenges of non-stable predicates

Finite Field Problems: Solutions

3607 Ν. 7.28/88. E.E., Παρ. I, Αρ. 2371,

Numerical Analysis FMN011

Other Test Constructions: Likelihood Ratio & Bayes Tests

Χαρτογράφηση θορύβου

Inverse trigonometric functions & General Solution of Trigonometric Equations

Uniform Convergence of Fourier Series Michael Taylor

MATH423 String Theory Solutions 4. = 0 τ = f(s). (1) dτ ds = dxµ dτ f (s) (2) dτ 2 [f (s)] 2 + dxµ. dτ f (s) (3)

FORTRAN & Αντικειμενοστραφής Προγραμματισμός ΣΝΜΜ 2017

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Transcript:

lb at 3 at 13 (r1=1 r2=1)

Peterson 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do {i} 12:do {j} 4: r[] R1 F2 { F2 i 4 } 13: r[] R3 F1; { F1j 13 } 5: r[] R2 T { T i 5 } 14: r[] R4 T; { Tj 14 } 6:while R1 R2 1 {i end } 15:while R3 R4 2; {j end } 7:skip (* CS1 *) 16:skip (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 9: 18: G. L. Peterson. Myths about the mutual exclusion problem. Inf. Process. Lett., 12(3):115 116, 1981. doi: 10.1016/0020-0190(81)90106-X. URL http://dx.doi.org/10.1016/0020-0190(81)90106-x. 1: {true}... 10: {true}... 7: { at{16}}... 16: { at{7}}... 9: {true} 18: {true}

read x write x write x write x read x write x

lb at 3 at 13 r1=1 r2=1

Peterson 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7:skip (* CS1 *) 16:skip (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 9: 18:

Peterson 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7:skip (* CS1 *) 16:skip (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 9: 18:

Domain of sets of candidate executions! c " c Invariance domain " i Domain of sets of histories! i! h! e! h " h Domain of sets of executions " e Domain of sets of interleaved traces

eee ee

lb 0} w 0 w 0 ; { w, 0 w}, 0 { 0}, { r 1 { w 12, w 0 }, { 1}, { 0} { w 12, w 2 }, { 1}, { 1} w}, 2 { 1}, { 1} { 1} r 11 w 12 { w 12, w 2 { w 12, w 2 }, { 1},

rf rw rf τ = τ 0 ν,... r ν,... τ 1 ν ((r)) = w

lb 1:,r1=0 0:, start w 0 ; w 0 11:,r2=0 r 1 2:,r1=1 rf r 11 12:,r2=1 w 2 3:,r1=1 w 12 13:,r2=1

lb 1:,r1=0 0:, start w 0 ; w 0 11:,r2=0 r 1 2:,r1=1 rf r 11 12:,r2=1 w 2 3:,r1=1 w 12 13:,r2=1

rf! n τ 0 τ i, i=1 IW in τ 0 po e e' e,e' po τiτi' τi'' τi'''

lb w 0 ; w 0 IW r 1 po rf r 11 po w 2 w 12

loc ext co fr frrf co

r 1 rf rf w 0 ; co w 0 IW r 11 po w 2 fr po w 12

"co.cat" co let fold f = let rec fold_rec (es,y) = match es with {} -> y e ++ es -> fold_rec (es, f(e,y)) end in fold_rec let map f = fun es -> fold (fun (e,y) -> f e ++ y) (es,{}) let rec cross S = match S with {} -> { 0 } S1 ++ S -> let yss = cross S in fold (fun (e1,r) -> map (fun t -> e1 t) yss r) (S1,{}) end let co0 = loc & (IW * (W\IW)) let makeco(s) = linearisations(s,co0) let same-loc-writes = loc & (W*W) let allcol = map makeco (classes (same-loc-writes)) let allco = cross allcol with co from allco

lb 0} w 0 w 0 ; { w, 0 w}, 0 { 0}, { r 12 { w 12, w 0 }, { 1}, { 0} { w 12, w 2 }, { 1}, { 1} w}, 2 { 1}, { 1} { 1} r 11 w 12 { w 12, w 2 { w 12, w 2 }, { 1},

lb π π rf w w 1:,r1=0 r 12 2:,r1=1 0:, start rf w 0 ; w 0 11:,r2=0 r 11 12:,r2=1 π π r rf rf w w 12 3:,r1=1 w 2 13:,r2=1

lb irreflexive po ; rf ; po; rf w 0 ; w 0 IW r 12 po w 12 rf r 11 po w 2

rf rf rf

{ x = 0; y = 0; } P0 P1 ; r[] r1 x r[] r2 y ; w[] y 1 w[] x 1 ; J. Alglave and L. Maranget. herd7. virginia.cs.ucl.ac.uk/herd, 31 Aug. 2015.

cat J. Alglave. A Shared Memory Poetics. PhD thesis, Université Paris 7, 2010. J. Alglave, P. Cousot, and L. Maranget. Syntax and semantics of the cat language. HSA Foundation, Version 1.1:38 p., 16 Oct 2015b. URL http://www.hsafoundation.com/?ddownload=5382.

let co = (IW*W) & loc let fr = (rf^-1;co) acyclic po rf co fr as sc let co = (IW*W) & loc let fr = (rf^-1;co) let po-loc = po & loc acyclic po-loc rf co fr as scpv let ppo = po \ (W*R) let rfe = rf & ext acyclic ppo rfe co fr as tso lb lblb acyclic (po rf) as lb

Lisa { x = 0; y = 0; } P0 P1 ; r[] r1 x r[] r2 y ; f[dep] f[lw] ; w[] y 1 w[] x 1 ; { x = 0; y = 0; } P0 P1 ; r[] r1 x r[] r2 y ; r2 = xor r1 r1 mfence ; r3 = r2+1 w[] y r3 w[] x r3 ;

cat _ IWWRF po rf locext, *; &\+^-1, irreflexive r, acyclic r, empty r, not empty r

let fr = rf^-1;co acyclic po-loc rf co fr as scpv let deps = addr data let rdw = po-loc & (fre;rfe) let detour = po-loc & (coe ; rfe) let ii0 = deps rfi rdw let ic0 = 0 let ci0 = ctrlcfence(isb) detour let cc0 = deps ctrl (addr;po) let rec ii = ii0 ci (ic;ci) (ii;ii) and ic = ic0 ii cc (ic;cc) (ii;ic) and ci = ci0 (ci;ii) (cc;ci) and cc = cc0 ci (ci;ic) (cc;cc) let ppo = ii & R*R ic & R*W let dmb = fencerel(dmb) let dsb = fencerel(dsb) let fences = dmb dsb let A-cumul = rfe;fences let hb = ppo fences rfe acyclic hb as no-thin-air let prop-base = (fences A-cumul);hb* let prop = (prop-base & W*W) (com*; prop-base*; fences; hb*) irreflexive fre;prop;hb* as observation acyclic co prop as propagation

rf

cat

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:repeat {i} 12:repeat {j} 4: r[] R1 F2 { F2 i 4 } 13: r[] R3 F1; { F1j 13 } 5: r[] R2 T { T i 5 } 14: r[] R4 T; { Tj 14 } 6:until R1 R2 = 1 {i end } 15:until R3 R4 = 2; {j end } 7:skip (* CS1 *) 16:skip (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 9: 18:

ς i = Γ i, i } τ i start rf k 0 k 1 k p k n 1 κ i 0, θ i 0, ρ i 0, ν i 0 κ i n 1, θ i n 1, ρ i n 1, ν i n 1 l, θ i p, ρ i p, ν i p τ i 0 τ i 1 τ i p τ i n 1

ς i = rf Γ i, i π i = ς i Γ i τ i start k 0, k 1 k p k n 1 κ i 0, θ i 0, ρ i 0, ν i 0 κ i n 1, θ i n 1, ρ i n 1, ν i n 1 l, θ i p, ρ i p, ν i p τ i 0 α a ({π i i })! $ p Pi τ i 1 $ l L(p) % i τ i p τ i n 1 { κ i 0,k 0, θ i 0,k 0, ρ i 0,k 0, ν i 0,k 0,..., ν i p 1,k p 1, θ i p,k p, ρ i p,k p, ν i p,k p, κ i p+1,k p+1,..., κ i n 1,k n 1, θ i n 1,k n 1, ρ i n 1,k n 1, νn 1,k i n 1, Γrf i q [0, n[ \ {p}. τq i = kq s κ i q,k q, θ i q,k q, ρ i q,k q, ν i q,k q τ i p kp = s l, θ i p,k p, ρ i p,k p, ν i p,k p }.

rf

0: { w F1 false; w F2 false; w T 0; } {F1=false F2=false T=0} } 1: {R1=0 R2=0} 10: {R3=0 R4=0} w[] F1 true w[] F2 true; 2: {R1=0 R2=0} 11: {R3=0 R4=0} w[] T 2 w[] T 1; 3: {R1=0 R2=0} 12: {R3=0 R4=0} do {i} do {j} 4: {(i=0 R1=0 R2=0) 13: {(j=0 R3=0 R4=0) (i>0 R1=F2 i 1 4 R2=T i 1 5 )} (j>0 R3=F1 j 1 13 R4=T j 1 14 )} r[] R1 F2 { F2 i 4 } r[] R3 F1 { F1j 13 }; 5: {R1=F2 i 4 (i=0 R2=0) (i>0 R2=T i 1 )} 5 14: {R3=F1 j 13 (j=0 R4=0) (j>0 R4=T j 1 14 )} r[] R2 T { T i 5 } r[] R4 T; { Tj 14 } 6: {R1=F2 i 4 R2=Ti 5 } 15: {R3=F1j 13 R4=Tj 14 )} while R1 R2 1 {i end } while R3 R4 2 {j end } ; 7: { F2 i end 4 T i end 5 =1} 16: { F1 j end 13 T j end 14 =2} skip (* CS1 *) skip (* CS2 *) 8: { F2 i end 4 T i end 5 =1} 17: { F1 j end 13 T j end 14 =2} w[] F1 false w[] F2 false; 9: { F2 i end 4 T i end 5 =1} 18: { F1 j end 13 T j end 14 =2} rf

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

rf wxvrθx rf read x R { x θ } θ θ vrf fence write R x

rf wθxvrθxx θ rf θ x x θ v

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

rf

at 7 at 16 ( F2 i end 4 T i end 5 = 1) ( F1 j end 13 Tj end 14 = 2)}!i.e. the invariants at lines 7: and 16: hold" S com!since by taking i = i end and j = j end, we have (F2 i 4 = false T i 5 = 1) (F1 j 13 = false Tj 14 = 2)" specification S com! [ i, j.[rf F2 i 4, 0:, false rf F2 i 4, 17:, false rf T i 5, 11:, 1 ] [rf F1 j 13, 0:, false rf F1 j 13, 8:, false rf T j 14, 2:, 2 ]]

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

cat

specification S com! [ i, j.[rf F2 i 4, 0:, false rf F2 i 4, 17:, false rf T i 5, 11:, 1 ] [rf F1 j 13, 0:, false rf F1 j 13, 8:, false rf T j 14, 2:, 2 ]] cat

0:{ w F1 false; w F2 false; w T 0; } P0: co rf P1: co 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; po 3:do 12:do fr 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 4 fr 10 po 13 fr 1 po 4 case 1: 0:F2,0:F1 po 0:{ w F1 false; w F2 false; w T 0; } P0: rf P1: co po 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 fr 11:w[] T 1; 3:do co 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 11 co 2 po 4 fr 10 po 11 case 2b: 0:F2,1:F1 (11 co 2) 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; po 2:w[] T 2 rf 11:w[] T 1; 3:do co 12:do fr 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 14 fr 11 po 14 case 2a: 0:F2,1:F1 (2 co 11) 0:{ w F1 false; w F2 false; w T 0; } P0: co rf P1: 1:w[] F1 true fr 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; po 3:do co 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 2 co 11 po 13 fr 1 po 2 case 3a: 10:F2,0:F1 (2 co 11)

fr 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true rf 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do po co 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 8:w[] F1 false 5 fr 2 po 5 case 3b: 10:F2,0:F1 (11 co 2) 0:{ w F1 false; w F2 false; w T 0; } P0: P1: rf 1:w[] F1 true 10:w[] F2 true; po 2:w[] T 2 11:w[] T 1; 3:do fr co 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 5 fr 2 po 5 case 4b: 10:F2,1:F1 (11 co 2) 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 rf 11:w[] T 1; po 3:do 12:do fr co 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 17:w[] F2 false; 14 ---fr 11 ---po 14 case 4a: 10:F2,1:F1 (2 co 11) 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false 17:w[] F2 false; 4 po 8 rf 13 po 17 rf 4 case 5: 17:F2,8:F1

0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do po 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T rf 14: r[] R4 T; po 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false cut 17:w[] F2 false; 7 po 8 rf 13 po 17 cut 7 case 6: 8:F1 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do po 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) po 8:w[] F1 false cut 17:w[] F2 false; 16 po 17 rf 4 po 7 cut 16 case 7: 17:F2 cutcat f[p0]f[p1] irreflexive fr;po;fr;po irreflexive fr;po irreflexive co;po;fr;po irreflexive po;rf;po;rf irreflexive po;rf;po;cut

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

irreflexive fr;po;fr;po irreflexive fr;po irreflexive co;po;fr;po irreflexive po;rf;po;rf irreflexive po;rf;po;cut cat let fr = (rf^-1 ; co) acyclic po rf co fr as sc

0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do po 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T rf 14: r[] R4 T; po 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) 8:w[] F1 false cut 17:w[] F2 false; 7 po 8 rf 13 po 17 cut 7 case 6: 8:F1 0:{ w F1 false; w F2 false; w T 0; } P0: P1: 1:w[] F1 true 10:w[] F2 true; 2:w[] T 2 11:w[] T 1; 3:do 12:do po 4: r[] R1 F2 13: r[] R3 F1; 5: r[] R2 T 14: r[] R4 T; 6:while R1 R2 1 15:while R3 R4 2; 7: f[p0] (* CS1 *) 16: f[p1] (* CS2 *) po 8:w[] F1 false cut 17:w[] F2 false; 16 po 17 rf 4 po 7 cut 16 case 7: 17:F2 π π π r rf rf w w π rf w

let fr = (rf^-1;co) let po-loc = po & loc acyclic po-loc rf co fr as scpv let ppo = po \ (W*R) let rfe = rf & ext acyclic ppo rfe co fr as tso w1,r4 fr ; po ; fr ; po is wr ppo

cat

0:{ F1 = 0; F2 = 0; T = 0; } 1: w[] F1 1 10: w[] F2 1 ; 2: w[] T 2 11: w[] T 1 ; 3: do 12: do ; f[fhw] f[fhw] ; 4: r[] r1 F2 13: r[] r3 F1 ; 5: r[] r2 T 14: r[] r4 T ; 6: while r1 r2 1 15: while r3 r4 1 ; 7: (* CS1 *) 16: (* CS2 *) ; f[fhw] f[fhw] ; 8: w[] F1 0 L17: w[] F2 0 ; let fhw = (po & (_ * F)) ; po let fre = (rf^-1;co) & ext irreflexive fhw;fre; fhw;fre fenceskip cat

algorithm A invariant specification S inv communication specification S com concistency hypothesis H com consistency model M invariance proof S com! S inv inclusion proof H com S com consistency proof M H com algorithm A proved correct w.r.t. H com and S inv H com! S inv algorithm A proved correct w.r.t. M and S inv M! S inv

Peterson Mʹ Mʹ fhw fhwmfence fhwdbmdsb

cat cat