src/HOL/UNITY/Traces.thy
author nipkow
Fri, 03 Jul 1998 10:37:04 +0200
changeset 5118 6b995dad8a9d
parent 5111 8f4b72f0c15d
child 5240 bbcd79ef7cf2
permissions -rw-r--r--
Removed leading !! in goals.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     1
(*  Title:      HOL/UNITY/Traces
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     2
    ID:         $Id$
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     4
    Copyright   1998  University of Cambridge
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     5
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     6
Inductive definitions of
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     7
  * traces: the possible execution traces
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     8
  * reachable: the set of reachable states
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
     9
*)
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    10
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    11
Traces = UNITY +
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    12
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    13
consts traces :: "['a set, ('a * 'a)set set] => ('a * 'a list) set"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    14
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    15
  (*Initial states and program => (final state, reversed trace to it)...
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    16
    Arguments MUST be curried in an inductive definition*)
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    17
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    18
inductive "traces Init Acts"  
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    19
  intrs 
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    20
         (*Initial trace is empty*)
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    21
    Init  "s: Init ==> (s,[]) : traces Init Acts"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    22
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    23
    Acts  "[| act: Acts;  (s,evs) : traces Init Acts;  (s,s'): act |]
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    24
	   ==> (s', s#evs) : traces Init Acts"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    25
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    26
5111
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    27
constdefs reachable :: "'a set * ('a * 'a)set set => 'a set"
8f4b72f0c15d Uncurried functions LeadsTo and reach
paulson
parents: 4837
diff changeset
    28
  "reachable == %(Init,Acts). {s. EX evs. (s,evs): traces Init Acts}"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    29
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    30
end