This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmystyle.tex
142 lines (126 loc) · 5.81 KB
/
mystyle.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
% ======================================================================
% Editing / collaboration
% ======================================================================
% Show diff (exactly one of this and the following pair of commands must be commented)
\newcommand{\add}[1]{\textcolor{blue}{#1}}
\newcommand{\del}[1]{\textcolor{gray}{#1}}
% Preview changes (exactly one of this and the previous pair of commands must be commented)
% \newcommand{\add}[1]{#1}
% \newcommand{\del}[1]{}
\newcommand{\replace}[2]{\del{#1}\add{#2}}
% Enable rendering of comments
% \newcommand{\guy}[1]{[\textcolor{blue}{\textbf{gg:}} {\footnotesize
% \textcolor{purple}{#1}]}}
% \newcommand{\matej}[1]{[\textcolor{blue}{\textbf{mp:}} {\footnotesize
% \textcolor{teal}{#1}]}}
% \newcommand{\marko}[1]{[\textcolor{blue}{\textbf{mv:}} {\footnotesize
% \textcolor{purple}{#1}]}}
% \newcommand{\arp}[1]{[\textcolor{blue}{\textbf{arp:}} {\footnotesize
% \textcolor{brown}{#1}]}}
% \newcommand{\jorge}[1]{[\textcolor{blue}{\textbf{js:}} {\footnotesize
% \textcolor{violet}{#1}]}}
% \newcommand{\akosh}[1]{[\textcolor{blue}{\textbf{af:}} {\footnotesize
% \textcolor{blue}{#1}]}}
% \newcommand{\cmt}[1]{[\textcolor{blue}{\textbf{CMT:}} {\footnotesize
% \textcolor{red}{#1}]}}
% \newcommand{\TODO}[1]{[{\textbf{\red{TODO:}}} {\footnotesize
% \textcolor{gray}{#1}]}}
% Disable rendering of comments.
\newcommand{\guy}[1]{}
\newcommand{\matej}[1]{}
\newcommand{\marko}[1]{}
\newcommand{\arp}[1]{}
\newcommand{\jorge}[1]{}
\newcommand{\akosh}[1]{}
\newcommand{\cmt}[1]{}
\newcommand{\TODO}[1]{}
\newcommand{\ignore}[1]{}
% ======================================================================
% Formatting macros
% ======================================================================
% Some text colors
\newcommand{\blue}[1]{{\color{blue}{#1}}}
\newcommand{\red}[1]{{\color{red}{#1}}}
\newcommand{\out}[1]{{\red{\sout{#1}}}}
\newcommand{\subnetName}[1]{\textbf{\texttt{#1}}}
\newcommand{\actorName}[1]{\texttt{#1}}
\newcommand{\dataField}[1]{\texttt{#1}}
\newcommand{\funcName}[1]{\textit{\texttt{#1}}}
\newcommand{\funcParam}[1]{\textit{#1}}
\newcommand{\accountName}[1]{\texttt{#1}}
\newcommand{\accountNameFull}[2]{\subnetName{#1}.\texttt{#2}}
\newcommand{\tx}[1]{\textit{#1}}
\newcommand{\funcNameFull}[3]{\subnetName{#1}.\actorName{#2}.\funcName{#3}}
\newcommand{\var}[1]{\textit{#1}}
\newtheorem{example}{Example}
% ======================================================================
% Macros for names to use in the text
% ======================================================================
\newcommand{\ipcFull}{Interplanetary Consensus\xspace}
\newcommand{\ipc}{IPC\xspace}
\newcommand{\sa}{\actorName{ISA}\xspace}
\newcommand{\saOf}[1]{$\sa_\subnetName{#1}$}
\newcommand{\saFull}{IPC Subnet Actor\xspace}
\newcommand{\saFulls}{IPC Subnet Actors\xspace}
\newcommand{\gw}{\actorName{IGA}\xspace}
\newcommand{\gwFull}{IPC Gateway Actor\xspace}
\newcommand{\actor}{actor\xspace} % TODO: Get rid of these and use the word "actor" directly in text. The name is very unlikely to change.
\newcommand{\actors}{actors\xspace}
\newcommand{\pofFull}{Proof of Finality\xspace}
\newcommand{\pofsFull}{Proofs of Finality\xspace}
\newcommand{\pof}{\textit{PoF}\xspace}
\newcommand{\postoffice}{postbox\xspace}
% ======================================================================
% Legacy macros
% ======================================================================
\newtheorem{claim}{Claim}
\newtheorem{notation}{Notation}
\newtheorem{invariant}{Invariant}
\newtheorem{execution}{Execution}
\newtheorem{ensemble}{Ensemble}
\newtheorem*{ensemble*}{Ensemble}
\newtheorem{strategy}{Strategy}
\newtheorem*{strategy*}{Strategy}
\newtheorem{assumption}{Assumption}
\newtheorem*{theorem*}{Theorem}
\newcommand{\alg}{$\mathcal A$}
\newcommand{\act}{\alpha}
\newcommand{\wrt}{w.r.t.\/}
\newcommand{\adv}{\sigma}
\newcommand{\SN}{\mathcal{SN}}
\newcommand{\PN}{\mathcal{PN}}
\newcommand{\parent}[1]{\texttt{parent}(#1)}
\newcommand{\user}{u}
\newcommand{\fil}{\textit{amt}\xspace}
\newcommand{\txwf}{$tx(\fil,\; \user,\; fee)$\xspace} %tx w\ fee
\newcommand{\txnf}{$tx(\fil,\; \user)$\xspace} %tx no fee
\newcommand{\chkp}{$\langle \texttt{chkp},\; fee \rangle $\xspace} %checkpoint
\newcommand{\pofs}{$pofs$\xspace}
\newcommand{\prop}{$\langle \texttt{prop},\; fee, \; dest \rangle $\xspace}
\newcommand{\report}{$\langle \texttt{report},\; \pofs \rangle $\xspace} %report slash
\newcommand{\slashop}{$\langle \texttt{slash},\; \pofs \rangle $\xspace} %slash
\newcommand{\pUp}{\textsc{PropUp}}
\newcommand{\pDn}{\textsc{PropDn}}
\newcommand{\pHr}{\textsc{PropHere}}
\newcommand{\smr}{SMR\xspace}
\newcommand{\gov}{\textit{gov-acc}\xspace}
\newcommand{\pom}{\textit{PoM}\xspace} % Proof of Misbehavior
\newcommand{\verifyGfinal}[2]{\textit{verifyGlobalFinality}({#1},{#2})\xspace} % verify the global finality of (#1-state/tx) in the child subnet with assitance of (#2-proof).
\newcommand{\verifyPfinal}[2]{\textit{verifyParentFinality}({#1},{#2})\xspace} % verify the global finality of (#1-state/tx) in the parent subnet with assitance of (#2-proof).
\newcommand{\ssc}{\textit{ShouldSubmitCheckpoint}\xspace}
\newcommand{\prf}{\textit{PoF}\xspace}
\newcommand{\data}{\textit{data}\xspace}
\newcommand{\dest}{\textit{dest}\xspace}
\newcommand{\src}{\textit{src}\xspace}
\newcommand{\bqueue}{bottom-up registry\xspace}
\newcommand{\tqueue}{top-down registry\xspace}
\newcommand{\tcheckpoint}{top-down checkpoint\xspace}
\newcommand{\eoa}{\textit{EOA}\xspace}
\newcommand{\propagate}{\textit{propagate}}
\newcommand\T[1]{\noindent\textbf{#1}}
\newcommand{\impl}{IPC reference implementation\xspace} % name it differently?
% \let\period.
% \catcode`\.\active
% \def\uppercasesingleletter#1{\uppercase{#1}}
% \def.{\period\afterassignment\periodx\let\next= }
% \def \periodx{\ifcat\space\next \next\expandafter\uppercasesingleletter \else\expandafter\next\fi}