(* Title: HOL/TLA/Buffer/DBuffer.thy Author: Stephan Merz, University of Munich *)
section‹Two FIFO buffers in a row, with interleaving assumption›
theory DBuffer imports Buffer begin
axiomatization (* implementation variables *)
inp :: "nat stfun"and
mid :: "nat stfun"and
out :: "nat stfun"and
q1 :: "nat list stfun"and
q2 :: "nat list stfun"and
qc :: "nat list stfun"and
DBInit :: stpred and
DBEnq :: action and
DBDeq :: action and
DBPass :: action and
DBNext :: action and
DBuffer :: temporal where
DB_base: "basevars (inp,mid,out,q1,q2)"and
(* the concatenation of the two buffers *)
qc_def: "PRED qc == PRED (q2 @ q1)"and
(* The plan for proving weak fairness at the higher level is to prove (0) DBuffer => (Enabled (Deq inp qc out) ↝ (Deq inp qc out)) which is in turn reduced to the two leadsto conditions (1) DBuffer => (Enabled (Deq inp qc out) ↝ q2 ≠ []) (2) DBuffer => (q2 ≠ [] ↝ DBDeq) and the fact that DBDeq implies 🚫inp qc out>_(inp,qc,out) (and therefore DBDeq ↝🚫inp qc out>_(inp,qc,out) trivially holds). Condition (1) is reduced to (1a) DBuffer => (qc ≠ [] /\ q2 = [] ↝ q2 ≠ []) by standard leadsto rules (leadsto_classical) and rule Deq_enabledE. Both (1a) and (2) are proved from DBuffer's WF conditions by standard WF reasoning (Lamport's WF1 and WF_leadsto). The condition WF(Deq inp qc out) follows from (0) by rule leadsto_WF. One could use Lamport's WF2 instead. *)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.