We now dene internal continuity, which appears in the third hypothesis of our main theorem. But rst, we give an example that indicates why the hypothesis is needed for our completeness theorem.
Let E =
N
, let i be the terminating sequence hh0;
1;:::;i;i;i;:::
ii, and let be the nonterminating sequence hh0;
1;
2;:::
ii. Let hhe
0
;e
1;:::
iix
denote the sequence hh(e
0
;x
);
(e
1;x
);:::
ii. We construct a specication
S
2 that denes the property whose stutter-free sequences consist of all sequences it
together with the sequencef
. Formally,S
2 = (2
;F
2;N
2;L
2), where
2=
N
f
t;f
g. (The internal component is a Boolean.)F
2 =
f(0
;t
);
(0;f
)g. (Behaviors start with their visible components equal to 0.)
N
2 =fh(
i;b
);
(i
+ 1;b
)ig. (The external component is incremented by 1 and the internal component remains constant.)
L
2 consists of all behaviors except ones of the form
f
with terminating, andt
with nonterminating.The externally visible property
O
2 dened byS
2 consists of the behaviors
i, the behavior , and all behaviors obtained from them by stuttering.Specication
S
2 is n and machine closed.The externally visible property
O
2 is also dened by the simpler speci- cationS
1= (1
;F
1;N
1;L
1), where
1= E =
N
. (There is no internal component.)F
1 =
f0g. (All behaviors start at 0.)
N
1 =
fh
i;i
+ 1ig. (The state is incremented by 1.)L
1=
!
Obviously,
S
1 implementsS
2. LetS
p 1 = ( p 1;F
p 1;N
p 1;L
p 1) be any specica- tion obtained fromS
1 by adding a prophecy variable. We now show that there does not exist a renement mapping fromS
p1 to
S
2; in fact there does not exist any mapping from p1 to
2 that proves that
S
p1 implements
S
2. LetP
1p be the property dened byS
p
1. We show by contradiction that there does not exist any mapping
f
: p1!
2 such that (i) E(
f
(i;p
)) =i
and (ii)f
(P
1p)P
2. For each
i
let 0 i 2P
p 1 be a behavior with [P]( 0 i)'i. Moreover, P5 implies that we can choose 0i to have no repeated nonnal
states, meaning that for
j < i
andk >
1, there is no segmenthh(j;p
1)
;
(j;p
2);
:::;
(j;p
k)ii of0
i with
p
1 =p
k. By (i), we then have that for everyi
andm
withi < m
there is anl
such that E(0mjl) '
iji+1. Moreover, P6 and the absence of repeated nonnal states imply that for each
i
there is an integer(i
)> i
such thatl
(i
) for all suchm
. We can choose so that (i
+ 1)(i
) for alli
.For any
n
, the set f 0jj (n)
g is nite (by P6). Therefore, we can induc- tively construct the sequence
n of length (n
) such that n is a prex ofinnitely many of the
0j and is also a prex of
n+1. Let0= lim
n; then
E(
0)'
. Since eachn is a prex of some 0j, clearly
0is in the machine property ofS
p1. Property P5 then implies that
0 2P
p 1. By denition of 0 i,assumption (ii) implies that
f
(0i)'
it
, which implies thatf
( 0) 't
. We then have0 2P
p 1 andf
( 0) 62P
2, which contradicts assumption (ii). This proof can be extended to the case where
S
1 is replaced by any specicationS
h1 obtained from it by adding a history variable. We just replace
with any behavior allowed byS
h1 that simulates it, and replace
i with an initial prex of this new. Thus, rst adding a history variable still does not allow one to construct the renement mapping.The problem with specication
S
2 is thatt
is not inP
2 even though E(
t
) is inO
2 and any nite portion of
t
is the same as the cor- responding portion of some behavior it
inP
2. The sequence
t
is not inP
2 even though we cannot tell that it isn't by looking either at its externally visible component or at any nite part of the complete behavior. To rule out this possibility, we must add to our completeness theorem the hypothesis thatP
2 is internally continuous.Denition 2
A -propertyP
with induced externally visible propertyO
is internally continuous i, for any -behavior
, if E() 2O
and 2P
, then 2P
. A specication is internally continuous i the (complete) property it denes is internally continuous.Suppose
P
=M
\L
andM
=P
. Then limi = for i 2P
i 2M
. It follows from this that, for a machine-closed specication, internal continuity is equivalent to the condition that a complete behavior is allowed i it is generated by the state machine and its externally visible component is allowed. In particular, safety properties are internally continuous.Since the machine property
M
is closed, if limi = for i 2M
\L
, then 2L
i 2M
\L
. This implies that ifL
is internally continuous, thenM
\L
is internally continuous. Hence, for any specication, if the supplementary property is internally continuous, then the specication is internally continuous. The converse is not true, since ifM
is the empty property, thenM
\L
is internally continuous for anyL
.Any specication can be made internally continuous by adding to