src/HOL/UNITY/Channel.thy
author nipkow
Fri, 02 Oct 1998 14:28:39 +0200
changeset 5608 a82a038a3e7a
parent 5253 82a5ca6290aa
child 5648 fe887910e32e
permissions -rw-r--r--
id <-> Id
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/Channel
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   1998  University of Cambridge
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     5
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     6
Unordered Channel
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     7
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     8
From Misra, "A Logic for Concurrent Programming" (1994), section 13.3
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     9
*)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    10
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    11
Channel = WFair + Option + 
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    12
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    13
types state = nat set
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    14
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    15
constdefs
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    16
  minSet :: nat set => nat option
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    17
    "minSet A == if A={} then None else Some (LEAST x. x:A)"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    18
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    19
rules
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    20
5608
a82a038a3e7a id <-> Id
nipkow
parents: 5253
diff changeset
    21
  skip "Id: acts"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    22
5253
82a5ca6290aa New record type of programs
paulson
parents: 4776
diff changeset
    23
  UC1  "constrains acts (minSet -`` {Some x}) (minSet -`` (Some``atLeast x))"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    24
5253
82a5ca6290aa New record type of programs
paulson
parents: 4776
diff changeset
    25
  (*  UC1  "constrains acts {s. minSet s = x} {s. x <= minSet s}"  *)
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    26
5253
82a5ca6290aa New record type of programs
paulson
parents: 4776
diff changeset
    27
  UC2  "leadsTo acts (minSet -`` {Some x}) {s. x ~: s}"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    28
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    29
end