src/ZF/UNITY/Union.thy
author wenzelm
Fri, 09 Nov 2001 00:09:47 +0100
changeset 12114 a8e860c86252
parent 11479 697dcaaf478f
child 12195 ed2893765a08
permissions -rw-r--r--
eliminated old "symbols" syntax, use "xsymbols" instead;
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"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    37
  "safety_prop(X) == SKIP:X &
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    38
                      (ALL G:program. Acts(G) <= (UN F:X. Acts(F)) --> G:X)"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    39
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    40
  property :: i
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    41
 "property == Pow(program)"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    42
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    43
  
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    44
syntax
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    45
  "@JOIN1"     :: [pttrns, i] => i         ("(3JN _./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    46
  "@JOIN"      :: [pttrn, i, i] => i       ("(3JN _:_./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    47
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    48
translations
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    49
  "JN x:A. B"   == "JOIN(A, (%x. B))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    50
  "JN x y. B"   == "JN x. JN y. B"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    51
  "JN x. B"     == "JOIN(state,(%x. B))"
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    52
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 11479
diff changeset
    53
syntax (xsymbols)
11479
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    54
   SKIP     :: i                    ("\\<bottom>")
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    55
  "op Join" :: [i, i] => i   (infixl "\\<squnion>" 65)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    56
  "@JOIN1"  :: [pttrns, i] => i     ("(3\\<Squnion> _./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    57
  "@JOIN"   :: [pttrn, i, i] => i   ("(3\\<Squnion> _:_./ _)" 10)
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    58
697dcaaf478f new ZF/UNITY theory
paulson
parents:
diff changeset
    59
end