added
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Tue, 19 Nov 2013 20:19:19 +0000
changeset 136 058504a45c34
parent 135 e78af5feb655
child 137 6fc7de0f23ba
added
progs/prove.scala
slides/slides07.pdf
slides/slides07.tex
--- a/progs/prove.scala	Tue Nov 19 03:05:48 2013 +0000
+++ b/progs/prove.scala	Tue Nov 19 20:19:19 2013 +0000
@@ -62,6 +62,9 @@
     case True => sc ()
     case False => ()
     case Imp(f1, f2) => prove(j.lhs + f1 |- f2, sc) 
+    case Says(p, Enc(f1, f2)) => 
+      prove(j.lhs |- Says(p, f1), 
+            () => prove(j.lhs |- Says(p, f2), sc))
     case Says(p, f1) => prove(j.lhs |- f1, sc) 
     case Or(f1, f2) => 
       { prove(j.lhs |- f1, sc);
@@ -70,7 +73,6 @@
       prove(j.lhs |- f1, 
             () => prove(j.lhs |- f2, sc))
     case Sends(p, q, f) => prove(j.lhs + (p says f) |- (q says f), sc)
-    case Enc(f1, f2) => prove(j.lhs + f1 |- f2, sc) 
     case _ => ()
   }
 
@@ -92,6 +94,9 @@
     case Or(f1, f2) => 
       prove(lhs_rest + f1 |- rhs, 
             () => prove(lhs_rest + f2 |- rhs, sc))
+    case Says(p, Enc(f1, f2)) => 
+      prove(lhs_rest |- Says(p, f2), 
+            () => prove(lhs_rest + Says(p, f1) |- rhs, sc))
     case Says(p, Imp(f1, f2)) => 
       prove(lhs_rest |- Says(p, f1), 
             () => prove(lhs_rest + Says(p, f2) |- rhs, sc))
@@ -141,10 +146,6 @@
 
 println("Server Example")
 
-val Alice = "Alice"
-//val Bob = "Bob"  -- already defined
-val Server = "Server"
-
 def Connect(p: String, q: String) : Form =
   Pred("Connect", List(Var(p), Var(q)))
 
Binary file slides/slides07.pdf has changed
--- a/slides/slides07.tex	Tue Nov 19 03:05:48 2013 +0000
+++ b/slides/slides07.tex	Tue Nov 19 20:19:19 2013 +0000
@@ -450,8 +450,8 @@
   \frametitle{Sending Rule}
 
   \bl{\begin{center}
-  \mbox{\infer{\Gamma \vdash Q \;\text{says}\; F}
-              {\Gamma \vdash P \;\text{says}\; F & \Gamma \vdash P \;\text{sends}\; Q : F}}
+  \mbox{$\infer{\Gamma \vdash Q \;\text{says}\; F}
+              {\Gamma \vdash P \;\text{says}\; F & \Gamma \vdash P \;\text{sends}\; Q : F}$}
   \end{center}}\bigskip\pause
   
   \bl{$P \,\text{sends}\, Q : F \dn$}\\