(* Title: HOL/TLA/Buffer/DBuffer.thy Author: Stephan Merz, University of Munich
*)
section \<open>Two FIFO buffers in a row, with interleaving assumption\<close>
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) \<leadsto> (Deq inp qc out)) which is in turn reduced to the two leadsto conditions (1) DBuffer => (Enabled (Deq inp qc out) \<leadsto> q2 \<noteq> []) (2) DBuffer => (q2 \<noteq> [] \<leadsto> DBDeq) and the fact that DBDeq implies <Deq inp qc out>_(inp,qc,out) (and therefore DBDeq \<leadsto> <Deq inp qc out>_(inp,qc,out) trivially holds).
Condition (1) is reduced to (1a) DBuffer => (qc \<noteq> [] /\ q2 = [] \<leadsto> q2 \<noteq> []) 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.
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 ist noch experimentell.