Sequential call indexing and completion helpers #
Shared internal lemmas on History, OpCall, nthProcPos, and sequential call indexing (opIdAt,
countProcCalls) used across the locality, nonblocking, and register-separation modules.
Main definitions #
Cslib.Distributed.ConcurrentObjects.countProcCalls,Cslib.Distributed.ConcurrentObjects.opIdAt: per-process call counts and operation identifier of thej-th call in a sequentialOpCalllist.
Main results #
Cslib.Distributed.ConcurrentObjects.History.even_length_of_equivalent_complete,Cslib.Distributed.ConcurrentObjects.History.isRespList_le_one_of_isSequential: parity of sequential histories equivalent tocomplete Hand classification of response-only extensions of sequential histories.Cslib.Distributed.ConcurrentObjects.prec_flatMap_toEvents_opIdAt_iff,Cslib.Distributed.ConcurrentObjects.exists_opIdAt_of_lt_countProcCalls: order isomorphism between call-list indicesjand real-time precedence<_Soncalls.flatMap OpCall.toEvents.
Completed OpCalls followed by a single pending invocation form a sequential history.
complete drops a trailing pending invocation after a list of completed OpCalls.
Completing a well-formed history preserves the set of completed operations.
Any sequential history equivalent to complete H (for well-formed H) has even length.
An even-length sequential history admits no nonempty response-only sequential suffix.
A response-only sequential extension R of a sequential history L is either empty or a single
matching response to L's trailing pending invocation.
nthProcPos p H n is some iff n < (H | p).length.
Bounds and process projection at nthProcPos p H n = some pos.
Lookup at nthProcPos p H n = some pos agrees with (H | p)[n]?.
nthProcPos p H is strictly monotone in the rank m < n.
nthProcPos on H₁ ++ H₂ for ranks within H₁ | p.
nthProcPos on H₁ ++ H₂ for ranks at or beyond (H₁ | p).length.
Any nthProcPos match in H₁ ++ H₂ landing before H₁.length comes from H₁.
List.flatMap OpCall.toEvents is injective on call lists.
Every event at an even index 2 * k of a sequential history is an invocation
(isResp = false).
Number of calls in calls invoked by process p.
Filtered positions in calls.flatMap OpCall.toEvents of the invocation and response of
calls[k] whenever pred calls[k] = true.
Invocation and response positions of opIdAt calls j hj in calls.flatMap OpCall.toEvents are
2 * j and 2 * j + 1.
opIdAt calls is injective on valid call indices.
Real-time precedence in calls.flatMap OpCall.toEvents agrees with call-index order j₁ < j₂.
Surjectivity of opIdAt calls onto all e : OpId P with e.idx < countProcCalls e.proc calls.