1050
|
1 |
(* Title: HOL/IOA/ABP/Spec.thy
|
|
2 |
ID: $Id$
|
|
3 |
Author: Tobias Nipkow & Olaf Mueller
|
|
4 |
Copyright 1995 TU Muenchen
|
|
5 |
|
|
6 |
The specification of reliable transmission
|
|
7 |
*)
|
|
8 |
|
|
9 |
Spec = List + IOA + Action +
|
|
10 |
|
|
11 |
consts
|
|
12 |
|
|
13 |
spec_sig :: "'m action signature"
|
|
14 |
spec_trans :: "('m action, 'm list)transition set"
|
|
15 |
spec_ioa :: "('m action, 'm list)ioa"
|
|
16 |
|
|
17 |
defs
|
|
18 |
|
|
19 |
sig_def "spec_sig == (UN m.{S_msg(m)}, \
|
|
20 |
\ UN m.{R_msg(m)} Un {Next}, \
|
|
21 |
\ {})"
|
|
22 |
|
|
23 |
trans_def "spec_trans == \
|
|
24 |
\ {tr. let s = fst(tr); \
|
|
25 |
\ t = snd(snd(tr)) \
|
|
26 |
\ in \
|
|
27 |
\ case fst(snd(tr)) \
|
|
28 |
\ of \
|
|
29 |
\ Next => t=s |\ (* Note that there is condition as in Sender *)
|
|
30 |
\ S_msg(m) => t = s@[m] | \
|
|
31 |
\ R_msg(m) => s = (m#t) | \
|
|
32 |
\ S_pkt(pkt) => False | \
|
|
33 |
\ R_pkt(pkt) => False | \
|
|
34 |
\ S_ack(b) => False | \
|
|
35 |
\ R_ack(b) => False}"
|
|
36 |
|
|
37 |
ioa_def "spec_ioa == (spec_sig, {[]}, spec_trans)"
|
|
38 |
|
|
39 |
end
|