@@ -22,40 +22,46 @@ Preliminary Definitions
2222.. math ::
2323 \begin {array}{rcl}
2424 \timeevt (\act ^\ast ~\AT ~\time _p~\time ) & = & \time \\
25- \\
25+ && \\
2626 \locact (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \loc \\
2727 \locact (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \loc \\
2828 \locact (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & \loc \\
29- \\
29+ && \\
3030 \ordact (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \ord \\
3131 \ordact (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \ord \\
3232 \ordact (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & \SEQCST \\
33- \\
34- \overlapact (\act _1 , \act _2 ) & = & \rangeact (\act _1 ) \cup \rangeact (\act _2 ) \neq \epsilon \\
35- \sameact (\act _1 , \act _2 ) & = & \rangeact (\act _1 ) = \rangeact (\act _2 ) \\
36- \\
37- \readingact (\act ) & = & \readact (\act ) \neq \epsilon \\
38- \writingact (\act ) & = & \writeact (\act ) \neq \epsilon \\
39- \\
33+ && \\
34+ \overlapact (\act _1 , \act _2 ) & = & ( \rangeact (\act _1 ) \cup \rangeact (\act _2 ) \neq \epsilon ) \\
35+ \sameact (\act _1 , \act _2 ) & = & ( \rangeact (\act _1 ) = \rangeact (\act _2 ) ) \\
36+ && \\
37+ \readingact (\act ) & = & ( \readact (\act ) \neq \epsilon ) \\
38+ \writingact (\act ) & = & ( \writeact (\act ) \neq \epsilon ) \\
39+ && \\
4040 \readact (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \byte ^\ast \\
4141 \readact (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & {\byte _1 }^\ast \\
42- \readact (\act ) & = & \epsilon \qquad \otherwise \\
42+ \readact (\act ) & = & \epsilon \qquad ( \otherwise ) \\
4343 &&\\
4444 \writeact (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \byte ^\ast \\
4545 \writeact (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & {\byte _2 }^\ast \\
46- \writeact (\act ) & = & \epsilon \qquad \otherwise \\
46+ \writeact (\act ) & = & \epsilon \qquad (\otherwise ) \\
47+ &&\\
48+ \offsetact (\act ) & = & \u32 \qquad (\iff ~\locact (\act ) = \reg [\u32 ]) \\
49+ &&\\
50+ \syncact (\act _1 ,\act _2 ) & = & (\sameact (\act _1 ,\act _2 ) \wedge \\
51+ && \qquad \ordact (\act _1 ) = \ordact (\act _2 ) = \SEQCST ) \\
52+ \rangeact (\act ) & = & [\u32 \ldots \u32 + n - 1 ] \\
53+ && (\iff ~\locact (\act ) = \reg [\u32 ] \wedge \\
54+ && \quad n = \F {max}(|\readact (\act )|,|\writeact (\act )|)) \\
4755 &&\\
48- \offsetact (\act ) & = & \u32 \qquad \iff \locact (\act ) = \reg [\u32 ] \ \\
49- \\
50- \syncact (\act _1 ,\act _2 ) & = & \sameact (\act _1 ,\act _2 ) \wedge \ordact (\act _1 ) = \ordact (\act _2 ) = \SEQCST \\
51- \rangeact (\act ) & = & [\u32 \ldots \u32 + n - 1 ] \qquad \iff \locact (\act ) = \reg [\u32 ] \qquad n = \F {max}(|\readact (\act )|,|\writeact (\act )|) \\
52- \\
53- \tearfreeact (\ARD _{\ord }~\loc ~\byte ^\ast ) & = & \bot \qquad \iff \ord = \UNORD \vee \ord = \INIT \\
54- \tearfreeact (\AWR _{\ord }~\loc ~\byte ^\ast ) & = & \bot \qquad \iff \ord = \UNORD \vee \ord = \INIT \\
55- \tearfreeact (\act ) & = & \top \qquad \otherwise \\
56- \\
57- \X {func}_{\reg }(\act _1 ^\ast ~\act ~\act _2 ^\ast ~\AT ~\time _p~\time ) & = & \X {func}(\act ) \qquad \iff \locact (\act ) = \reg [\u32 ] \\
58- \X {func}_{\reg }(\act _1 ^\ast ~\act ~\act _2 ^\ast ~\AT ~\time _p~\time , \act _3 ^\ast ~\act '~\act _4 ^\ast ~\AT ~\time '_p~\time ') & = & \X {func}(\act .\act ') \qquad \iff \locact (\act ) = \locact (\act ') = \reg [\u32 ] \\
56+ \tearfreeact (\ARD _{\ord }~\loc ~\byte ^\ast ) & = & \bot \qquad (\iff ~\ord = \UNORD \vee \ord = \INIT ) \\
57+ \tearfreeact (\AWR _{\ord }~\loc ~\byte ^\ast ) & = & \bot \qquad (\iff ~\ord = \UNORD \vee \ord = \INIT ) \\
58+ \tearfreeact (\act ) & = & \top \qquad (\otherwise ) \\
59+ &&\\
60+ \X {func}_{\reg }(\act _1 ^\ast ~\act ~\act _2 ^\ast ~\AT ~\time _p~\time ) & = & \X {func}(\act ) \\
61+ && (\iff ~\locact (\act ) = \reg [\u32 ]) \\
62+ \X {func}_{\reg }(\act _1 ^\ast ~\act ~\act _2 ^\ast ~\AT ~\time _p~\time , \quad &&\\
63+ \qquad \act _3 ^\ast ~\act '~\act _4 ^\ast ~\AT ~\time '_p~\time ') & = & \X {func}(\act ,\act ') \\
64+ && (\iff ~\locact (\act ) = \locact (\act ') = \reg [\u32 ]) \\
5965 \end {array}
6066
6167 .. todo :: add loc for wait/woken/timeout/notify
@@ -78,9 +84,9 @@ A trace is a coinductive set of :ref:`events <syntax-evt>`. A trace is considere
7884
7985.. math ::
8086 \begin {array}{c}
81- \config \stepto ^{\evt } \config ' \qquad \vdash \config ' : \trace \qquad \timeevt (\evt ) \notin \timeevt ^\ast (\trace ) \\[ 0.2 \normalbaselineskip ]
82- \hline \\[-0.8 \normalbaselineskip ]
83- \hline \\[-0.8 \normalbaselineskip ]
87+ \config \stepto ^{\evt } \config ' \qquad \vdash \config ' : \trace \qquad \timeevt (\evt ) \notin \timeevt ^\ast (\trace ) \\[ 0.2 ex ]
88+ \hline \\[-0.8 ex ]
89+ \hline \\[-0.8 ex ]
8490 \vdash \config : \evt ~\trace
8591 \end {array}
8692
@@ -96,54 +102,50 @@ Consistency
96102
97103.. math ::
98104 \frac {
99- \forall \reg , \, \ vdash _{\reg } \trace \consistentwith
105+ \forall \reg ,~ \ vdash _{\reg } \trace ~ \consistentwith
100106 }{
101- \vdash \trace \consistent
107+ \vdash \trace ~ \consistent
102108 }
103109
104110.. math ::
105111 \frac {
106112 \begin {array}[b]{@{}c@{}}
107- \vdash _{\reg } \trace \suspensionsconsistentwith \\
113+ \vdash _{\reg } \trace ~ \suspensionsconsistentwith \\
108114 \forall \evt _R \in \readingact _{\reg }(\trace ), \exists \evt _W^\ast ,
109- \trace \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast \\
115+ \trace \vdash _{\reg } \evt _R~ \readseachfrom ~ \evt _W^\ast \\
110116 \forall \evt _I, \evt \in \trace , \,
111117 \ordact _{\reg }(\evt _I) = \INIT \wedge
112118 \evt _I \neq \evt \wedge
113119 \overlapact (\evt _I, \evt ) \Rightarrow \evt _I \prechb \evt
114120 \end {array}
115121 }{
116- \vdash _{\reg } \trace \consistentwith
122+ \vdash _{\reg } \trace ~ \consistentwith
117123 }
118124
119125.. math ::
120126 \frac {
121127 \begin {array}[b]{@{}c@{}}
122128 \left |\evt _W^\ast \right | = |\readact _{\reg }(\evt _R)| \\
123129 \forall i < |\evt _W^\ast |,
124- \trace \vdash _{\reg }^i \evt _R \readsfrom \left (\evt _W^\ast [i]\right )
130+ \trace \vdash _{\reg }^i \evt _R~ \readsfrom ~ \left (\evt _W^\ast [i]\right )
125131 \\
126- \vdash _{\reg } \evt _R \notear \evt _W^\ast
132+ \vdash _{\reg } \evt _R~ \notear ~ \evt _W^\ast
127133 \end {array}
128134 }{
129- \trace \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast
135+ \trace \vdash _{\reg } \evt _R~ \readseachfrom ~ \evt _W^\ast
130136 }
131137
132138.. math ::
133139 \frac {
134- \begin {array}[b]{@{}l@{}}
135- \evt _R \neq \evt _W \\
136- \evt _W \in \writingact _{\reg }(\trace )
137- \end {array}
138- \qquad
139- \begin {array}[b]{@{}r@{}}
140- \trace \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W \\
141- \trace \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
140+ \begin {array}[b]{@{}c}
141+ \evt _R \neq \evt _W \\
142+ \evt _W \in \writingact _{\reg }(\trace ) \\
143+ \trace \vdash _{\reg }^{i,k} \evt _R~\valueconsistent ~\evt _W \\
144+ \trace \vdash _{\reg }^k \evt _R~\hbconsistent ~\evt _W \\
145+ \trace \vdash _{\reg } \evt _R~\sclastvisible ~\evt ^\ast _W
142146 \end {array}
143- \qquad
144- \trace \vdash _{\reg } \evt _R \sclastvisible \evt ^\ast _W
145147 }{
146- \trace \vdash _{\reg }^i \evt _R \readsfrom \evt _W
148+ \trace \vdash _{\reg }^i \evt _R~ \readsfrom ~ \evt _W
147149 }
148150
149151.. math ::
@@ -153,22 +155,18 @@ Consistency
153155 k = \offsetact _{\reg }(\evt _R) + i &=& \offsetact _{\reg }(\evt _W) + j
154156 \end {array}
155157 }{
156- \trace \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W
158+ \trace \vdash _{\reg }^{i,k} \evt _R~ \valueconsistent ~ \evt _W
157159 }
158160
159161.. math ::
160162 \frac {
161163 \begin {array}[b]{@{}c}
162164 \neg (\evt _R \prechb \evt _W) \\
163- \syncact _{\reg }(\evt _W, \evt _R) \Rightarrow \evt _W \prechb \evt _R
164- \end {array}
165- \qquad
166- \begin {array}[b]{@{}l@{}}
167- \forall \evt '_W \in \writingact _{\reg }(\trace ),\\
168- \quad \evt _W \prechb \evt '_W \prechb \evt _R \Rightarrow k \notin \rangeact _{\reg }(\evt '_W)
165+ \syncact _{\reg }(\evt _W, \evt _R) \Rightarrow \evt _W \prechb \evt _R \\
166+ \forall \evt '_W \in \writingact _{\reg }(\trace ), \evt _W \prechb \evt '_W \prechb \evt _R \Rightarrow k \notin \rangeact _{\reg }(\evt '_W)
169167 \end {array}
170168 }{
171- \trace \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
169+ \trace \vdash _{\reg }^k \evt _R~ \hbconsistent ~ \evt _W
172170 }
173171
174172.. math ::
@@ -180,23 +178,27 @@ Consistency
180178 \quad \evt _W \prectot \evt '_W \prechb \evt _R \Rightarrow \neg \syncact _{\reg }(\evt _W, \evt '_W)
181179 \end {array}
182180 }{
183- \trace \vdash _{\reg } \evt _R \sclastvisible \evt _W
181+ \trace \vdash _{\reg } \evt _R~ \sclastvisible ~ \evt _W
184182 }
185183
186184.. math ::
187185 \frac {
188- \tearfreeact _{\reg }(\evt _R) \Rightarrow |\{\evt _W \in \evt _W^\ast ~|~ \sameact _{\reg }(\evt _R, \evt _W) \wedge \tearfreeact _{\reg }(\evt _W)\}| \leq 1
186+ \begin {array}[b]{l@{}}
187+ \tearfreeact _{\reg }(\evt _R) \Rightarrow \\
188+ \quad |\{\evt _W \in \evt _W^\ast ~|~ \sameact _{\reg }(\evt _R, \evt _W) \wedge \tearfreeact _{\reg }(\evt _W)\}| \leq 1
189+ \end {array}
189190 }{
190- \vdash _{\reg } \evt _R \notear \evt _W^\ast
191+ \vdash _{\reg } \evt _R~ \notear ~ \evt _W^\ast
191192 }
192193
193194.. math ::
194195 \frac {
195196 TODO
196197 }{
197- \vdash _{\reg } \trace \suspensionsconsistentwith
198+ \vdash _{\reg } \trace ~ \suspensionsconsistentwith
198199 }
199200
201+
200202 .. todo :: pull out the trace events which denote wait/wake actions as a timestamped list, check queue behaviour
201203
202204
0 commit comments