src/HOL/UNITY/Union.thy
author paulson
Thu Dec 03 10:45:06 1998 +0100 (1998-12-03)
changeset 6012 1894bfc4aee9
parent 5804 8e0a4c4fd67b
child 6295 351b3c2b0d83
permissions -rw-r--r--
Addition of the States component; parts of Comp not working
paulson@5252
     1
(*  Title:      HOL/UNITY/Union.thy
paulson@5252
     2
    ID:         $Id$
paulson@5252
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
paulson@5252
     4
    Copyright   1998  University of Cambridge
paulson@5252
     5
paulson@5252
     6
Unions of programs
paulson@5252
     7
paulson@5804
     8
Partly from Misra's Chapter 5: Asynchronous Compositions of Programs
paulson@5252
     9
*)
paulson@5252
    10
paulson@5252
    11
Union = SubstAx + FP +
paulson@5252
    12
paulson@5252
    13
constdefs
paulson@6012
    14
  eqStates :: ['a set, 'a => 'b program] => bool
paulson@6012
    15
    "eqStates I F == EX St. ALL i:I. States (F i) = St"
paulson@6012
    16
paulson@5648
    17
  JOIN  :: ['a set, 'a => 'b program] => 'b program
paulson@6012
    18
    "JOIN I F == mk_program (INT i:I. States (F i),
paulson@6012
    19
			     INT i:I. Init (F i),
paulson@6012
    20
			     UN i:I. Acts (F i))"
paulson@5252
    21
paulson@5648
    22
  Join :: ['a program, 'a program] => 'a program      (infixl 65)
paulson@6012
    23
    "F Join G == mk_program (States F Int States G,
paulson@6012
    24
			     Init F Int Init G,
paulson@6012
    25
			     Acts F Un Acts G)"
paulson@5252
    26
paulson@6012
    27
  SKIP :: 'a set => 'a program
paulson@6012
    28
    "SKIP states == mk_program (states, states, {})"
paulson@5259
    29
paulson@5648
    30
  Diff :: "['a program, ('a * 'a)set set] => 'a program"
paulson@6012
    31
    "Diff F acts == mk_program (States F, Init F, Acts F - acts)"
paulson@5648
    32
paulson@5804
    33
  (*The set of systems that regard "v" as local to F*)
paulson@5648
    34
  localTo :: ['a => 'b, 'a program] => 'a program set  (infixl 80)
paulson@5804
    35
    "v localTo F == {G. ALL z. Diff G (Acts F) : stable {s. v s = z}}"
paulson@5804
    36
paulson@6012
    37
  (*Two programs with disjoint actions, except for identity actions *)
paulson@5804
    38
  Disjoint :: ['a program, 'a program] => bool
paulson@6012
    39
    "Disjoint F G == States F = States G &
paulson@6012
    40
                     Acts F Int Acts G <= {diag (States G)}"
paulson@5648
    41
paulson@5313
    42
syntax
paulson@5313
    43
  "@JOIN"      :: [pttrn, 'a set, 'b set] => 'b set  ("(3JN _:_./ _)" 10)
paulson@5313
    44
paulson@5313
    45
translations
paulson@5313
    46
  "JN x:A. B"   == "JOIN A (%x. B)"
paulson@5313
    47
paulson@5252
    48
end