diff -r 087d82632852 -r e04123f4bacc thys/Hoare_tm3.thy --- a/thys/Hoare_tm3.thy Tue Apr 29 15:26:48 2014 +0100 +++ b/thys/Hoare_tm3.thy Fri May 30 12:04:49 2014 +0100 @@ -47,26 +47,27 @@ section {* Operational Semantics of TM *} -datatype taction = W0 | W1 | L | R - -type_synonym tstate = nat - +datatype action = W0 | W1 | L | R + +type_synonym state = nat + +(* FIXME: I think Block should be changed to cell *) datatype Block = Oc | Bk (* the successor state when tape symbol is Bk or Oc, respectively *) -type_synonym tm_inst = "(taction \ tstate) \ (taction \ tstate)" +type_synonym tm_inst = "(action \ state) \ (action \ state)" (* - number of faults (nat) - - TM program (nat \ tm_inst) + - TM program (nat f\ tm_inst) - current state (nat) - position of head (int) - - tape (int \ Block) + - tape (int f\ Block) *) type_synonym tconf = "nat \ (nat f\ tm_inst) \ nat \ int \ (int f\ Block)" (* updates the position/tape according to an action *) fun - next_tape :: "taction \ (int \ (int f\ Block)) \ (int \ (int f\ Block))" + next_tape :: "action \ (int \ (int f\ Block)) \ (int \ (int f\ Block))" where "next_tape W0 (pos, m) = (pos, m(pos f\ Bk))" | "next_tape W1 (pos, m) = (pos, m(pos f\ Oc))" |