src/HOLCF/IOA/meta_theory/TL.thy
author wenzelm
Thu, 15 Nov 2001 23:25:46 +0100
changeset 12218 6597093b77e7
parent 12114 a8e860c86252
child 12338 de0f4a63baa5
permissions -rw-r--r--
GPLed;
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: 12114
diff changeset
     3
    Author:     Olaf Müller
wenzelm
parents: 12114
diff changeset
     4
    License:    GPL (GNU GENERAL PUBLIC LICENSE)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     5
12218
wenzelm
parents: 12114
diff changeset
     6
A General Temporal Logic.
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     7
*)   
12218
wenzelm
parents: 12114
diff changeset
     8
	       
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
     9
TL = Pred + Sequence +  
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    10
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    11
default term
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 temporal      = 'a Seq predicate
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    16
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    17
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    18
consts
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    19
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
suffix     :: "'a Seq => 'a Seq => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    22
tsuffix    :: "'a Seq => 'a Seq => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    23
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    24
validT     :: "'a Seq predicate => bool"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    25
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    26
unlift     ::  "'a lift => 'a"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    27
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    28
Init         ::"'a predicate => 'a temporal"          ("<_>" [0] 1000)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    29
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    30
Box          ::"'a temporal => 'a temporal"   ("[] (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    31
Diamond      ::"'a temporal => 'a temporal"   ("<> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    32
Next         ::"'a temporal => 'a temporal"   
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    33
Leadsto      ::"'a temporal => 'a temporal => 'a temporal"  (infixr "~>" 22)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    34
12114
a8e860c86252 eliminated old "symbols" syntax, use "xsymbols" instead;
wenzelm
parents: 12028
diff changeset
    35
syntax (xsymbols)
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    36
   "Box"        ::"'a temporal => 'a temporal"   ("\\<box> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    37
   "Diamond"    ::"'a temporal => 'a temporal"   ("\\<diamond> (_)" [80] 80)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    38
   "Leadsto"    ::"'a temporal => 'a temporal => 'a temporal"  (infixr "\\<leadsto>" 22)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    39
 
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    40
defs
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    41
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    42
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    43
unlift_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    44
  "unlift x == (case x of 
12028
52aa183c15bb replaced Undef by UU;
wenzelm
parents: 10835
diff changeset
    45
                 UU   => arbitrary
4559
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    46
               | Def y   => y)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    47
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    48
(* this means that for nil and UU the effect is unpredictable *)
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    49
Init_def
10835
nipkow
parents: 5976
diff changeset
    50
  "Init P s ==  (P (unlift (HD$s)))" 
4559
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
suffix_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    53
  "suffix s2 s == ? s1. (Finite s1  & s = s1 @@ s2)" 
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
tsuffix_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    56
  "tsuffix s2 s == s2 ~= nil & s2 ~= UU & suffix s2 s"
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
Box_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    59
  "([] P) s == ! s2. tsuffix s2 s --> P s2"
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
Next_def
10835
nipkow
parents: 5976
diff changeset
    62
  "(Next P) s == if (TL$s=UU | TL$s=nil) then (P s) else P (TL$s)"
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
Diamond_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    65
  "<> P == .~ ([] (.~ P))"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    66
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    67
Leadsto_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    68
   "P ~> Q == ([] (P .--> (<> Q)))"  
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    69
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    70
validT_def
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    71
  "validT P == ! s. s~=UU & s~=nil --> (s |= P)"
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    72
8e604d885b54 added files containing temproal logic and abstraction;
mueller
parents:
diff changeset
    73
end