This repository has been archived by the owner on Oct 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
macros.tex
75 lines (67 loc) · 2.01 KB
/
macros.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
\usepackage{url}
\usepackage{latexsym}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{clrscode}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{algorithmic}
\usepackage{array}
\usepackage{multirow}
\usepackage{listings}
\usepackage{xspace}
\usepackage{ifthen}
\usepackage{stmaryrd}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{bussproofs}
\usepackage{xcolor}
\usepackage{stmaryrd}
\usepackage{wrapfig}
% for checkmarks
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}\xspace}%
\newcommand{\xmark}{\ding{55}\xspace}%
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}
\newtheorem{definition}{Definition}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\rng}{rng}
\newcommand{\Stmt}{\mathrm{Stmt}}
\newcommand{\Name}{\mathrm{Name}}
\newcommand{\Label}{\mathrm{Label}}
\newcommand{\Literal}{\mathrm{Literal}}
\newcommand{\Address}{\mathrm{Address}}
\newcommand{\Heap}{\mathrm{Heap}}
\newcommand{\Env}{\mathrm{Env}}
\newcommand{\PrimOp}{\mathrm{PrimOp}}
\newcommand{\PrimVal}{\mathrm{PrimVal}}
\newcommand{\Value}{\mathrm{Value}}
\newcommand{\Record}{\mathrm{Rec}}
\newcommand{\Event}{\mathrm{Event}}
\newcommand{\Trace}{\mathrm{Trace}}
\newcommand{\ToString}{\mathrm{ToString}}
\newcommand{\ToBoolean}{\mathrm{ToBoolean}}
\newcommand{\red}{\downarrow}
\newcommand{\mred}{\mathop{\overline{\red}}}
\newcommand{\hatred}[1]{\mathop{\hat{\red}^{#1}}}
\newcommand{\mhatred}[1]{\mathop{\overline{\hatred{#1}}}}
%\newcommand{\kw}[1]{\mathbf{#1}}
\newcommand{\rlname}[1]{(\textsc{#1})}
\newcommand{\hatrlname}[1]{($\widehat{\textsc{#1}}$)}
\newcommand{\muJS}{\ensuremath{\mu\mathrm{JS}}\xspace}
\newcommand{\code}[1]{\texttt{#1}}
\newcounter{cnt}
\makeatletter
\newcommand{\contextlabel}[1]{
\setcounter{cnt}{0}
\@for\arg:=#1\do{
\addtocounter{cnt}{1}
\ifnum\value{cnt}=1 \arg \else \mbox{$\rightarrow$} \arg \fi
}
}
\newcommand{\fact}[3]{\mbox{$\llbracket\,$\code{#1}$\,\rrbracket_{\,\contextlabel{#2}}$ $=$ \code{#3}}}
\makeatother
\newcommand{\indet}{\mbox{\bf ?}}
\newif\ifdetails