Skip to content

feat(wcp): make ct max deterministic #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions wcp/heartbeat.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
\item \If $\wcpStamp_{i} = 0$ \Then
\[
\left\{ \begin{array}{lcl}
\INST_{i} & = & 0 \sanityCheck \\
\maxCt_{i} & = & 0 \quad (\trash) \\
\ct_{i} & = & 0 \quad (\trash) \\
\end{array} \right.
Expand All @@ -16,8 +17,19 @@
\item \If $\ct_{i} \neq \maxCt_{i}$ \Then $\ct_{i + 1} = 1 + \ct_{i}$
\item \If $\ct_{i} = \maxCt_{i}$ \Then $\wcpStamp_{i + 1} = 1 + \wcpStamp_{i}$
\end{enumerate}
\label{wcp: heartbeat: smallness of ct max}
\item $\ct_{i} \neq \llarge$
\label{wcp: heartbeat: determinism of ct max}
\item \If $\ct_{i} \neq 0 $ \Then:
\begin{enumerate}
\item \Or $\acc{1}_{i-1} \neq 0$
\item \Or $\acc{2}_{i-1} \neq 0$
\item \Or $\acc{3}_{i-1} \neq 0$
\item \Or $\acc{4}_{i-1} \neq 0$
\end{enumerate}
\item $\ct_{N} = \maxCt_{N}$.
\end{enumerate}
\saNote{} We don't explicitly impose anything on the value of $\maxCt_i$ when $\vli_i \equiv 1$.
But the above forces us to have at all times $0 \leq \ct_{i} \leq \maxCt_{i} < \llarge$, at the very least whenever $\wcpStamp_{i} \neq 0$ if the implementation omits the constraints marked with $(\trash)$.
\saNote{} When $\vli_i \equiv 1$, the value of $\maxCt_i$ is imposed:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a problem here in the presentation. Its not formatted as a bullet point list which I'm assuming is what you intended. Its actually very confusing and only by looking at the latex source could I understand what you meant.

- \ref{wcp: heartbeat: smallness of ct max} imposes the smallness of $\maxCt$: $0 \leq \ct_{i} \leq \maxCt_{i} < \llarge$
- \ref{wcp: heartbeat: determinism of ct max} imposes the determinism of $\maxCt$: at least one of the four byte decomposition starts with a nonzero value on the first row (ie when $\ct_{i} = 0$) thus imposing that the byte decomposition takes exactly max($\argOneHi$, $\argOneLo$, $\argTwoHi$, $\argTwoLo$) byteSize.