src/HOL/UNITY/Union.thy
author wenzelm
Fri Nov 09 00:09:47 2001 +0100 (2001-11-09)
changeset 12114 a8e860c86252
parent 10064 1a77667b21ef
child 13792 d1811693899c
permissions -rw-r--r--
eliminated old "symbols" syntax, use "xsymbols" instead;
     1 (*  Title:      HOL/UNITY/Union.thy
     2     ID:         $Id$
     3     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     4     Copyright   1998  University of Cambridge
     5 
     6 Unions of programs
     7 
     8 Partly from Misra's Chapter 5: Asynchronous Compositions of Programs
     9 *)
    10 
    11 Union = SubstAx + FP +
    12 
    13 constdefs
    14 
    15   (*FIXME: conjoin Init F Int Init G ~= {} *) 
    16   ok :: ['a program, 'a program] => bool      (infixl 65)
    17     "F ok G == Acts F <= AllowedActs G &
    18                Acts G <= AllowedActs F"
    19 
    20   (*FIXME: conjoin (INT i:I. Init (F i)) ~= {} *) 
    21   OK  :: ['a set, 'a => 'b program] => bool
    22     "OK I F == (ALL i:I. ALL j: I-{i}. Acts (F i) <= AllowedActs (F j))"
    23 
    24   JOIN  :: ['a set, 'a => 'b program] => 'b program
    25     "JOIN I F == mk_program (INT i:I. Init (F i), UN i:I. Acts (F i),
    26 			     INT i:I. AllowedActs (F i))"
    27 
    28   Join :: ['a program, 'a program] => 'a program      (infixl 65)
    29     "F Join G == mk_program (Init F Int Init G, Acts F Un Acts G,
    30 			     AllowedActs F Int AllowedActs G)"
    31 
    32   SKIP :: 'a program
    33     "SKIP == mk_program (UNIV, {}, UNIV)"
    34 
    35   (*Characterizes safety properties.  Used with specifying AllowedActs*)
    36   safety_prop :: "'a program set => bool"
    37     "safety_prop X == SKIP: X & (ALL G. Acts G <= UNION X Acts --> G : X)"
    38 
    39 syntax
    40   "@JOIN1"     :: [pttrns, 'b set] => 'b set         ("(3JN _./ _)" 10)
    41   "@JOIN"      :: [pttrn, 'a set, 'b set] => 'b set  ("(3JN _:_./ _)" 10)
    42 
    43 translations
    44   "JN x:A. B"   == "JOIN A (%x. B)"
    45   "JN x y. B"   == "JN x. JN y. B"
    46   "JN x. B"     == "JOIN UNIV (%x. B)"
    47 
    48 syntax (xsymbols)
    49   SKIP      :: 'a program                              ("\\<bottom>")
    50   "op Join" :: ['a program, 'a program] => 'a program  (infixl "\\<squnion>" 65)
    51   "@JOIN1"  :: [pttrns, 'b set] => 'b set              ("(3\\<Squnion> _./ _)" 10)
    52   "@JOIN"   :: [pttrn, 'a set, 'b set] => 'b set       ("(3\\<Squnion> _:_./ _)" 10)
    53 
    54 end