src/HOL/UNITY/Common.thy
author paulson
Thu, 15 Oct 1998 11:35:07 +0200
changeset 5648 fe887910e32e
parent 5313 1861a564d7e2
child 7537 875754b599df
permissions -rw-r--r--
specifications as sets of programs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      HOL/UNITY/Common
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
Common Meeting Time example from Misra (1994)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     7
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     8
The state is identified with the one variable in existence.
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
     9
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    10
From Misra, "A Logic for Concurrent Programming" (1994), sections 5.1 and 13.1.
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    11
*)
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    12
5648
fe887910e32e specifications as sets of programs
paulson
parents: 5313
diff changeset
    13
Common = SubstAx + Union + 
4776
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    14
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    15
consts
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    16
  ftime,gtime :: nat=>nat
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    17
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    18
rules
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    19
  fmono "m <= n ==> ftime m <= ftime n"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    20
  gmono "m <= n ==> gtime m <= gtime n"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    21
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    22
  fasc  "m <= ftime n"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    23
  gasc  "m <= gtime n"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    24
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    25
constdefs
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    26
  common :: nat set
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    27
    "common == {n. ftime n = n & gtime n = n}"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    28
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    29
  maxfg :: nat => nat set
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    30
    "maxfg m == {t. t <= max (ftime m) (gtime m)}"
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    31
1f9362e769c1 New UNITY theory
paulson
parents:
diff changeset
    32
end