@@ -55,9 +55,9 @@ A trace is a coinductive set of :ref:`events <syntax-evt>`. A trace is considere
5555
5656.. math ::
5757 \frac {
58- \config \stepto ^{\evt } \config ' \qquad \vdash \config ' : \X {tr} \qquad \timeevt (\evt ) \notin \timeevt ^\ast (\X {tr} )
58+ \config \stepto ^{\evt } \config ' \qquad \vdash \config ' : \trace \qquad \timeevt (\evt ) \notin \timeevt ^\ast (\trace )
5959 }{
60- \vdash \config : \evt ~\X {tr}
60+ \vdash \config : \evt ~\trace
6161 }
6262
6363 When a WebAssembly program is executed, all behaviours observed during that execution must correspond to a single :ref: `consistent <relaxed-consistent >` pre-execution of that execution's starting :ref: `configuration <syntax-config >`.
@@ -70,57 +70,94 @@ Consistency
7070
7171.. todo :: define auxiliary functions (either here or in Runtime Structure)
7272
73+ .. math ::
74+ \begin {array}{lcl}
75+ \ordaux (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \ord \\
76+ \ordaux (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \ord \\
77+ \ordaux (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & \SEQCST \\
78+ &&\\
79+ \locaux (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \loc \\
80+ \locaux (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \loc \\
81+ \locaux (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & \loc \\
82+ &&\\
83+ \sizeaux (\ARD _{\ord }~\loc ~\byte ^n~\NOTEARS ^?) & = & n \\
84+ \sizeaux (\AWR _{\ord }~\loc ~\byte ^n~\NOTEARS ^?) & = & n \\
85+ \sizeaux (\ARMW ~\loc ~{\byte _1 }^n~{\byte _2 }^n) & = & n \\
86+ &&\\
87+ \readaux (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \byte ^\ast \\
88+ \readaux (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \epsilon \\
89+ \readaux (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & {\byte _1 }^\ast \\
90+ &&\\
91+ \writeaux (\ARD _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \epsilon \\
92+ \writeaux (\AWR _{\ord }~\loc ~\byte ^\ast ~\NOTEARS ^?) & = & \byte ^\ast \\
93+ \writeaux (\ARMW ~\loc ~{\byte _1 }^\ast ~{\byte _2 }^\ast ) & = & {\byte _2 }^\ast \\
94+ &&\\
95+ \addraux (\act ) & = & \addraux (\regionaux (\act ) \\
96+ \addraux (\loc ) & = & \addraux (\regionaux (\reg ) \\
97+ \addraux (\addr .\fld ) & = & \addr \\
98+ &&\\
99+ \regionaux (\act ) & = & \regionaux (\locaux (\act ) \\
100+ \regionaux (\reg ) & = & \reg \\
101+ \regionaux (\reg [i]) & = & \reg \\
102+ &&\\
103+ \offsetaux (\act ) & = & \offsetact (\locaux (\act )) \\
104+ \offsetaux (\reg ) & = & 0 \\
105+ \offsetaux (\reg [i]) & = & i \\
106+ \end {array}
107+
108+ .. todo :: Add more auxiliary functions
109+
73110.. todo :: add prose intuition
74111
75112.. math ::
76113 \frac {
77- \forall \reg , \, \vdash _{\reg } \X {tr} \consistentwith
114+ \forall \reg , \, \vdash _{\reg } \trace \consistentwith
78115 }{
79- \vdash \X {tr} \consistent
116+ \vdash \trace \consistent
80117 }
81118
82119.. math ::
83120 \frac {
84121 \begin {array}[b]{@{}l@{}}
85- \forall \evt _R \in \readingact _{\reg }(\X {tr} ), \exists \evt _W^\ast ,
86- \X {tr} \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast \\
87- \forall \evt _I, \evt \in \X {tr} , \,
88- \ordact _{ \reg } (\evt _I) = \INIT \wedge
122+ \forall \evt _R \in \readingact _{\reg }(\trace ), \exists \evt _W^\ast ,
123+ \trace \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast \\
124+ \forall \evt _I, \evt \in \trace , \,
125+ \F {ord}_r (\evt _I) = \INIT \wedge
89126 \evt _I \neq \evt \wedge
90127 \overlapact (\evt _I, \evt ) \Rightarrow \evt _I \prechb \evt
91128 \end {array}
92129 }{
93- \vdash _{\reg } \X {tr} \consistentwith
130+ \vdash _{\reg } \trace \consistentwith
94131 }
95132
96133.. math ::
97134 \frac {
98135 \begin {array}[b]{@{}c@{}}
99136 \left |\evt _W^\ast \right | = |\readact _{\reg }(\evt _R)| \\
100137 \forall i < |\evt _W^\ast |,
101- \X {tr} \vdash _{\reg }^i \evt _R \readsfrom \left (\evt _W^\ast [i]\right )
138+ \trace \vdash _{\reg }^i \evt _R \readsfrom \left (\evt _W^\ast [i]\right )
102139 \\
103140 \vdash _{\reg } \evt _R \notear \evt _W^\ast
104141 \end {array}
105142 }{
106- \X {tr} \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast
143+ \trace \vdash _{\reg } \evt _R \readseachfrom \evt _W^\ast
107144 }
108145
109146.. math ::
110147 \frac {
111148 \begin {array}[b]{@{}l@{}}
112149 \evt _R \neq \evt _W \\
113- \evt _W \in \writingact _{\reg }(\X {tr} )
150+ \evt _W \in \writingact _{\reg }(\trace )
114151 \end {array}
115152 \qquad
116153 \begin {array}[b]{@{}r@{}}
117- \X {tr} \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W \\
118- \X {tr} \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
154+ \trace \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W \\
155+ \trace \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
119156 \end {array}
120157 \qquad
121- \X {tr} \vdash _{\reg } \evt _R \sclastvisible \evt ^\ast _W
158+ \trace \vdash _{\reg } \evt _R \sclastvisible \evt ^\ast _W
122159 }{
123- \X {tr} \vdash _{\reg }^i \evt _R \readsfrom \evt _W
160+ \trace \vdash _{\reg }^i \evt _R \readsfrom \evt _W
124161 }
125162
126163.. math ::
@@ -130,7 +167,7 @@ Consistency
130167 k = \offsetact _{\reg }(\evt _R) + i &=& \offsetact _{\reg }(\evt _W) + j
131168 \end {array}
132169 }{
133- \X {tr} \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W
170+ \trace \vdash _{\reg }^{i,k} \evt _R \valueconsistent \evt _W
134171 }
135172
136173.. math ::
@@ -141,23 +178,23 @@ Consistency
141178 \end {array}
142179 \qquad
143180 \begin {array}[b]{@{}l@{}}
144- \forall \evt '_W \in \writingact _{\reg }(\X {tr} ),\\
181+ \forall \evt '_W \in \writingact _{\reg }(\trace ),\\
145182 \quad \evt _W \prechb \evt '_W \prechb \evt _R \Rightarrow k \notin \rangeact _{\reg }(\evt '_W)
146183 \end {array}
147184 }{
148- \X {tr} \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
185+ \trace \vdash _{\reg }^k \evt _R \hbconsistent \evt _W
149186 }
150187
151188.. math ::
152189 \frac {
153190 \begin {array}[b]{@{}l@{\qquad }l@{}}
154- \forall \evt '_W \in \writingact _{\reg }(\X {tr} ), \evt _W \prechb \evt _R \Rightarrow \\
191+ \forall \evt '_W \in \writingact _{\reg }(\trace ), \evt _W \prechb \evt _R \Rightarrow \\
155192 \quad \evt _W \prectot \evt '_W \prectot \evt _R \wedge \syncact _{\reg }(\evt _W, \evt _R) \Rightarrow \neg \syncact _{\reg }(\evt '_W, \evt _R) \\
156193 \quad \evt _W \prechb \evt '_W \prectot \evt _R \Rightarrow \neg \syncact _{\reg }(\evt '_W, \evt _R) \\
157194 \quad \evt _W \prectot \evt '_W \prechb \evt _R \Rightarrow \neg \syncact _{\reg }(\evt _W, \evt '_W)
158195 \end {array}
159196 }{
160- \X {tr} \vdash _{\reg } \evt _R \sclastvisible \evt _W
197+ \trace \vdash _{\reg } \evt _R \sclastvisible \evt _W
161198 }
162199
163200.. math ::
0 commit comments