src/HOLCF/IOA/meta_theory/RefMappings.thy
author mueller
Wed Apr 30 11:20:15 1997 +0200 (1997-04-30)
changeset 3071 981258186b71
child 3275 3f53f2c876f4
permissions -rw-r--r--
New meta theory for IOA based on HOLCF.
mueller@3071
     1
(*  Title:      HOLCF/IOA/meta_theory/RefMappings.thy
mueller@3071
     2
    ID:         $$
mueller@3071
     3
    Author:     Olaf Mueller
mueller@3071
     4
    Copyright   1996  TU Muenchen
mueller@3071
     5
mueller@3071
     6
Refinement Mappings in HOLCF/IOA
mueller@3071
     7
*)
mueller@3071
     8
mueller@3071
     9
RefMappings = Traces  +
mueller@3071
    10
mueller@3071
    11
default term
mueller@3071
    12
mueller@3071
    13
consts
mueller@3071
    14
  laststate    ::"('a,'s)execution => 's"
mueller@3071
    15
  move         ::"[('a,'s)ioa,('a,'s)execution,'s,'a,'s] => bool"
mueller@3071
    16
  is_ref_map   ::"[('s1=>'s2),('a,'s1)ioa,('a,'s2)ioa] => bool"
mueller@3071
    17
  is_weak_ref_map ::"[('s1=>'s2),('a,'s1)ioa,('a,'s2)ioa] => bool"
mueller@3071
    18
 
mueller@3071
    19
defs
mueller@3071
    20
mueller@3071
    21
laststate_def
mueller@3071
    22
  "laststate ex == case Last`(snd ex) of
mueller@3071
    23
                      Undef  => fst ex
mueller@3071
    24
                    | Def at => snd at"
mueller@3071
    25
mueller@3071
    26
(* FIX: see paper, move should be defined on pairs, not on execs, then fst ex=s can
mueller@3071
    27
   be omitted *)
mueller@3071
    28
move_def
mueller@3071
    29
  "move ioa ex s a t ==    
mueller@3071
    30
    (is_execution_fragment ioa ex &  Finite (snd ex) & 
mueller@3071
    31
     fst ex=s & laststate ex=t  &     
mueller@3071
    32
     mk_trace ioa`(snd ex) = (if a:ext(ioa) then a>>nil else nil))"
mueller@3071
    33
mueller@3071
    34
is_ref_map_def
mueller@3071
    35
  "is_ref_map f C A ==                          
mueller@3071
    36
   (!s:starts_of(C). f(s):starts_of(A)) &        
mueller@3071
    37
   (!s t a. reachable C s &                      
mueller@3071
    38
            s -a--C-> t                 
mueller@3071
    39
            --> (? ex. move A ex (f s) a (f t)))"
mueller@3071
    40
 
mueller@3071
    41
is_weak_ref_map_def
mueller@3071
    42
  "is_weak_ref_map f C A ==                          
mueller@3071
    43
   (!s:starts_of(C). f(s):starts_of(A)) &        
mueller@3071
    44
   (!s t a. reachable C s &                      
mueller@3071
    45
            s -a--C-> t     
mueller@3071
    46
            --> (if a:ext(C) 
mueller@3071
    47
                 then (f s) -a--A-> (f t)
mueller@3071
    48
                 else (f s)=(f t)))" 
mueller@3071
    49
mueller@3071
    50
end