Skip to content

Commit 19bdf2c

Browse files
committed
wip
1 parent 15c20d1 commit 19bdf2c

1 file changed

Lines changed: 10 additions & 18 deletions

File tree

paper.tex

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -443,24 +443,21 @@ \subsection{Symbolic Bit Representations}
443443
These values are supplied by a bit environment $(\sigma : \mathbb Var \to \mathbb B)$,
444444
which maps each bit variable to its boolean value.
445445
The evaluation function $\csem{\cdot} : \BitExpr \to \mathbb B$ evaluates a \BitExpr $e$ under a bit environment $\sigma$,
446-
producing a concrete boolean value. It is defined in the usual way by recursion on the language of \BitExpr.
447-
446+
producing a concrete boolean value. It is defined in the usual way by recursion on the language of \BitExpr:
448447
\[
449448
\begin{array}{r@{\;}c@{\;}l@{\qquad}l}
450449
\multicolumn{4}{l}{%
451450
b \in Var \qquad
452-
\circledast \in \{\wedge,\vee,\oplus\}}\\[6pt]
453-
451+
\circledast \in \{\wedge,\vee,\oplus\}}\\[2pt]
454452
\BitExpr \ni c &::=& b_n \mid 0 \mid 1 \mid \neg c \mid c \circledast c &
455453
\end{array}
456454
\]
457-
458455
\[
459456
\begin{array}{r@{\;}c@{\;}l}
460457
\multicolumn{3}{@{}l@{}}{%
461458
\sigma \;:\; Var \to \mathbb{B}
462459
\qquad
463-
\csem{\cdot} \;:\; \BitExpr \to \mathbb{B}} \\[4pt]
460+
\csem{\cdot} \;:\; \BitExpr \to \mathbb{B}} \\[2pt]
464461
\csem{b} &=& \sigma(b) \quad \csem{0} = \mathit{false} \quad \csem{1} = \mathit{true}\\
465462
\csem{\neg c} &=& \neg \csem{c} \quad \csem{c_0 \circledast c_1} = \csem{c_0} \circledast \csem{c_1}
466463
\end{array}
@@ -494,11 +491,10 @@ \subsection{Bit Heap Data Structure}
494491
\paragraph{Evaluation of Bit Heaps}
495492
Since a bit heap represents a summation of weighted bits,
496493
we can evaluate the bit heap $h$ under a bit environment $\sigma$ to obtain a concrete value, written as $\csem{h}$.
497-
This is defined by adding up all the bits across all the columns, with bits at column $k$ being evaluated by $\csem{\cdot}$ and weighted by $2^k$. Moreover, since we work with fixed-size bitvectors, all our computations happen modulo $2^w$.
498-
494+
This is defined by adding up all the bits across all the columns, with bits at column $k$ being evaluated by $\csem{\cdot}$ and weighted by $2^k$. Moreover, since we work with fixed-size bitvectors, all our computations happen modulo $2^w$:
499495
\[
500496
\begin{array}{r@{\;}c@{\;}l}
501-
\csem{\cdot} &:& \Heap_w \to \mathbb{N} \\[4pt]
497+
\csem{\cdot} &:& \Heap_w \to \mathbb{N} \\[2pt]
502498
\csem{h}
503499
&=& \Bigl(\textstyle\sum_{k<w} 2^{k} \sum_{c \in h_k} \csem{c}\Bigr)
504500
\bmod 2^{w}
@@ -625,12 +621,11 @@ \subsection{From Word-Level Arithmetic to Bit Heaps}
625621
This allows us to represent nested arithmetic expressions, such as multiply-accumulate.
626622
An \Arith variable $\mathsf{var}(i)$ represents the $i$-th input word.
627623
We also support zero-extension of the variables, that allows us to fit narrow operands into a wider datapath,
628-
as this is commonly needed in multiplication to preserve the full precision of the result
629-
624+
as this is commonly needed in multiplication to preserve the full precision of the result:
630625
\begin{align*}
631626
&i \in \mathbb{N} \qquad v, w \in \mathbb{N}^{+}\\
632627
&\mathtt{ArithCircuit}_w \ni a ::= \\
633-
&\quad \mid \mathsf{var}(i) \mid \mathsf{zext}_{w}(a, e) \mid \mathsf{sext}_{w}(a, e) \mid \mathsf{add}[a_0,\dots,a_{n-1}] \mid \mathsf{mul}[a, a]\\
628+
&\quad \mid \mathsf{var}(i) \mid \mathsf{zext}_{w}(a, e) \mid \mathsf{sext}_{w}(a, e) \mid \mathsf{add}[a_0,\dots,a_{n-1}] \mid \mathsf{mul}[a, a]
634629
\end{align*}
635630

636631
The \Arith variables are assigned a value by a variable environment $\rho : \mathbb{N} \to \mathtt{BitVec}\ w$, mapping each variable to a $w$-bit word,
@@ -693,8 +688,7 @@ \subsection{Compression Algorithms For Fast Arithmetic}
693688
In this section, we prove the correctness of compression algorithms, starting from a single compressor step.
694689

695690
Concretely, any compression algorithm produces a sequence of compression steps.
696-
Formally, we define a \Step as either a half adder or a full adder, which takes the column index and the bits it consumes as arguments.
697-
691+
Formally, we define a \Step as either a half adder or a full adder, which takes the column index and the bits it consumes as arguments:
698692
\[
699693
\begin{array}{r@{\;}c@{\;}l@{\qquad}l}
700694
\Step \ni s &::=& \HA(k,c,c) \mid \FA(k,c,c,c) &
@@ -739,8 +733,7 @@ \subsection{Compression Algorithms For Fast Arithmetic}
739733
Having established that each individual step preserves the value of the heap, we now consider
740734
sequences of steps.
741735
Formally, a chain of compressors is an ordered list of compression steps, where each step is a half or full adder,
742-
and is either empty or a step followed by a chain.
743-
736+
and is either empty or a step followed by a chain:
744737
\[
745738
\begin{array}{r@{\;}c@{\;}l@{\qquad}l}
746739
\Chain \ni S &::=& [\,] \mid s :: S &
@@ -863,7 +856,7 @@ \section{Results}
863856
with the gap being stable for other bit widths as well ($1.21\times$ / $1.12\times$ at 16 bits, $1.21\times$ / $1.10\times$ at 8 bits).
864857

865858
The existing gap in circuit quality is not an inherent limitation of our workflow.
866-
CIRCT's datapath engine applies certain optimizations we have not yet implemented, notably Booth encoding and sign-extension optimizations. \sam{cite?}
859+
CIRCT's datapath engine applies certain optimizations we have not yet implemented, notably Booth encoding and sign-extension optimizations \cite{application_specific_arithmetic}. \sam{cite?}
867860
This is also revealed on our performance on signed benchmarks.
868861

869862
\autoref{tab:verify-time-16} reports how both of flows perform on total verification time.
@@ -872,7 +865,6 @@ \section{Results}
872865

873866
The results show that we are able to verify circuits that the standard flow cannot verify\osman{funny thing, we are not faster on the ones that the standard flow can already verify},
874867
with out flow verifying 11 more circuits than the standard flow, we show the effectiveness of our approach on verification.
875-
The results show that we are able to verify 11 circuits that the standard flow cannot verify at 16-bits.
876868

877869
\begin{table}
878870
\centering

0 commit comments

Comments
 (0)