Documentation

CslibFrontier.Computability.Distributed.ConcurrentObjects.Linearizability.Locality

Interval-order cycle collapse and Herlihy–Wing Theorem 1 (Locality) #

Algebraic interval-order acyclicity (acyclic_sup_of_isIntervalOrder), finite topological sort, per-object operation lifting (liftOp), and Herlihy–Wing Theorem 1 (isLinearizable_iff_forall_obj, compositionality / locality of linearizability across typed concurrent objects; [HW90], §3.1, Theorem 1, pp. 470–471; [SHP21], §5.2, Theorem 5.1, pp. 7–9).

Main results #

References #

theorem Cslib.Distributed.ConcurrentObjects.History.prec_append_resp_iff {P : Type u_1} {Obj : Type u_2} {Op : Obj → Type u_3} {Resp : Obj → Type u_4} [DecidableEq P] {H R : History P Op Resp} (hwf : H.WellFormed) (hresp : R.IsRespList) (hwf_ext : (H ++ R).WellFormed) {e₀ e₁ : OpId P} (hc₁ : (H ++ R).IsCompletedOp e₁) :
(H ++ R).prec e₀ e₁ ↔ H.prec e₀ e₁

Appending response events does not alter <_H on operations completed in H ++ R.

Interval-order acyclicity and finite topological sort #

theorem Cslib.Distributed.ConcurrentObjects.acyclic_sup_of_isIntervalOrder {α : Type u_1} {Obj : Type u_2} (obj : α → Obj) (loc rt : α → α → Prop) (hrt : Relation.IsIntervalOrder rt) (hloc_irrefl : ∀ (a : α), ¬loc a a) (hloc_trans : ∀ {a b c : α}, loc a b → loc b c → loc a c) (hloc_obj : ∀ {a b : α}, loc a b → obj a = obj b) (hrt_sub_loc : ∀ {a b : α}, obj a = obj b → rt a b → loc a b) :
Relation.Acyclic (loc ⊔ rt)

Algebraic interval-order cycle collapse (core of [HW90], §3.1, Theorem 1, p. 471): if rt is a Relation.IsIntervalOrder on α, loc only relates elements of the same object (obj a = obj b), loc is a strict order (irreflexive and transitive), and rt restricted to same-object pairs is contained in loc, then loc ⊔ rt is Relation.Acyclic.

Per-object operation lifting #

Herlihy–Wing Theorem 1 (Locality) #

theorem Cslib.Distributed.ConcurrentObjects.IsLinearizable.objSubhistory {P : Type u_1} {Obj : Type u_2} {Op : Obj → Type u_3} {Resp : Obj → Type u_4} [DecidableEq P] [DecidableEq Obj] {spec : (x : Obj) → SeqSpec P Op Resp x} {H : History P Op Resp} (hlin : IsLinearizable spec H) (x : Obj) :

Restricting a linearizable history H to any single object x preserves linearizability ("only if" direction of [HW90], §3.1, Theorem 1, p. 470; [SHP21], §5.2, Theorem 5.1, p. 7).

theorem Cslib.Distributed.ConcurrentObjects.isLinearizable_iff_forall_obj {P : Type u_1} {Obj : Type u_2} {Op : Obj → Type u_3} {Resp : Obj → Type u_4} [DecidableEq P] [DecidableEq Obj] (spec : (x : Obj) → SeqSpec P Op Resp x) {H : History P Op Resp} (hwf : H.WellFormed) :
IsLinearizable spec H ↔ ∀ (x : Obj), IsLinearizable spec (H.objSubhistory x)

Herlihy–Wing Theorem 1 (Locality / Compositionality of Linearizability) ([HW90], §3.1, Theorem 1, pp. 470–471; amended L2 proof of [SHP21], §5.2, Theorem 5.1, pp. 7–9): a well-formed concurrent history H over typed objects Obj is linearizable if and only if for every object x : Obj, its object subhistory History.objSubhistory H x (H | x) is linearizable.