Skip to content

Commit 5f78dcf

Browse files
committed
Generalize (section 1)
- include EDF - replace FIFOs with PIFOs - other minor tweaks to structure
1 parent d76c38d commit 5f78dcf

File tree

2 files changed

+46
-44
lines changed

2 files changed

+46
-44
lines changed

enq-deq-equiv/notes.pdf

11.1 KB
Binary file not shown.

enq-deq-equiv/notes.tex

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@
5454

5555
% Rio
5656
\DeclareMathOperator{\Rio}{\mathbf{Rio}}
57-
\DeclareMathOperator{\RR}{\mathbf{rr}}
58-
\DeclareMathOperator{\Fifo}{\mathbf{fifo}}
57+
\DeclareMathOperator{\Fifo}{\mathbf{fifo}} % set2stream
58+
\DeclareMathOperator{\EDF}{\mathbf{edf}}
59+
\DeclareMathOperator{\RR}{\mathbf{rr}} % stream2stream
60+
\DeclareMathOperator{\Strict}{\mathbf{strict}}
5961
\DeclareMathOperator{\Class}{\mathbf{Class}}
6062
\DeclareMathOperator{\flow}{\mathbf{flow}}
6163
\DeclareMathOperator{\class}{\mathrm{class}}
@@ -115,38 +117,25 @@
115117

116118
\reqnomode
117119

118-
As usual, we assume familiarity with citeOG, adopt its notational conventions, and steal its definitions!
120+
\textbf{Disclaimer}: we assume familiarity with citeOG, adopt its notational conventions, and steal its definitions!
119121

120-
\section{Structure and Semantics of Rio Trees}
121-
122-
In addition to $\Pkt$, $\Rk$, and $\St$, presuppose the existence of the following opaque sets/functions:
123-
\begin{enumerate}
124-
\item $\FIFO(S)$, a set of FIFOs with entries in $S$.
125-
\item $\Class$, a collection of \emph{classes}
126-
\item $\flow : \Pkt \to \Class$, a mapping from packets to the class they belong to (flow inference)
127-
\end{enumerate}
128-
129-
Naturally, FIFOs support the partial functions
122+
Further, we work with a specific subset of \emph{Rio}, denoted $\Rio$, namely
130123
\begin{align*}
131-
\pop &: \FIFO(S) \halfto S \times \FIFO(S)\\
132-
\push &: \FIFO(S) \times S \halfto \FIFO(S)
124+
\inference{set2stream}
125+
{c \in \Class}
126+
{\EDF[c], \Fifo[c] \in \Rio}
127+
&&
128+
\inference{stream2stream}
129+
{n \in \mathbb N\\ rs \in \Rio^n}
130+
{\Strict[rs], \RR[rs] \in \Rio}
133131
\end{align*}
134132

133+
where $\Class$ is an opaque collection of \emph{classes}.
134+
135+
\section{Structure and Semantics of Rio Trees}
136+
135137
\subsection{Structure}
136138

137-
% \begin{dfn}
138-
% % Rio
139-
% We'll inductively define the set of \emph{Rio} programs, denoted $\Rio$, by
140-
% \begin{align*}
141-
% \inference{}
142-
% {c \in \Class}
143-
% {\Fifo[c] \in \Rio}
144-
% &&
145-
% \inference{}
146-
% {n \in \mathbb N\\ rs \in \Rio^n}
147-
% {\RR[rs] \in \Rio}
148-
% \end{align*}
149-
% \end{dfn}
150139

151140
% \begin{dfn}
152141
% % Well-formed
@@ -207,12 +196,11 @@ \subsection{Structure}
207196
% \end{abuse}
208197

209198
\begin{dfn}
210-
% Rio tree
211199
For topology $t \in \Topo$, the set $\RioTree(t)$ of \emph{Rio trees} over $t$ is defined by
212200
\begin{align*}
213201
\inference{}
214-
{f \in \FIFO(\Pkt)\\ c \in \Class}
215-
{\Leaf(f, c) \in \RioTree(\ast)}
202+
{p \in \PIFO(\Pkt)\\ c \in \Class}
203+
{\Leaf(p, c) \in \RioTree(\ast)}
216204
&&
217205
\inference{}
218206
{
@@ -221,7 +209,7 @@ \subsection{Structure}
221209
}
222210
{\Internal(qs) \in \RioTree(\Node(ts))}
223211
\end{align*}
224-
These are trees with leaves decorated by both classes and FIFOs.
212+
These are trees with leaves decorated by both classes and PIFOs.
225213
\end{dfn}
226214

227215
\begin{dfn}
@@ -243,37 +231,39 @@ \subsection{Structure}
243231

244232
\subsection{Semantics}
245233

234+
Let $\flow : \Pkt \to \Class$ be an opaque mapping from packets to the class they belong to (flow inference).
235+
246236
\begin{dfn}
247-
For $t \in \Topo$, define $\push : \RioTree(t) \times \Pkt \halfto \RioTree(t)$ such that
237+
For $t \in \Topo$, define $\push : \RioTree(t) \times \Pkt \times \Rk \halfto \RioTree(t)$ such that
248238
\begin{align*}
249239
\inference{}
250240
{
251241
\flow(\pkt) = c\\
252-
\push(f, \pkt) = f^\prime
242+
\push(p, \pkt, r) = p^\prime
253243
}
254-
{\push(\Leaf(f, c), \pkt) = \Leaf(f^\prime, c)}
244+
{\push(\Leaf(p, c), \pkt, r) = \Leaf(p^\prime, c)}
255245
&&
256246
\inference{}
257247
{
258-
\forall 1 \leq i \leq |qs|. \; \push(qs[i], \pkt) = qs^\prime[i]
248+
\forall 1 \leq i \leq |qs|. \; \push(qs[i], \pkt, r) = qs^\prime[i]
259249
}
260-
{\push(\Internal(qs), \pkt) = \Internal(qs^\prime)}
250+
{\push(\Internal(qs), \pkt, r) = \Internal(qs^\prime)}
261251
&&
262252
\inference{}
263253
{
264254
\flow(\pkt) \neq c\\
265255
}
266-
{\push(\Leaf(f, c), \pkt) = \Leaf(f, c)}
256+
{\push(\Leaf(p, c), \pkt, r) = \Leaf(p, c)}
267257
\end{align*}
268-
Informally, we recursively push to all subtrees but only the FIFOs on leaves with the packet's flow are updated.
258+
Informally, we recursively push to all subtrees but only the PIFOs on leaves with the packet's flow are updated.
269259
\end{dfn}
270260

271261
\begin{dfn}
272262
For $t \in \Topo$, define $\pop : \RioTree(t) \times \OrdTree(t) \halfto \Pkt \times \RioTree(t)$ such that
273263
\begin{align*}
274264
\inference{}
275-
{\pop(f) = (\pkt, f^\prime)}
276-
{\pop(\Leaf(f, c), \Leaf) = (\pkt, \Leaf(f^\prime, c))}
265+
{\pop(p) = (\pkt, p^\prime)}
266+
{\pop(\Leaf(p, c), \Leaf) = (\pkt, \Leaf(p^\prime, c))}
277267
&&
278268
\inference{}
279269
{
@@ -287,7 +277,7 @@ \subsection{Semantics}
287277

288278
\newpage
289279

290-
\section{Controls}
280+
\section{PIFO \& Rio Controls}
291281

292282
\begin{figure}[!htb]
293283
\begin{align*}
@@ -342,7 +332,7 @@ \section{Controls}
342332
For $t \in \Topo$, $\PIFOControl(t)$ is the set of quadruples of $(s, q, \zin, \zout)$ where
343333
\begin{align*}
344334
\zin &: \St \times \Pkt \to \Path(t) \times \St\\
345-
\zout &: \St \times \Pkt \to \times \St
335+
\zout &: \St \times \Pkt \to \St
346336
\end{align*}
347337
$s \in \St$ and $q \in \PIFOTree(t)$.
348338
\end{dfn}
@@ -358,7 +348,7 @@ \section{Controls}
358348
$s \in \St$ and $q \in \RioTree(t)$.
359349
\end{dfn}
360350

361-
Both types of controls support $\push$ and $\pop$ operations:
351+
Both controls admit $\push$ and $\pop$ operations:
362352
\begin{align*}
363353
\push : \RioControl(t) \times \Pkt \to \RioControl(t) &&
364354
\push : \PIFOControl(t) \times \Pkt \to \PIFOControl(t)\\
@@ -368,6 +358,18 @@ \section{Controls}
368358

369359
Their semantics are written out in full in \Cref{fig:control_push_pop}.
370360

361+
\newpage
362+
363+
\section{Round-Robin}
364+
365+
Let's put our theory to use by constructing both a $\PIFOControl$ and $\RioControl$ for
366+
\begin{align*}
367+
\RR[(\FIFO[F_1], \FIFO[F_2], \ldots, \FIFO[F_n])] && \text{distinct } F_1, F_2, \ldots, F_n \in \Class
368+
\end{align*}
369+
and showing they're in simulation.
370+
This would show the equivalence of enqueue and dequeue-side semantics for a specific type of program!
371+
372+
371373
\renewcommand\refname{\LARGE References}
372374
\bibliographystyle{alpha}
373375
\bibliography{refs}

0 commit comments

Comments
 (0)