-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe-canonical-rule.tex
More file actions
73 lines (67 loc) · 2.42 KB
/
frame-canonical-rule.tex
File metadata and controls
73 lines (67 loc) · 2.42 KB
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
% SPDX-License-Identifier: CC-BY-4.0
% Copyright 2018 Toni Dietze
\documentclass[beamer]{standalone}
\input{preamble.tex}
\begin{document}
\begin{standaloneframe}{\jobname}
\centering%
\begin{tikzpicture}
[ anchor=base
, level distance=3em
, node distance=0.5em
, sibling distance=2em
, tri/.style =
{ inner sep=0.12em
, outer sep=0
, shape border rotate=90
, isosceles triangle
, isosceles triangle apex angle=60
, draw=black
}
]
\node (t) at (0, -4em) {\(σ\)}
child { node[tri] {\(t_1\)} edge from parent[child anchor=apex]}
child {node {\(\dots\)} edge from parent[draw=none]}
child { node[tri] {\(t_k\)} edge from parent[child anchor=apex]};
\draw (t-1.right corner) -- (t-3.left corner);
\draw (t-1.left corner)
-- ++(-1em, 0) coordinate (left)
-- (0.5em, 0) coordinate (top)
-- ($(t-3.right corner) + (2em, 0)$) coordinate (right)
-- (t-3.right corner);
\draw[decorate, decoration={snake, amplitude=0.05em, segment length=1em}]
(t) .. controls ++(0, 1em) and ++(0, -1em) .. (0.5em, 0);
% draw subsequent tree triangles
\coordinate (s) at (0, 0);
\foreach \s in {1, 2, ..., 4}
\draw
coordinate (sOld) at (s)
coordinate (s) at (\s*0.5em, \s*0.125em)
(intersection cs: first line = {([shift={(sOld)}]top) -- ([shift={(sOld)}]right)}
, second line = {([shift={(s)}]top) -- ([shift={(s)}]left)})
-- ([shift={(s)}]top)
-- ([shift={(s)}]right)
-- (intersection cs: first line = {([shift={(sOld)}]top) -- ([shift={(sOld)}]right)}
, second line = {([shift={(s)}]right) -- ([shift={(s)}]left)});
\node at (0, -9em) {\(\Downarrow\)};
\matrix[draw=nt, edge from parent/.style={draw=black}, rounded corners, cells={rounded corners=0}] (lhs) at (-8em, -11em) {
\node (t) {\(σ\)}
child { node[tri] {\(t_1\)} edge from parent[child anchor=apex]}
child {node {\(\dots\)} edge from parent[draw=none]}
child { node[tri] {\(t_k\)} edge from parent[child anchor=apex]};
\\
};
\node[right=0 of lhs] (arr) {\({} → σ\Big(\)};
\matrix[base right=of arr, draw=nt, edge from parent/.style={draw=black}, rounded corners, cells={rounded corners=0}]
(t1) {\node[tri] {\(t_1\)};\\};
\node[base right=of t1] (dots) {\(, \dots,\)};
\matrix[base right=of dots, draw=nt, edge from parent/.style={draw=black}, rounded corners, cells={rounded corners=0}]
(tk) {\node[tri] {\(t_k\)};\\};
\node[base right=of tk] {\(\Big)\)};
\end{tikzpicture}
\pause
\begin{center}
result is bottom-up deterministic
\end{center}
\end{standaloneframe}
\end{document}