# HG changeset patch # User Christian Urban # Date 1395933153 0 # Node ID e6e412406a2dcea41214d83e8c2f4c90747a09fc # Parent 457240e429724fbc82c38f1668a15e7ad6ba3eb1 added some comments diff -r 457240e42972 -r e6e412406a2d thys/Hoare_gen.thy --- a/thys/Hoare_gen.thy Thu Mar 27 13:06:27 2014 +0000 +++ b/thys/Hoare_gen.thy Thu Mar 27 15:12:33 2014 +0000 @@ -203,6 +203,8 @@ shows "((EXS x. P(x)) \* r) s" by (metis assms pred_ex_def sep_globalise) + +(* Interpreted Hoare triples *) definition IHoare :: "('b::sep_algebra \ 'a \ bool) \ ('b \ bool) \ ('a \ bool) \ ('b \ bool) \ bool" ("(1_).(\(1_)\/ (_)/ \(1_)\)" 50) diff -r 457240e42972 -r e6e412406a2d thys/Hoare_tm.thy --- a/thys/Hoare_tm.thy Thu Mar 27 13:06:27 2014 +0000 +++ b/thys/Hoare_tm.thy Thu Mar 27 15:12:33 2014 +0000 @@ -49,10 +49,17 @@ type_synonym tstate = nat +datatype Block = Oc | Bk + +(* the successor state when tape symbol is Bk or Oc, respectively*) type_synonym tm_inst = "(taction \ tstate) \ (taction \ tstate)" -datatype Block = Oc | Bk - +(* - number of faults + - TM program + - current state + - position of head + - tape +*) type_synonym tconf = "nat \ (nat \ tm_inst) \ nat \ int \ (int \ Block)" fun @@ -93,11 +100,11 @@ by (cases s) (auto split: option.splits Block.splits) datatype tresource = - TM int Block - | TC nat tm_inst - | TAt nat - | TPos int - | TFaults nat + TM int Block (* at the position int of the tape is a Bl or Oc *) + | TC nat tm_inst (* at the address nat is a certain instruction *) + | TAt nat (* TM is at state nat*) + | TPos int (* head of TM is at position int *) + | TFaults nat (* there are nat faults *) definition "tprog_set prog = {TC i inst | i inst. prog i = Some inst}" definition "tpc_set pc = {TAt pc}"