Character Sequence "ZCZC" Can Be in The Following States. Detected
Character Sequence "ZCZC" Can Be in The Following States. Detected
State Graphs
A state is defined as : A combination of
circumstances or attributes belonging for the time
being to a person or thing.
For example, a moving automobile whose engine is
running can have the following states with respect to
its transmission.
UNIT 7
STATES,STATE GRAPHS AND
TRANSITION TESTING
D.ABHISHEKH MS(SE)
Reverse gear
Neutral gear
First gear
Second gear
Third gear
Fourth gear
A
A,C
A,C
Z,C,A
A
None
Z
Z
ZC
ZCZ
Z
ZCZC
C
Z
Z
10/26/2012
ERROR
STATE
OKAY
1/NONE
2/REWRITE
1/NONE
4/REWRITE
1/NONE
2/REWRITE
3/NONE
5/ERASE
1/NONE
6/ERASE
1/NONE
7/OUT
TRANSITION BUGS
10/26/2012
State table from the state graph(refer earlier slide for the
graph)
INPUT
error
error
error
error
STATE
OKAY
ERROR
0/None
1/
...
Okay
ERROR
0/None
1/REWRITE
2/REWRITE
4/REWRITE
5/REWRITE
6/REWRITE
7/REWRITE
8/REWRITE
2/
3/
4/
5/
6/
7/
8/
Rule 3: If there have been 3 successive errors, erase of tape and then rewrite the block
INPUT
STATE
STATE
OKAY
0/None
ERROR
INPUT
1/REWRITE
2/REWRITE
2
3
3/REWRITE,ERASE,REWRITE
4/REWRITE,ERASE,REWRITE
5/REWRITE,ERASE,REWRITE
6/REWRITE,ERASE,REWRITE
7/REWRITE,ERASE,REWRITE
8/REWRITE,ERASE,REWRITE
10/26/2012
OKAY
ERROR
0/None
1/REWRITE
2/REWRITE
3/REWRITE,ERASE,REWRI
TE
4/REWRITE,ERASE,REWRI
TE
We have 3 successive erasures- so
OKAY
ERROR
0/None
1/REWRITE
service
4we now put the unit out of5/REWRITE,ERASE,REWRI
TE
6/OUT
0/None 4/REWRITE,ERASE,REWRI
TE
0/None
5/REWRITE,ERASE,REWRI
TE
0/None
6/OUT
2/REWRITE
3/REWRITE,ERASE,REWRI
TE
Conclusion
INPUT
STATE
OKAY
ERROR
0/None
1/REWRITE
0/None
2/REWRITE
1/None
3/REWRITE,ERASE,REWRI
TE
0/None
2/None
4/REWRITE,ERASE,REWRI
TE
0/None
5/REWRITE,ERASE,REWRI
3/None Example: Say we are
TEat state 1. The error
If we have a
0/None counter here is 2.6/OUT
successful(okay) rewrite, the entry for okay
4/None at state 2 will have error counter
decremented by 1 which is:
(2-1)/None where, None output for
success.
6
7
Observe the previous slideRULE6 states If the rewrite was successful, then
decrement the error counter and return to the
previous state.
The requirement probably was If there have been
no erasures and rewrite was successful, then
This has now resulted in contradictions which is a
concern as it might lead to bugs.
It is always unlikely that a contradictory specification
can result in a satisfactory implementation.