Slides/Slides2.thy
changeset 279 98b3b769ec9a
parent 278 acc752cef1e7
child 280 19a4ac992823
equal deleted inserted replaced
278:acc752cef1e7 279:98b3b769ec9a
   186 
   186 
   187   \begin{itemize}
   187   \begin{itemize}
   188   \item Norrish formalised computability theory in HOL starting
   188   \item Norrish formalised computability theory in HOL starting
   189   from the lambda-calculus\smallskip 
   189   from the lambda-calculus\smallskip 
   190   \begin{itemize}
   190   \begin{itemize}
   191   \item \textcolor{gray}{for technical reasons we could not follow him}
   191   \item \textcolor{gray}{for technical reasons we could not follow his work}
   192   \item \textcolor{gray}{some proofs use TMs (Wang tilings)}
   192   \item \textcolor{gray}{some proofs use TMs (Wang tilings)}
   193   \end{itemize}
   193   \end{itemize}
   194   \bigskip
   194   \bigskip
   195 
   195 
   196   \item Asperti and Ricciotti formalised TMs in Matita\smallskip
   196   \item Asperti and Ricciotti formalised TMs in Matita\smallskip
   262   \end{textblock}}
   262   \end{textblock}}
   263 
   263 
   264   \only<4->{
   264   \only<4->{
   265   \begin{textblock}{4}(4.2,12.4)
   265   \begin{textblock}{4}(4.2,12.4)
   266   \begin{tikzpicture}
   266   \begin{tikzpicture}
   267   \draw (0,0) node {\begin{tabular}{l}correct UTM by translation\end{tabular}};
   267   \draw (0,0) node {\begin{tabular}{l}a correct UTM by translation\end{tabular}};
   268   \end{tikzpicture}
   268   \end{tikzpicture}
   269   \end{textblock}}
   269   \end{textblock}}
   270 
   270 
   271   \end{frame}}
   271   \end{frame}}
   272   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   272   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   338   \begin{center}
   338   \begin{center}
   339   \begin{tabular}{@ {}rcl@ {\hspace{8mm}}l}
   339   \begin{tabular}{@ {}rcl@ {\hspace{8mm}}l}
   340   @{text "I"} & $::=$  & @{term "Goto L\<iota>"}
   340   @{text "I"} & $::=$  & @{term "Goto L\<iota>"}
   341   & \textcolor{black!60}{jump to instruction @{text L}}\\[1mm]
   341   & \textcolor{black!60}{jump to instruction @{text L}}\\[1mm]
   342   & $\mid$ & @{term "Inc R\<iota>"} & \textcolor{black!60}{increment register @{text "R"} by one}\\[1mm]
   342   & $\mid$ & @{term "Inc R\<iota>"} & \textcolor{black!60}{increment register @{text "R"} by one}\\[1mm]
   343   & $\mid$ & @{term "Dec R\<iota> L\<iota>"} & \textcolor{black!60}{if content of @{text R} is non-zero,}\\
   343   & $\mid$ & @{term "Dec R\<iota> L\<iota>"} & \textcolor{black!60}{if the content of @{text R} is non-zero,}\\
   344   & & & \textcolor{black!60}{then decrement it by one}\\
   344   & & & \textcolor{black!60}{then decrement it by one}\\
   345   & & & \textcolor{black!60}{otherwise jump to instruction @{text L}}
   345   & & & \textcolor{black!60}{otherwise jump to instruction @{text L}}
   346   \end{tabular}
   346   \end{tabular}
   347   \end{center}
   347   \end{center}
   348   \end{itemize}
   348   \end{itemize}
   382   can be defined by simple recursion\\ (HOL has @{term "Least"})
   382   can be defined by simple recursion\\ (HOL has @{term "Least"})
   383   
   383   
   384   \item \small you define
   384   \item \small you define
   385   \begin{itemize}
   385   \begin{itemize}
   386   \item addition, multiplication, logical operations, quantifiers\ldots
   386   \item addition, multiplication, logical operations, quantifiers\ldots
   387   \item coding of numbers (Cantor encoding), UTM
   387   \item coding of numbers (Cantor encoding), UF
   388   \end{itemize}
   388   \end{itemize}
   389 
   389 
   390   \end{itemize}
   390   \end{itemize}
   391   
   391   
   392 
   392 
   399   \mode<presentation>{
   399   \mode<presentation>{
   400   \begin{frame}[c]
   400   \begin{frame}[c]
   401   \frametitle{Copy Turing Machine}%
   401   \frametitle{Copy Turing Machine}%
   402 
   402 
   403   \begin{itemize}
   403   \begin{itemize}
   404   \item TM that copies a number on the input tape\smallskip
   404   \item TM that copies a number on the input tape
       
   405   \begin{center}
       
   406   @{text "copy \<equiv> cbegin ; cloop ; cend"}
       
   407   \end{center}\smallskip
   405 
   408 
   406 
   409 
   407   \begin{center}
   410   \begin{center}
   408   \begin{tikzpicture}[scale=0.7]
   411   \begin{tikzpicture}[scale=0.7]
   409   \node [anchor=base] at (2.2,0.1) {\small$\Rightarrow$};
   412   \node [anchor=base] at (2.2,0.1) {\small$\Rightarrow$};
   486   \end{center}\bigskip
   489   \end{center}\bigskip
   487 
   490 
   488   \footnotesize
   491   \footnotesize
   489   \begin{center}
   492   \begin{center}
   490   \begin{tabular}{@ {\hspace{-8mm}}c@ {\hspace{2mm}}c@ {\hspace{2mm}}c}
   493   \begin{tabular}{@ {\hspace{-8mm}}c@ {\hspace{2mm}}c@ {\hspace{2mm}}c}
   491   \multicolumn{3}{@ {\hspace{-8mm}}l}{\small@{text "copy \<equiv> cbegin ; cloop ; cend"}}\\[4mm]
       
   492   \begin{tabular}[t]{@ {}l@ {}}
   494   \begin{tabular}[t]{@ {}l@ {}}
   493   @{text cbegin} @{text "\<equiv>"}\\
   495   @{text cbegin} @{text "\<equiv>"}\\
   494   \hspace{2mm}@{text "["}@{text "(W\<^bsub>0\<^esub>, 0), (R, 2), (R, 3),"}\\
   496   \hspace{2mm}@{text "["}@{text "(W\<^bsub>0\<^esub>, 0), (R, 2), (R, 3),"}\\
   495   \hspace{2mm}\phantom{@{text "["}}@{text "(R, 2), (W\<^bsub>1\<^esub>, 3), (L, 4),"}\\
   497   \hspace{2mm}\phantom{@{text "["}}@{text "(R, 2), (W\<^bsub>1\<^esub>, 3), (L, 4),"}\\
   496   \hspace{2mm}\phantom{@{text "["}}@{text "(L, 4), (L, 0)"}@{text "]"} 
   498   \hspace{2mm}\phantom{@{text "["}}@{text "(L, 4), (L, 0)"}@{text "]"} 
   667   \mode<presentation>{
   669   \mode<presentation>{
   668   \begin{frame}[c]
   670   \begin{frame}[c]
   669   \frametitle{Hoare Reasoning}%
   671   \frametitle{Hoare Reasoning}%
   670 
   672 
   671   \begin{itemize}
   673   \begin{itemize}
   672   \item reasoning is still quite demanding;\\
   674   \item reasoning is quite demanding, e.g.~the invariants 
   673   the invariants of the copy-machine:\\[-5mm]\mbox{}
   675   of the copy-machine:\\[-5mm]\mbox{}
   674 
   676 
   675   \footnotesize
   677   \footnotesize
   676   \begin{center}
   678   \begin{center}
   677   \begin{tabular}{@ {\hspace{-5mm}}c@ {}}
   679   \begin{tabular}{@ {\hspace{-5mm}}c@ {}}
   678   \begin{tabular}{@ {}l@ {\hspace{1mm}}c@ {\hspace{1mm}}l@ {\hspace{-0.9cm}}l@ {}}
   680   \begin{tabular}{@ {}l@ {\hspace{1mm}}c@ {\hspace{1mm}}l@ {\hspace{-0.9cm}}l@ {}}
   709   \begin{frame}[c]
   711   \begin{frame}[c]
   710   \frametitle{Midway Conclusion}%
   712   \frametitle{Midway Conclusion}%
   711 
   713 
   712   \begin{itemize}
   714   \begin{itemize}
   713   \item feels awfully like reasoning about machine code
   715   \item feels awfully like reasoning about machine code
   714   \item compositional constructions / reasoning not at all frictionless
   716   \item compositional constructions / reasoning is not at all frictionless
   715   \item sizes
   717   \item sizes
   716 
   718 
   717   \begin{center}
   719   \begin{center}
   718   \begin{tabular}{ll}
   720   \begin{tabular}{ll}
   719   & sizes:\smallskip\\
   721   & sizes:\smallskip\\
   772   \mode<presentation>{
   774   \mode<presentation>{
   773   \begin{frame}[c]
   775   \begin{frame}[c]
   774   \frametitle{Better Composability}%
   776   \frametitle{Better Composability}%
   775 
   777 
   776   \begin{itemize}
   778   \begin{itemize}
   777   \item an idea from Jensen, Benton, Kennedy who looked at X86 
   779   \item an idea from Jensen, Benton \& Kennedy who looked at X86 
   778   assembly programs and macros\bigskip
   780   assembly programs and macros\bigskip
   779   
   781   
   780   \item assembly for TMs:\medskip
   782   \item assembly for TMs:\medskip
   781   \begin{center}
   783   \begin{center}
   782   \begin{tabular}{l}
   784   \begin{tabular}{l}
   835 
   837 
   836   \begin{center}
   838   \begin{center}
   837   \large @{text "{P} p {Q}"}
   839   \large @{text "{P} p {Q}"}
   838   \end{center}\bigskip\medskip
   840   \end{center}\bigskip\medskip
   839  
   841  
   840   \item[@{text "(1)"}] we had to find a termination order proving that @{text p} terminates
   842   \item[@{text "(1)"}] we had to find invariants for each state\\ \textcolor{gray}{(not easy)}
   841   \textcolor{gray}{(not easy)}
   843 
   842   
   844   
   843   \item[@{text "(2)"}] we had to find invariants for each state\\ \textcolor{gray}{(not easy either)}
   845   
       
   846   \item[@{text "(2)"}] we had to find a termination order proving that @{text p} terminates
       
   847   \textcolor{gray}{(not easy either)}
   844   \end{itemize}\pause
   848   \end{itemize}\pause
   845   
   849   
   846   \begin{center}
   850   \begin{center}
   847   \alert{very little opportunity for automation}
   851   \alert{very little opportunity for automation}
   848   \end{center}
   852   \end{center}
   932   \begin{itemize}
   936   \begin{itemize}
   933   \item What started out as a student project, turned out to be much more
   937   \item What started out as a student project, turned out to be much more
   934   fun than first thought.\bigskip
   938   fun than first thought.\bigskip
   935 
   939 
   936   \item Where can you claim that you proved the correctness of
   940   \item Where can you claim that you proved the correctness of
   937   a @{text "38"} Mio instruction program. 
   941   a @{text "38"} Mio instruction program?
   938   (ca.~@{text 7000} is the soa \raisebox{-1mm}{\includegraphics[scale=0.077]{smiley.jpg}})
   942   (ca.~@{text 7000} is the soa \raisebox{-1mm}{\includegraphics[scale=0.077]{smiley.jpg}})
   939   \bigskip
   943   \bigskip
   940   
   944   
   941   \item We learned a lot about current verification technology for low-level code
   945   \item We learned a lot about current verification technology for low-level code
   942   (we had no infrastructure: CPU model).
   946   (we had no infrastructure: CPU model).\bigskip
       
   947 
       
   948   \item The existing literature on TMs \& RMs leave out quite a bit of the story
       
   949   (not to mention contains bugs).
   943   \end{itemize}
   950   \end{itemize}
   944   
   951   
   945 
   952 
   946   \end{frame}}
   953   \end{frame}}
   947   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
   954   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%