1 \documentclass[dvipsnames,14pt,t]{beamer} |
1 \documentclass[dvipsnames,14pt,t]{beamer} |
2 \usepackage{beamerthemeplaincu} |
2 \usepackage{beamerthemeplaincu} |
3 %\usepackage[T1]{fontenc} |
|
4 %\usepackage[latin1]{inputenc} |
|
5 \usepackage{mathpartir} |
|
6 \usepackage[absolute,overlay]{textpos} |
3 \usepackage[absolute,overlay]{textpos} |
7 \usepackage{ifthen} |
4 \usepackage{ifthen} |
8 \usepackage{tikz} |
5 \usepackage{tikz} |
9 \usepackage{pgf} |
6 \usepackage{pgf} |
10 \usepackage{calc} |
7 \usepackage{calc} |
11 \usepackage{ulem} |
8 \usepackage{ulem} |
12 \usepackage{courier} |
|
13 \usepackage{listings} |
9 \usepackage{listings} |
14 \renewcommand{\uline}[1]{#1} |
10 \renewcommand{\uline}[1]{#1} |
15 \usetikzlibrary{arrows} |
11 \usetikzlibrary{arrows} |
16 \usetikzlibrary{automata} |
12 \usetikzlibrary{automata} |
17 \usetikzlibrary{shapes} |
13 \usetikzlibrary{shapes} |
19 \usetikzlibrary{positioning} |
15 \usetikzlibrary{positioning} |
20 \usetikzlibrary{calc} |
16 \usetikzlibrary{calc} |
21 \usetikzlibrary{plotmarks} |
17 \usetikzlibrary{plotmarks} |
22 \usepackage{graphicx} |
18 \usepackage{graphicx} |
23 \usepackage{pgfplots} |
19 \usepackage{pgfplots} |
24 \setmonofont{Consolas} |
20 \usepackage{../langs} |
25 |
21 \usepackage{../data} |
26 \definecolor{javared}{rgb}{0.6,0,0} % for strings |
|
27 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
28 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
29 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
30 |
|
31 \lstset{language=Java, |
|
32 basicstyle=\ttfamily, |
|
33 keywordstyle=\color{javapurple}\bfseries, |
|
34 stringstyle=\color{javagreen}, |
|
35 commentstyle=\color{javagreen}, |
|
36 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
37 numbers=left, |
|
38 numberstyle=\tiny\color{black}, |
|
39 stepnumber=1, |
|
40 numbersep=10pt, |
|
41 tabsize=2, |
|
42 showspaces=false, |
|
43 showstringspaces=false} |
|
44 |
|
45 \lstdefinelanguage{scala}{ |
|
46 morekeywords={abstract,case,catch,class,def,% |
|
47 do,else,extends,false,final,finally,% |
|
48 for,if,implicit,import,match,mixin,% |
|
49 new,null,object,override,package,% |
|
50 private,protected,requires,return,sealed,% |
|
51 super,this,throw,trait,true,try,% |
|
52 type,val,var,while,with,yield}, |
|
53 otherkeywords={=>,<-,<\%,<:,>:,\#,@}, |
|
54 sensitive=true, |
|
55 morecomment=[l]{//}, |
|
56 morecomment=[n]{/*}{*/}, |
|
57 morestring=[b]", |
|
58 morestring=[b]', |
|
59 morestring=[b]""" |
|
60 } |
|
61 |
|
62 |
|
63 \lstset{language=Scala, |
|
64 basicstyle=\ttfamily, |
|
65 keywordstyle=\color{javapurple}\bfseries, |
|
66 stringstyle=\color{javagreen}, |
|
67 commentstyle=\color{javagreen}, |
|
68 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
69 numbers=left, |
|
70 numberstyle=\tiny\color{black}, |
|
71 stepnumber=1, |
|
72 numbersep=10pt, |
|
73 tabsize=2, |
|
74 showspaces=false, |
|
75 showstringspaces=false} |
|
76 |
|
77 \lstdefinelanguage{while}{ |
|
78 morekeywords={if,then,else,while,do,true,false,write}, |
|
79 otherkeywords={=,!=,:=,<,>,;}, |
|
80 sensitive=true, |
|
81 morecomment=[n]{/*}{*/}, |
|
82 } |
|
83 |
|
84 |
|
85 \lstset{language=While, |
|
86 basicstyle=\ttfamily, |
|
87 keywordstyle=\color{javapurple}\bfseries, |
|
88 stringstyle=\color{javagreen}, |
|
89 commentstyle=\color{javagreen}, |
|
90 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
91 numbers=left, |
|
92 numberstyle=\tiny\color{black}, |
|
93 stepnumber=1, |
|
94 numbersep=10pt, |
|
95 tabsize=2, |
|
96 showspaces=false, |
|
97 showstringspaces=false} |
|
98 |
|
99 |
22 |
100 % beamer stuff |
23 % beamer stuff |
101 \renewcommand{\slidecaption}{AFL 09, King's College London, 20.~November 2013} |
24 \renewcommand{\slidecaption}{AFL 09, King's College London, 20.~November 2013} |
102 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
25 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
103 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
26 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
104 |
|
105 |
|
106 % The data files, written on the first run. |
|
107 \begin{filecontents}{compiled.data} |
|
108 %1 0.234146 |
|
109 %5000 0.227539 |
|
110 %10000 0.280748 |
|
111 50000 1.087897 |
|
112 100000 3.713165 |
|
113 250000 21.6624545 |
|
114 500000 85.872613 |
|
115 750000 203.6408015 |
|
116 1000000 345.736574 |
|
117 \end{filecontents} |
|
118 |
|
119 \begin{filecontents}{interpreted.data} |
|
120 %1 0.00503 |
|
121 200 1.005863 |
|
122 400 7.8296765 |
|
123 500 15.43106 |
|
124 600 27.2321885 |
|
125 800 65.249271 |
|
126 1000 135.4493445 |
|
127 1200 232.134097 |
|
128 1400 382.527227 |
|
129 \end{filecontents} |
|
130 |
|
131 \begin{filecontents}{interpreted2.data} |
|
132 %1 0.00503 |
|
133 200 1.005863 |
|
134 400 7.8296765 |
|
135 600 27.2321885 |
|
136 800 65.249271 |
|
137 1000 135.4493445 |
|
138 1200 232.134097 |
|
139 1400 382.527227 |
|
140 \end{filecontents} |
|
141 |
|
142 \begin{filecontents}{compiled2.data} |
|
143 200 0.222058 |
|
144 400 0.215204 |
|
145 600 0.202031 |
|
146 800 0.21986 |
|
147 1000 0.205934 |
|
148 1200 0.1981615 |
|
149 1400 0.207116 |
|
150 \end{filecontents} |
|
151 |
27 |
152 \begin{document} |
28 \begin{document} |
153 |
29 |
154 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
155 \mode<presentation>{ |
31 \mode<presentation>{ |