Skip to content

Commit 1c0f265

Browse files
committed
Make changes to conclusion
1 parent 1411c9c commit 1c0f265

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

macros

Submodule macros updated 1 file

main.tex

+18-18
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@
5454
Before we can start constructing circuits, we must specify the components we can use.
5555

5656
\begin{definition}[Circuit signature]
57-
Let \(\Sigma\) be a tuple \((\mathcal{V},\bullet,\circ,\mathcal{G})\) where \(\mathcal{V}\) is a finite set of \emph{values} with distinguished elements \(\bullet,\circ \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}.
57+
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}.
5858
\end{definition}
5959

6060
\noindent
6161
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.
62-
Using a signature, we can construct digital circuits as morphisms in a freely generated symmetric traced monoidal category.
62+
Using a signature, digital circuits are constructed as morphisms in a freely generated symmetric traced monoidal category (STMC).
6363
To aid in the presentation, we shall use the graphical calculus of \emph{string diagrams}~\cite{joyal1991geometry,joyal1996traced,selinger2011survey}.
6464

6565
\begin{definition}[Sequential circuits]
@@ -83,8 +83,9 @@
8383
The small boxes are \emph{values}: these represent the signals that can flow through our circuits.
8484
Next come the generators for each gate symbol in our signature, and three \emph{structural} generators for forking, joining and stubbing wires.
8585
The final generator is a \emph{delay} generator: one can think of this as delaying its inputs for one tick of the clock.
86-
We write arbitrary sequential circuits obtained by composing generators together as squares \iltikzfig{circuits/components/circuits/f-seq}.
87-
If a circuit is \emph{combinational}, i.e. it contains no delay or trace, it is drawn in a lighter square \iltikzfig{circuits/components/circuits/f-comb}.
86+
We write arbitrary sequential circuits obtained by composing generators together as green squares \iltikzfig{circuits/components/circuits/f-seq}.
87+
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.
8889

8990
\paragraph*{Semantics.}
9091

@@ -93,7 +94,7 @@
9394

9495
\begin{definition}[Interpretation]\label{def:interpretation}
9596
Let \(\circuitsignature = (\circuitsignaturevalues,\circuitsignaturegates)\) be a circuit signature.
96-
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 \{\bot,\top\} \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}\).
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}\).
9798
\end{definition}
9899

99100
\begin{figure}[p]
@@ -139,10 +140,10 @@
139140
\end{figure}
140141

141142
\begin{example}\label{ex:interp}
142-
Let \(\Sigma_\star = (\{\bot,\valuetrue,\valuefalse,\top\}, \bot, \top, \{\text{AND},\text{OR},\text{NOT}\}\)) be a signature.
143-
The corresponding generators for values are \(\iltikzfig{strings/structure/monoid/init}, \iltikzfig{circuits/components/values/true}, \iltikzfig{circuits/components/values/false}\) and \(\iltikzfig{strings/structure/monoid/init-white}\); and the gates \(\iltikzfig{circuits/components/gates/and}, \iltikzfig{circuits/components/gates/or}\) and \(\iltikzfig{circuits/components/gates/not}\).
144-
The values can be interpreted in the four value lattice \(\mathbf{V}_\star = \{\bot, 0, 1, \top\}\), where the join \(0 \ljoin 1 = \top\) and the meet \(0 \lmeet 1 = \bot\).
145-
Gates can be interpreted using Belnap logic~\cite{belnap1977useful}: the truth tables are listed in Figure~\ref{tab:truths}.
143+
Let \(\Sigma_\star = (\{\disconnected,\valuetrue,\valuefalse,\shortcircuit\}, \disconnected, \shortcircuit, \{(\text{AND},2),(\text{OR},2),(\text{NOT},1)\}\)) be a signature.
144+
In \(\scirc{\Sigma_\star}\), the values are \(\iltikzfig{strings/structure/monoid/init}, \iltikzfig{circuits/components/values/true}, \iltikzfig{circuits/components/values/false}\) and \(\iltikzfig{strings/structure/monoid/init-white}\); the gates are \(\iltikzfig{circuits/components/gates/and}, \iltikzfig{circuits/components/gates/or}\) and \(\iltikzfig{circuits/components/gates/not}\).
145+
Let \(\values_\star\) be the lattice \((\{\bot, 0, 1, \top\},\sqsubseteq)\), with the join defined as \(0 \ljoin 1 = \top\) and the meet defined as \(0 \lmeet 1 = \bot\).
146+
Let \(\{\wedge,\vee,\neg\}\) be the \emph{Belnap logic} operators~\cite{belnap1977useful}: the truth tables are listed in \cref{tab:truths}.
146147
Let \(\interpretation_\star = (\mathbf{V}_\star, \{\mathsf{f} \mapsto 0, \mathsf{t} \mapsto 1\}, \{\text{AND} \mapsto \land, \text{OR} \mapsto \lor, \text{NOT} \mapsto \neg\})\).
147148
\end{example}
148149

@@ -174,10 +175,10 @@
174175

175176
\paragraph*{Equational reasoning.}
176177

177-
Circuits of different structure can have the same semantics.
178+
Circuits of different structure can have the same semantics as stream functions.
178179
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}.
179180
Equations are identities that hold in the quotient category \(\scircsigmai\).
180-
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 equations in \(\mathcal{E}\).
181+
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}\).
181182
Note that since we are using string diagrams, the axioms of STMCs are `absorbed' into the notation and always hold by moving wires and boxes around.
182183

183184
\begin{figure}[p]
@@ -239,7 +240,7 @@
239240
A set of equations was presented in~\cite{ghica2016categorical}.
240241
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.
241242
While in some circuits `instant feedback' is useful~\cite{riedel2004cyclic,mendler2012constructive}, in other cases it can result in an unproductive circuit.
242-
To tackle this, we take inspiration from \emph{Kleene's fixpoint theorem}: since all the gates in an interpretation are monotonic, they have a least fixpoint; since our lattice is finite, we are able to compute it after a finite number of iterations.
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.
243244

244245
\begin{definition}
245246

@@ -267,7 +268,7 @@
267268
\end{definition}
268269

269270
\noindent
270-
The complete set of equations \(\mathcal{C}\) for closed circuits is shown in \cref{fig:closed-circuit-axioms}.
271+
The complete set of equations \(\mathcal{C}\) for closed circuits under \emph{any} interpretation is shown in \cref{fig:closed-circuit-axioms}.
271272

272273
\begin{theorem}
273274
Any closed sequential circuit \iltikzfig{circuits/components/circuits/f-seq-closed} is productive under \(\mathcal{C}\).
@@ -282,7 +283,7 @@
282283
In the closed case these equations suffice as the input values are propagated across the circuit, with gates evaluated one by one.
283284
However, when faced with an \emph{open circuit} the equations in \(\mathcal{C}\) are not sufficient.
284285
For example, consider the circuits \iltikzfig{circuits/examples/demorgan-lhs} and
285-
\iltikzfig{circuits/examples/demorgan-rhs}: when interpreted under \(\interpretation_\star\) they have the same stream function by applying de Morgan's law.
286+
\iltikzfig{circuits/examples/demorgan-rhs}: when interpreted under \(\interpretation_\star\) their stream functions are equal by applying de Morgan's law.
286287
To tackle this we must consider additional equivalences between \emph{combinational circuits}.
287288

288289
All circuits will include the generators for the fork, join, stub and disconnected wire.
@@ -418,10 +419,9 @@
418419
\end{theorem}
419420

420421
\noindent
421-
This allows us to reason \emph{purely equationally} with digital circuits, rather than having to appeal to te
422-
An initial , and is still current work.
423-
424-
422+
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}.
425425

426426
\printbibliography[heading=bibintoc,title={References}]
427427

0 commit comments

Comments
 (0)