diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-11-27 18:20:06 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-11-27 18:20:06 +1100 |
commit | 839764bd955d2bddedb4a38ab1d4d92c797c56b9 (patch) | |
tree | ba18f19658c62f5d515d1bdadbf37969f9e99711 /tex/thesis/appendices | |
parent | 8b9d3f9880824523c16a1101967987f998dc1cb4 (diff) |
Thesis and performance testing related stuff.
Diffstat (limited to 'tex/thesis/appendices')
-rw-r--r-- | tex/thesis/appendices/tool-output.tex | 83 |
1 files changed, 62 insertions, 21 deletions
diff --git a/tex/thesis/appendices/tool-output.tex b/tex/thesis/appendices/tool-output.tex index 3e85174..229ed94 100644 --- a/tex/thesis/appendices/tool-output.tex +++ b/tex/thesis/appendices/tool-output.tex @@ -2,29 +2,70 @@ \chapter{Analysis tool results} In the following output a min-cost flow operator is presented as -\ttext{MCF<supplies,edges>(costs)}. This represents the solution to a +{\tt MCF<supplies,edges>(costs)}. This represents the solution to a min-cost flow problem where each node has a cost from ``supplies'', ``edges'' indicates the topology of the directed graph and ``costs'' indicates costs of the edges (which are the arguments to the operator). -As an example, \ttext{MCF<[1,0,-1],[2:1,2:3,1:2]>(x1, x2, x3)} is a -representation of the following graph: -\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node - distance=2cm,main node/.style={circle,fill=blue!20,draw},every - loop/.style={min distance=1.5cm}] - - \node[main node] (2) {$0$}; - \node[main node] (1) [above left of=V] {$1$}; - \node[main node] (3) [above right of=V] {$-1$}; - - \path[every node/.style={fill=none}] - (2) edge node{x1} (1) - (2) edge node{x2} (3) - (1) edge node{x3} (2); -\end{tikzpicture} - -\section{Bubble sort} - - -\section{} +As an example, {\tt MCF<[1,0,-1],[2:1,2:3,1:2]>(x1, x2, x3)} is a +representation of the flow network shown in Figure +\ref{fig:results-min-cost-flow}. The minimum cost flow of this network +is {\tt x2 + x3}, unless {\tt x1 = $-\infty$}, in which case the +system is infeasible and the result is $-\infty$. +\begin{figure}[H] + \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node + distance=2cm,main node/.style={circle,fill=blue!20,draw},every + loop/.style={min distance=1.5cm}] + + \node[main node] (2) {$0$}; + \node[main node] (1) [above left of=V] {$1$}; + \node[main node] (3) [above right of=V] {$-1$}; + + \path[every node/.style={fill=none}] + (2) edge [bend left] node{x1} (1) + (2) edge node [anchor=north west] {x2} (3) + (1) edge [bend left] node {x3} (2); + \end{tikzpicture} + \caption{An example flow network for which a min-cost flow must be + found} + \label{fig:results-min-cost-flow} +\end{figure} + +The output below consists of a CFG dumped by the Clang framework, +followed by the generated equation system for the CFG. Finally the +equation system is solved and the bounds for each abstract variable at +each block is printed. + +\lstset{basicstyle=\ttfamily\scriptsize,breaklines=true,breakatwhitespace=true,frame=lrtb} + +\pagebreak +\section{Chain construction} +\lstinputlisting{implementation/experiments/chain-output} + +In this example we show + +\pagebreak +\section{Counter} +\lstinputlisting{implementation/experiments/counter-output} + +\lstinputlisting{implementation/experiments/backwards_counter-output} + +\pagebreak +\section{Nested Loops} +\lstinputlisting{implementation/experiments/nested-output} + +\pagebreak +\section{Double counting} +\lstinputlisting{implementation/experiments/example-output} + +In this example + +\pagebreak +\section{Fibonacci} +\lstinputlisting{implementation/experiments/fib-output} + +\pagebreak +\section{Unreachable} +\lstinputlisting{implementation/experiments/irreducible-output} + |