src/ZF/UNITY/Union.thy
author paulson
Tue, 21 May 2002 13:06:36 +0200
changeset 13168 afcbca3498b0
parent 12195 ed2893765a08
child 14092 68da54626309
permissions -rw-r--r--
converted domrange to Isar and merged with equalities
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     1
(*  Title:      ZF/UNITY/Union.thy
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     2
    ID:         $Id$
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     3
    Author:     Sidi O Ehmety, Computer Laboratory
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     4
    Copyright   2001  University of Cambridge
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     5
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     6
Unions of programs
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     7
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     8
Partly from Misra's Chapter 5: Asynchronous Compositions of Programs
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
     9
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    10
Theory ported form HOL..
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    11
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    12
*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    13
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    14
Union = SubstAx + FP +
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    15
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    16
constdefs
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    17
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    18
  (*FIXME: conjoin Init(F) Int Init(G) ~= 0 *) 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    19
  ok :: [i, i] => o     (infixl 65)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    20
    "F ok G == Acts(F) <= AllowedActs(G) &
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    21
               Acts(G) <= AllowedActs(F)"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    22
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    23
  (*FIXME: conjoin (INT i:I. Init(F(i))) ~= 0 *) 
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    24
  OK  :: [i, i=>i] => o
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    25
    "OK(I,F) == (ALL i:I. ALL j: I-{i}. Acts(F(i)) <= AllowedActs(F(j)))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    26
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    27
   JOIN  :: [i, i=>i] => i
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    28
  "JOIN(I,F) == if I = 0 then SKIP else
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    29
                 mk_program(INT i:I. Init(F(i)), UN i:I. Acts(F(i)),
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    30
                 INT i:I. AllowedActs(F(i)))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    31
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    32
  Join :: [i, i] => i    (infixl 65)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    33
  "F Join G == mk_program (Init(F) Int Init(G), Acts(F) Un Acts(G),
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    34
				AllowedActs(F) Int AllowedActs(G))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    35
  (*Characterizes safety properties.  Used with specifying AllowedActs*)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    36
  safety_prop :: "i => o"
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12114
diff changeset
    37
  "safety_prop(X) == X<=program &
ed2893765a08 *** empty log message ***
ehmety
parents: 12114
diff changeset
    38
      SKIP:X & (ALL G:program. Acts(G) <= (UN F:X. Acts(F)) --> G:X)"
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    39
  
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    40
syntax
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    41
  "@JOIN1"     :: [pttrns, i] => i         ("(3JN _./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    42
  "@JOIN"      :: [pttrn, i, i] => i       ("(3JN _:_./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    43
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    44
translations
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    45
  "JN x:A. B"   == "JOIN(A, (%x. B))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    46
  "JN x y. B"   == "JN x. JN y. B"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    47
  "JN x. B"     == "JOIN(state,(%x. B))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    48
12195
ed2893765a08 *** empty log message ***
ehmety
parents: 12114
diff changeset
    49
syntax (symbols)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    50
   SKIP     :: i                    ("\\<bottom>")
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    51
  "op Join" :: [i, i] => i   (infixl "\\<squnion>" 65)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    52
  "@JOIN1"  :: [pttrns, i] => i     ("(3\\<Squnion> _./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    53
  "@JOIN"   :: [pttrn, i, i] => i   ("(3\\<Squnion> _:_./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    54
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    55
end