src/HOL/IOA/ABP/Spec.thy
author wenzelm
Mon, 09 Dec 1996 09:03:52 +0100
changeset 2334 00db792beb4e
parent 1376 92f83b9d17e1
permissions -rw-r--r--
added -norc option; error output to stderr;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1139
993e475e70e2 *** empty log message ***
mueller
parents: 1050
diff changeset
     1
(*  Title:      HOL/IOA/example/Spec.thy
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     2
    ID:         $Id$
1139
993e475e70e2 *** empty log message ***
mueller
parents: 1050
diff changeset
     3
    Author:     Tobias Nipkow & Konrad Slind
993e475e70e2 *** empty log message ***
mueller
parents: 1050
diff changeset
     4
    Copyright   1994  TU Muenchen
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     5
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     6
The specification of reliable transmission
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     7
*)
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     8
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
     9
Spec = List + IOA + Action +
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    10
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    11
consts
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    12
1376
92f83b9d17e1 removed quotes from consts and syntax sections
clasohm
parents: 1151
diff changeset
    13
spec_sig   :: 'm action signature
92f83b9d17e1 removed quotes from consts and syntax sections
clasohm
parents: 1151
diff changeset
    14
spec_trans :: ('m action, 'm list)transition set
92f83b9d17e1 removed quotes from consts and syntax sections
clasohm
parents: 1151
diff changeset
    15
spec_ioa   :: ('m action, 'm list)ioa
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    16
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    17
defs
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    18
1151
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    19
sig_def "spec_sig == (UN m.{S_msg(m)}, 
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    20
                     UN m.{R_msg(m)} Un {Next}, 
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    21
                     {})"
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    22
1151
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    23
trans_def "spec_trans ==                           
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    24
 {tr. let s = fst(tr);                            
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    25
          t = snd(snd(tr))                        
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    26
      in                                          
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    27
      case fst(snd(tr))                           
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    28
      of   
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    29
      Next =>  t=s |\ (* Note that there is condition as in Sender *) 
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    30
      S_msg(m) => t = s@[m]  |                    
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    31
      R_msg(m) => s = (m#t)  |                    
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    32
      S_pkt(pkt) => False |                    
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    33
      R_pkt(pkt) => False |                    
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    34
      S_ack(b) => False |                      
c820b3cc3df0 removed \...\ inside strings
clasohm
parents: 1139
diff changeset
    35
      R_ack(b) => False}"
1050
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    36
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    37
ioa_def "spec_ioa == (spec_sig, {[]}, spec_trans)"
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    38
0c36c6a52a1d ABP: Alternating bit protocol example
nipkow
parents:
diff changeset
    39
end