Skip to content

Commit 904ba83

Browse files
committed
correctness
1 parent 2412aa2 commit 904ba83

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

paper.tex

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -774,12 +774,22 @@ \subsection{Compression Algorithms For Fast Arithmetic}
774774
proven above (\autoref{thm:step-correct}),
775775
and the induction hypothesis is used to prove that the other steps preserve the value of the heap.
776776

777-
This therefore shows that \emph{any chain} of well-formed compression steps preserves the value of the bit heap.
778-
We then use this to trivially prove the correctness of the Dadda algorithm.
779-
It is easy to prove that the Dadda algorithm produces a well-formed chain of compression steps.
780-
\osman{we need to explain why this is the case, and this part might be connected to the Integration section.}
781-
However, see that our framework is general,
782-
and can be used to prove the correctness of any compression algorithm that produces a well-formed chain of compression steps.
777+
This shows that \emph{any} well-formed chain preserves the value of the bit heap.
778+
It should we noted that we do not verify compression algorithms themselves.
779+
But instead we verify that the chain of compressors generated by a compressor algorithm preserves the value at the run-time..
780+
So we define $\mathsf{applyChainSafe}$, which applies a chain step by step, checks the conditions of each step against the bit heap it
781+
has reached, and returns $\mathsf{none}$ if a step does not apply.
782+
We then prove that a successful run preserves the value:
783+
\[
784+
\mathsf{applyChainSafe}(S, h) = \mathsf{some}\ h'
785+
\quad\Longrightarrow\quad
786+
\forall \sigma,\; \hsem{h'} = \hsem{h}.
787+
\]
788+
789+
Dadda's algorithm is a plain Lean function with no correctness theorem of its own.
790+
It proposes a chain, and the check decides whether that chain is used.
791+
Any other compression algorithm can take its place without further proof, since only the chain it produces is checked.
792+
This is the check the CIRCT pass of \autoref{sec:integration} runs.
783793

784794
\begin{theorem}[Bit Heap Compression]
785795
\label{thm:tobitheap-compression}
@@ -799,6 +809,7 @@ \subsection{Compression Algorithms For Fast Arithmetic}
799809
The next sections will explain the integration into CIRCT and the results of the verified synthesis of multipliers.
800810

801811
\section{Integration}
812+
\label{sec:integration}
802813

803814
We integrate our verified synthesizer into the CIRCT compiler framework, and make our contributions open-source.
804815
CIRCT's \texttt{circt-synth} flow lowers the word-level \texttt{comb} dialect to an

0 commit comments

Comments
 (0)