slides07.tex
changeset 67 2522dea979d0
parent 66 2895a7550754
child 68 bc48791bb3a9
equal deleted inserted replaced
66:2895a7550754 67:2522dea979d0
    15 \usetikzlibrary{positioning}
    15 \usetikzlibrary{positioning}
    16 \usetikzlibrary{calc}
    16 \usetikzlibrary{calc}
    17 \usepackage{graphicx} 
    17 \usepackage{graphicx} 
    18 \usetikzlibrary{shapes}
    18 \usetikzlibrary{shapes}
    19 \usetikzlibrary{shadows}
    19 \usetikzlibrary{shadows}
       
    20 \usetikzlibrary{plotmarks}
       
    21 
    20 
    22 
    21 \isabellestyle{rm}
    23 \isabellestyle{rm}
    22 \renewcommand{\isastyle}{\rm}%
    24 \renewcommand{\isastyle}{\rm}%
    23 \renewcommand{\isastyleminor}{\rm}%
    25 \renewcommand{\isastyleminor}{\rm}%
    24 \renewcommand{\isastylescript}{\footnotesize\rm\slshape}%
    26 \renewcommand{\isastylescript}{\footnotesize\rm\slshape}%
    92 
    94 
    93 % beamer stuff 
    95 % beamer stuff 
    94 \renewcommand{\slidecaption}{APP 07, King's College London, 13 November 2012}
    96 \renewcommand{\slidecaption}{APP 07, King's College London, 13 November 2012}
    95 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
    97 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
    96 \newcommand{\bl}[1]{\textcolor{blue}{#1}}
    98 \newcommand{\bl}[1]{\textcolor{blue}{#1}}
       
    99 
       
   100 
       
   101 % The data files, written on the first run.
       
   102 \begin{filecontents}{re-python.data}
       
   103 1 0.029
       
   104 5 0.029
       
   105 10 0.029
       
   106 15 0.032
       
   107 16 0.042
       
   108 17 0.042
       
   109 18 0.055
       
   110 19 0.084
       
   111 20 0.136
       
   112 21 0.248
       
   113 22 0.464
       
   114 23 0.899
       
   115 24 1.773
       
   116 25 3.505
       
   117 26 6.993
       
   118 27 14.503
       
   119 28 29.307
       
   120 #29 58.886
       
   121 \end{filecontents}
       
   122 
       
   123 \begin{filecontents}{re1.data}
       
   124 1 0.00179
       
   125 2 0.00011
       
   126 3 0.00014
       
   127 4 0.00026
       
   128 5 0.00050
       
   129 6 0.00095
       
   130 7 0.00190
       
   131 8 0.00287
       
   132 9 0.00779
       
   133 10 0.01399
       
   134 11 0.01894
       
   135 12 0.03666
       
   136 13 0.07994
       
   137 14 0.08944
       
   138 15 0.02377
       
   139 16 0.07392
       
   140 17 0.22798
       
   141 18 0.65310
       
   142 19 2.11360
       
   143 20 6.31606
       
   144 21 21.46013
       
   145 \end{filecontents}
       
   146 
       
   147 \begin{filecontents}{re2.data}
       
   148 1  0.00240
       
   149 2  0.00013
       
   150 3  0.00020
       
   151 4  0.00030
       
   152 5  0.00049
       
   153 6  0.00083
       
   154 7  0.00146
       
   155 8  0.00228
       
   156 9  0.00351
       
   157 10  0.00640
       
   158 11  0.01217
       
   159 12  0.02565
       
   160 13  0.01382
       
   161 14  0.02423
       
   162 15  0.05065 
       
   163 16  0.06522
       
   164 17  0.02140
       
   165 18  0.05176
       
   166 19  0.18254
       
   167 20  0.51898
       
   168 21  1.39631
       
   169 22  2.69501
       
   170 23  8.07952
       
   171 \end{filecontents}
       
   172 
       
   173 \begin{filecontents}{re-internal.data}
       
   174 1 0.00069
       
   175 301 0.00700
       
   176 601 0.00297
       
   177 901 0.00470
       
   178 1201 0.01301
       
   179 1501 0.01175
       
   180 1801 0.01761
       
   181 2101 0.01787
       
   182 2401 0.02717
       
   183 2701 0.03932
       
   184 3001 0.03470
       
   185 3301 0.04349
       
   186 3601 0.05411
       
   187 3901 0.06181
       
   188 4201 0.07119
       
   189 4501 0.08578
       
   190 \end{filecontents}
       
   191 
       
   192 \begin{filecontents}{re3.data}
       
   193 1 0.001605
       
   194 501 0.131066
       
   195 1001 0.057885
       
   196 1501 0.136875
       
   197 2001 0.176238
       
   198 2501 0.254363
       
   199 3001 0.37262
       
   200 3501 0.500946
       
   201 4001 0.638384
       
   202 4501 0.816605
       
   203 5001 1.00491
       
   204 5501 1.232505
       
   205 6001 1.525672
       
   206 6501 1.757502
       
   207 7001 2.092784
       
   208 7501 2.429224
       
   209 8001 2.803037
       
   210 8501 3.463045
       
   211 9001 3.609
       
   212 9501 4.081504
       
   213 10001 4.54569
       
   214 \end{filecontents}
       
   215 
       
   216 
    97 \begin{document}
   217 \begin{document}
    98 
   218 
    99 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   100 \mode<presentation>{
   220 \mode<presentation>{
   101 \begin{frame}<1>[t]
   221 \begin{frame}<1>[t]
   407 
   527 
   408   \end{frame}}
   528   \end{frame}}
   409   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
   529   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
   410 
   530 
   411 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   531 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   532   \mode<presentation>{
       
   533   \begin{frame}[c]
       
   534   \frametitle{Priority Inheritance Protocol}
       
   535 
       
   536   \begin{itemize}
       
   537   \item an algorithm that is widely used in real-time operating systems
       
   538   \item hash been ``proved'' correct by hand in a paper in 1983
       
   539   \item but the first algorithm turned out to be incorrect, despite the ``proof''\bigskip\pause
       
   540   
       
   541   \item we specified the algorithm and then proved that the specification makes
       
   542   ``sense''	
       
   543  \item we implemented our specification in C on top of PINTOS (Stanford)
       
   544  \item our implementation was much more efficient than their reference implementation
       
   545   \end{itemize}
       
   546 
       
   547   \end{frame}}
       
   548   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
       
   549   
       
   550   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
       
   551 \mode<presentation>{
       
   552 \begin{frame}[c]
       
   553 \frametitle{Regular Expression Matching}
       
   554 \tiny
       
   555 
       
   556 \begin{tabular}{@ {\hspace{-6mm}}cc}
       
   557 \begin{tikzpicture}[y=.1cm, x=.15cm]
       
   558  	%axis
       
   559 	\draw (0,0) -- coordinate (x axis mid) (30,0);
       
   560     	\draw (0,0) -- coordinate (y axis mid) (0,30);
       
   561     	%ticks
       
   562     	\foreach \x in {0,5,...,30}
       
   563      		\draw (\x,1pt) -- (\x,-3pt)
       
   564 			node[anchor=north] {\x};
       
   565     	\foreach \y in {0,5,...,30}
       
   566      		\draw (1pt,\y) -- (-3pt,\y) 
       
   567      			node[anchor=east] {\y}; 
       
   568 	%labels      
       
   569 	\node[below=0.3cm] at (x axis mid) {\bl{a}s};
       
   570 	\node[rotate=90, left=0.6cm] at (y axis mid) {secs};
       
   571 
       
   572 	%plots
       
   573 	\draw[color=blue] plot[mark=*, mark options={fill=white}] 
       
   574 		file {re-python.data};
       
   575 	\only<1->{
       
   576 	\draw[color=red] plot[mark=triangle*, mark options={fill=white} ] 
       
   577 		file {re1.data};}
       
   578 	\only<1->{	 
       
   579          \draw[color=green] plot[mark=square*, mark options={fill=white} ] 
       
   580 		file {re2.data};}
       
   581     
       
   582 	%legend
       
   583 	\begin{scope}[shift={(4,20)}] 
       
   584 	\draw[color=blue] (0,0) -- 
       
   585 		plot[mark=*, mark options={fill=white}] (0.25,0) -- (0.5,0) 
       
   586 		node[right]{\footnotesize Python};
       
   587 	\only<1->{\draw[yshift=6mm, color=red] (0,0) -- 
       
   588 		plot[mark=triangle*, mark options={fill=white}] (0.25,0) -- (0.5,0)
       
   589 		node[right]{\footnotesize Scala V1};}
       
   590 	\only<1->{	
       
   591 	 \draw[yshift=12mm, color=green] (0,0) -- 
       
   592 		plot[mark=square*, mark options={fill=white}] (0.25,0) -- (0.5,0)
       
   593 		node[right]{\footnotesize Scala V2 with simplifications};}
       
   594 	\end{scope}
       
   595 \end{tikzpicture} &
       
   596 
       
   597 \begin{tikzpicture}[y=.35cm, x=.00045cm]
       
   598  	%axis
       
   599 	\draw (0,0) -- coordinate (x axis mid) (10000,0);
       
   600     	\draw (0,0) -- coordinate (y axis mid) (0,6);
       
   601     	%ticks
       
   602     	\foreach \x in {0,2000,...,10000}
       
   603      		\draw (\x,1pt) -- (\x,-3pt)
       
   604 			node[anchor=north] {\x};
       
   605     	\foreach \y in {0,1,...,6}
       
   606      		\draw (1pt,\y) -- (-3pt,\y) 
       
   607      			node[anchor=east] {\y}; 
       
   608 	%labels      
       
   609 	\node[below=0.3cm] at (x axis mid) {\bl{a}s};
       
   610 	\node[rotate=90, left=0.6cm] at (y axis mid) {secs};
       
   611 
       
   612 	%plots
       
   613 	\draw[color=blue] plot[mark=*, mark options={fill=white}] 
       
   614 		file {re-internal.data};
       
   615 	\only<1->{	 
       
   616          \draw[color=red] plot[mark=triangle*, mark options={fill=white} ] 
       
   617 		file {re3.data};}
       
   618     
       
   619 	%legend
       
   620 	\begin{scope}[shift={(2000,4)}] 
       
   621 	\draw[color=blue] (0,0) -- 
       
   622 		plot[mark=*, mark options={fill=white}] (0.25,0) -- (0.5,0) 
       
   623 		node[right]{\footnotesize Scala Internal};
       
   624         \only<1->{
       
   625 	\draw[yshift=6mm, color=red] (0,0) -- 
       
   626 		plot[mark=triangle*, mark options={fill=white}] (0.25,0) -- (0.5,0)
       
   627 		node[right]{\footnotesize Scala V3};}
       
   628 	\end{scope}
       
   629 \end{tikzpicture}
       
   630 \end{tabular}\bigskip\pause
       
   631 \normalsize
       
   632 \begin{itemize}
       
   633 \item I needed a proof in order to make sure my program is correct
       
   634 \end{itemize}\pause
       
   635 
       
   636 \begin{center}
       
   637 \bl{End Digression.\\ (Our small proof is 0.0005\% of the OS-proof.)}
       
   638 \end{center}
       
   639 
       
   640 \end{frame}}
       
   641 
       
   642 
       
   643 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   
       
   644 
       
   645   
       
   646 
       
   647 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   412 \mode<presentation>{
   648 \mode<presentation>{
   413 \begin{frame}[c]
   649 \begin{frame}[c]
   414 \frametitle{Trusted Third Party}
   650 \frametitle{Trusted Third Party}
   415 
   651 
   416 Simple protocol for establishing a secure connection via a mutually
   652 Simple protocol for establishing a secure connection via a mutually