Skip to content

Commit bf10e96

Browse files
committed
Initial commit
0 parents  commit bf10e96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7302
-0
lines changed

.gitignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
*.aux
2+
*.glo
3+
*.idx
4+
*.log
5+
*.toc
6+
*.ist
7+
*.acn
8+
*.acr
9+
*.alg
10+
*.bbl
11+
*.blg
12+
*.dvi
13+
*.glg
14+
*.gls
15+
*.ilg
16+
*.ind
17+
*.lof
18+
*.lot
19+
*.maf
20+
*.mtc
21+
*.mtc1
22+
*.out
23+
*.synctex.gz
24+
thesis.pdf

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
all:
2+
TEXINPUTS=.//:$(TEXINPUTS) pdflatex thesis.tex

biblio.bib

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@phdthesis{Lambers2010,
2+
author = {Lambers, Leen},
3+
mendeley-groups = {Graph Grammars},
4+
pages = {258},
5+
school = {Elektrotechnik und Informatik der Technischen Universit{\"a} Berlin},
6+
title = {{Certifying Rule-Based Models using Graph Transformation}},
7+
year = {2010}
8+
}
9+

chapters/case-study.tex

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
\chapter{Case Study}
2+
3+
$L1$ is a simple call-by-value functional language with high order functions. All functions are currified, that is, have exactly one argument.
4+
5+
\begin{figure}
6+
\caption{$L1$ Abstract Syntax}
7+
\begin{openframe}
8+
\begin{align*}
9+
e ::= & \quad n \quad |\quad x \quad | \quad e_1 \: op \: e_2 \\
10+
& |\quad \text{if } e_1 \text{ then } e_2 \text{ else } e_3 \\
11+
& |\quad e_1 e_2 \\
12+
& |\quad \text{fn x } \Rightarrow e \\
13+
& |\quad \text{let y } = e_1 \text{ in } e_2 \\
14+
& |\quad \text{letrec y } = (\text{fn x } \Rightarrow e_1) \text{ in } e_2 \\
15+
\end{align*}
16+
17+
where
18+
19+
\begin{align*}
20+
n & \in \mathbb{N} \\
21+
x & \in \text{set of variable identifiers} \\
22+
op & \in \{+, -, *, /, =, <, >, \geq, \leq \} \\
23+
\end{align*}
24+
\end{openframe}
25+
\end{figure}
26+
27+
Acqua goal is to explore parallel execution of function applications. A classical example that allows to explore parallel function applications is the algorithm to find the n-th number of the Fibonacci sequence. The Fibonacci number sequece starts with the number 1 two times, and all other numbers are the result of the sum of the last two numbers. Thus, the sequence is \{1,1,2,3,5,8,13,...\}.
28+
29+
The figure \ref{fig:fib-l1} shows a naive $L1$ program that finds the 7th number on the Fibonacci sequence. The recursive function fibo is declared on the first line. The second line shows that fibo is a function that receives one argument (as any function on $L1$) named $x$. The lines 3-5 are the body of the function, that returns 1 when $x$ is less than 2, or the sum of two fibo applications, for $x-1$ and $x-2$. The lines 6 and 8 limit the scope of this function definition. On the line 7 we have the application of the function fibo to the number 7, thus, finding the 7th number of the Fibonacci sequence.
30+
31+
\begin{figure}
32+
\caption{Fibonacci function applied to 7}
33+
\begin{lstlisting}[language=l1]
34+
letrec fibo =
35+
fn x =>
36+
if x < 2
37+
then 1
38+
else (fibo (x - 1)) + (fibo (x - 2))
39+
in
40+
fibo 7
41+
end
42+
\end{lstlisting}
43+
\label{fig:fib-l1}
44+
\end{figure}
45+
46+
To find the 7th Fibonacci number, we need to first find the 6th and 5th numbers. And for the 6th, we need the 5th and 4th numbers. We can represent this dependency using a tree, as show in figure \ref{fig:fibo}. This tree will have the height of $n-2$, except when we are calculating the first and second numbers of fibonacci sequence. This is so because for any node, the subtree on the right is contained on the subtree on the left. So to find the height we only need to consider the leftmost path. The width of this tree is the own fibonacci number. This is so because the width of the first and second numbers are 1, and the width of $n$ is the width of $(n-1) + (n-2)$.
47+
48+
\begin{figure}
49+
\caption{Fibonacci sequence tree}
50+
\centerline{
51+
\includegraphics[width=0.7\textwidth]{fibo.png}
52+
}
53+
\label{fig:fibo}
54+
\end{figure}
55+
56+
Each node in the Fibonacci dependency tree represents a function application in the program shown on figure \ref{fig:fib-l1}. The acqua architecture allows function applications to be done in parallel, so the architecture has the potential to parallelize the width of the tree in a given moment, that is $fibo(n)$ function applications. Function application will generate a job, and each job will potentially copy one environment with only two name bindings: The $x$ variable and the reference to $fibo$ function, thus the environment copy is constant. Assuming that we have enough processing units in the architecture, we can execute the naive program shown on figure \ref{fig:fib-l1} in linear time.

chapters/conclusions.tex

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
\chapter{Conclusions}

chapters/gts.tex

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\chapter{Graph Transformation Systems}
2+
3+

chapters/introduction.tex

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\chapter{Introduction}
2+
3+
Here is a test \cite{Lambers2010}

chapters/methodology.tex

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Methodology}
2+

chapters/verigraph.tex

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\chapter{Verigraph}
2+
3+

conf/figures.tex

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
\graphicspath{ {images/} }
2+
%\captionsetup[table]{skip=10pt}
3+
\newmdenv[leftline=false,rightline=false]{openframe}
4+

conf/listings.tex

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
\definecolor{kwcolor}{rgb}{0,0.5,0}
2+
\definecolor{bgcolor}{rgb}{0.98, 0.98, 0.98}
3+
\definecolor{numbercolor}{rgb}{0.1,0.1,0.1}
4+
5+
\lstset{
6+
keywordstyle=\bfseries\underbar,
7+
stringstyle=\itshape,
8+
basicstyle=\small\ttfamily,
9+
frame=bt,
10+
framerule=1pt,
11+
numbers=left,
12+
numbersep=10pt,
13+
numberstyle=\scriptsize\color{numbercolor},
14+
backgroundcolor=\color{bgcolor},
15+
tabsize=2
16+
}
17+
18+
\lstdefinelanguage{l1}
19+
{keywords={let, letrec, in, if, then, else, end, unused}%
20+
sensitive=true,
21+
alsoletter={\$},
22+
comment=[l]{\#},
23+
string=[b]"
24+
}
25+
26+
\lstdefinelanguage{acqua-ir}
27+
{keywords={unused, EnvNew, EnvAdd, Call, unused}%
28+
sensitive=true,
29+
alsoletter={\$},
30+
comment=[l]{\#},
31+
string=[b]"
32+
}

conf/macros.tex

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
\newcommand{\pu}{processing unit}
2+
\newcommand{\Pu}{Processing unit}
3+
\newcommand{\pus}{processing units}
4+
\newcommand{\Pus}{Processing units}
5+
\newcommand{\envid}{env_{id}}

0 commit comments

Comments
 (0)