src/HOLCF/IOA/meta_theory/TLS.thy
author kleing
Mon, 21 Jun 2004 10:25:57 +0200
changeset 14981 e73f8140af78
parent 12338 de0f4a63baa5
child 17233 41eee2e7b465
permissions -rw-r--r--
Merged in license change from Isabelle2004
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     1
(*  Title:      HOLCF/IOA/meta_theory/TLS.thy
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     2
    ID:         $Id$
12218
wenzelm
parents: 10835
diff changeset
     3
    Author:     Olaf Müller
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     4
12218
wenzelm
parents: 10835
diff changeset
     5
Temporal Logic of Steps -- tailored for I/O automata.
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     6
*)   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     7
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     8
		       
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     9
TLS = IOA + TL + 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    10
12338
de0f4a63baa5 renamed class "term" to "type" (actually "HOL.type");
wenzelm
parents: 12218
diff changeset
    11
default type
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    12
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    13
types
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    14
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    15
 ('a,'s)ioa_temp       = "('a option,'s)transition temporal" 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    16
 ('a,'s)step_pred      = "('a option,'s)transition predicate"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    17
  's state_pred        = "'s predicate"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    18
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    19
consts
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    20
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    21
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    22
option_lift :: "('a => 'b) => 'b => ('a option => 'b)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    23
plift       :: "('a => bool) => ('a option => bool)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    24
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    25
temp_sat   :: "('a,'s)execution => ('a,'s)ioa_temp => bool"    (infixr "|==" 22)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    26
xt1        :: "'s predicate => ('a,'s)step_pred"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    27
xt2        :: "'a option predicate => ('a,'s)step_pred"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    28
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    29
validTE    :: "('a,'s)ioa_temp => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    30
validIOA   :: "('a,'s)ioa => ('a,'s)ioa_temp => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    31
5677
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    32
mkfin      :: "'a Seq => 'a Seq"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    33
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    34
ex2seq     :: "('a,'s)execution => ('a option,'s)transition Seq"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    35
ex2seqC    :: "('a,'s)pairs -> ('s => ('a option,'s)transition Seq)" 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    36
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    37
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    38
defs
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    39
5677
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    40
mkfin_def
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    41
  "mkfin s == if Partial s then @t. Finite t & s = t @@ UU
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    42
                           else s"
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    43
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    44
option_lift_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    45
  "option_lift f s y == case y of None => s | Some x => (f x)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    46
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    47
(* plift is used to determine that None action is always false in 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    48
   transition predicates *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    49
plift_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    50
  "plift P == option_lift P False"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    51
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    52
temp_sat_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    53
  "ex |== P == ((ex2seq ex) |= P)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    54
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    55
xt1_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    56
  "xt1 P tr == P (fst tr)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    57
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    58
xt2_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    59
  "xt2 P tr == P (fst (snd tr))"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    60
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    61
ex2seq_def
10835
nipkow
parents: 5976
diff changeset
    62
  "ex2seq ex == ((ex2seqC $(mkfin (snd ex))) (fst ex))"
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    63
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    64
ex2seqC_def
10835
nipkow
parents: 5976
diff changeset
    65
  "ex2seqC == (fix$(LAM h ex. (%s. case ex of 
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    66
      nil =>  (s,None,s)>>nil
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    67
    | x##xs => (flift1 (%pr.
10835
nipkow
parents: 5976
diff changeset
    68
                (s,Some (fst pr), snd pr)>> (h$xs) (snd pr)) 
nipkow
parents: 5976
diff changeset
    69
                $x)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    70
      )))"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    71
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    72
validTE_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    73
  "validTE P == ! ex. (ex |== P)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    74
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    75
validIOA_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    76
  "validIOA A P == ! ex : executions A . (ex |== P)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    77
5976
44290b71a85f tuning to assimiliate it with PhD;
mueller
parents: 5677
diff changeset
    78
44290b71a85f tuning to assimiliate it with PhD;
mueller
parents: 5677
diff changeset
    79
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
    80
rules
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
    81
5677
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    82
mkfin_UU
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    83
  "mkfin UU = nil"
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    84
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    85
mkfin_nil
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    86
  "mkfin nil =nil"
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    87
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    88
mkfin_cons
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    89
  "(mkfin (a>>s)) = (a>>(mkfin s))"
4feffde494cf another little bug ;-) and minor changes in TLS.*;
mueller
parents: 4577
diff changeset
    90
4577
674b0b354feb added thms wrt weakening and strengthening in Abstraction;
mueller
parents: 4559
diff changeset
    91
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    92
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    93
end
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    94