\documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage{microtype} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{thmtools} \usepackage{enumitem} \usepackage{csquotes} \usepackage[hidelinks]{hyperref} \usepackage[nameinlink,noabbrev]{cleveref} \usepackage{algorithm} \usepackage{algpseudocode} % Line-number prefix configuration (A/B/C) \renewcommand{\thealgorithm}{\Alph{algorithm}} % Float labels: Algorithm A, B, C \newcommand{\algletter}{} \algrenewcommand\alglinenumber[1]{\scriptsize\textbf{\algletter}#1} \usepackage{tikz} \usepackage{xspace} \usepackage[fr-FR]{datetime2} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyfoot[L]{Compilé le \DTMnow} \fancyfoot[C]{\thepage} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \theoremstyle{plain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}{Definition} \theoremstyle{remark} \newtheorem{remark}{Remark} \newcommand{\send}{\textsf{send}} \newcommand{\recv}{\textsf{recv}} \newcommand{\hash}{\textsf{hash}} \newcommand{\procQueue}{\textsf{processQueue}} \newcommand{\RBcast}{\textsf{RB-cast}} \newcommand{\RBreceived}{\textsf{RB-received}} \newcommand{\queue}{\mathsf{queue}} \crefname{theorem}{Theorem}{Theorems} \crefname{lemma}{Lemma}{Lemmas} \crefname{definition}{Definition}{Definitions} \crefname{algorithm}{Algorithm}{Algorithms} % \title{Upgrading Reliable Broadcast to Atomic Reliable Broadcast with a DenyList Primitive} \date{\vspace{-1ex}} \begin{document} % \maketitle \section*{Algorithm} \renewcommand{\algletter}{A} \begin{algorithm} \begin{algorithmic}[1] \Function{send}{m} \State \RBcast$(self, m, \hash(H))$ \EndFunction \vspace{1em} \Function{\RBreceived}{$j, m, h$} \State $\queue[j] \gets \queue[j].push(\{(m, h)\})$ \If{$|\queue[j]| = 1$} \Comment{If this is the first message in the queue, process it} \State \procQueue() \EndIf \EndFunction \vspace{1em} \Function{processQueue}{} \For{$j$ such that $\queue[j] \neq \emptyset$} \State $\{(m, h)\} \gets \queue[j].pop()$ % \If{$m$ is a singleton} % \State $H \gets H \cup \{m\}$; \recv$(m)$; $\queue[j] \gets \queue[j] \setminus \{(m, h)\}$ % \ElsIf{$\exists A : A \subseteq H\ \wedge\ \hash(A) = h$} % \State $H \gets H \cup \{m\}$; \recv$(m)$; $\queue[j] \gets \queue[j] \setminus \{(m, h)\}$ % \Else % \State \textbf{break} % \EndIf \If{$\exists A : A \subseteq H\ \wedge\ \hash(A) = h$} \State $H \gets H \cup \{m\}$; \recv$(m)$; $\queue[j] \gets \queue[j] \setminus \{(m, h)\}$ \State \procQueue(); \Return; \EndIf \EndFor \EndFunction \end{algorithmic} \end{algorithm} % \bibliographystyle{plain} % \begin{thebibliography}{9} % % (left intentionally blank) % \end{thebibliography} \end{document}