source: docs/Working/icGrep/fig-compiler.tex @ 4504

Last change on this file since 4504 was 4504, checked in by nmedfort, 4 years ago

Small fix for unicode matching example along with formatting changes

File size: 3.9 KB
Line 
1
2\begin{figure}[tbh]
3\vspace{-2em}
4\begin{center}
5
6\pgfdeclarelayer{phases}
7\pgfsetlayers{phases,main}
8\tikzfading[name=fade down,
9  top color=transparent!0, bottom color=transparent!100]
10
11% Define block styles
12%\tikzstyle{decision} = [diamond, shape aspect=2, rotate=30, draw, text width=4.5em, text badly centered, inner sep=0pt, thick]
13\tikzstyle{block} = [rectangle, draw, fill=white, text width=12em, text centered, minimum height=1.75em, thick, font=\ttfamily\bfseries, node distance=3.5em]
14\tikzstyle{line} = [draw, ->, line width=1.4pt]
15\tikzstyle{separator} = [draw, line width=0.125em, dashed]
16\tikzset{block/.append style={execute at begin node=\footnotesize}}   
17\begin{tikzpicture}[node distance=3cm, auto, >=stealth]
18
19    % Place nodes
20    \node [draw=none] (RE) {\RegularExpression{}};
21    \node [block, below of=RE] (REParser) {\REParser{}};
22    \node [block, below of=REParser] (RETransform) {\RegularExpression{} Transformations};   
23%    \coordinate[below of=RETransform, node distance=3em] (Point);   
24%    \node [block, left of=Point, node distance=10em] (CUCompiler) {\CodeUnitCompiler{}};
25%    \node [block, right of=Point, node distance=10em] (RECompiler) {\RegularExpressionCompiler{}};
26    \node [block, below of=RETransform] (RECompiler) {\RegularExpressionCompiler{}};
27    \node [block, below of=RECompiler] (PabloTransform) {\Pablo{} Transformations};   
28    \node [block, below of=PabloTransform] (PabloCompiler) {\PabloCompiler{}};
29    \node [block, below of=PabloCompiler] (LLVMCompiler) {LLVM Compiler};
30    \node [draw=none, below of=LLVMCompiler, node distance=3.5em] (Matcher) {Dynamically-Generated Match Function};
31   
32    % Draw edges
33    \path [line] (RE) -- (REParser);
34    %\path [line] (RE) -- (PropertyExtraction);
35    \path [line] (REParser) -- (RETransform);
36%    \path [line] (RETransform) -| (CUCompiler);
37%    \path [line] (RETransform) -| (RECompiler);
38%    \path [line] (CUCompiler) |- (PabloTransform);
39 %   \path [line] (RECompiler) |- (PabloTransform);
40    \path [line] (RETransform) -- (RECompiler);
41    \path [line] (RECompiler) -- (PabloTransform);
42    \path [line] (PabloTransform) -- (PabloCompiler);
43    \path [line] (PabloCompiler) -- (LLVMCompiler);
44    \path [line] (LLVMCompiler) -- (Matcher);
45   
46    % Draw layers
47    \coordinate[right of=REParser, node distance=15em] (SR);
48    \coordinate[left of=REParser, node distance=15em] (SL);
49    \path [separator] (SL) -- (REParser);
50    \path [separator] (REParser) -- (SR);
51   
52    \coordinate[left of=RECompiler, node distance=15em] (PL);
53    \coordinate[right of=RECompiler, node distance=15em] (PR);
54    \path [separator] (PL) -- (RECompiler);
55    \path [separator] (RECompiler) -- (PR);
56    %\path [separator] (PL) -- (CUCompiler);
57%    \path [separator] (CUCompiler) -- (RECompiler);
58    %\path [separator] (RECompiler) -- (PR);
59
60    \coordinate[right of=PabloCompiler, node distance=15em] (LR);
61    \coordinate[left of=PabloCompiler, node distance=15em] (LL);
62    \path [separator] (LL) -- (PabloCompiler);
63    \path [separator] (PabloCompiler) -- (LR);   
64   
65    \coordinate[right of=LLVMCompiler, node distance=15em] (OR);
66    \coordinate[left of=LLVMCompiler, node distance=15em] (OL);
67    \path [separator] (OL) -- (LLVMCompiler);
68    \path [separator] (LLVMCompiler) -- (OR);       
69   
70    % Seperator text
71    \node [draw=none,anchor=west] at ($(SL)!0.5!(PL)$) {1)~\RegularExpression{} AST};
72    \node [draw=none,anchor=west] at ($(PL)!0.5!(LL)$) {2)~\Pablo{}};
73    \node [draw=none,anchor=west] at ($(LL)!0.5!(OL)$) {3)~LLVM};
74
75    \begin{pgfonlayer}{phases}
76        \path[fill=green!20,path fading=fade down, draw=none] (SL) rectangle (PR);
77        \path[fill=blue!20,path fading=fade down, draw=none] (PL) rectangle (LR);
78        \path[fill=red!20,path fading=fade down, draw=none] (LL) rectangle (OR);
79    \end{pgfonlayer}
80
81\end{tikzpicture}
82
83\end{center}
84\vspace{-1em}
85\caption{icGrep compilation architecture}\label{fig:compiler}
86\vspace{-1em}
87\end{figure} 
Note: See TracBrowser for help on using the repository browser.