-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathautomata.tex
123 lines (110 loc) · 2.69 KB
/
automata.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
% Automata
\newcommand{\AFA}{\ensuremath{\mathrm{AFA}}}
\newcommand{\automata}{\ensuremath{\mathfrak{A}}}
\newcommand{\run}{\ensuremath{G=(V,E)}}
% Word
\newcommand{\wT}{\ensuremath{w}}
% States
\newcommand{\q}[1]{\ensuremath{q_{#1}\,}}
\newcommand{\qstart}{\ensuremath{\q{{\textit{start}}}}}
\newcommand{\qleft}{\ensuremath{\q{\vdash}}}
\newcommand{\qright}{\ensuremath{\q{\dashv}}}
% Transition function
\newcommand{\fpbf}{\ensuremath{\bot}}
\newcommand{\tpbf}{\ensuremath{\top}}
\newcommand{\pbf}{\textit{pbf}}
% Transitions with sigma conditioned
\newcommand{\interp}{X}
\newcommand{\sigmaf}[1]{X_{#1}}
\newcommand{\sigmat}{\sigmaf{\top}}
\newcommand{\A}{\ensuremath{\mathcal{A }}}
\newcommand{\trace}{\T}
% 2AFA
\newcommand{\conf}[2]{\langle#1,#2\rangle}
\newcommand{\Tend}{\ensuremath{\vdash\T\dashv}}
\newcommand{\Tendl}{\ensuremath{\vdash \T_0 \cdots \T_{\lambda-1}\dashv}}
% Translations
\newcommand{\srtm}{\ensuremath{ST_m}}
\newcommand{\srtp}{\ensuremath{ST_p}}
\newcommand{\srtx}{\ensuremath{ST}}
\newcommand{\mso}{\text{mso}}
% ------ TIKZ
% Rewrite Next to be able to import tikz
\providecommand{\Next}{\text{\rm \raisebox{-.5pt}{\Large\textopenbullet}}} % {{\ensuremath{\circ}}}
\providecommand{\wNext}{\ensuremath{\widehat{\Next}}}
\usepackage{tikz} %Must go after macros
\usetikzlibrary{patterns,shapes.arrows,arrows,automata,positioning,trees,calc,shadows,positioning,fit,bending,fit}
\usepackage{tikz-cd}
\newcommand{\invisibleopac}{0.4}
\newcommand\addvmargin[1]{
\node[fit=(current bounding box),inner ysep=#1,inner xsep=0]{};
}
\tikzset{
arrows = {[bend]},
>=latex',node distance=48pt,on grid,auto,initial text=,
state/.style = {
draw,
circle,
font=\footnotesize,
minimum width=0.5cm,
minimum height=0.5cm,
fill=gray!10
},
config/.style = {
font=\footnotesize
},
config_accept/.style = {
config,
color=green
},
trans/.style = {
font=\tiny,
color=gray
},
all/.style = {
font=\scriptsize
},
run/.style = {
-{Stealth[length=2.5, width=2.5]}
},
head/.style = {
S-{Stealth[length=2.5, width=2.5]},
sloped,
inner sep = 0.6pt
},
headS/.style = {
S-{Stealth[length=2.5, width=2.5]},
sloped,
inner sep = 0.6pt
},
headR/.style = {
R-{Stealth[length=2.5, width=2.5]},
sloped,
inner sep = 0.6pt,
color=blue
},
headL/.style = {
L-{Stealth[length=2.5, width=2.5]},
sloped,
inner sep = 0.6pt,
color=red
},
R/.tip = {%
.[length=3]
_[sep=2pt 2]
Bar[sep=-1.7pt -2, length=0pt 1, width=3pt 3, line width=0.8]
Bar[sep=1pt 0, length=3pt 3,width=0pt 1,line width=0.6]
},
every loop/.style={
min distance=10mm,
looseness=10
},
L/.tip = {%
.
_[sep=2pt 2]
Bar[sep=1pt 0, length=3pt 3,width=0pt 1, line width=0.6]
},
S/.tip = {%
.
}
}