src/HOL/UNITY/UNITY.thy
author paulson
Wed, 18 Nov 1998 15:10:46 +0100
changeset 5931 325300576da7
parent 5804 8e0a4c4fd67b
child 6535 880f31a62784
permissions -rw-r--r--
Finally removing "Compl" from HOL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/UNITY
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
The basic UNITY theory (revised version, based upon the "co" operator)
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
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     9
*)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    10
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    11
UNITY = Traces + Prefix +
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    12
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    13
constdefs
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    14
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    15
  constrains :: "['a set, 'a set] => 'a program set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    16
    "constrains A B == {F. ALL act: Acts F. act^^A <= B}"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    17
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    18
  stable     :: "'a set => 'a program set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    19
    "stable A == constrains A A"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    20
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    21
  strongest_rhs :: "['a program, 'a set] => 'a set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    22
    "strongest_rhs F A == Inter {B. F : constrains A B}"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    23
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    24
  unless :: "['a set, 'a set] => 'a program set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    25
    "unless A B == constrains (A-B) (A Un B)"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    26
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    27
  invariant :: "'a set => 'a program set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    28
    "invariant A == {F. Init F <= A} Int stable A"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    29
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    30
  (*Polymorphic in both states and the meaning of <= *)
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    31
  increasing :: "['a => 'b::{ord}] => 'a program set"
fe887910e32e specifications as sets of programs
paulson
parents: 5253
diff changeset
    32
    "increasing f == INT z. stable {s. z <= f s}"
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    33
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    34
end