%
% Replication and Nu Style
%
% General Utilities
%
\newcommand{\suppress}[1]{} % Comment out text. JRWG
\newcommand{\comment}[1]{\{\textsf{#1}\}} % Highlight text. JRWG
\newcommand{\vecsc}[1]{\vec{\textsc{#1}}}
%
% Abbreviations
%
\newcommand{\F}{Facile}
\newcommand{\Cham}{Chemical Abstract Machine}
\newcommand{\Lc}{$\lambda$--calculus}
\newcommand{\LC}{$\lambda$--Calculus}
\newcommand{\Lx}{$\lambda$--expression}
\newcommand{\Pc}{$\pi$--calculus}
\newcommand{\PC}{$\pi$--Calculus}
\newcommand{\MAPc}{mini asynchronous $\pi$--calculus}
\newcommand{\MAPC}{Mini Asynchronous $\pi$--Calculus}
\newcommand{\TPC}{Term--$\pi$--Calculus}
\newcommand{\TPc}{term--$\pi$--calculus}
\newcommand{\PPC}{$\pi^\pi$--Calculus}
\newcommand{\PPc}{$\pi^\pi$--calculus}
\newcommand{\TPPC}{Term--$\pi^\pi$--Calculus}
\newcommand{\TPPc}{term--$\pi^\pi$--calculus}
\newcommand{\OGRe}{OGRe}
%
% Semantics
%
\newcommand{\sembrac}[1]{[\![ #1 ]\!]}
\newcommand{\infer}[3]
           {\vspace{.2cm}
            \hbox{${\displaystyle {\frac {#1}{#2}}\hspace{.5cm}{#3}}$}
            \vspace{.2cm}}
\newcommand{\subs}[3]{{#1}\{{#2}/{#3}\}}
\newcommand{\defeq}{\stackrel{\triangle}{=}}
%
% Translation representation
%
\newcommand{\transwhere}[4]{& & {\makebox[1.5cm][l]
	{\textbf{with}}}{\Ppar{\Pdef{#1}{#2}}{\Pcall{#1}{#3}} \rightarrow {#4}}}
\newcommand{\transand}[4]{& & {\makebox[1.5cm][l]
	{\textbf{and}}}{\Ppar{\Pdef{#1}{#2}}{\Pcall{#1}{#3}} \rightarrow {#4}}}
\newcommand{\anddef}[2]{& & {\makebox[1.5cm][l]
	{\textbf{#1}}}{#2}}
\newcommand{\PPwhere}[2]{\textbf{where} & & {#1} \; = \; {#2}}
\newcommand{\PPand}[2]{\textbf{and} & & {#1} \; = \; {#2}}
\newcommand{\transexp}[2]{\sembrac{#1}_{#2}}
\newcommand{\transdef}[3]{\transexp{#1}{#2} & = & {#3}}
%
% Lambda
%
\newcommand{\Labs}[2]{\lambda{#1}.\,{#2}}
\newcommand{\Lapp}[2]{{#1}\,{#2}}
\newcommand{\Lappl}[1]{@_{#1}}
\newcommand{\Lanapp}[3]{\Lappl{#1}\,{#2}\,{#3}}
\newcommand{\Ltriv}{()}
\newcommand{\Lpair}[2]{({#1},{#2})}
%
% Pi Common
%
\newcommand{\parprocs}[2]{{#1}\,|\,{#2}}
\newcommand{\match}[4]{{#1}={#2} \cdot {#3} \; : \; {#4}}
\newcommand{\inaction}{0}
\newcommand{\pair}[2]{{#1}\,{#2}}
\newcommand{\triv}{}
%
% Pi Generic
%
\newcommand{\intup}[1]{{#1}}
\newcommand{\outup}[1]{({#1})}
\newcommand{\restrictand}[2]{\restrictandnu{#1}{#2}}
\newcommand{\restrict}[2]{\restrictnu{#1}{#2}}
\newcommand{\replicate}[2]{\replicatepi{#1}{#2}}
\newcommand{\guardedrep}[4]{\guardedreppi{#1}{#2}{#3}{#4}}
\newcommand{\inpact}[3]{\inpactpi{#1}{#2}{#3}}
\newcommand{\inpacta}[2]{\inpactapi{#1}{#2}}
\newcommand{\outact}[3]{\outactpi{#1}{#2}{#3}}
\newcommand{\outacta}[2]{\outactapi{#1}{#2}}
%\newcommand{\intup}[1]{({#1})}
%\newcommand{\outup}[1]{({#1})}
%\newcommand{\restrictand}[2]{\restrictandbs{#1}{#2}}
%\newcommand{\restrict}[2]{\restrictbs{#1}{#2}}
%\newcommand{\replicate}[2]{\replicateagt{#1}{#2}}
%\newcommand{\guardedrep}[4]{\guardedrepagt{#1}{#2}{#3}{#4}}
%\newcommand{\inpact}[3]{\inpactoc{#1}{#2}{#3}}
%\newcommand{\inpacta}[2]{\inpactaoc{#1}{#2}}
%\newcommand{\outact}[3]{\outactoc{#1}{#2}{#3}}
%\newcommand{\outacta}[2]{\outactaoc{#1}{#2}}
%
% Pi Trad
%
\newcommand{\restrictandnu}[2]{({\nu}\,{#1}){#2}}
\newcommand{\restrictnu}[2]{({\nu}\,{#1})\,({#2})}
\newcommand{\replicatepi}[2]{!\,{#2}}
\newcommand{\guardedreppi}[4]{!\,\inpact{#2}{#3}{#4}}
\newcommand{\inpactpi}[3]{{#1}({#2}) \cdot {#3}}
\newcommand{\inpactapi}[2]{{#1}({#2})}
\newcommand{\outactpi}[3]{\overline{#1}\,{#2} \cdot {#3}}
\newcommand{\outactapi}[2]{\overline{#1}\,{#2}}
%
% Pi Rec
%
\newcommand{\restrictandbs}[2]{{#2}\backslash {#1}}
\newcommand{\restrictbs}[2]{({#2})\backslash {#1}}
\newcommand{\replicateagt}[2]{\recdef {#1} (\parprocs {\recvar{#1}} {#2})}
\newcommand{\guardedrepagt}[4]{\guardedrec{#1}{#2}{#3}{#4}}
\newcommand{\inpactoc}[3]{{#1}?{#2} \cdot {#3}}
\newcommand{\inpactaoc}[2]{{#1}?{#2}}
\newcommand{\outactoc}[3]{{#1}!{#2} \cdot {#3}}
\newcommand{\outactaoc}[2]{{#1}!{#2}}
\newcommand{\recdef}[2]{\textbf{rec} {\recvar {#1}} \cdot {#2}}
\newcommand{\guardedrec}[4]{\textbf{rec} {\recvar {#1}} \cdot
	\inpact{#2}{#3}{(\,\parprocs {#4} {\recvar {#1}}\,)}}
\newcommand{\recvar}[1]{{#1}}
\newcommand{\agtuse}[2]{\recvar {#1} ({#2})}
\newcommand{\agtdef}[3]{\agtuse {#1} {#2} = {#3}}
\newcommand{\agtdefn}[3]{\agtuse {#1} {#2} & = & {#3}}
%
% OGRe
%
\newcommand{\Ppar}[2]{{#1},\;{#2}}
\newcommand{\Pcall}[2]{{#1}\,!\,{#2}}
\newcommand{\Pdef}[2]{{#1}:{#2}}
\newcommand{\Pinact}{Dead}
\newcommand{\Prule}[5]{\Ppar{\Pdef{#1}{#2}}{\Pcall{#1}{#3}} &
	\rightarrow & \Ppar{\Pdef{#1}{#5}}{#4}}
\newcommand{\PruleChange}[4]{\Ppar{\Pdef{#1}{#2}}{\Pcall{#1}{#3}}
	& \rightarrow & \Pdef{#1}{#4}}
\newcommand{\PruleSpawn}[4]{\Prule{#1}{#2}{#3}{#4}{#2}}
%
% Pi Sky
%
\newcommand{\PPin}[2]{?{#1} \cdot {#2}}
\newcommand{\PPoutP}[2]{{#1}!{#2}}
\newcommand{\PPout}[3]{\PPoutP{#1}{#2} \cdot {#3}}
\newcommand{\PPnew}[3]{{\nu}\,{#1} \cdot {#2} \cdot {#3}}
\newcommand{\PPmatch}[4]{[{#1} = {#2}\,:\,{#3}];\,{#4}}
\newcommand{\PPmatches}[3]{{#1},\,{#2}\,:\,{#3}}
\newcommand{\PPabs}[2]{\lambda{#1}\,{#2}}
\newcommand{\PPdef}[2]{{#1} = {#2}}
\newcommand{\PPstop}[0]{Stop}
\newcommand{\PPempty}[0]{()}
\newcommand{\PPname}[2]{{#1}:{#2}}
\newcommand{\PPpar}[2]{{#1}\,\|\,{#2}}
\newcommand{\PPsum}[2]{{#1}+{#2}}
\newcommand{\PPres}[2]{\nu{#1}\,{#2}}
\newcommand{\PPsub}[2]{{#1}\{{#2}\}}
\newcommand{\PPdefn}[2]{{#1} & = & {#2}}
% End of macros
