src/HOL/IMP/Transition.thy
author nipkow
Tue, 05 Jan 1999 17:27:59 +0100
changeset 6059 aa00e235ea27
parent 5855 9be441c17f6d
child 8029 05446a898852
permissions -rw-r--r--
In Main: moved Bin to the left to preserve the solver in its simpset.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     1
(*  Title:      HOL/IMP/Transition.thy
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     2
    ID:         $Id$
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     3
    Author:     Tobias Nipkow & Robert Sandner, TUM
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     4
    Copyright   1996 TUM
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     5
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     6
Transition semantics of commands
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     7
*)
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     8
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
     9
Transition = Natural + RelPow +
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    10
4906
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    11
consts  evalc1    :: "((com*state)*(com*state))set"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    12
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    13
syntax
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    14
        "@evalc1" :: "[(com*state),(com*state)] => bool"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    15
                                ("_ -1-> _" [81,81] 100)
5855
9be441c17f6d the type of @evalcn was wrong
paulson
parents: 4906
diff changeset
    16
        "@evalcn" :: "[(com*state),nat,(com*state)] => bool"
4906
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    17
                                ("_ -_-> _" [81,81] 100)
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    18
        "@evalc*" :: "[(com*state),(com*state)] => bool"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    19
                                ("_ -*-> _" [81,81] 100)
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    20
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    21
translations
4906
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    22
  "cs0 -1-> cs1"	== "(cs0,cs1) : evalc1"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    23
  "cs0 -1-> (c1,s1)"	<= "cs0 -1-> (_args c1 s1)"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    24
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    25
  "cs0 -n-> cs1" 	== "(cs0,cs1) : evalc1^n"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    26
  "cs0 -n-> (c1,s1)" 	<= "cs0 -n-> (_args c1 s1)"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    27
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    28
  "cs0 -*-> cs1" 	== "(cs0,cs1) : evalc1^*"
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    29
  "cs0 -*-> (c1,s1)" 	<= "cs0 -*-> (_args c1 s1)"
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    30
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    31
1789
aade046ec6d5 Quotes now optional around inductive set
paulson
parents: 1701
diff changeset
    32
inductive evalc1
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    33
  intrs
4897
be11be0b6ea1 Changed [/] to [:=] and removed actual definition.
nipkow
parents: 4757
diff changeset
    34
    Assign "(x := a,s) -1-> (SKIP,s[x := a s])"
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    35
4906
0537ee95d004 fixed translations;
wenzelm
parents: 4897
diff changeset
    36
    Semi1   "(SKIP;c,s) -1-> (c,s)"     
1700
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    37
    Semi2   "(c0,s) -1-> (c2,s1) ==> (c0;c1,s) -1-> (c2;c1,s1)"
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    38
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    39
    IfTrue "b s ==> (IF b THEN c1 ELSE c2,s) -1-> (c1,s)"
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    40
    IfFalse "~b s ==> (IF b THEN c1 ELSE c2,s) -1-> (c2,s)"
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    41
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    42
    WhileFalse "~b s ==> (WHILE b DO c,s) -1-> (SKIP,s)"
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    43
    WhileTrue "b s ==> (WHILE b DO c,s) -1-> (c;WHILE b DO c,s)"
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    44
afd3b60660db Natural and Transition semantics.
nipkow
parents:
diff changeset
    45
end