4776
|
1 |
(* Title: HOL/UNITY/UNITY
|
|
2 |
ID: $Id$
|
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory
|
|
4 |
Copyright 1998 University of Cambridge
|
|
5 |
|
|
6 |
The basic UNITY theory (revised version, based upon the "co" operator)
|
|
7 |
|
|
8 |
From Misra, "A Logic for Concurrent Programming", 1994
|
|
9 |
*)
|
|
10 |
|
5648
|
11 |
UNITY = Traces + Prefix +
|
4776
|
12 |
|
|
13 |
constdefs
|
|
14 |
|
5648
|
15 |
constrains :: "['a set, 'a set] => 'a program set"
|
|
16 |
"constrains A B == {F. ALL act: Acts F. act^^A <= B}"
|
|
17 |
|
|
18 |
stable :: "'a set => 'a program set"
|
|
19 |
"stable A == constrains A A"
|
4776
|
20 |
|
5648
|
21 |
strongest_rhs :: "['a program, 'a set] => 'a set"
|
|
22 |
"strongest_rhs F A == Inter {B. F : constrains A B}"
|
|
23 |
|
|
24 |
unless :: "['a set, 'a set] => 'a program set"
|
|
25 |
"unless A B == constrains (A-B) (A Un B)"
|
4776
|
26 |
|
5648
|
27 |
invariant :: "'a set => 'a program set"
|
|
28 |
"invariant A == {F. Init F <= A} Int stable A"
|
4776
|
29 |
|
5648
|
30 |
(*Polymorphic in both states and the meaning of <= *)
|
|
31 |
increasing :: "['a => 'b::{ord}] => 'a program set"
|
|
32 |
"increasing f == INT z. stable {s. z <= f s}"
|
4776
|
33 |
|
|
34 |
end
|