Skip to content

Commit 49fe74b

Browse files
committed
Make some small changes
1 parent 1c0f265 commit 49fe74b

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

figures

main.tex

+36-23
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,30 @@
3434
\addbibresource{refs/refs.biblatex.bib}
3535
\pagenumbering{gobble}
3636

37-
\title{\vspace{-3em}Full abstraction for digital circuits: \textbf{Extended abstract}}
37+
\title{\vspace{-3em}Fully abstract categorical semantics for digital circuits: \textbf{Extended abstract}}
3838
\author{\textbf{George Kaye}, David Sprunger and Dan R. Ghica}
3939

4040
\begin{document}
4141
\maketitle
4242

43-
\paragraph*{Motivation.}
44-
Digital circuits are ubiquitous in today's society, so it is essential that we have easy ways to verify their correctness and reason with them.
45-
Conventionally, this is done by translation into an executable model such as an automaton, which can be simulated to observe its behaviour.
46-
An alternative approach, used commonly in software, is to reason \emph{syntactically}: programs are formulated equationally and can be reduced step by step by identifying \emph{redexes} in terms.
47-
When provided with inputs, the goal of such a system is to apply redexes and eventually return an output value.
43+
\paragraph*{Contribution.}
44+
It is essential that we have ways to verify the correctness of digital circuits and reason with them.
45+
Conventionally, this is done by translation into an executable model which can be simulated to observe its behaviour.
46+
An alternative approach, used in software, is to reason \emph{syntactically}: programs are formulated equationally and can be reduced step by step.
47+
When provided with inputs, the goal of such a system is to apply reductions and derive an output value.
4848

49-
Such an equational system was first presented in~\cite{ghica2016categorical,ghica2017diagrammatic}, in which digital circuits with delay and feedback are modelled as morphisms in a freely generated traced cartesian category, or \emph{dataflow category}~\cite{cazanescu1990new,cazanescu1994feedback}.
50-
However, there were some informalities in the presentation, and, crucially, the framework was not guaranteed to reduce circuits with \emph{non-delay-guarded feedback} to a value.
49+
Such an equational system was first presented in~\cite{ghica2016categorical,ghica2017diagrammatic}, in which digital circuits with delay and (instant) feedback are modelled as morphisms in a freely generated traced cartesian category, or \emph{dataflow category}~\cite{cazanescu1994feedback,hasegawa1997recursion}.
50+
However, the presentation was informal and, crucially, not complete, and could not reduce all circuits to a stream of values.
5151
Our work brings this project to its conclusion, formalising the categorical semantics and completing the set of equations.
5252

5353
\paragraph*{Syntax.}
54-
Before we can start constructing circuits, we must specify the components we can use.
5554

5655
\begin{definition}[Circuit signature]
5756
Let \(\Sigma\) be a tuple \((\mathcal{V},\disconnected,\shortcircuit,\mathcal{G})\) where \(\mathcal{V}\) is a finite set of \emph{values} with distinguished elements \(\disconnected,\shortcircuit \in \mathcal{V}\), and \(\mathcal{G}\) is a finite set of tuples \((g,m)\) where \(g\) is a \emph{gate symbol} and \(m \in \nat\) is its \emph{arity}.
5857
\end{definition}
5958

6059
\noindent
61-
The distinct elements \(\bullet\) and \(\circ\) represent a \emph{disconnected wire} (a \emph{lack} of information) and a \emph{short circuit} (a \emph{glut} of information) respectively.
60+
The distinct elements \(\bullet\) and \(\circ\) represent a \emph{disconnected wire} (a \emph{lack} of information) and a \emph{short circuit} (\emph{inconsistent} information) respectively.
6261
Using a signature, digital circuits are constructed as morphisms in a freely generated symmetric traced monoidal category (STMC).
6362
To aid in the presentation, we shall use the graphical calculus of \emph{string diagrams}~\cite{joyal1991geometry,joyal1996traced,selinger2011survey}.
6463

@@ -85,16 +84,17 @@
8584
The final generator is a \emph{delay} generator: one can think of this as delaying its inputs for one tick of the clock.
8685
We write arbitrary sequential circuits obtained by composing generators together as green squares \iltikzfig{circuits/components/circuits/f-seq}.
8786
If a circuit is \emph{combinational}, i.e. it contains no delay or trace, it is drawn in a lighter blue square \iltikzfig{circuits/components/circuits/f-comb}.
88-
When restricted to the combinational circuits, this work is similar to~\cite{lafont2003algebraic}: where the approaches diverge is the inclusion of delay and feedback.
87+
When restricted to the combinational circuits, this work is similar to~\cite{lafont2003algebraic}.
88+
Where the approaches diverge is the inclusion of delay and feedback.
8989

9090
\paragraph*{Semantics.}
9191

92-
Circuits specified syntactically have no computational content associated with them.
92+
Circuits specified syntactically have no computational content.
9393
To add \emph{semantics} to circuits, first the signature must be interpreted in some domain.
9494

9595
\begin{definition}[Interpretation]\label{def:interpretation}
96-
Let \(\circuitsignature = (\circuitsignaturevalues,\circuitsignaturegates)\) be a circuit signature.
97-
A interpretation of \(\circuitsignature\) is a tuple \(\interpretation = (\mathbf{V}, \valueinterpretation,\gateinterpretation)\) where \(\values\) is a finite lattice, \(\valueinterpretation\) is a bijective function \(\valueinterpretation \setminus \{\disconnected,\shortcircuit\} \to \values \setminus \{\top,\bot\}\), and \(\gateinterpretation\) is a map from each gate \((g,m) \in \circuitsignaturegates\) to a monotone function \(\morph{\overline{g}}{\valuetuple{m}}{\values}\).
96+
Let \(\circuitsignature = (\circuitsignaturevalues,\circuitsignaturegates)\) be a signature.
97+
A interpretation of \(\circuitsignature\) is a tuple \(\interpretation = (\mathbf{V}, \valueinterpretation,\gateinterpretation)\) where \(\values\) is a finite lattice, \(\valueinterpretation\) is a bijective function \(\valueinterpretation \setminus \{\disconnected,\shortcircuit\} \to \values \setminus \{\top,\bot\}\), and \(\gateinterpretation\) is a map from each \((g,m) \in \circuitsignaturegates\) to a monotone function \(\morph{\overline{g}}{\valuetuple{m}}{\values}\).
9898
\end{definition}
9999

100100
\begin{figure}[p]
@@ -170,12 +170,12 @@
170170

171171
\begin{theorem}[\cite{ghica2022full}]
172172
Let \(\scircsigmai\) be the category obtained by quotienting \(\scircsigma\) by \(\eqaxioms{\mathcal{B}}\).
173-
Then, \(\scircsigmai \cong \streami\).
173+
Then, there is an isomorphism of categories \(\scircsigmai \cong \streami\).
174174
\end{theorem}
175175

176176
\paragraph*{Equational reasoning.}
177177

178-
Circuits of different structure can have the same semantics as stream functions.
178+
Circuits of non-equal syntax can have the same semantics as stream functions.
179179
However, in general it is prohibitive to check that the corresponding streams for two circuits are equal~\cite{ghica2017diagrammatica}: it is more efficient to reason \emph{equationally}.
180180
Equations are identities that hold in the quotient category \(\scircsigmai\).
181181
Given a set of equations \(\mathcal{E}\), we write \(\iltikzfig{circuits/components/circuits/f-seq} \eqaxioms{\mathcal{E}} \iltikzfig{circuits/components/circuits/g-seq}\) if \iltikzfig{circuits/components/circuits/f-seq} can be rewritten to \iltikzfig{circuits/components/circuits/g-seq} by applying equations in \(\mathcal{E}\).
@@ -224,8 +224,20 @@
224224
\label{fig:closed-circuit-axioms}
225225
\end{figure}
226226

227+
\begin{figure}[p]
228+
\centering
229+
\begin{align*}
230+
\iltikzfig{strings/traced/trace-rhs.seq}
231+
= \iltikzfig{circuits/examples/reasoning/unfolding/unfolding-1}
232+
= \iltikzfig{circuits/examples/reasoning/unfolding/unfolding-2}
233+
= \iltikzfig{circuits/examples/reasoning/unfolding/unfolding-3}
234+
\end{align*}
235+
\caption{Deriving the \emph{unfolding} rule using equations in \(\mathcal{C}\).}
236+
\label{fig:unfolding}
237+
\end{figure}
238+
227239
\paragraph*{Productivity.}
228-
A common use of equational reasoning is to take a circuit and reduce it to its output values.
240+
A common use of equational reasoning is to take a circuit and reduce it to its stream of output values.
229241

230242
\begin{definition}[Productivity]
231243
For a set of equations \(\mathcal{E}\), a closed sequential circuit \iltikzfig{circuits/components/fcirc-closed-traced} is called \emph{productive under} \(\mathcal{E}\) if there exist values \iltikzfig{circuits/components/values/vs} and sequential circuit \iltikzfig{circuits/components/gcirc-closed-traced} such that
@@ -240,7 +252,7 @@
240252
A set of equations was presented in~\cite{ghica2016categorical}.
241253
However, they were not \emph{complete}: these axioms could not necessarily handle circuits with \emph{non-delay-guarded feedback}, in which every feedback loop does not pass through a delay generator.
242254
While in some circuits `instant feedback' is useful~\cite{riedel2004cyclic,mendler2012constructive}, in other cases it can result in an unproductive circuit.
243-
To tackle this, we take inspiration from \emph{Kleene's fixpoint theorem}: since all the gates in an interpretation are monotone, they have a least fixpoint; since our lattice is finite, we are able to compute it after a finite number of iterations.
255+
To tackle this, we use \emph{Kleene's fixpoint theorem}: since all the gates in an interpretation are monotone, they have a least fixpoint; since our lattice is finite, we are able to compute it after a finite number of iterations.
244256

245257
\begin{definition}
246258

@@ -269,6 +281,7 @@
269281

270282
\noindent
271283
The complete set of equations \(\mathcal{C}\) for closed circuits under \emph{any} interpretation is shown in \cref{fig:closed-circuit-axioms}.
284+
An important consequence of these is that the \emph{unfolding} rule for circuits with feedback can be derived, illustrated in \cref{fig:unfolding}.
272285

273286
\begin{theorem}
274287
Any closed sequential circuit \iltikzfig{circuits/components/circuits/f-seq-closed} is productive under \(\mathcal{C}\).
@@ -291,14 +304,14 @@
291304
All that remains is to add equations for equivalences between gates
292305

293306
\begin{definition}
294-
We say that a set of equations \(\mathcal{E}\), where each \(e \in \mathcal{E}\) contains at least one gate, is \emph{combinationally complete} for an interpretation \(\interpretation\) if for all combinational circuits \(\iltikzfig{circuits/components/circuits/f-comb}\) and \(\iltikzfig{circuits/components/circuits/g-comb}\), if \(\circuittostream[\iltikzfig{circuits/components/circuits/f-comb}]{\interpretation} = \circuittostream[\iltikzfig{circuits/components/circuits/g-comb}]{\interpretation}\) then there exists a sequence of axioms in \(\mathcal{E}\) such that \(\circuittostream[\iltikzfig{circuits/components/circuits/f-comb}]{\interpretation} \eqaxioms{\mathcal{E}}\circuittostream[\iltikzfig{circuits/components/circuits/g-comb}]{\interpretation}\).
307+
We say that a set of equations \(\mathcal{E}\), where each \(e \in \mathcal{E}\) contains at least one gate, is \emph{combinationally complete} for an interpretation \(\interpretation\) if for all combinational circuits \(\iltikzfig{circuits/components/circuits/f-comb}\) and \(\iltikzfig{circuits/components/circuits/g-comb}\), if \(\circuittostream[\iltikzfig{circuits/components/circuits/f-comb}]{\interpretation} = \circuittostream[\iltikzfig{circuits/components/circuits/g-comb}]{\interpretation}\) then there exists a sequence of equations in \(\mathcal{E}\) such that \(\circuittostream[\iltikzfig{circuits/components/circuits/f-comb}]{\interpretation} \eqaxioms{\mathcal{E}}\circuittostream[\iltikzfig{circuits/components/circuits/g-comb}]{\interpretation}\).
295308
\end{definition}
296309

297310
\begin{example}
298311
A set of equations combinationally complete for \(\interpretation_\star\) are listed in \cref{fig:combinational-axioms}.
299312
\end{example}
300313

301-
\begin{figure}
314+
\begin{figure}[p]
302315
\centering
303316
\begin{align*}
304317
\iltikzfig{strings/structure/comonoid/unitality-l-lhs} &\eqaxioms{\mathcal{B}}
@@ -409,7 +422,7 @@
409422
&\eqaxioms{\mathcal{P}}
410423
\iltikzfig{circuits/axioms/belnap/de-morgan-2-rhs}
411424
\end{align*}
412-
\caption{A set of equations \(\mathcal{P}\) which is combinationally complete for \(\interpretation_\star\).}
425+
\caption{A (not necessarily minimal) set of equations \(\mathcal{P}\) which is combinationally complete for \(\interpretation_\star\), adapted from~\cite{rodrigues1998translation}.}
413426
\label{fig:combinational-axioms}
414427
\end{figure}
415428

@@ -420,8 +433,8 @@
420433

421434
\noindent
422435
This allows us to reason \emph{purely equationally} with digital circuits, rather than having to appeal to the potentially inefficient stream semantics.
423-
Even so, this does not immediately yield an \emph{automatic} rewriting framework: as computationally it is difficult to handle the trace.
424-
A suitable strategy for tackling this problem was presented in~\cite{ghica2017diagrammatic} using graph rewriting on \emph{framed point graphs}~\cite{ghica2017diagrammatic}; a current thread of work involves reworking this using recent work on rewriting with \emph{hypergraphs}~\cite{bonchi2016rewriting}.
436+
Even so, this does not immediately yield an \emph{automatic} rewriting framework, as computationally it is difficult to handle the trace.
437+
A suitable strategy for tackling this problem was presented in~\cite{ghica2017diagrammatic} using graph rewriting on \emph{framed point graphs}; a current thread of work involves reworking this using recent work on rewriting with \emph{hypergraphs}~\cite{bonchi2016rewriting,kaye2021rewriting}.
425438

426439
\printbibliography[heading=bibintoc,title={References}]
427440

refs

0 commit comments

Comments
 (0)