Slides/Slides2.thy
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 23 Jul 2013 09:06:34 +0200
changeset 272 42f2c28d1ce6
parent 271 4457185b22ef
child 273 fa021a0c6984
permissions -rw-r--r--
new verison of the slides
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
(*<*)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
theory Slides2
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
imports "../thys/UTM" "../thys/Abacus_Defs"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
begin
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
declare [[show_question_marks = false]]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
hide_const (open) s 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
abbreviation
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
  "update2 p a \<equiv> update a p"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
notation (latex output)
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    14
  Cons ("_::_" [48,47] 68) and
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    15
  append ("_@_" [65, 64] 65) and
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
  Oc ("1") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
  Bk ("0") and
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    18
  exponent ("_\<^bsup>_\<^esup>" [107] 109) and
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
  inv_begin0 ("I\<^isub>0") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
  inv_begin1 ("I\<^isub>1") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    21
  inv_begin2 ("I\<^isub>2") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    22
  inv_begin3 ("I\<^isub>3") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    23
  inv_begin4 ("I\<^isub>4") and 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    24
  inv_begin ("I\<^bsub>cbegin\<^esub>") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    25
  inv_loop1 ("J\<^isub>1") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    26
  inv_loop0 ("J\<^isub>0") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    27
  inv_end1 ("K\<^isub>1") and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    28
  inv_end0 ("K\<^isub>0")
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    29
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    30
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    31
 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    32
lemma inv_begin_print:
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    33
  shows "s = 0 \<Longrightarrow> inv_begin n (s, tp) = inv_begin0 n tp" and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    34
        "s = 1 \<Longrightarrow> inv_begin n (s, tp) = inv_begin1 n tp" and 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    35
        "s = 2 \<Longrightarrow> inv_begin n (s, tp) = inv_begin2 n tp" and 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    36
        "s = 3 \<Longrightarrow> inv_begin n (s, tp) = inv_begin3 n tp" and 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    37
        "s = 4 \<Longrightarrow> inv_begin n (s, tp) = inv_begin4 n tp" and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    38
        "s \<notin> {0,1,2,3,4} \<Longrightarrow> inv_begin n (s, l, r) = False"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    39
apply(case_tac [!] tp)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    40
by (auto)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    41
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    42
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    43
lemma inv1: 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    44
  shows "0 < (n::nat) \<Longrightarrow> Turing_Hoare.assert_imp (inv_begin0 n) (inv_loop1 n)"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    45
unfolding Turing_Hoare.assert_imp_def
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    46
unfolding inv_loop1.simps inv_begin0.simps
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    47
apply(auto)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    48
apply(rule_tac x="1" in exI)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    49
apply(auto simp add: replicate.simps)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    50
done
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    51
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    52
lemma inv2: 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    53
  shows "0 < n \<Longrightarrow> inv_loop0 n = inv_end1 n"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    54
apply(rule ext)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    55
apply(case_tac x)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    56
apply(simp add: inv_end1.simps)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    57
done
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    58
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    59
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    60
lemma measure_begin_print:
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    61
  shows "s = 2 \<Longrightarrow> measure_begin_step (s, l, r) = length r" and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    62
        "s = 3 \<Longrightarrow> measure_begin_step (s, l, r) = (if r = [] \<or> r = [Bk] then 1 else 0)" and
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    63
        "s = 4 \<Longrightarrow> measure_begin_step (s, l, r) = length l" and 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    64
        "s \<notin> {2,3,4} \<Longrightarrow> measure_begin_step (s, l, r) = 0"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    65
by (simp_all)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    66
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    67
lemma inv_begin01:
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    68
  assumes "n > 1"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    69
  shows "inv_begin0 n (l, r) = (n > 1 \<and> (l, r) = (Oc \<up> (n - 2), [Oc, Oc, Bk, Oc]))"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    70
using assms by auto                          
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    71
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    72
lemma inv_begin02:
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    73
  assumes "n = 1"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    74
  shows "inv_begin0 n (l, r) = (n = 1 \<and> (l, r) = ([], [Bk, Oc, Bk, Oc]))"
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    75
using assms by auto
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    76
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    77
(*>*)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    78
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    79
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    80
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    81
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    82
  \renewcommand{\slidecaption}{ITP, 24 July 2013}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    83
  \newcommand{\bl}[1]{#1}                        
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    84
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    85
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    86
  \begin{frame}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    87
  \frametitle{%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    88
  \begin{tabular}{@ {}c@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    89
  \\[-3mm]
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    90
  {\fontsize{20}{20}\selectfont{}Mechanising Turing Machines and}\\[-2mm] 
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    91
  {\fontsize{20}{20}\selectfont{}Computability Theory in Isabelle}\\[-3mm] 
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    92
  \end{tabular}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    93
  
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    94
  \bigskip\medskip\medskip
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    95
 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    96
  \begin{center}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    97
  \begin{tabular}{c@ {\hspace{1cm}}c}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    98
  \includegraphics[scale=0.29]{jian.jpg}  &
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
    99
  \includegraphics[scale=0.034]{xingyuan.jpg} \\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   100
  Jian Xu & Xingyuan Zhang\\[-3mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   101
  \end{tabular}\\[3mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   102
  \small PLA University of Science and Technology
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   103
  \end{center}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   104
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   105
  \begin{center}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   106
  Christian Urban\\[0mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   107
  \small King's College London
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   108
  \end{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   109
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   110
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   111
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   112
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   113
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   114
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   115
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   116
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   117
  \begin{frame}[c]
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   118
  \frametitle{Why Turing Machines?}%
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   119
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   120
  \begin{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   121
  \item At the beginning, it was just a student project
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   122
  about computability.\smallskip
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   123
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   124
  \begin{center}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   125
  \begin{tabular}{c}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   126
  \includegraphics[scale=0.3]{boolos.jpg}\\[-2mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   127
  \footnotesize Computability and Logic (5th.~ed)\\[-2mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   128
  \footnotesize Boolos, Burgess and Jeffrey\\[2mm]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   129
  \end{tabular}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   130
  \end{center}
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   131
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   132
  \item found an inconsistency in the definition of halting computations
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   133
  (Chap.~3 vs Chap.~8)
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   134
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   135
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   136
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   137
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   138
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   139
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   140
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   141
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   142
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   143
  \begin{frame}[c]
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   144
  \frametitle{Some Previous Work}%
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   145
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   146
  \begin{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   147
  \item Norrish formalised computability theory in HOL starting
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   148
  from the lambda-calculus 
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   149
  \begin{itemize}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   150
  \item \textcolor{gray}{for technical reasons we could not follow him}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   151
  \item \textcolor{gray}{some proofs use TMs (Wang tilings)}
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   152
  \end{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   153
 
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   154
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   155
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   156
  \bigskip
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   157
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   158
  \item Asperti and Ricciotti formalised TMs in Matita
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   159
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   160
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   161
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   162
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   163
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   164
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   165
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   166
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   167
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   168
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   169
  \frametitle{Turing Machines}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   170
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   171
  \begin{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   172
  \item tapes are lists and contain @{text 0}s or @{text 1}s only
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   173
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   174
  \begin{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   175
\begin{tikzpicture}[scale=1]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   176
  \draw[very thick] (-3.0,0)   -- ( 3.0,0);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   177
  \draw[very thick] (-3.0,0.5) -- ( 3.0,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   178
  \draw[very thick] (-0.25,0)   -- (-0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   179
  \draw[very thick] ( 0.25,0)   -- ( 0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   180
  \draw[very thick] (-0.75,0)   -- (-0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   181
  \draw[very thick] ( 0.75,0)   -- ( 0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   182
  \draw[very thick] (-1.25,0)   -- (-1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   183
  \draw[very thick] ( 1.25,0)   -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   184
  \draw[very thick] (-1.75,0)   -- (-1.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   185
  \draw[very thick] ( 1.75,0)   -- ( 1.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   186
  \draw[rounded corners=1mm] (-0.35,-0.1) rectangle (0.35,0.6);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   187
  \draw[fill]     (1.35,0.1) rectangle (1.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   188
  \draw[fill]     (0.85,0.1) rectangle (1.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   189
  \draw[fill]     (-0.35,0.1) rectangle (-0.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   190
  \draw[fill]     (-1.65,0.1) rectangle (-1.35,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   191
  \draw (-0.25,0.8) -- (-0.25,-0.8);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   192
  \draw[<->] (-1.25,-0.7) -- (0.75,-0.7);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   193
  \node [anchor=base] at (-0.85,-0.5) {\small left list\;\;\;\;\mbox{}};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   194
  \node [anchor=base] at (0.40,-0.5) {\small \mbox{}\;\;\;\;right list};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   195
  \node [anchor=base] at (0.1,0.7) {\small \;\;head};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   196
  \node [anchor=base] at (-2.2,0.2) {\ldots};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   197
  \node [anchor=base] at ( 2.3,0.2) {\ldots};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   198
  \end{tikzpicture}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   199
  \end{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   200
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   201
  \item @{text steps} function:
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   202
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   203
  \begin{quote}\rm
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   204
  What does the TM claclulate after it has executed @{text n} steps?
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   205
  \end{quote}\pause
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   206
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   207
  \item designate the @{text 0}-state as \"halting state\" and remain there 
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   208
  forever, i.e.~have a @{text Nop}-action
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   209
  \end{itemize}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   210
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   211
  \end{frame}}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   212
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   213
*}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   214
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   215
text_raw {*
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   216
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   217
  \mode<presentation>{
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   218
  \begin{frame}[c]
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   219
  \frametitle{Register Machines}%
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   220
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   221
  \begin{itemize}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   222
  \item instructions
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   223
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   224
  \begin{center}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   225
  \begin{tabular}{rcl@ {\hspace{10mm}}l}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   226
  @{text "I"} & $::=$  & @{term "Inc R\<iota>"} & increment register @{text "R"} by one\\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   227
  & $\mid$ & @{term "Dec R\<iota> L\<iota>"} & if content of @{text R} is non-zero,\\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   228
  & & & then decrement it by one\\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   229
  & & & otherwise jump to instruction @{text L}\\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   230
  & $\mid$ & @{term "Goto L\<iota>"} & jump to instruction @{text L}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   231
  \end{tabular}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   232
  \end{center}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   233
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   234
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   235
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   236
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   237
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   238
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   239
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   240
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   241
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   242
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   243
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   244
  \frametitle{Copy Turing Machines}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   245
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   246
  \begin{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   247
  \item TM that copies a number on the input tape
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   248
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   249
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   250
  \begin{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   251
\begin{tikzpicture}[scale=0.7]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   252
  \node [anchor=base] at (2.2,0.1) {\small$\Rightarrow$};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   253
  \node [anchor=base] at (5.6,0.1) {\small$\Rightarrow$};
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   254
  \node [anchor=base] at (10.5,0.1) {\small$\Rightarrow$};
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   255
  \node [anchor=base] at (2.2,-0.8) {\small$\overbrace{@{text cbegin}}^{}$};
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   256
  \node [anchor=base] at (5.6,-0.8) {\small$\overbrace{@{text cloop}}^{}$};
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   257
  \node [anchor=base] at (10.5,-0.8) {\small$\overbrace{@{text cend}}^{}$};
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   258
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   259
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   260
  \begin{scope}[shift={(0.5,0)}]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   261
  \draw[very thick] (-0.25,0)   -- ( 1.25,0);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   262
  \draw[very thick] (-0.25,0.5) -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   263
  \draw[very thick] (-0.25,0)   -- (-0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   264
  \draw[very thick] ( 0.25,0)   -- ( 0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   265
  \draw[very thick] ( 0.75,0)   -- ( 0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   266
  \draw[very thick] ( 1.25,0)   -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   267
  \draw[rounded corners=1mm] (-0.35,-0.1) rectangle (0.35,0.6);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   268
  \draw[fill]     (-0.15,0.1) rectangle (0.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   269
  \draw[fill]     ( 0.35,0.1) rectangle (0.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   270
  \draw[fill]     ( 0.85,0.1) rectangle (1.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   271
  \end{scope}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   272
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   273
  \begin{scope}[shift={(2.9,0)}]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   274
  \draw[very thick] (-0.25,0)   -- ( 2.25,0);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   275
  \draw[very thick] (-0.25,0.5) -- ( 2.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   276
  \draw[very thick] (-0.25,0)   -- (-0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   277
  \draw[very thick] ( 0.25,0)   -- ( 0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   278
  \draw[very thick] ( 0.75,0)   -- ( 0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   279
  \draw[very thick] ( 1.25,0)   -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   280
  \draw[very thick] ( 1.75,0)   -- ( 1.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   281
  \draw[very thick] ( 2.25,0)   -- ( 2.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   282
  \draw[rounded corners=1mm] (0.15,-0.1) rectangle (0.85,0.6);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   283
  \draw[fill]     (-0.15,0.1) rectangle (0.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   284
  \draw[fill]     ( 0.35,0.1) rectangle (0.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   285
  \draw[fill]     ( 0.85,0.1) rectangle (1.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   286
  \draw[fill]     ( 1.85,0.1) rectangle (2.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   287
  \end{scope}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   288
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   289
  \begin{scope}[shift={(6.8,0)}]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   290
  \draw[very thick] (-0.75,0)   -- ( 3.25,0);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   291
  \draw[very thick] (-0.75,0.5) -- ( 3.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   292
  \draw[very thick] (-0.75,0)   -- (-0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   293
  \draw[very thick] (-0.25,0)   -- (-0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   294
  \draw[very thick] ( 0.25,0)   -- ( 0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   295
  \draw[very thick] ( 0.75,0)   -- ( 0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   296
  \draw[very thick] ( 1.25,0)   -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   297
  \draw[very thick] ( 1.75,0)   -- ( 1.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   298
  \draw[very thick] ( 2.25,0)   -- ( 2.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   299
  \draw[very thick] ( 2.75,0)   -- ( 2.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   300
  \draw[very thick] ( 3.25,0)   -- ( 3.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   301
  \draw[rounded corners=1mm] (-0.35,-0.1) rectangle (0.35,0.6);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   302
  \draw[fill]     (-0.15,0.1) rectangle (0.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   303
  \draw[fill]     ( 2.35,0.1) rectangle (2.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   304
  \draw[fill]     ( 2.85,0.1) rectangle (3.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   305
  \draw[fill]     ( 1.85,0.1) rectangle (2.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   306
  \end{scope}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   307
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   308
  \begin{scope}[shift={(11.7,0)}]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   309
  \draw[very thick] (-0.75,0)   -- ( 3.25,0);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   310
  \draw[very thick] (-0.75,0.5) -- ( 3.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   311
  \draw[very thick] (-0.75,0)   -- (-0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   312
  \draw[very thick] (-0.25,0)   -- (-0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   313
  \draw[very thick] ( 0.25,0)   -- ( 0.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   314
  \draw[very thick] ( 0.75,0)   -- ( 0.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   315
  \draw[very thick] ( 1.25,0)   -- ( 1.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   316
  \draw[very thick] ( 1.75,0)   -- ( 1.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   317
  \draw[very thick] ( 2.25,0)   -- ( 2.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   318
  \draw[very thick] ( 2.75,0)   -- ( 2.75,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   319
  \draw[very thick] ( 3.25,0)   -- ( 3.25,0.5);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   320
  \draw[rounded corners=1mm] (-0.35,-0.1) rectangle (0.35,0.6);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   321
  \draw[fill]     (-0.15,0.1) rectangle (0.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   322
  \draw[fill]     ( 2.35,0.1) rectangle (2.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   323
  \draw[fill]     ( 2.85,0.1) rectangle (3.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   324
  \draw[fill]     ( 1.85,0.1) rectangle (2.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   325
  \draw[fill]     ( 0.35,0.1) rectangle (0.65,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   326
  \draw[fill]     ( 0.85,0.1) rectangle (1.15,0.4);
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   327
  \end{scope}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   328
  \end{tikzpicture}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   329
  \end{center}\bigskip
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   330
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   331
  \footnotesize
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   332
  \begin{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   333
  \begin{tabular}{@ {\hspace{-8mm}}c@ {\hspace{2mm}}c@ {\hspace{2mm}}c}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   334
  \begin{tabular}[t]{@ {}l@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   335
  @{text cbegin} @{text "\<equiv>"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   336
  \hspace{2mm}@{text "["}@{text "(W\<^bsub>0\<^esub>, 0), (R, 2), (R, 3),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   337
  \hspace{2mm}\phantom{@{text "["}}@{text "(R, 2), (W\<^bsub>1\<^esub>, 3), (L, 4),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   338
  \hspace{2mm}\phantom{@{text "["}}@{text "(L, 4), (L, 0)"}@{text "]"} 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   339
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   340
  &
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   341
  \begin{tabular}[t]{@ {}l@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   342
  @{text cloop} @{text "\<equiv>"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   343
  \hspace{2mm}@{text "["}@{text "(R, 0), (R, 2), (R, 3),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   344
  \hspace{2mm}\phantom{@{text "["}}@{text "(W\<^bsub>0\<^esub>, 2), (R, 3), (R, 4),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   345
  \hspace{2mm}\phantom{@{text "["}}@{text "(W\<^bsub>1\<^esub>, 5), (R, 4), (L, 6),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   346
  \hspace{2mm}\phantom{@{text "["}}@{text "(L, 5), (L, 6), (L, 1)"}@{text "]"} 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   347
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   348
  &
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   349
  \begin{tabular}[t]{@ {}l@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   350
  @{text cend} @{text "\<equiv>"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   351
  \hspace{2mm}@{text "["}@{text "(L, 0), (R, 2), (W\<^bsub>1\<^esub>, 3),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   352
  \hspace{2mm}\phantom{@{text "["}}@{text "(L, 4), (R, 2), (R, 2),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   353
  \hspace{2mm}\phantom{@{text "["}}@{text "(L, 5), (W\<^bsub>0\<^esub>, 4), (R, 0),"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   354
  \hspace{2mm}\phantom{@{text "["}}@{text "(L, 5)"}@{text "]"} 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   355
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   356
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   357
  \end{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   358
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   359
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   360
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   361
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   362
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   363
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   364
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   365
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   366
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   367
  \definecolor{mygrey}{rgb}{.80,.80,.80}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   368
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   369
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   370
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   371
  \frametitle{Hoare Logic for TMs}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   372
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   373
  \begin{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   374
  \item Hoare-triples and Hoare-pairs:
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   375
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   376
  \small
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   377
  \begin{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   378
  \begin{tabular}{@ {\hspace{-6mm}}c@ {\hspace{-3mm}}c@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   379
  \begin{tabular}[t]{@ {}l@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   380
  \colorbox{mygrey}{@{thm (lhs) Hoare_halt_def}} @{text "\<equiv>"}\\[1mm]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   381
  \hspace{5mm}@{text "\<forall>"}@{term "tp"}.\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   382
  \hspace{7mm}if @{term "P tp"} holds then\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   383
  \hspace{7mm}@{text "\<exists>"}@{term n}. such that\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   384
  \hspace{7mm}@{text "is_final (steps (1, tp) p n)"} \hspace{1mm}@{text "\<and>"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   385
  \hspace{7mm}@{text "Q holds_for (steps (1, tp) p n)"}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   386
  \end{tabular} &
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   387
  \begin{tabular}[t]{@ {}l@ {}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   388
  \colorbox{mygrey}{@{thm (lhs) Hoare_unhalt_def}} @{text "\<equiv>"}\\[1mm]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   389
  \hspace{5mm}@{text "\<forall>"}@{term "tp"}.\\ 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   390
  \hspace{7mm}if @{term "P tp"} holds then\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   391
  \hspace{7mm}@{text "\<forall>"}@{term n}. @{text "\<not> is_final (steps (1, tp) p n)"}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   392
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   393
  \end{tabular}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   394
  \end{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   395
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   396
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   397
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   398
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   399
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   400
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   401
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   402
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   403
  \definecolor{mygrey}{rgb}{.80,.80,.80}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   404
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   405
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   406
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   407
  \frametitle{Hoare Reasoning}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   408
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   409
  \begin{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   410
  \item reasoning is still quite demanding;\\
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   411
  the invariants of the copy-machine:\\[-5mm]\mbox{}
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   412
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   413
  \footnotesize
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   414
  \begin{center}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   415
  \begin{tabular}{@ {\hspace{-5mm}}c@ {}}
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   416
  \begin{tabular}{@ {}l@ {\hspace{1mm}}c@ {\hspace{1mm}}l@ {\hspace{-0.9cm}}l@ {}}
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   417
  \hline
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   418
  @{thm (lhs) inv_begin1.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_begin1.simps} & (starting state)\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   419
  @{thm (lhs) inv_begin2.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_begin2.simps}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   420
  @{thm (lhs) inv_begin3.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_begin3.simps}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   421
  @{thm (lhs) inv_begin4.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_begin4.simps}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   422
  @{thm (lhs) inv_begin0.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_begin01} @{text "\<or>"}& (halting state)\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   423
                                &             & @{thm (rhs) inv_begin02}\smallskip \\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   424
   \hline
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   425
  @{thm (lhs) inv_loop1.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_loop1_loop.simps} @{text "\<or>"}\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   426
                               &             & @{thm (rhs) inv_loop1_exit.simps} & (starting state)\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   427
  @{thm (lhs) inv_loop0.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_loop0.simps}& (halting state)\smallskip\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   428
   \hline
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   429
  @{thm (lhs) inv_end1.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_end1.simps} & (starting state)\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   430
  @{thm (lhs) inv_end0.simps} & @{text "\<equiv>"} & @{thm (rhs) inv_end0.simps} & (halting state)\smallskip\\
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   431
  \hline
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   432
  \end{tabular}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   433
  \end{tabular}
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   434
  \end{center}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   435
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   436
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   437
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   438
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   439
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   440
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   441
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   442
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   443
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   444
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   445
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   446
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   447
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   448
  \frametitle{Recursive Functions}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   449
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   450
  \begin{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   451
  \item addition, multiplication, \ldots
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   452
  \item logical operations, quantifiers\ldots
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   453
  \item coding of numbers (Cantor encoding)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   454
  \item UF\pause\bigskip
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   455
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   456
  \item Recursive Functions $\Rightarrow$ Register Machines
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   457
  \item Register Machines $\Rightarrow$ Turing Machines
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   458
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   459
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   460
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   461
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   462
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   463
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   464
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   465
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   466
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   467
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   468
  \frametitle{Sizes}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   469
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   470
  \begin{itemize}
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   471
  \item UF (size: @{text 140843})
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   472
  \item Register Machine (size: @{text 2} Mio instructions)
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   473
  \item UTM (size: @{text 38} Mio states)
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   474
  \end{itemize}\bigskip\bigskip
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   475
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   476
  \small
272
42f2c28d1ce6 new verison of the slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 271
diff changeset
   477
  old version: RM (@{text 12} Mio) UTM (@{text 112} Mio)
271
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   478
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   479
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   480
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   481
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   482
text_raw {*
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   483
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   484
  \mode<presentation>{
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   485
  \begin{frame}[c]
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   486
  \frametitle{Separation Algebra}%
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   487
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   488
  \begin{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   489
  \item introduced a separation algebra framework for register machines and TMs 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   490
  \item we can semi-automate the reasoning for our small TMs
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   491
  \item we can assemble bigger programs out of smaller components\bigskip
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   492
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   493
  \item looks awfully like ``real'' assembly code\pause
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   494
  \item Conclusion: we have a playing ground for reasoning about low-level 
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   495
  code; we work on automation
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   496
  \end{itemize}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   497
  \end{frame}}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   498
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   499
*}
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   500
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   501
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   502
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   503
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   504
(*<*)
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   505
end
4457185b22ef added slides
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
   506
(*>*)