Lecture Notes in Computer Science Edited by G. Goos and J. Hartmanis
190 IIII
M.W. Alford J. R Ansart G. Hommel L. Lam...
39 downloads
1577 Views
29MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Lecture Notes in Computer Science Edited by G. Goos and J. Hartmanis
190 IIII
M.W. Alford J. R Ansart G. Hommel L. Lamport B. Liskov G. R Mullery E B. Schneider
Distributed Systems Methods and Tools for Specification An Advanced Course Edited by M. Paul and H.J. Siegert I
I
Springer-Verlag Berlin Heidelberg New York Tokyo
Editorial Board D. Barstow W. Brauer R Brinch Hansen D. Gries D. Luckham C. Meier A. Pnueli G. SeegmiJller J. Steer N. Wirth Editors
M. Paul H.J. Siegert Institut fiJr Informatik, Technische Universit~t M0nchen Arcisstr. 21, D-8000 MiJnchen 2, FRG
CR Subject Classification (1982): C. 1.2, C. 2, D. 1.3, D. 2, D. 3, D. 4
ISBN 3-540-15216-4 Springer-Verlag Berlin Heidelberg NewYork Tokyo ISBN 0-38'7-15216-4 Springer-Verlag NewYork Heidelberg Berlin Tokyo This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically those of translation, reprinting, re-use of illustrations, broadcasting, reproduction by photocopying machine or similar means, and storage in data banks. Under § 54 of the German Copyright Law where copies are made for other than private use, a fee is payable to "Verwertungsgesetlschaff Wort", Munich. © by Springer-Verlag Berlin Heidelberg 1985 Printed in Germany Printing and binding: Beltz Offsetdruck, Hemsbach/Bergstr. 2145/3140-543210
Preface The papers comprising this volume were p r e p a r e d for and p r e s e n t e d d u r i n g t h e Advanced Course on Distributed Systems - Methods and Tools for Specification. The c o u r s e was held f r o m April 3 to April 12, 1984 at the T e c h n i s c h e Universittit Milnchen. Due to its s u c c e s s it was r e p e a t e d f r o m April 16 to April 25, 1985. The organization lay in the h a n d s of the Institut ftir ]nformatik, and it was jointly f i n a n c e d by the Ministry for R e s e a r c h and T e c h n o l o g y of t h e Federal Republic of Germany, and t h e Commission of the E u r o p e a n Communities. R e s e a r c h on distributed s y s t e m s is in progress within universities as well as in i n d u s t r y and g o v e r n m e n t a l organizations. Networks, p a r t i c u l a r l y high speed local a r e a networks, are often the spur to build distributed systems. In the past a c e r t a i n a g r e e m e n t on some basic models has been achieved, e.g. on the
I S O - O S I - R e f e r e n c e Model, on lower level protocols, and on some
s y n c h r o n i z a t i o n problems. However, c o n c e p t s and p r o g r a m m i n g paradigms p e r t i n e n t to h i g h e r level protocol layers, to overall c o n c e p t s for distributed systems, to design choices, and to h i g h e r level l a n g u a g e support are still i m p o r t a n t r e s e a r c h areas. A discussion and p r e s e n t a t i o n c o n c e r n i n g t h e s e issues c a n be f o u n d in [Lampson Bib]. A n o t h e r i m p o r t a n t r e s e a r c h area aimed at improving software quality and r e d u c i n g software production costs is the support of the specification and design p h a s e s within t h e software life cycle. This problem has r e c e i v e d m o r e and m o r e a t t e n t i o n during t h e last decade. Looking at the relative cost or m a n p o w e r for d i f f e r e n t phases in t h e life cycle of software one could see a definite shift of i m p o r t a n c e from the coding and implementation phase to the specification and design phase. A typical figure is, t h a t about 40Z of the total d e v e l o p m e n t costs are spent for specification and design. Again we have not yet an a g r e e m e n t on the direction or on the methods and tools to be used for specifying even simple systems. For a s u c c e s s f u l specification of distributed s y s t e m s one has to combine
TV
general specification methods and tools as well as architectural knowledge, modularization
concepts
and
programming
paradigms
for distributed
systems. A presentation of these topics was the major aim of the course. As said before, all aspects involved are stillin a research stage to a very high degree. Therefore it is impossible to give a complete picture of all ideas, concepts, methods, and tools. Instead we have tried to show and discuss the range of possible solutions by presenting a specification system used by a commercial company, and in contrast, examples and basic principles for formal specification and verification. It is important of course to have an understanding of programming systems w h e n
concepts and paradigms for distributed
specifying and designing them. Important concepts and
paradigms are presented in chapter 4. As an example for a language for programming distributed systems we have selected the Argus language. Finally we want to express our gratitude and appreciation to the lecturers, w h o have spent considerable time discussing the course contents during the preparation period and preparing the excellent lecture notes, and to all m e m b e r s of our staff, foremost Mrs. U. Weber and Dr. H. Halfar, w h o have helped with organizing this course and editing the lecture notes. The authors and editors are confident, that both the course participants and the readers of these lecture notes will find an in-depth study of the material contained herein rewarding for their own work. M. Paul H.J. Siegert
Contents
I.
Introduction ......................................................I G~n~er HoJuel, TU ~nchen
.
Basic Concepts Mack W. Altord, TRW (2.I) .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
7
Leslie Zampor¢, S ~ n f ord Research Institute (2.2) C,soff P. Mullery, l ~ % c h o i c e L~d. (2.3) 2.1 2.2 2.3
.
Introduction to Models ......................................... 7 Logical Foundation ............................................ 19 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Acquisition
-
Environment
.................................... 45
C~off P. Mullery, Imps~choice L~d. 3. I 3.2 3.3 3.4 3.5 3.6
.
A
Start-Up ...................................................... 46 Information Gathering ......................................... 62 Data Structuring .............................................. 76 Action Structuring (Isolated) ................................. 87 Action Structuring (Combined) ................................ 103 Completion ................................................... 117
Graph Model Based Approach to Specifications .........131
Mack W. Afford, TRW 4.1 4.2 4.3 4.4 4.5 4.5
.
The Graph Model o f I ~ c o s p o s i t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System R e q u i r e m e n t s D e f i n i t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Software Requirements Decomposition and Analysis . . . . . . . . . . . . . Overview o f t h e Problems o f D i s t r i b u t e d D e s i g n . . . . . . . . . . . . . . . T r a n s i t i o n t o Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
152 144 155 169 179 ~i
Formal Foundation for Specification and Verification..2e3 Leslie Iampor~, S~anford Research Institute (5.1, 5.4, 5.5) Fred B. Schneider, Cornell University (5.2, 5.3) 5.1 5.2 5.3 5.4 5.5
An Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Proving Safety Properties .................................... P r o o f R u l e s f o r Message P a s s i n g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Proving Liveness Properties .................................. Specification ................................................
203 P21 234 254 270
VI
.
Language Constructs for Distributed Programs ............287 a~nter Hommel, ~ d ~ n c h e n 6.1 6.2 6.5 6,4 6.5 6.6 6.7
.
.
288 ~5 511 522 527 550 557
The A r g u s Language a n d System ..............................345 Barbar~ Liskov, M~ssachusetts Institute of Technology 7.1 7.2 7.3 7.4 7.5
Concepts and Issues .......................................... Argus Features ............................................... Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subsystems ................................................... Implementation ...............................................
346 557 566 577 590
7.6 7.7
User-Defined Atomic Data Types ............................... Discussion ...................................................
4%8 426
for Distributed ProErams ........................451 Fred B. Schneider, Cornell University (8.1, 8.2, 8.4) Leslie ~ r t , Stanford Research Institute (8.3)
Paradigms
8.1 8.2 8.3 8.4
.
Modularity Concepts .......................................... Concurrency Concepts ......................................... Cowunication Concepts ....................................... Exception Handling ........................................... Real-Time Concepts ........................................... Configuration Description .................................... Case S t u d y f o r a R e a l - T i m e D i s t r i b u t e d S y s t e m . . . . . . . . . . . . . . . .
A, B, C ' s o f A g r e e m e n t a n d Commitment . . . . . . . . . . . . . . . . . . . . . . . . The S t a t e M a c h i n e A p p r o a c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Computing Global States ...................................... Other Paradigms ..............................................
Issues
and Tools f o r P r o t o c o l
Specification
.............
452 444 454 468
4sl
Jean-Pierre Ansart, Agenoe de l'Informatique Projet Rhin 9.1 9.2 9.5 9.4
0.
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Toward a T e l e c o m m u n i c a t i o n S o f t w a r e F a c t o r y . . . . . . . . . . . . . . . . . . E x a m p l e : The O S I T r a n s p o r t P r o t o c o l .......................... l > r o t o c o l Oames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Conclusion
.......................................................
485 495 518 525
5~9
GeoffP. Mullery, Impactchoice L~d. 10.1 1¢.2 10.3 10.4 1¢.5
Introduction ................................................ Distributed Systems ......................................... Methods ..................................................... Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index
Use ...............................................
545 544
......................................................
548
Practical
References
559 540 542
.............................................................
565
Chapter 1
Introduction Production of software for distributed systems, as any other production of industrial goods, requires different activities to be performed. Scanning the literature on software engineering we can find an enormous variety of models for the production of software using different notions for the activities in the production process. In spite of this variety of models and notions we try to filterout the essential activities: •
Acquisition and Analysis Gathering, structuring, and analysing informations on the feasibility of a project.
•
Requirements Specification Specification and analysis what the software system should do.
•
Design of System Architecture Specification and analysis how the logical structure of the system should be and ~#hat each module should do.
•
Design of Components Specification h o w each module should be realized.
•
Implementation Specification of the whole system in an executable programming language.
•
Integration and Installation Make the system run.
An ordering of those activities in time with additional revision cycles is often called a softlvare life-cyclemodel or a phase model.
Rapid prototypi~tg M e a n s
to p r o d u c e a quick i m p l e m e n t a t i o n of e s s e n t i a l
p a r t s of t h e s y s t e m in o r d e r to show i m p o r t a n t p r o p e r t i e s of t h e s y s t e m to the
user
as
e a r l y as possible. It. is e s p e c i a l l y u s e f u l to a g r e e
upon
r e q u i r e m e n t s on t h e m a n - m a c h i n e i n t e r f a c e of a s y s t e m a n d is t h e r e f o r e r e g a r d e d to be a p a r t of r e q u i r e m e n t s e n g i n e e r i n g . During all t h o s e a c t i v i t i e s a lot of s p e c i f i c a t i o n s are p r o d u c e d . Our goal is to p r o d u c e b e t t e r q u a l i t y s o f t w a r e a n d to r a t i o n a l i z e t h e s o f t w a r e p r o d u c t i o n process. This c a n be a c h i e v e d if we t r y to find e r r o r s in t h o s e s p e c i f i c a t i o n s as soon as possible. The cost for c o r r e c t i n g an e r r o r m a d e in some a c t i v i t y grows e x p o n e n t i a l l y in t i m e of e r r o r d e t e c t i o n as c a n be s e e n f r o m F i g u r e 1.1.
Relative c o s t f o r error correction
1000
I00
I0
i
D
I
ecti:n 1
Requirements Specification
Design
F i g u r e 1.1:
Implementation Integration and Installation Cost f o r e r r o r d e t e c t i o n
The e x t e n t of how m a n y e r r o r s c a n be d e t e c t e d by a n a l y t i c a l tools d e p e n d s on t h e d e g r e e of f o r m a l i t y of a s p e c i f i c a t i o n . As F i g u r e 1.2 shows, t h e production
of
software
would
ideally
start
with
a
complete
formal
s p e c i f i c a t i o n of t h e r e q u i r e m e n t s . By f o r m a l s p e c i f i c a t i o n we u n d e r s t a n d a s p e c i f i c a t i o n f o r m a l i z e d in s y n t a x a n d s e m a n t i c s . In t h i s c a s e we c o u l d c o m e
to an i m p l e m e n t a t i o n by using s e m a n t i c s - p r e s e r v i n g t r a n s f o r m a t i o n s .
Requirements Specification
Ideal
Starting Point
Design of System Architecture
Possible Today
Design of Components
Conventional Implementation Goal ii ,ll
Formal
Figure 1.2: Conventionally t h e
Formatted
Informal
Idea
Process of software production
specification
of r e q u i r e m e n t s ,
of t h e
system
a r c h i t e c t u r e , and of c o m p o n e n t s exists only as a vague idea in t h e h e a d of t h e p r o g r a m m e r who is starting with coding immediately. Tools available today allow to go the third realistic way using also informal and f o r m a t t e d specifications. Informal specifications consist of n a t u r a l language and a r b i t r a r y graphs. In f o r m a t t e d specifications t h e r e is a w e l l - d e f i n e d s y n t a c t i c a l f r a m e with some informal s e m a n t i c s in it. Tools can be classified using t h e following criteria:
•
Activities which are supported by a tool. Mostly a tool is applicable only for one or few activities.
•
Underlying
theoretical
models.
Those
are
typical
the
entity-
relationship model, Petri net theory, the finite state machine, etc. •
F o r m of representation, either graphical or in a linear notation.
•
Guidelines for the way to succeed.
S o m e tools even claim not to
restrict the user at all and support any way the user wants to take without giving any recommendation. •
Degree of formalization.
•
Degree
of computer
support. S o m e
tools even
do
without
any
computer support. •
Availability and cost of tools.
•
Scope of intended application.
If we do not have the n e c e s s a r y m e t h o d s and e x p e r i e n c e to design a s y s t e m we c a n n o t blame o u r tools for that. The most i m p o r t a n t m e t h o d s u s e d in s o f t w a r e p r o d u c t i o n are t h e r e d u c t i o n of complexity by decomposition and abstraction. In decomposing s y s t e m s we t r y to identify w e l l - k n o w n patterns, often called paradigms. Such paradigms may be algorithms (as for example sorting and s e a r c h i n g algorithms in s e q u e n t i a l programming) or high level language
constructs.
Successful
application
of m e t h o d s
is a mental,
i n t u i t i o n - g u i d e d activity t h a t can not be automized and n e e d s a lot of e x e r c i s e and experience. After discussing m e t h o d s and tools for specification we will take a look at t h e a s p e c t of distribution. There are d i f f e r e n t r e a s o n s for using d i s t r i b u t e d systems: •
Load s h a r i n g to b e t t e r exploit available processing capacity.
•
Resource sh~ring to use expensive r e s o u r c e s or s c a r c e l y u s e d special
equipment. •
Dater sh~zring to a c c e s s distributed databases.
•
The fleographical s t r u c t u r e
may be i n h e r e n t l y
distributed.
The
bandwidth of t h e c o m m u n i c a t i o n lines or t h e w e a k n e s s of a n a l o g u e signals may f o r c e t h e i r processing in loco.
•
The
logical structure m a y be s i m p l e r e.g. if e a c h p a r a l l e l p r o c e s s is
l o c a t e d in a s e p a r a t e p r o c e s s o r . •
reliability of a s y s t e m c a n be e n h a n c e d by t a i l o r i n g a n
The
appropriate structure. •
The
flezibilit~t of a s y s t e m is i n c r e a s e d h a v i n g t h e possibility to add
a n d d e l e t e single p r o c e s s o r s .
Let us have a closer look at the aspect of reliability.Reliability can be defined as the degree of suitability to perform well under specific operating conditions during a specific time. A probabilistic measure for reliability is the availab~itll of a system. The m e a n value of the availability A of a system is usually defined as A = M T B F / (MTBF + MTTR), with MTBF meaning the meantime between failures and MTTR meaning the meantime to repair.
Reliability
!
I
I
Fault tolerance
Perfection
Redundancy
!
I
I
Static
Dynamic Reconfiguration
I n o u t of m s y s t e m 2<=n<m
! Passive stand- by
[
ii
I Active graceful degradation
Flgure 1.3: Reliabilityof a s y s t e m
perfection, t h a t m e a n s c o n s t r u c t i n g p e r f e c t h a r d w a r e a n d s o f t w a r e , or by fault tolerance. F a u l t t o l e r a n c e c a n be a c h i e v e d by redundancy w h i c h m a y e i t h e r be s t a t i c (n o u t of m s y s t e m ) or d y n a m i c , r e q u i r i n g reconfiguration. R e c o n f i g u r a t i o n c a n be d o n e e i t h e r u s i n g p a s s i v e stand-by p r o c e s s o r s o r F i g u r e 1.3 s h o w s t h a t reliability c a n e i t h e r be a c h i e v e d by
u s i n g a l r e a d y a c t i v e p r o c e s s o r s giving u p s o m e of t h e less i m p o r t a n t f u n c t i o n s of t h e s y s t e m
(graceful degradation).
The c o u r s e m a t e r i a l h a s b e e n s e l e c t e d s u c h t h a t n o t only s o m e m e t h o d s and t o o l s a r e p r e s e n t e d f o r all a c t i v i t i e s of t h e s o f t w a r e p r o d u c t i o n p r o c e s s b u t also f u n d a m e n t a l s to u n d e r s t a n d t h o s e m e t h o d s a n d tools. We also t r i e d to p r e s e n t c u r r e n t l y k n o w n t h i n k i n g p a t t e r n s in t h e field of d i s t r i b u t e d s y s t e m s as to a l l e v i a t e t h e d e c o m p o s i t i o n p r o c e s s . We a r e s h u r e that this course does not provide a closed t h e o r y or fool-proof recipes how to p r o d u c e s o f t w a r e f o r d i s t r i b u t e d s y s t e m s and t h a t a lot of r e s e a r c h a n d d e v e l o p m e n t r e m a i n s to be done.
Chapter 2
Basic Concepts 2. I. Introduction to Models This section presents an overview of the models commonly used as the foundation for specifying properties of a distributed systems. This will of necessity only review a few selected models -- an review of all of the models used by different specification techniques is beyond the time and space limitations for this course. Before examining individual models, i t is useful to consider why one should be interested in the subject of models for specifications. major motivation can be derived from the following observation:
The
a model
is used to precisely define desired characteristics of a system -- what is not specified cannot be verified, error.
and what is not verified may be in
The purpose of a model is to precisely define specific properties
or characteristics of a system under consideration to be b u i l t or analyzed, and provides the foundation for verifying those properties. Different models are used to specify different properties; alternatively, to express a specific property of a system, one must select from a class of models which represent that property. The kinds of properties necessary for the development of distributed systems include the following:
sets, sequences, and structures of data;
transformations of one data set into another, and the implied input/output relationships between the transformations and the data sets; sequences and
concurrency of data sets which arrive or are generated at different points of time; transformations of one time sequence into another; sequences of transformations; data flow between transformations; concurrency of transformations; control of interactions between concurrent transformations; time to perform a transformation; and r e l i a b i l i t y / a v a i l a b i l i t y of performing a transformation in an environment of faults. I f we compare the properties of a flow chart or pseudo-code to this l i s t of desired characteristics, we see that a flow chart or pseudo-code (structured or otherwise) usually expresses sequence, selection, and i t e r ation of processing steps; the characteristics of data flow, concurrency, and performance are not present.
A program structure chart for a serial
program usually identifies all subprograms CALLEDby a subprogram, flow of control,
and flow of data;
but no concurrency would be represented.
Whether one thinks these representations to be sufficient for representing serial programs, clearly they are insufficient for addressing the problems of concurrent distributed software.
To represent these proper-
ties, we will examine the following models: mathematical function; f i n i t e state machine; functional hierarchy; Petri Net; and graph model of computation. 2.1.1
Mathematical Function
To define a mathematical function, one must specify three things:
an
input domain (e.g., a set of input variables); an output domain (e.g., a set of output variables); and a rule for transforming the inputs into the outputs.
For the transformation to be a function, i t must always produce
the same outputs for the same input data set. There are several
relevent
aspects of mathematical function which
affect i t s applicabilty as a model for specifying distributed systems. First,
a mathematical function is not an algorithm -- a function can be
specified by providing an algorithm, but i t is a design issue to construct an algorithm which performs a transformation within a specified accuracy.
For example, one can specify a transformation by y = sin(x) but any one of at least three algorithms can be used to accomplish i t : I) y = x (for small values of x) 2) y = polynomial in x (different polynomials for different desired accuracy); or 3) y = Taylor series (calculated i t e r a t i v e l y ) . A second relevent aspect of a mathematical function is that i t "decomposed", i . e . functions.
can be
specified by a combination of logic and lower level
For example, one can define the absolute value function by
ABS(g(x)) = x
i f g(x)>O
= -x i f
g(x)
This has the effect of specifying a function in terms of a structure of functions,
and thus specifying an algorithm approach.
The structure can
be described in terms decision tables, pre-conditions and post-conditions, or flow-charts. an algorithm
Since one would like to specify a transformation and not
in order to
separate requirements
from design,
use of
a
mathematical function appears to be very desirable. The HOS specification
approach [Hamilton 77] provides techniques for
decomposing any a r b i t r a r y
function
in terms of logical
INCLUDE, and OR together with lower level
functions,
operators JOIN,
and repeating the
decomposition until the lowest level arithmetic operators are encountered. This process decomposes both control
flow and data flow simultaneously,
and provides tools to check that the two are consistent. However, a this
approach is limited because a mathematical
inherently has no memory -- given an input, saves no data.
This means that
cannot be used to computer systems.
specify
the
a collection required
it
function
produces an output but
of mathematical
data contents
Attempts to use recursion ( i . e . ,
of
functions
distributed
a function
invoking
another copy of i t s e l f to process a subsequent input) to overcome the lack of memory results drives the complexity of the function description exponentially. In view of this l i m i t a t i o n ,
i t appears that a mathematical function is
a necessary ingredient but not a s u f f i c i e n t model for specification of a d i s t r i b u t e d system. which require
By i t s e l f ,
i t can only be used to specify functions
no memory; the model must be augmented to
address the
10 problems for which distributed systems are most widely used. 2,1.2
Finite State Machine
The concept of a Finite State Machine (FSM) seems to be t a i l o r made for the specification of processing for a data processor.
Essentially, an
FSM is composed of a set of inputs X, a set of outputs Y, a set of states S, an i n i t i a l state So, and a pair of functions which are used to specify the outputs and state transitions which occur as a result of an input. The transformation
function
specifies
the outputs which result from an
input when the FSM is in any of its possible states; and the state transition function specifies the next state which results from an input for each possible state.
In other words,
X is the set [ X i ] of inputs Y is the set [ Y i ] of outputs S is the set [ S j ] of states So is i n i t i a l
state
F maps Xi and Sj onto Yi G maps Xi and Sj onto Sj+I, the next state. Figure 2.1 provides an i l l u s t r a t i o n of such a model.
Xi
INPUT 3 J
TRANSFORMATION ~OUTPUT Yi STATE TRANSITION
STATE
s(j) I s(j+l
Figure 2.1: Finite State Machine Model
11 This model appears
ideal
for
the specification
of data processing
because one can associate the inputs and outputs of the data processor with those of an FSM, and associate the contents of the data processor memory (including the processing registers) with the state, and the code with
the transformations.
The foundation for completeness analysis is
that the transformations for all inputs should be specified for all output states, all outputs should be produced for some combination of input and state, and that the i n i t i a l The f i n i t e
state should be specified.
state machine model is one of the fundamental models of
computer science.
I t has been used for the specification
of communication protocols. proof techniques.
and validation
It is is at the heart of almost all program
I t has been incorporated into IBM's standard method for
software development, and is Systems Analysis [Wymore 78].
the
foundation
for
some techniques
for
However, there are two fundamental l i m i t a t i o n s for use of this model for
specifying
distributed
processes.
First,
the f i n i t e
state machine
model inherently serializes away all of the underlying concurrency which one would l i k e to exploit with multiple processors.
The model e x p l i c i t l y
assumes that all processing on an input is completed before the next input arrives.
As a r e s u l t , one of the most common errors in using the f i n i t e
state machine model for the specification of concurrent processes is that clash states ( i . e . ,
states in which two arrivals
occur at the same time)
are neglected; t h i s results in proofs of correctness for an inappropriate model.
There have been attempts to extend the FSM model for the descrip-
tion of concurrency by using multiple parallel
FSMs (e.g.,
with Cooper-
ative Sequential Processes); the properties of such models are discussed l a t e r in Section 2.1.6. A second fundamental l i m i t a t i o n
of the f i n i t e
state machine model is
that i t presents has no inherent way of handling complexity: "flat",
i.e.
description
if will
the model is
2000 states are required to describe a process, the FSM not be understandable without
additional
structuring.
The description of the function which maps an input and a state onto the output and the updated state can become extremely complex to specify even for small problems. Some mechanism is needed to decompose the transformation and state t r a n s i t i o n pieces.
functions
into
smaller, more understandable
Note that the FSM extend the concept of the mathematical function
12 with the concept of state in order to describe how sequences of inputs are mapped onto sequences of outputs, and thus the problems of complexity found in the representation of mathematical functions s t i l l remain. The above discussion suggests that the Finite State Machine model is not sufficient for the specification of distributed processing, but the model should be a necessary ingredient in such a descriptive technique. The FSM model provides the foundation for consistency and completeness properties linking inputs, outputs, state, and processing, and provides the link into program proof techniques. However, to provide a practical foundation for such specifications, the problems of complexity must be successfully addressed.
One way to do this is to use the concept of a
heirarchy of functions. 2.1.3
Hierarchy of Functions
The most common approach to specifying data processing requirements is to use the model of a hierarchy of functions.
One starts by identifying a
system function which has input domain consisting of all possible input data set sequences, and has output range of all possible sequences of output data. This system function is then "decomposed" into a collection of interacting functions which may have input/output relationships; these functions can in turn be "decomposed" into a collection of lower level interacting functions.
Figure 2.2 illustrates
such a representation.
Note that both the data and the functions are decomposed: the input X is decomposed into the items (X1,X2,X3), the output Y is decomposed into (YI,Y2), and the function A is decomposed into three interacting functions (A1,A2,A3), with intermediate data (Zl,Z2) not visible from the outside. Variations of this model are the foundation for many specification techniques, e.g., SADT [Ross 77], PSL/PSA [Teichroew 77], and N Squared Charts [Lano 77]. The benefits of this model arise from its a b i l i t y to organize a large mass of data, and check the consistency of inputs and outputs between a top level
function and its decomposition into a number of lower level
interconnected functions (e.g., i f X is input to F, i t f i r s t be input to one of the Fi which decompose i t ) . The process can be repeated as many times as necessary to obtain a hierarchy of functions with many levels, although the maximum number of levels is seldom more than 7 to 10.
This
13 X
INPUTr Ii AFUNCTIONJ °uTPuT--~Y ~
X
INPUT
Xl
X2
DECOMPOSETO S
_1 FUNCTION ! OUTPUT,
-! A1
Vl
~Y 1
......
Zl
INPUT ~ [ ;UNCTION ! OUTPUT
-! X3
Figure 2.2:
,
1 ~1 A3
Y2
i OUTPUT
Hierarchy of Functions Model
deals e x p l i c i t l y with the problems of representing concurrency and complexity, but at the cost of ambiguity -- only data flow is represented, not control flow. The fundamental limitation of this model is that i t does not differentiate between a function F inputting X and Z, X or Z, or X followed by Z. Thus sequencing and condition information are not expressed by the model, and cannot be verified using the model. In a similar fashion, when a function F is decomposed into functions FI, F2, and F3, the model does not specify whether they are concurrent or executed in a specific sequence. This limits the u t i l i t y of this model for specifying conditions and sequences of functions.
14 The above discussion suggests that any model used to describe complex d i s t r i b u t e d systems should have the hierarchy of functions as a necessary ingredient,
but
this
model
is
insufficient
required properties of such systems.
to
represent
all
of
the
In other words, the f l a t model of
the Finite State Machine provides precision for describing processing of time
sequences of
inputs,
but
is d i f f i c u l t
to
use to
describe
large
systems; while the Hierarchy of Functions can describe concurrency and provides
visibility
precision.
into
the contents
of
large
systems,
but lacks
A precise method of describing concurrency is s t i l l
needed,
and this is addressed by the Petri Net. 2.1.4
Petri Net
A Petri senting
Net [Peterson 81] provides
sequencing
potential
and concurrency,
ambiguities.
A Petri
a notation
and for
for
identifying
formally
and resolving
Net consists of a directed graph which
alternates two kinds of nodes called places and t r a n s i t i o n s 2.3).
repre-
(See Figure
The places, represented by c i r c l e s or boxes, define locations on
the graph where tokens can reside.
The are linked by arcs to t r a n s i t i o n s ,
represented as bars, which are locations on the graph which govern the movement of tokens from preceeding places to subsequent places i f the condition of the t r a n s i t i o n are s a t i s f i e d . The preconditions of the t r a n s i t i o n may specify that i t may move tokens i f a specified combination of tokens exist on the immediately preceeding places; the postcondition of the t r a n s i t i o n
may specify to move tokens to some combination of the
subsequent places. to
the
For simple Petri Nets, the preconditions are limited
specification
of
all
or one ( i . e . t h e
places leading to the t r a n s i t i o n token);
the postcondition
is
transition
have a token,
limited
or
if
occurs i f
only one has a
to specifying whether a token is
generated for all places leading from the t r a n s i t i o n or only one. the precondition is met, the t r a n s i t i o n is said to " f i r e " , removed from the places.
preceeding
places
all
and generated
for
When
and tokens are the
subsequent
More complex versions of Petri Nets allow a r b i t r a r y combinations
of input arcs and output arcs to be specified
as the preconditions
and
postconditions. The Petri Net can be used to specify precisely concepts of sequence, selection, concurrency, and synchronization.
Note that Petri Nets can be
15
CONCUR RENCY PLACE ARC TRANSITION
u,
ARC PLACE
AMBIGUITY
SELECTION SYNCHRONIZATION
SEQUENCE
Figure 2.3:
Example Petri Nets
specified which are ambiguous, i . e . ,
when a place has more than one tran-
s i t i o n which follows i t ; in this case, rules must be established for selecting the t r a n s i t i o n which is to take place (e.g., i f random, then the net is nondeterministic).
Simulations can be automatically generated from
the Petri Net by defining a Petri Net Processor.
This device examines the
status of all t r a n s i t i o n s , selects one which has met i t s input conditions, and moves the repeated u n t i l
tokens
according
to
the
postconditions.
no preconditions are s a t i s f i e d .
observe the movement of
tokens
and thus
This
step
is
This allows an analyst to
the behavior of
a specified
process. Many interesting properties of concurrent systems can be defined and validated using the Petri Net.
For example, a Petri Net can be analyzed
to determine whether correct termination single token entering, only one w i l l the graph when i t (e.g.,
exits),
exit,
will
always occur (e.g,
and no tokens w i l l
for
be l e f t
a in
or whether the p o s s i b i l t y of deadlock exists
the net may enter a state where no t r a n s i t i o n s
are possible, or
where the net is cycling through an endless loop). In spite of i t s advantages, there are two fundamental l i m i t a t i o n s for using a Petri Net to describe distributed system. state machine model, i t one level.
is " f l a t " ,
However, several
i.e.,
First,
l i k e the f i n i t e
the Net appears in e s s e n t i a l l y
authors have independently developed the
18 concept of a Petri SubNet, thus using the concept of a hierarchy of Subnets to handle large complex networks. affect
the semantics of the Petri
When done properly, this does not
Net, but does provide the a b i l i t y to
address a problem in pieces. A more s i g n i f i c a n t
limitation
to the Petri
only control flow, not data flow.
Net is that
it
specifies
Even though conditions for the t r a n s i -
tions can be specified in terms of data values, the semantics for changing or saving values of data variables is not an inherent part of the Petri Net, so we must look elsewhere for modeling such concepts. being made to r e c t i f y this problem (e.g., have not yet been f u l l y worked out.
Attempts are
see [Yau 83]), but the d e t a i l s
I t is noted that Petri Nets are one
of the tools used for the specification
and validation
of communication
protocols. 2.1.5
Graph Model of Computation
The Graph Model of Computation [Cerf 71] is a directed graph nodes and arcs which is used to specify both control flow and data flow. is quite similar to a Petri Net in which the t r a n s i t i o n s effectively
combined into
one type of
node.
The graph
and places are
Each node of the graph
represents a processing step, which has one or more input arcs and one or more output arcs.
An input function is defined to specify whether all or
only one input arc must be enabled fn order for the transformation to take place; and an exit function specifies whether all or only one of the output arcs are enabled when the transformation effectively Net.
is completed.
This is
the same as the specification of the t r a n s i t i o n s of a Petri
However, unlike the Petri Net, each node has specified
inputs and
outputs from a defined alphabet of data items; this is used to specify the flow of data between nodes.
This data flow can be represented graphically
using dashed or dotted lines, while using solid lines for the arcs of the graph.
Figure 2.4 provides a sample of such a graph model.
This model provides for the simultaneous specification and c o n t r o l
flow
(including
the
concepts
of
sequence,
of data flow selection,
i t e r a t i o n , concurrency, and synchronization of control flow), and hence provides the foundation for checking the consistency of the two. Because control
flow is represented in a fashion similar to the Petri
Net, the
properties of correct termination and lack of deadlock can be analyzed,
17 STA RT
xl
"ALL EXIT ARCS ENABLED
+ ONLY ONE
+ REJOIN
\ *SYNCHRONIZATION
END
Figure 2.4:
Example Graph Model of Computation
48 and the concept of a sub-net can be used to provide a heirarchy of decomposition.
As with the data flow models, one can determine whether each
data item input by the top level function is used, and each output data item is produced.
However, because both data flow and control flow are
specified, one can also analyze the consistency of the two (e.g., that each input to each node has been given a value before i t is used). The primary limitation of this model is
that
it
can be used to
describe the decomposition of a mathematical function, but does not inherently address transformation
of time sequences of inputs, and does not
incorporate the concept of a "state" which is saved from processing one input data set in order to process subsequent input data.
To address
these issues, the model would have to be extended as in Section 4.1. 2.1.6 Discussion The point of the above discussion is that d i f f e r e n t properties are expressed by d i f f e r e n t
models of requirements.
Section 4 w i l l
show how
these models can be extended to precisely define requirements in terms of time functions and f i n i t e state mechines.
19
2.2. Logical Foundation 2.2.1. Introduction From the point of view of logical formalism, distributed systems are no different from any other kind of concurrent system.
What distinguishes a distributed multi-
computer system from a shared memory multiprocessor is the communication delay and the communication bandwidth. In the distributed system, information may take many milliseconds to go from one process to another, while in a muitiprocessor it takes only microseconds. The bandwidth for message passing in the distributed system may be limited by telephone lines, while in the multiprocessor it is limited only by memory access delays. However, these differences are quantitative and not qualitative. In both cases, information received from another process represents that process's state when the information was sent, which is not necessarily the state when the information is received. The fact that the state of the system is changing while a process is viewing it is the fundamental problem in synchronizing any type of concurrent system. How one goes about dealing with this problem wilt be different for distributed and nondistributed systems, but the logical analysis of the problem is the same in both cases. While there is no logical difference between distributed and nondistributed concurrent programs, there is a fundamental difference between concurrent and sequential programs. In sequential programs, one is concerned only with the relation between the starting and terminating state of program parts--the so-called
input/output behavior)
Thus, the input/output behavior of $1; Sz depends only upon the input/output behavior of S1 and
$2, not upon how this behavior is implemented.
Input/output behavior is not sufficient for talking about concurrent programs. The input/output behavior of
cobegin $t i]S2 coend is not determined by the input/output behavior of $1 and $2, since the two statements can ~interfere" with one another. To handle concurrent programs, we must talk about their complete behavior--what the program does throughout its execution--not just 1 One should really be concerned with the o u t p u t produced by the program, since all t e r m i n a t i n g programs are the same if they never produce any output. Rowever~ one usually considers the state of the o u t p u t m e d i u m - - f o r example, the state of t h e phosphors on a terminal s c r e e n - - t o be part of t h e program state.
20
what is true before and after the execution.
2.2.2. Sequential Programs Since sequential programs are a very simple special case of concurrent ones, let us begin with them. The execution of a sequential program may be represented by a sequence of the form: so - - ~ sl ~
s2 - ' ~ "'"
(2.1)
where si are states and the ai are atomic actions. (The sequence is finite if and only if the execution terminates.) The state contains all information necessary to determine the possible future behavior of the program. (For a deterministic program, the state determines its precise behavior; for a nondeterministic one, it determines the set of all possible behaviors.) The atomic actions are the actions that take the program from one state to the next. For example, an action ai might be a particular instance of the program statement X :ffi X + I
Then the state si would be the same as state si-i except with the value of x increased by one. For sequential programs, it makes no difference how the program is divided into atomic actions, but for concurrent programs, this is crucial. The actions and states are, in some sense, dual to one another. Different formalisms usually concentrate on just one of them, representing the above execution either as the sequence 80,81,82,... of states or as the sequence ~1,~2,~$,... of actions.
2.2.3. The Space-Time
View
How do we generalize the above description of a sequential program's execution to the execution of a concurrent program, in which actions in the different processes are not naturally viewed as sequentially ordered? Perhaps the most natural approach is the space-time one, discussed at length in [Lamport 78a]. The execution is viewed as a partially ordered set of events, where the partial ordering is determined by the following constraints: 1. The events at a single physical location are totally ordered in time.
21 2. An event a that makes some physical change to the system must precede an event fl which senses that change. For distributed message-passing systems, these two types of orderings are interpreted as follows: 1. All the actions performed by a single process are totally ordered. 2. The sending of a message must precede its receipt. This set of temporal orderings must be acyclic, so its transitive closure forms an irreflexire partial ordering.
2.2.4. The Interleaving View The space-time view is very useful for understanding distributed systems. It represents the philosophy underlying most work on net theory. However, while our underlying view of the execution of a concurrent program may be a set of actions, experience has shown that we want to reason about programs--both sequential and concurrent programs--in terms of states.
The space-time view is very strongly biased towards
actions. To talk about states, we need the interleaving view. In the interleaving view, we assume that, as in the case of a sequential program, the execution of a concurrent program consists of the sequence (2.1) of states sl and atomic actions c~i. The justification for this view is that we could, in principle, .determine the real order in which the actions took place. If two actions which don't influence one another are truly concurrent, then we may pretend that they occurred in either order. If two concurrent actions actions do influence one another, then they are not truly atomic, and must be subdivided into smaller actions. By assuming that the actions are totally ordered, we are losing the ability to distingulsh whether one action "really" preceded another, according to the precedence relations described above, or if the two actions were concurrent and were ordered just for convenience. This loss of information limits the type of question we can ask about the system. However, for those questions we can ask, the interleaving view provides a very convenient formalism for answering them.
22
2.2.5. Temporal Logic In the interleaving view, an execution is a sequence of states and actions as in (2.1). How do we talk about such a sequence? We could use ordinary logic. For example, we can formally state that a property P holds of every state in the execution by writing
¥i > 0 : P(si) However, it turns out that one does not need the ability to write the kind of arbitrary assertions about execution sequences that can be expressed in this way. Instead, a special formalism called temporal logic has been developed for expressing properties of execution sequences. Temporal logic is a well-established branch of classical logic [Reseher 71]. Burstall [Burstall 74] was the first to suggest using it for reasoning about programs, but the application of temporal logic to concurrent programs is due to Pnueli [Pnueli 77]. M o d e l s and S e m a n t i c s We begin with the ordinary linear time temporal logic described in [Lamport 80a]. In this version of temporal logic, actions are ignored and only the states are used. Later, I will describe an extension the takes the actions into consideration. The well-formed formulas of temporal logic are called assertions. Formally, temporal logic assertions are constructed from a set of atomic symbols, called atomic predicates, the usual logical operators A, V, -, and D, and certain temporal operators described below. To define a semantics for temporal logic, we need to define a semantic model and what it means for an assertion to be valid for a model. We define a state to be a truth-valued function on the set of atomic predicates. We write s ~ P to denote the value of the state s on the atomic predicate P. To see why such a function represents what we ordinarily think of as a state, recall that an atomic predicate is an uninterpreted symbol--for example, the string of characters a > O. For a program having a variable a, a state s can be interpreted as one in which a has the valuelifs~a
> O=true, s~a
> 1-false, s~a
> 2-~false, etc. Thus, the state
of the program is defined by the truth or falseness of each atomic predicate.
A predicate is a logical combination of atomic predicates. There is a natural way to define a state s to be a truth-valued function on predicates. For example, for any
23
atomic predicates P and Q, we define
sI==(-~PA Q) ~ -~(s[=P) A (sl=Q) The generalization to arbitrary to~cal combinations should be obvious. A model M is a pair (S, E), where S is a set of states and E is a set of sequences
of states satisfying property E below. The set of states can be thought of as the set of all conceivable states of a program--for example, all possible combinations of values of variables and "program counter" values. A sequence so, s l , s 2 , . . , in ~ represents an execution that starts in state so, performs the first program step to reach state sl, performs the next program step to reach state s2, etc. The execution terminates if and only if the sequence is finite. The set ~ represents all possible executions of the program, starting in any possible state. The one assumption we make about a model, expressed formally by property E below, is that the future behavior depends only upon the current state, and not upon how that state was reached. Before formally stating this property, we introduce some notation. For any element s of E, we write 8
~
80,81,82,...
where the s¢ are elements of S. If s is a finite sequence, so 8
~
80,...,8
n
for some n, then we define sm to equal s,, for all m > n. Intuitively, si represents the state of the program at "time" i. The finite sequence so,. •., s,~ represents an execution in which the program halted at time n in state s,. At all later times, it is still in state 8n,
If s is a sequence of length greater than one, then we define 8"+ =
81,82,...
which is the sequence obtained by deleting the first element of s. If s is of length one, then s + is defined to equal s. The equality (8+)i ~
8i`+1
24 holds for all sequences s and nonnegative integers i. We also define 8+n
=
8n~Sn+l,...
More precisely, for any sequence s in ~, we define s +n inductively by: 8 ÷ 0 m~ 8
s +~ = (s+("-l)) + for n > 0 We can now state our condition which the set ~ must satisfy as follows: E. If s E E then s + E ~. We are not assuming any preferred starting state for our program. The set E should be thought of as the set of all possible executions starting from all conceivable states. Condition E means that after the program reaches state sl, its subsequent behavior is not affected by how that state was reached. The semantics of our temporal logic are specified by defining how a temporal logic assertion is to be interpreted as a statement about a model. For any model ($, E) and any s E ~, we define what it means for an assertion A to be true for the sequence s. More precisely, we define the boolean s ~ A, where s ~ A = true means that A is true f o r 8.
The relation s ~ A asserts that A is true of the sequence s. We write E~A
=
VsE~:s~A
When there is no chance of confusion, we write ~ A instead of ~E ~ A. Thus, ~ A asserts that A is true for every sequence in E. Since E represents the set of all possible executions of a program, ~ A asserts that A is true for all possible program executions. The goal of reasoning about a program is to show that ~ A is true for a desired property A.
Unary Temporal Operators In the simplest form of temporal logic, the only temporal operators are the unary operator [] and its dual O , where O A -= "~I:]-~A
25
for an)' assertion A. We define s ~ A inductively as follows for all assertions A formed with the 13 operator.
• If A is an atomic predicate, then for any sequence s:
s~A
= so~A
• If A is the logical combination of simpler assertions, then its interpretation is defined in the obvious way in terms of the interpretations of its components. For example,
sb(VVD)
-= (sbC) V (sbn)
* For any assertion A:
s~[]A
= Vn>>.O:s+n~A
It follows from these definitions that if A is a predicate, then
s ~ r'lA = V n > O : s n ~ A If we think of sn to be the state at "time" n, then [] A means that A is "always" true. In general, we regard s +" ~ A to mean that A is true at time n, so, for any assertion A, [] A means that A is always true. It is easy to see that
s~<>A ~ 3 n > O : s + " ~ A so O A means that A will eventually be true--where "eventually" includes the possibility that it is true now. An important derived operator is the operator ,x,, defined by A'~B
-
13(ADOB)
The assertion A ' ~ B means that if A ever becomes true, then B must be true then or at some later time. Note that "-~ is a transitive relation: (A'~B)
A (B',~C)
D (A'~C)
26
The B i n a r y T e m p o r a l O p e r a t o r The unary operator O, with its derived operators ~ and "~, allows one to express a large number of properties. However, there are certain important properties of concurrent programs that cannot be expressed with it. To express these properties, we must generalize [] to a binary operator. There are various binary operators which one can de/me, all of which are expressible in terms of the others. I will define the operator ~ as follows. For any sequence s and assertions A and B,
s~A~_
B
=
Yn>_O:(Vm<<_n:s+m~A) ~ s+'~B
Intuitively, A <3 B asserts that B holds at least as long as A does--i.e., if A is true through time n, then B must also be true through time n. If A becomes false at any time t, then the truth of A ~ B says nothing about the truth of B from time t onward. It is easy to see that
OA
=- true~ A
so ~ generalizes O. Note that A ~ B means that B remains true until A becomes false, so (-~C) <] D means that D is true until C is. The temporal operator until, which is often used, can therefore be defined by
A until B
=-- ('~B) ~_ A
We define the operator
A <~ B
=-
(A V ~B) ~_ B
One can show that
s'~A,~B
-
Vn>_O:(Vm
~ s+'~B
In other words, A <~ B asserts that B is true as long as A is and, if A becomes false, then B remains true at least one "step" longer than A. The operators <~ and <~ obey the same transitivity relations as <: and <. For example, (A_~ B) A ( B < 3 C ) D (A<3C)
27 Temporal Properties
of Programs
The temporal operators we have just defined can be used to express important properties about programs. A common property one wants to prove about a program is that some predicate is always true. For example, if a program is supposed to implement mutual exclusion, one wants to assert that it is always the case that at most one process is in its critical section. Let P be the predicate which means that at most one process is in its critical section. Since E consists of the executions obtained from starting the program in all conceivable states, including states in which two processes are in their critical sections, s ~ [ ] P cannot be true for all s in E. All that we can expect to be true is that P is always true for any execution that starts in a proper initial state. In other words, what we must show is that r--
lnit D D P
where Init is a predicate which asserts that the program is in a proper initial state. The assertion ~ Init D []P is an example of a safety property.
Safety proper-
ties generally assert that something is always true of the program. However, one can characterize a safety property more generally as an assertion A satisfying the following condition: If sl. ~ A is true for every n then s ~ A is true, where 8In =
80,...~8 n
Thus, a safety property is one that holds for an infinite sequence if it holds for every finite prefix of it. Another way of saying the same thing is that a safety property is one such that, if it is false, then one can prove it false in a finite length of time. The most important type of safety property one uses about concurrent programs is
invariance, where a predicate I is said to be invariant if ~ I D [] I. Another important class of safety properties have the form
lnit ~ D(A ~ B ~_ C) For example, first-come-first-served can be expressed in this form, with A -
Process i waiting and process j neither waiting nor being served.
28
B = Process i waiting. C = Process j not being served. Besides safety properties, the other large class of properties one uses about programs are liveness properties. Intuitively, whereas a safety property asserts that something is always true, a liveness property asserts that something eventually becomes true. The most common form of liveness property is P ,,~ Q, where P and Q are predicates. For example, the absence of starvation can be expressed in this form where P is the predicate which asserts that a process is waiting for service and Q is the predicate which asserts that the process is receiving service. We know of no formal definition of a liveness property corresponding to the above definition of a safety property. Action Predicates We now return to consider execution sequences of the form s0 ~
sl
0 2 s2
~8 ...
(2.1)
with the actions ai. We include two kinds of atomic predicates: state predicates and
action predicates. A state is defined to be a boolean function on the set of state predicates, and an action is defined to be a boolean function on the set of action predicates. A model is defined to be a a triple (S, A, ~), where S is a set of states, A is a set of actions, and ~2 is a set of sequences of the form (2.1) with each si E S and ai E A. The set Z must satisfy Condition E above, where s + is defined in essentially the same way as before. Temporal logic assertions are formed from state and action predicates with the logical connectives and the temporal operator _<3. To define the semantics of these assertions, we can proceed as before. The only new thing that must be added is the definition of s ~ A when A is an action predicate. If s = so ~
s~A
=
" ", then we define
otl~A
In other words, an action predicate is true of a sequence if and only if it is true of the first action of the sequence. The only action predicates one needs have the form atom(It}, where rr is part of a program. The action atom(~r) is true of an action a if and only if cr is an atomic action
29 in rr. For example, suppose I is a predicate and ~r is a process in a concurrent program. The temporal logic formula
[] (I D . t o . , ( . ) < I) then asserts that if I is true, then any- atomic action of process ~r leaves I true. In other words, it asserts that 7r leaves I invariant. The ordinary temporal logic, without action predicates, suffices for talking about the program as a whole. However, action predicates are necessary for making assertions about individual parts of a program. Predicates of the form atom(rr) allow one to talk about the program component 7r by itself.
The Next-Time Operator Many temporal formalisms employ a next-time operator, sometimes denoted by C), whose semantics are defined by
s~OA
= s+~A
The formula O A thus asserts that A will be true after the first action. The O operator is not expressible in the temporal logic described above. This is most easily seen by observing that this logic is invariant under "stuttering". This means that if s t is the same as s except with some state and action repeated, for example if 8!
=
so ~
so ~
sl ~
sz ~
...
then for any assertion A
s'~A
= s~A
This invariance under stuttering is the key to the use of temporal logic in the hierarchical description of a system.
By not using the O operator, one avoids the
trap of explicitly describing the granularity of time. Temporal logic formulas that are invariant under stuttering are meaningful assertions about the system when viewed at any level of abstraction. This is explained in [Lamport 83b].
2.2.6. Relating the T w o V i e w s The space-time and the interleaving views are philosophically quite different. We now discuss how these two views are related. First, suppose we are give a space-time
30 model of a distributed system--i.e, a set of events with a temporal partial order relation ---. We can extend the - . relation to a total ordering of the events. Given this total ordering and an initial state, we can define the sequence of global states produced by this sequence of events, yielding an interleaving model. In general, ghere are many ways of extending the partial ordering --* to a total ordering. Thus, an interleaving obtained from a partial ordering is arbitrary. However, remember that in our semantics for temporal logic, a program is represented not by a single execution but by a set ~ of all possible executions. The set E will contain all possible interleavings obtained from any space-time model of an execution. Since the set of all possible interleavings derivable from ~ is logically equivalent to 4 , no information is lost when we use the set E of interleavings. When reasoning about a program, we are interested in temporal logic assertions A such that ~ A holds--in other words, for assertions that are true for all possible program executions E. Since E includes all possible interleavings, we cannot deduce any property of the program that depends upon an arbitrary choice of interleaving. Thus, any temporal logic assertion that we can prove about the program expresses a property of the program that makes sense in the space-time view. The only possible drawback of temporal logic is its restrictive expressiveness--there are interesting properties of the program that cannot be expressed in temporal logic.
31
2.3. Over 2.3.1
ew
Introduction
Computing has c o n s i s t e n t l y
f o l l o w e d two t r e n d s
:
• movement towards better understanding and use of
abstraction
. movement of the perceived root of system problems the
hardware
and
software,
towards
away
various
from
forms
of
specification
Programming has moved from m a n i p u l a t i o n o f hand s w i t c h e s t o use o f h i g h l e v e l l a n g u a g e s ° the
through
Most d e v e l o p m e n t s h a v e b e e n b a s e d on
i d e a of a compiler t h a t p r o c e s s e s language s t a t e m e n t s to produce
executable code.
The c o n c e p t o f m o d u l a r i t y and p a r a m e t e r p a s s i n g and
t h e u s e of information hiding t e c h n i q u e s in l a n g u a g e s have
reflected
the movement towards abstraction.
Other developments process a language, code,
but
activity. use
to
make i t
practicable
to
produce executable
as a b a s i s f o r a c o d e
T h e s e o p e r a t e on a s p e c i f i c a t i o n
of abstraction.
not
production
l a n g u a g e and make
strong
Most such developments have reflected the other
trend - to specify information which is less and less
implementation
oriented.
This project
Course through
covers
specification from the early
to the point of code generation.
module of the course covers the early,
The
stages
of
a
Requirements
pre-deslgn stages.
These are
summarlsed in section 2.3.2. The motivation for improving requirement specifications is summarised in section 2.3.3.
Requirement
Specification
terminology is discussed
in
section
32 2.3.4 and section 2.3.5 briefly describes the types of support currently (CORE
used.
and
SREM)
Finally,
section 2.3.6 summarises the two
used in this course to
illustrate
tools methods
principles
of
requirement specification.
2.3.2
Requirement Stages
Objectives
The
earliest
stage
is
evaluation of
the
objectives
of
the
organlsation the system is to serve. The aim is to discover whether a system
is
needed and if so,
the objectives served and measures
of
effectiveness of the service provided.
This stage is frequently omitted. of
Often there is no clear
means
identifying objectives of the organisation or of translating them
into measures of effectiveness of the proposed system.
For needed
this Course it is assumed t h a t a decision that a
is
has already been made and what remains is to decide the scope
and form of support it m u s t provide. but
system
if
it
is,
This may be unduly
there is little computer system
optimistic,
oriented
guidance
available to help relieve the problem.
Environment Requirements Any
system must be viewed as being embedded in
an
environment.
Major distinguishing criteria of quality for systems are :
. How well they match their environment
. How well they can adapt to changes in their environment
33
• How much they cause their environment to change
Hence
it
is
environment, able
necessary
the
to
evolutionary
achieve
forces
an
understanding
acting
on i t
valid
System
of
and how f a r
the
it
is
and prepared to change•
A
prerequisite
specification
of
to
producing
those
a
aspects of
the
Requirement
environment
which
is
permit
assessment against these criteria.
There
are
problems which complicate the preparation o f
such
a
specification :
• The e n v i r o n m e n t
its
is
ill-understood;
different
parts
interpret
behaviour differently
• There are conflicting interests, some of which may be hostile to introduction or
successful operation of the system
• Authority f o r deciding disputes is often not clearly defined• Necessary decisions are often not made
• The environment is continuously evolving, which modifies
the
system requirement, even as the system is developed
Some m e t h o d i s illustrate
the need
needed,
the differences
to achieve
in understanding•
authority for making decisions, for
making it. evolution
a common u n d e r s t a n d i n g , It
should help
or to identify
make the authority aware of the
each decision and the probable consequences
of
delay
in
Finally, it should help identify the most likely areas of and
interference
predicted problems.
and assess how best to
deal
with
the
34
System Requirement A
System Requirement is a statement of what the proposed
must do.
system
Normally it avoids defining how the system is to do what is
required. That is the business of System Design° In practice, freedom from
imposed
solutions
(design or
implementation
influences)
is
frequently impossible. For example :
. The Environment Requirement often describes
what
This
easily
can
has
embedded
design.
It
is in essence the design of the environment. lead
to
unnoticed
expressions of System
Design.
. It can
be
difficult
environment job
currently
satisfies.
available
to
for
"requirements"
does
User the
distinguish
between
authorities
on
way the
its job and the requirement the unaware
proposed system are
based
the
current
of
likely
practice,
technology to
which
express is
by
definition about to become obsolete.
. There are sometimes reasons, constraining software
design.
For
not necessarily technical, example
existing
hardware
may pre-determine some of the hardware or
for or
software
to be used.
• Practice might some things
have
shown
that there is only one way to do
(but note the above point about familiarity with
available technology).
• Sometimes current practice is authorizy
decides
introduce
a
practice.
system
it
would that did
so
established that a not other
be
customer
cost-effectlve than
support
to
current
35
a
Hence
System Requirement consists of "pure" requirements
r e q u i r e d solutions. is
later
The two should be distinguishable,
Infeaslbility.
There
is a
difference
and
in case t h e r e
between
absolute
infeasibillty (the "pure" requirement c a n n o t be satisfied by
current
technology) and treatable infeaslbility (a required solutlon prevents successful implementation).
Requirements form a b r i d g e between the customer/user view
System
of the proposed system and the deslgner/implementor view.
that
the
divided
This means
a u d i e n c e f o r a System Requirement S p e c i f i c a t i o n between
terminology
and
people
who
those
with
understand neither
abstraction
an
is
often
and
understanding
formal nor
the
unacceptable.
Yet
motivation to achieve an understanding of such matters.
For the latter people, without
formal
cannot
seriously
formal terminology is
terminology
the
System
Requirement
Specification
be the basis of a contract for development of
the
proposed system.
A
method
is
required
which
distinguishes
between
"pure"
requirements and imposed solutions. It must use a terminology capable of
demonstrating
coverage
of
the
Environment
Requirement
Specification for an audience untrained in use of formalisms and
yet
capable of forming the basis of a contract for the development of the proposed system.
2.3.3
M o t i v a t i o n f o r Improving R e q u i r e m e n t s
There
are
specifications.
two First,
basic
reasons
end-user
what i8 implemented is inadequate, Second,
for
improving
requirement
satisfaction is often low inaccurate and
incomprehensible.
the requirements are often poorly expressed and much
development and maintenance cost and schedule of the system is fixing problems from the Requirements Specification.
because
of the spent
36 Improving User S a t i s f a c t i o n
Recurrent causes of the problems are:
• complexity o f the required system
, high volume of information to be handled
. inconsistency,
incompleteness and ambiguity in the
recorded
information
. poor
communication
of
even
the
complete / c o n s i s t e n t
/
unambiguous requirements
System techniques
complexity
is
often supplemented by complexity
and tools used.
less probable.
They make successful system
in
the
reallsatlon
There is a need for technlqes and tools which
assist
handling genuine complexlty without adding unnecessary complexlty.
Dealing
with
high
volumes of information
requires
systematic
techniques for handling acquisition and expression of the information and
reliable
tool support for input,
analysis and
output
of
the
information.
Inconsistency without
tool
information,
for
large
support.
coupled
The
systems is unlikely problems a r i s e from
to
be
large
with poor performance of people in
removable volumes
of
performing
repetitive checking tasks. Completeness
of
the
Requirement S p e c i f i c a t i o n s
can
never
be
guaranteed. Adequate techniques for analysis and support tools should make
it possible to guarantee analytlc completeness - le the absence
of any analytically detectable evidence of incompleteness.
37 Ambiguity is a very difficult problem for Requirements. There are notations
which
viewpoint.
dramatically
People
guarantee
who
reduce
understand
from
the notations
a
can
technical
very
that if the expressed requirement is feasible,
implemented
correctly.
The
problem
understandable only by few people. though
ambiguity
unambiguous,
is
that
the
nearly
it can
notations
be are
The statement of the requirement,
is not understood by the people whose
need
it
represents. To them it remains ambiguous!
This
latter
mentioned
difficulty is precisely the
above.
The
Requirement
communication
Specification must not
problem only
be
correct, it must be seen to be correct!
Cost and S c h e d u l e R e d u c t i o n
It
is not the intention
b a s e d on measured e v i d e n c e .
here to argue the case
for
improvement
R e g a r d l e s s o f t h e measured e v i d e n c e , t h e
l o g i c o f a t t e m p t i n g improvement i s i r r e f u t a b l e .
The
proposed
system
and
its
environment
exhibit
hierarchic
properties
(eg functional decomposition,) and network properties
data
flow
relationships)
made
in the early stages and left undetected until later
and the comblnatoric effects of
an
(eg error
stages
of
development are demonstrably large. For may
example,
result
Environment
a data flow error in the Environment Specification
in propogation of the error through Requirement
decomposition,
Requirement decomposition, on
to
Implementation
multiple error
and the need to re-deflne
may propogate to more than one component.
effect
levels
levels of
of
System
several levels of Design decomposition and
tests for each implementation "module".
error's e f f e c t s
To
several
several
and/or
re-perform
At each level The growth
of
the the
will be exponential.
repairs there would be new activities to be
defined,
$8 changes states
to
existing
and
effects
new i n s t a n c e s
on
training. changes
data definitions,
user
and
Finally, with
of each.
other
There
maintenance
there
would
changes
data flows would
procedures,
be
and be
as
other
consequential
documentation
and
coordinating
the
problems of
such
operational
errors
and
system
enhancements.
Getting
it
right
early
is
clearly
a
sensible
goal.
What
statistics may ultimately provide is an assessment of the cost to get it
right compared to the cost of leaving it
depends
on
t h e c o s t and e f f e c t i v e n e s s
wrong.
The
comparison
of the techniques
and
tools
used. That is still a subject for experimental measurement.
2.3.4
R e q u i r e m e n t s Terminology
Representation
A or
Techniques
notation may only express some "key" properties,
control
flow.
It
may,
on
the
other
hand,
such as data
permit
rigorous
specification of all relevant aspects of the proposed system. In this paper,
the
two policies will be distinguished by use of the
quasi-formal
in
reference
to a partial
notation
and
phrase
formal,
in
reference to a complete notation. A basic axiom of this paper is that the absence of any defined notation is a recipe for disaster. What is to
be
decided
is
the role (if any)
of
quasi-formal
and
formal
notations in successful Requirement Specification.
Use notations
of
Formal
Notations.
are usually
In
general,
b a s e d on some k i n d o f
the
available
mathematical
formal formalism
which demands considerable training and discipline from its users and readers. A problem with use of formal notations is that the levels of expertise
required
available are low.
are high,
while the levels of
relevant
skills
Hence, few non-research projects actually produce
a formal specification.
39
This
problem may disappear slowly,
made more widely available.
as training is improved
and
There is some possibility that, in terms
of training enough people, the problems will never disappear.
Two factors must be addressed to achieve formal specifications :
. Available staff skills must be used to maximum effect
The task of developing a requirement specification should layered,
so
different
that
staff
of different
skill
levels,
or
types of skill can be used on those aspects
be with
which
are appropriate to their skills.
. Maximum use must be made of tools
Tools
should
be used to perform repetitive
(boring)
Jobs,
assist skilled Jobs (eg perform complex analyses) and provide a
good
environment for skilled tasks (eg
provide
advanced
interfaces to support use of formal notations).
Quasi-Formal
Notations. Achieving a rigorous specification which
can be used to guide the system development demands the use of formal notations. Their use conflicts (in current practice) with getting the specification understood and agreed by the customer community.
The customer community is not going to leap in its entlrlty crash
training
programs in understanding formal
notations,
into so
an
alternative is required. This requires translatlon between the formal notation
and
the
customer
- perhaps mapping
parts
of
a
formal
specification onto simpler (quasi-formal) notations.
Examples flow diagrams.
of such notations have been in use for years - eg
data
The slmpler notations are not complete, and sometimes
not rigorously defined.
They should be treated as informative rather
40
than
definitive.
Their
job is to convey an understanding
of
some
limlted aspect of the full specification.
If
such notations are used,
they must be demonstrably mapped on
to a formal notation. When used, it must be made clear that it is the formal representation which is definitive.
Expression
The
v Acquisition
existence
specification
of
of requirements.
to extract
analysts
a notation does not
solve
the
problems
of
Problems arise from the inability of
information from their customers and from
their
inability to cope with the volume of information that is extracted.
There
is a need to promote the discovery of information
organlse This
its storage and analysis to achieve maximum
and
to
effectiveness.
requires a strategy for analysis and guidelines on treatment of
departures requires
from
the
guidelines
strategy (ie on
tactical
interviewing and
guidelines).
prompting
It
also
techniques
to
extract information and decisions when required.
Much can be done to assist in this area for very little cost most
formal
effort
notations could be used to much greater effect if
was devoted to the relevant techniques.
indications
will
During
this
and some
course
be given of techniques which have been applied
to
the activity of Environment Requirement Specification.
2.3.5
Use o f T o o l s
Tools to support requirement specification could be subdivided in numerous ways. separates purpose analysis
For the purposes of this overview the division chosen
largely active tools.
passive
tools
tools (requirements
(database
systems)
exercisers)
from
and
special
conventional
It should be noted that there is no reason why
all
41 the classes should not be used in combination.
Database Systems Database systems have been in use for over a decade in support of requirement specification. they in
Their purpose has been threefold.
First,
provide a means of storing information and later retrieving various different forms for analysis,
generation.
Second,
consistency
of cross reference between parts of
Third,
they
reflect
they
ad hoc enquiry and
provide
it
report
provide a means of automatic guarantee of the
specification.
a means of extending the terminology
used
to
special cases or improved understanding of what needs to
be
recorded.
The
two
most
widely known examples are the
RSL/REVS
database
associated with the SREM method [Bell 76] which is one of the example methods
used
in this Course and PSL/PSA [Telchroew 77a]
been used in support of a number of methods,
which
has
including CORE [Mullery
79], which is another of the examples methods used in this Course.
Exercisers
An
exerciser,
Requirement input of
as
used
Specification
here,
is a tool which
or on data derived from
operates one
to
on
a
produce
to a simulation package which then provides an operating model the
behaviour
of
a
system
built
to
satisfy
the
given
specification.
The technique was pioneered for Requirement Specification in SREM [A1ford 79b] and has also been used in HOS [Hamilton 76].
This form
a
kind of tool, strong
though little advertised at the
aid to transferring an
understanding
moment of
may
problems,
consequences of decisions and basic operational behaviour of a system
42 produced
from the requirement they have helped define.
An important
consequence of the need for such simulations might be the need to use example algorithms in the Requirement Specification, simulation.
The
to permit
danger of the examples being interpreted as
full design
would require careful precautions.
Analysers In is
addition to the special types of tool mentioned above,
a large body of tools which support methods aimed at
ambiguity and proof of correctness. clusters
and
methods
removal
of
These normally exist in isolated
are in a continuous state of evolution as
they
there
support are enhanced or the support
the
formal
requirements
are
better understood. Published details of actual tools are not known to the
author of
this
paper,
but examples are mentioned for several
methods in [Cheheyl 81].
2.3.6
Use of Examples
There
are two methods for Requirement Specification which
precisely namely methods
the
two types of requirement mentioned in this
Environment
Requirements and System
development
and
practical
use
for a
Course
Requirements.
are CORE (Environment) and SREM (System). decade.
cover
The
SREM has been CORE
development and practical use for over five years.
has
been
two in in
Both are designed
to be evolutionary, extending as our understanding of the Requirement Specification process increase~.
CORE
has
concentrated
on the earlier
stages
of
analysis and emphasises the use of a defined strategy,
requirements guidelines on
tactical adjustment and use of prompting techniques and a simple
but
powerful
the
diagrammatic
customer/user PSL/PSA
community.
notation It
to
aid
communication
with
has been used in conjunction with
and other database systems and a number of
special
the
purpose
43
tools are in process of construction for its support.
CORE British
has
been
adopted for use on major and minor
Aerospace
and is in process of adoption
by
projects several
by
other
major organisations.
SREM
has concentrated on the development of System
and their use for derivation of System Design.
Requirements
It defines guidelines
on
strategy and is a major contributor to demonstrating the
of
tool
section
support, 2.3.5.
requirement feasible.
It
combining all three types of tools has
been
extended
to
bridge
utility
mentioned the
stages
in of
and design so as to make a coherent development approach It
goes some way towards the goal of defining
a
layered
approach that facilitates practical use of staff of varying levels of skill.
SREM
was
developed by TRW for the US Army and has been used
the US Air Force. some
It is also in use by commercial organisations,
cases just as a method and in others as the
and tool set.
integrated
by in
method
Chapter
3
Acquisition- Environment The
early
charaeterised It
stages
of
a
system
development
project
by the absence of clear information about the
frequently exists only as an amorphous set of ideas
minds.
Often,
though
divided.
system.
in
people's
they agree on the need for a system and
convinced themselves that they all want the same system, reality
are
have
they are in
The divisions occur over who or what the system is
to serve and what service it is to provide•
An
early task is t o clarify who/what t h e system is t o serve
and
the operations it is to serve. This requires discovery of information about the environment of the system, which involves :
• obtaining information from people who have as yet only formed ideas about the service
half-
required
• detecting and illustrating differences in
perception
of the
required service
• getting
decisions
about
whose view is to prevail or aiding
the development of compromises
. illustrating the dangers of some practices they would like to carry over into use of the new system
achieving
completeness
information,
where
and
possible,
where it is not achieved
consistency
of
the
specified
and a record of each instance
46
. recording user
it
in a form understandable by the
community
specification
and
of
task
for
developing
the System Requirement,
basis of a contract
This
usable
customer a
and
formal
suitable
as
the
Techniques
for
to develop the proposed system.
is referred to here as
Acquisition.
acquisition are important at all stages,
they are particularly so at
the start.
3. I. Start-Up 3.1.1
Introduction
C o r e Overview
CORE The
assists in meeting the objectives of environment
analysis.
assistance provided assists both technical / analytic skills and
psychological
skills.
The
required skills are
not
complex.
They
relate to systematic handling of large quantities of information
and
use of accountability to encourage responsible behaviour.
The base
techniques discussed could be extended to provide
for
producing
a
high quality
system
principle of the method is that of evolution. several environments (eg. and
control
systems)
avionics,
a
requirement.
better
A
major
CORE has been used
in
communications systems, command
and extended to meet the
needs
of
specific
applications, organisations and staff skills.
The
author
methods,
has
implemented a database system
including CORE,
mainframes.
The
for
support
of
on anything from microcomputers through to
database is being used as part of a full,
flexible
support environment under development in the UK by Imperial
Software
47
Technology.
This
application
of
(eg.
use
Specific
will
provide
advanced support
tools
to
CORE or other methods and integration of
assist
their
of CORE with more formal specification techniques). support
tools are also under development
in
the
use CORE-
UK,
by
Systems Designers Plc. and British Aerospace.
Other basic principles underlying CORE are summarlsed in the next two
sections.
The initial stages of applying CORE are described
in
sections 3.1.2 to 3.1.6.
Strategy and Tactics
Strategy control
defines
the
general intentions
of
a
the perturbing effects on the strategy of
influences. concepts
In
are
methods
for
computer
barely recognised.
system
plan.
local
Tactics
disturbing
specification,
The best one sees is use
of
down" methods (strategy) with "stepwise refinement" (tactics). are
many times for use of strategic and tactical planning.
the "top There
One such
time is the stage of analysis of the environment's requirements.
CORE stop"
defines a strategy,
sequence.
It
based on "top down" and
a
"start-do-
defines signals of perturbations and tactics for
dealing them. The start-do-stop sequence is summarised as follows:
An approach to starting the analysis is defined. given
to
system.
Indications are
assist application of the approach to different Between
starting
and
completion,
there
is
a
types
of
recursive
application of a series of intermediate steps. Each intermediate step can be described in terms of its own "start - do - stop". The overall process is guided by clear scope bounds and "when to stop" criteria.
The involves and
subject
of this first paper is
the
start-up
establishing an agreed scope and agreeing
schedules for the analysis process.
step,
which
responsibilities
Later papers deal with
the
48
intermediate steps and with completion.
Acquisition and Expression In
the
expressed
overview for
of
the requirements
process,
the
use of a means of expression which is
need
was
accessible
to
untrained readers, but usable to generate formal specifications or to express parts of a formal specification.
This is the "middle ground"
which CORE attempts to bridge.
CORE
has
generate later
made use of a "simple" notation which can be
a more formal representation.
to illustrate some techniques.
That notation will
possible candidate would be CCITT's SDL notation.
for
selection of a notation are ease of understanding, concepts and well defined scope.
notation process
such
or already exist,
The
criteria
coverage
of
tools
of
are
a in
to support SDL for other
Most of these tools could usefully be applied to
environment requirements,
used
One benefit of use of
SDL is the fact that a number
of development,
purposes. of
as
be
to
Other notations could be used.
One
necessary
used
analysis
thereby supplementing the normal
CORE
analyses.
Another problem described in the overview was that of acquisition of
information.
analysis. they
want
This
Customers and
is
a notorious problem
during
and end-users are accused of not
not making up their minds
about
Requirements are changed and extended repeatedly,
requirements knowing
the
what
requirements.
during development
and even during service life.
These instances
problems where
psychological
are inevitable in many systems,
analysis
techniques
techniques could
force
could detect its
removal,
continued existence the result of a recorded decision. CORE
has
its
strength.
There
are
numerous
but a
there
are
problem
and
or
make
its
This is where
techniques
for
the
49
detection
of
omissions
i11ustrating
and
problems.
There
problems and for getting more
are
techniques
information.
for
There
are
techniques for provoking decisions or recording the need for them, so that
they
can
definition
not
of
accidentally be forgotten.
There
is
a
who has responsibility and who has authority
clear in
the
establish
the
decision making process.
3.1.2
Strategy
The scope
principal aim of the start-up activity is to of
the information required about the
achieved by finding who and what, system,
is
to
environment.
This
is
in the environment of the proposed
be directly influenced by the system when it
enters
service.
A
secondary aim of start-up is to establish the levels of detail
at which the environment can be described and to agree a plan for its analysis, the
which
addresses the higher (most abstract) levels
lower (less abstract) levels.
The plan includes
before
assignment
of
responsibilities, authority and schedule for performing the analysis.
Depending on the nature of the environment, the levels identified may be based on "real world" concepts such as companies, departments, teams
and
Job titles or on abstract "functional" concepts
navigation, organlsed target
such
as
weapon control and attitude control. Ultimately, whether on
real world or functional
lines,
the
structure
onto people and equipments who are the interface between
will the
system and the environment.
Many people,
embedded systems have little or no direct interaction and
abstraction
in in
such
cases there are likely to be
specifying
organisational structure. functional hierarchy,
the
environment's
few
levels
requirements
with of via
Such systems are best dealt with by use of
terminating in people and equipment
operating
50
in various functional ~roles ~'.
Systems
involving
direct
provision
of
services
to
numerous
people,
perhaps
in several different organisatlons (eg command
control
systems,
inventory systems) are best dealt with using
world
hierarchies
such
as departments and
teams,
and real
terminating
in
people and equipments operating in various organlsatlonal "roles".
It
is
strongly
environment start-up basis
is
recommended that,
where the
performed as part of a
analysis
contractual
of
the
agreement,
the
activity should be completed pre-contract and used
for
the
customer's damaging
scope of the contract.
attention structures
identification
on in
the
This
will
possible effects
the
environment
of what is to be covered,
and
as
the
concentrate
the
of
warnings
about
will
permit
clear
who is to be involved
and
when the work is to take place.
3.1.3
Prompts
At
the
start-up
stage,
there is a good possibility
customer has a lot to say about what is required. is
likely
related
driven",
"we
information",
"wish
want
a
list" ideas, fast,
of
llke "we want
reliable
the
Unfortunately,
that what is said consists of a stream
partially
that
turnround
it
unrelated it of
all
or menu
accounting
"we want an on-line enquiry service". How detailed the
stream becomes may depend on how computer-literate the customer is.
It
is
a
irrelevant.
mistake to ignore the stream, It
indefinately,
is
also
without
a
mistake
trying
to
let
or
to the
suggest stream
to guide it towards useful
it
is
continue strategic
goals. This is part of the aim of prompting techniques - to guide the customer
towards
discussing
(technically) productive order.
the
requirements
in
the
most
51
In any case, eventually
there is a high probability that the customer
run out of ideas.
of prompting techniques. what
is
necessary
environment
will
To help in such cases is the other aim
The analyst aims to steer the topic towards
at this stage,
knowledge of the
scope
of
the
- ie what is the set of interests (called Viewpoints
in
CORE) to be supported/influenced by the proposed system.
This
means
Viewpoints. function
Any
picking out of the customer person,
Job title,
department,
all
hints
discovery
if they are
at
equipment name or
should be noted and used to steer the conversation
confirmation of their relevance and, the
stream,
towards
relevant,
of other possible Viewpoints - eg "who does
towards he
work
for?", "who works for her?", '~who works in that department?", "who is responsible
for
that equipment?",
"where do they
get
information
from?".
Having whether
it
discovered is
a
Viewpoint,
to interact
with
the customer
the proposed
should
system,
rule
or whether
causes one of the other Viewpoints to interact with the system. direct interaction is required, environment analysis. with
the
proposed
Indirect Viewpoint. Viewpoints
is
Viewpoints
are
on it
If a
that is a Viewpoint relevant to
the
If a Viewpoint only causes another to interact system,
then that is considered in CORE
In the analyses,
considered,
but
information to/from
their actions are
not relevant and should nornally
not. be
as
an
Indirect Any
excluded
other from
further consideration (but see the later discussion on tactics).
If
most interactions with the proposed system are
via equipments in the environment,
predominantly
it is best treated as an embedded
system. Rather than seeking "real world" entities (eg departments) it is
better to seek functions and sub-functlons to be supported.
Identification of functions and sub-functions is difficult, since the identification of what constitutes a "function" is vague, relying
52
heavily on the experience of the customer and/or the analyst. In this sense, that
embedded systems are hard to analyse.
A redeeming feature is
interfaces with the environment (in terms of input and
and
dependencies
among
output)
external equipments are more likely
to
be
written down, or at least known and thus analysable.
3.1.4
Analyses
Analyses
at
relationships
start-up
among
concentrate on
Viewpoints,
discovery
of
indicating possible
structural
omissions
or
basic test is for any Viewpoint which is either not part
of
V%ewpoint or contains no other Viewpoints.
of
damaging organisational structures in the environment.
The another
Three
kinds
containment can be considered :
. Reporting relationships - ie who reports t o whom?
. Membership relationships
- ie which person belongs to
which
team?, which team belongs to which department?, etc.
. Ownership relationships
-
ie which person
supervises
which
equipment?, which department owns which equipment?
A
Viewpoint
superior
may
legitimately
to no other Viewpoint,
be without
but this should
a
superior, be
or
be
confirmed.
In
practice, other potential Viewpoints will usually be discovered - and some
will
be confirmed as relevant to the
proposed
system,
while
others will be explicitly excluded from further study.
A only
variant one
control
on the basic test is for a Viewpoint
other Viewpoint. only
one
which
contains
It may be legitimate for a Viewpoint
other but,
what may be
happening
is
that
to the
53
Viewpoint
controls
multiple instances of the same job title - eg
Supervisor
controls several Assistants and the system
them
In
all.
fact,
it
must
a
support
is worth prompting for such cases
as
the
A potentially damaging organisational structure is one which
has
Viewpoints are discovered.
one
Job title or one team contained in two or more other Viewpoints.
This can arise either because a Viewpoint is actually responsible several
superiors,
purposes. include
The a
former
means
currently
or
of
working,
information.
because the same name is used for is damaging because the system detecting the context in
to
to
different
may
need
to
the
user
is
which
prevent corruption or leakage
of
sensitive
The latter is damaging because of possible ambiguity in
interpreting for which version of the name, particular facilities are required.
3.1.5
Tactical I s s u e s
It of
is important to point out the cost and security
permitting
the same person to fulfill more than one
responsibilities.
implications Viewpolnt's
It is worth prompting to determine whether any
the agreed Viewpoints could be performed by the same person.
of
If they
could, and the customer wishes to preserve that flexibility, the fact and the customer's decision should be recorded.
To
deal
with
the problem,
at least to
avoid
ambiguity
when
analysing the environment, a special form of Viewpoint, called a Role is used. each
Each "dangerous" Viewpoint is allocated a separate Role for
responsibility.
qualified
by
its
Then
each
Viewpoint,
when
Role - eg Design Consultant and
referred Quality
to
is
Control
Consultant. The same kind of problem arises in functional hierarchies and can be addressed in the same way - eg Ship Navigation and Navigation.
Weapon
54
On some occasions, though a Viewpoint interacts with the proposed system,
it
may
analyse
the
be prohibited by the customer,
behaviour
of
knowledge of the behaviour. interaction
with
an enemy.
the Viewpoint
or
using
impractical
someone's
to
working
The most obvious case is a weapon system The actual analyses performed
in
such
cases must be recorded as areas of high risk of change.
In
some
require
cases,
for non-technical
references
interact
reasons,
the
customer
may
to and even analysis of Viewpoints which do
not
with the proposed system - eg it may be that the
Viewpoint
is on a llst for later take-over and inclusion in the environment the
system.
interact
of
It should be recorded that each such Viewpoint will not
directly
with the proposed system~
or
someone
may
make
interaction occur - eg because he/she assumes that the inteaction was accidentally omitted.
Some system.
customers These
particular
do
may
impose design constraints
include
use of particular
equipments or even inclusion of whole
on
the
proposed
algorithms, existing
use
of
systems,
operators and all, in the proposed system. This forces an analysis of the
behaviour
"premature" probable the
of the imposed elements at some stage and
may
force
design features in the rest of the proposed system.
consequences of such constraints should be pointed
customer and,
if they are nevertheless retained,
the
out
The to
probable
consequences and the decision are recorded.
The
customer
is
the
final
authority
on
what
Decisions
may result,
political
or financial or some other considerations,
the
business
requirement
not from technical considerations,
of the technical analyst, and
warn
is
required. but
from
which are
not
whose Job is to record
the
of possible damaging
consequences
- not
to
censor it.
Though there is mention of the need to record damaging
decisions
55
and
warn
will
of the possible consequences,
those records and
not necessarily appear in the environment
to
attempts
promote
responsibility
to
accountability,
make
record the warnings. the
warnings.
warnings
specification.
emphasising
the
CORE
analyst's
the customer aware of the problems
and
to
The customer decides whether to pass on or hide
Cases of safety related warnings or infringements
of
the law are a matter for guidelines on ethics rather than method, and are not covered by CORE.
Finally,
if
a
need is discovered to extend the
environment after it has been agreed contractually,
is
not
necessarily recommended.
It is a
of
the
there is a clear
case for re-negotiation of the terms of the contract. action
scope
However,
matter
such
of
local
tactics as to whether new terms are negotiated or the extra cost/time are
absorbed.
Giving a little at one stage may be judged a good way
of promoting future good will. CORE.
In
any
authorised
event,
the
That decision is beyond the scope
extension should be pointed out
by the customer in a manner consistent
with
to
of and
contractual
terms.
3.1.6
Use of Start-Up Information
The
product
hierarchy
of
of
the start-up activity can be thought
Viewpoints,
of
as
together with a plan for the analysis
interactions b e t w e e n those Viewpoints,
a of
using i n f o r m a t i o n provided by
agreed "user authorities". This can be used in two ways :
C o n t r o l o f Scope
A
benefit
possible analyses). their
during
later analyses derives
from
the
guidelines
on what is relevant (ie within the scope of the environment People are highly prone to talk about things which are in
environment as well as the environment of the proposed system~
There is a need to trap such cases and determine whether they
should
56 become relevant (ie the contract should be extended) or be dropped.
For
example,
department, definition
any
mention of a Viewpoint
(person,
Job
function) not in the set agreed during start-up out
of scope.
tltle, iss
by
Mention of inputs from or outputs to/from
such Viewpoints are out of scope.
Actions performed by out of
scope
Viewpoints are likewise out of scope.
If extensions of scope are clearly important to the customer, the decision on how to deal with the situation is the subject of tactical and contractual considerations, as described earlier.
Source of Prompts
During later analysis, start-up information can be used to direct effort and negotiate changes to schedule when problems arise.
It can
also be used to suggest possible interactions (eg "do you get
inputs
from there?", "do you send outputs to there?").
When
analysis of interactions between Viewpoints is
under
way,
start-up information can be used to prompt in other ways (eg "are you involved in doing that?",
"do you use some of that information?").
These prompts are a considerable insurance against omissions.
3.1.6
Example
Overview of the Example
In
the
space available here,
it is impossible to give
tutorial overview on the use of CORE. a
CORE
mentioned
Workshop in
the
is
used
on
full
Instead, an example taken from
to illustrate some
discussions
a
Environment
of
the
key
points
Requirements.
In
particular, the example diagrams are not fully described. In practice
57
they
should
covered
be
supported
by notes which
supply
information
by the diagrammatic notation and which explain the
interpretation
of
the
diagrams
for
people
not
not
intended
experienced
in
interpreting the notation.
The
following
intended
to
illustrate
brief description of the example
give some
environment
an idea of what the environment is
of
the recurrent
problems
with
llke
is
and
to
descriptions
of
environment requirements. It is used later to suggest how the various CORE
analyses
should
pick up and deal with
problems.
Hence,
the
reader
be warned that the description attempts to be plausible while
at the same time containing the seeds of future problems.
The
size of the description supplied here is very
than
one would normally be given.
easy
to
detect
and deal with,
much
smaller
Hence the problems are relatively even
without
systematic
analysis
techniques. Remember that a specification of perhaps ten to a hundred times
the
normally
amount
of information contained in
this
example
contain many times the number of errors to be seen in
would this
example. For such cases, systematic analysis is essential.
The example concerns a company involved in provision of monitoring services for a number of clients. number
of
possible
security
The monitoring covers a
alarm indications - such
as
fire,
flood
and
burglary. The current service is provided by hardware on the client's premises,
which monitors alarm systems local to those premises,
and
reports changes of state in any of the systems via a direct llne to a Central Station run by the security company.
At each
the Central Station the hardware includes a set of lights for customer
customer.
A
site, red
indicating
light
indicates a burglary, indicates a safe state.
the current alarm
indicates a fire
alert,
state an
for
orange
the light
a blue light indicates flood and a green light
58
The
Central Site Operators monitor the lights and,
when they change
from green, the Supervisor at the Central Station consults a schedule supplied alarm
by the company being monitored,
is
genuine
to determine
or Just an exercise or the customer
whether site
the
is
in
process of opening or closing.
In
the
case of a genuine alarm,
Customer
Contact,
separate
file,
to
representative's the police,
whose
name
report
and
the
the
Supervisor
phone number are
condition.
It
is
telephones
a
stored
a
the
in
Customer
responsibility to check the condition and
call
in
fire service or other emergency services as appropriate.
The customer must also later report to the Central Station to confirm clearance
of
the alarm state.
The Central Station will not
report
further alarm states until the clearance has been received.
All are
transactions between the Central Station and
logged in an archive,
their
clients
which contains date and time stamped tape
recorded telephone conversations and records of opening schedules.
What
is now required is a system which automates many of the
tasks,
reduces
flexibility thought
to
the
hardware
monitor
complexity
various types of
and
provides
alarm
devices.
manual greater This
to involve a microcomputer based at the customer's
is
premises
linked to a minicomputer based at the Central Station.
Schedules
are
to
be
site
and
staff
transmitted
to
via the
the
at
minicomputer.
The microcomputer monitors the state of the customer's
and
own
client's
microcomputer
alarms
their
entered by the
reports it to the minicomputer which tells the
host
Security
Company's staff of any significant change. Problem reporting is still to be via telephone.
The
basic
ideas
relevant to preliminary establishment
scope of the requirement are described below.
of
the
59
Start-Up The
first
t h i n g to do i s to look a t t h e example description
for
all "doers" (ie. potential Viewpoints). The list is long. It will not be completely covered here, but examples are :
Company; Supervisor; Police;
Client;
Hardware;
Central S t a t i o n ;
Central Site Operator;
S e c u r i t y Company;
Customer Site; Customer Contact;
Fire Service; Emergency Services; Customer; Archive; System;
Hardware
at Client's Premises;
Devices;
Microcomputer;
Hardware at Central
Station;
Alarm
Minicomputer; Customer's Premises; Client's
Staff; Security Company's Staff; Host Minicomputer.
Clearly a lot of these names are really Just renaming of the same thing.
For example :
Client and Customer are the same thing as
Client's Premises and Customer's premises. as
In a description as small
this it is just about possible to distinguish all these from
context in which they are mentioned, renaming
occurred
up
are
the
but imagine the problems if the
to thirty or even a hundred pages
after
the
first name was mentioned.
Another problem is that some of the names are not really relevant to the proposed system. For example, Police and Fire Service are Just examples of Emergency Services. business of the proposed system, with
Emergency Services.
Even the latter is not strictly
the
since there is no direct connection
It is possibly valid to include
Emergency
Services, since the eventual User Manuals will need to emphasise that the
Central
Station
does not have responsibility to
whereas the Customer Contact might.
notify
them,
Hence, Emergency Services are an
example of a CORE Indirect Viewpoint.
For
this
example,
after
various
prompts
and
analyses,
the
60
Viewpoint Hierarchy agreed is as shown in figure 3.1 : I which uses a special box-and-llne notation.
The
boxes are divided into an upper and lower section.
section
contains a code indicating hierarchic position (V2
of
and
V21
V22).
An "I" in the top
section
The upper consists
indicates
that
the
Viewpoint is Indirect and hence will be mentioned only as a source of inputs
The
or a destination of outputs.
presence of "shadow" boxes indicates replication.
there
are
V22)
many Customer Sites (box V2) and many Local
in each Customer Site.
For
a
For
Here~
example,
Alarms
(box
many could indicate two or more,
complete specification the supporting text for
this
diagram
should indicate the maximum to be supported in each case.
Note finally, at
that there is only one operator and one supervisor
the Central Site.
In the fully expanded example,
this is
later
detected to be a mistake, but that will not be shown on this course.
The
Viewpoint
hierarchy
is also expanded to show
roles in which the system will appear (boxes V212, and V432). what
the
the
V222,
various
V412, V422
In such a case, the requirement is first expanded to show person or equipment must do (description at the
boxes
V21,
V22,
tasks
between
V41,
level
V42 and V43) and then the division of
the person or equipment and the
proposed
of
those
system
is
considered.
In
this course the analyses performed do not go down as far even
as the level of V21,
etc.. Instead, just the first level is analysed
(interactions between V1 to V5, with only V2 and V4 being expanded in terms of the Actions they perform).
In should
practice, be
agreed
it is recommended at this stage that
a
wltn the customer authority for analysis
timetable of
the
vii
I I
v2,'l
I l
I
iCustomer l !Contact {
l'.
£
I
....
,
I I I
v2211
~
I
I
II l_L
I,
{Local IA1arm
I
I _I I I v211 lCusto~r { l {Site I_L 1 1 I
I I
I ,I,, v41{
I I ISupervisorl I. I
I
I' lEnviron- l I meot I I L
. . . . . .
.I
I. 1 I
I 1
I
I
il .. v42.1
I
I IOperator
1
I
I v41 {Central { lStation l
I I
i
I
J
I I
v431
L
t {
I,
I
I .....
I
I I IEngineer I
iZ
t {Archive
I, ...... vsi
........
I(OP)
,,,I ,l,Ser,vi,ce
I I(OP) I I ......
{ I
Figure 3.1 : I ExampleViewpoint Hierarchy
l I Service
{ {
I {. . . . .
._L I
{ {
{
I I I I I I I 1 I I ..... I I I, I I, I l I .......... I I v2221 1 v4zzl I V412 I i11 v421{ I v422l I V43tl I v432{ ii v~uI I v2121 I'' v22i'1 I { {Local ] lSupervisor{ lSupervisorl loperatOr I lOperator { lEngineerl lEngineerl {Customer { {Customer { {Loca] { {Alarm l {(OP) l ] Service { {(OP) { {Service { {(OP) { {Service I lContact I {Contact I {Alarm
L
{Emergency { IServices I
.I..I
I I
lviewpoi,,tsl l l I l v31
VOI I lSystem }
{. IAla~
62
various
viewpoints,
with the assistance of named user
authorities.
This permits progress measurement from the early stages of the project.
3.2. Information Gathering 3.2.1
Introduction
Step
Overview of a Recursive
After application
Start-Up, of
a
CORE
process
analyses called
consist
Viewpoint
of
the
recursive
Decomposition.
This
takes a Viewpoint which has already been provisionally specified
and
re-specifies
about
its
the
two
subordinate
it
in
Viewpoints
terms (in
specifications are consistent,
of
information the
gathered
Hierarchy).
When
the "parent" Viewpoint
Specification
is considered to be confirmed and the subordinate Viewpoints are then themselves re-speclfied in terms of their subordinate Viewpoints.
Analysis
at each level of recursion uses five intermediate
sub-
steps :
. Information Gathering
• Data Structuring
• Action Structuring (Isolated)
. Action Structuring (Combined)
• Reliability/Availability Analysis
Special
features of the first and last levels of
recursion
and
63 the main characteristics of the intermediate sub-steps are summarlsed
in
the
next
two sections.
The main purpose of section 3.2
describe Information Gathering, sections 3.2.2 to 3.2.6.
is
to
which is described in more detail in
The other intermediate steps are
described
in greater detail in later sections.
The F i r s t
After
and Last R e c u r s l v e S t e p s
Start-Up
viewpoint
to
could
taken
is
as
yet
no
provisionally
describe in terms of its subordinates.
it.
specification of this top level would consist
Action
definition
together
level
Indirect Viewpoints which stimulate it or receive responses from
abstract
Environment",
The top
the
provisional
to be "System +
specified
with
A
be
there
- eg
"Use
stimuli to
produce
of
responses"
an
and
a
of the stimuli and responses from all Indirect Viewpoints
in the Viewpoint Hierarchy.
Taking this as the first Viewpoint to be analysed,
the
analysis
would be to discover the intended stimuli and responses. This process can be performed as the first "real" Viewpoints are analysed.
For below
CORE
the
first Viewpoints analysed are
the top level.
They are analysed in the
those
immediately
stages mentioned
in
section 3.2.1, with the exception that consistency with the top level is ensured by the manner of their construction. Viewpoints
in
recursive
step,
Re-speclflcation
terms of their subordinates then follows the until
the
lowest
level
Viewpoints
of
general
have
been
provisionally specified.
At
this
stage there is no lower level against which it
can
be
verified. The CORE Viewpoint Hierarchy could be taken to the level at which
the
Viewpoint
proposed
system is a Viewpoint.
Then one
lowest
is a provisional System Requirement which can be
level
verified
against the eventual actual System Requirement Specification. If this
64 is
done the lowest level CORE Viewpoints also permit
production
of
provisional User Manuals.
Overview of Intermediate Sub-Steps
Information (technically) detects such.
Gathering varying
takes
information
level of detail and
provided
relevance,
at
records
out of scope or apparently premature detail and marks it The
related
a it, as
information is checked for consistency within and between
Viewpoints.
Prompts
are made to
ensure
completeness
and
consistency.
Data Structuring takes outputs, to
be
relevant
establishes Prompts necessary
for the Viewpoints currently
d~tectable
are
based
dependencies
and
between
relationships Data
and the
at
under
analysis,
structural
on Data structures from
structural
relationships
known from Information Gathering
the the
known
and
constraints.
parent
Viewpoint,
current
level
information
about
and the
Viewpoint which produces it.
Action Structuring (Isolated) takes Actions and Data, Information under
Gathering
analysis,
performed
and
to
be relevant to each
establishes
by the Viewpoint.
known from
Viewpoint
dependencies
among
Prompts are based on Data
the
currently Actions
dependencies
for the current Viewpoints, Actions performed by the parent Viewpoint and detectable peculiarities in the known temporal,
control and Data
flow dependencies.
Action related
Structuring
(Combined) takes the
Actions
performed
Viewpoints and demonstrates that they and their dependencies
are mutually consistent and are together consistent with the and dependencies of the parent Viewpoint level. as
by
those for isolated Action Structuring,
cross Viewpoint boundaries.
Actions
Prompts are the same
but extended in scope
to
65 Reliabillty/Availabillty currently flows
Viewpoints
under analysis and adds any required new Actions and
necessary
availability causes
Analysis takes the combined
of
to
of
handle
problems
the service provided.
problems
performance,
possible
Data
with
Actions,
or
of
reliability
Prompts are based the
Data
mechanisms
or
on
known
for
their
and Data flows or the media for their storage
or
transfer.
3 . 2 . 2 Strategy
This
intermediate
recursive
step.
sorts
into
it
sub-step is the start-up activity for a
It takes technically unstructured things
to be pursued at this
step,
CORE
information
and
things
be
to
postponed and things which are out of scope.
The main aim of Information Gathering is to record all "transactions" known to be performed by Viewpoints at the current level of analysis. In
CORE,
a
Viewpoint,
"transaction" consists of an Action
performed
by
the
together with the Data used andderived by the Action and
the source/destlnation of the Data.
As
a back-up to the mainstream of analysis,
information is gathered
about key Events and operational Conditions.
A "transaction" concept
associated with Events and Conditions requires that any Event either
trigger
Condition
or
terminate
a
Condition or
an
Action
should and
should test Data or another Condition and select or
any limit
the performance of an Action.
Information Analysts Actions
Gathering first considers each Viewpoint
in
isolation.
interview a user authority for the Viewpoint to find performed
require
support which could be provided
which by
the
proposed system and/or which inputs and outputs could be supported by the proposed system, is complete,
etc. When each user authority interview process
communications between the Viewpoints are analysed
for
66
consistency / completeness.
3.2.3
Prompts
Prompts for this intermediate sub-step arise in three ways :
• Asking about "transactions"
in general terms (What do you do?
What data do you use? What Data do you derive? etc.)
• Analysis (What
of
what the user autority has said,
Data does that Action use?
for omissions
Where does that Data
come
from? etc.)
• Use
of information already available from other sources (the
Viewpoint Hierarchy~
previous levels of Viewpoint
information from other user authorities
This
paper
does not cover all the prompts,
analysis,
at the same level)
but the
ideas
are
summarlsed below:
Consistency within Transactions
Each input.
source Each
must be associated with at least one item
input
of
Data
must be associated with at least one source
must be used by at least one Action. one input and at least one output.
Each Action must have at
and least
Each output must be derived by at
least one Action and go to at least one destination.
Each destination
must be associated with at least one output.
Consistency between Transactions
Different Viewpoints must agree on their mutual transactions. example,
if
destinations,
Viewpoint then
"A"
has
Viewpoint
"B"
as
one
of
Viewpoint "B" must have Viewpoint "A" as one
For its of
67
its sources.
Moreover, if "A" claims to derive Data "X" for "B" then
"B" must claim to use "X" from "A".
Viewpoint Hierarchy Each Viewpoint which is part of the Viewpoint under decomposition is
a
potential
source
and/or
destination
for
each
other
such
Viewpoint. Hence, if no Data appears to be exchanged by any pair, the user
authority
should
be
prompted at least
to
confirm
that
no
exchange occurs.
Premature information from previous levels
Premature reconsidered may
information
mentioned
at the next level.
at
any
level
At any level below the
be premature details from previous levels.
should
be
checked
is
At
noted top,
and there
£hls
stage,
it
or
should
be
to see whether has been included
included or is still premature.
Previous level information
For
the
Viewpoint
under decomposition (apart from a t
level) there exists a provisional specification.
the
top
That is a source of
prompts when considering its "child" Viewpoints at the current level. For instance,
which parts of an Action performed by the "parent" are
performed by which of its "child" Viewpoints.
3.2.4
Analyses
Analyses at each intermediate sub-step are predominantly aimed at detecting the
evidence of incompletion,
prompts
for
the
sub-step.
which is then used to Examples
of
such
generate
analyses
Information Gathering are suggested in the previous section.
for
68
Other analyses are recommended at each sub-step, aspects cost
or
for evidence of
of the information supplied which may adversely
affect
the of
reliability of the proposed system or limit the ability
the environment to make best use of such a system.
Examples of
such
analyses for Information Gathering are described below :
S o u r c e o r destination n o t in t h e Viewpoint H i e r a r c h y
This is, as
are
by agreement with the customer authority, out of scope,
any inputs or outputs only mentioned in connection with
it.
Leaving it in may result unwanted system features.
Data derived by several Actions or received from several sources
This may be a valid specification of current practice, but should be
questioned,
because it may lead to the need for a
significantly
more expensive system, to cope with problems about where a partlcular instance
came
from and how it should be handled.
It might lead
to
deadlock situations in either the environment or the proposed system.
Actlons/Data not hierarchically below those of the previous level
These are evidence of omission at the previous level or of out of scope information at the current level. In the latter case, continued inclusion could lead to unwanted system features.
Data which is only feedback to the Viewpoint which produced it
This
is evidence of information which is probably premature
the current level of analysis. that
it is not forgotten,
considered necessary.
at
Continued inclusion is necessary,
but it should be marked as premature
this level only if subsequent analyses show it to
for so and be
89 Actions
which
only communicate with other
Actions
o3
the
same
Viewpoint This marked
is
a similar
as premature
analyses
show i t
case
to that
and c o n s i d e r e d
Just at
discussed.
this
level
It
should
only if
be
subsequent
t o be n e c e s s a r y .
The same Action performed by more than one Viewpoint
This
usually
actions. This
indicates use of the same name for
Sometimes
could
it
c a n be b e c a u s e
two
of overlapping
lead to an expensive or complex
different
responsibilies.
system,
which
has
to
recognise the relevant user context.
3.2.5
Tactical Issues
The "user authority" may be a person, of
the
two.
Ideally
interpretation analysis the
of
there
should be
documents or a combination someone
to
of documents and to supply omitted
consult
details.
about Unaided
documents often permits only recording of the scope
disaster rather than development of a good quality
of
requirement.
However, even that knowledge may help make decisions about whether to continue and how much contingency to allow if development proceeds.
Before
prompting based on information already available the
should
encourage the user authority to volunteer
may
make
the
necessary. previous
acquisition
However, analyses
is
appear
to
likely
indicate
to
mention
authorities
believe the environment behaves. each
take
longer
differences
information
or
for
information.
new view on the environment unprejudiced
overlooked
transactions
to
a
process
analyst
user
authority
in
how For should
Independently and then compared for consistency.
be
than by
previously
different similar
This
user
reasons, collected
70
Hierarchic current
level
Hierarchic
between
are
to
sought,
the "parent"
help
achieve
and
complete
the
coverage.
though if they are expressed it is encouraged that
be recorded.
they
This is an example of a regular tactic :
ignore information which is volunteered, or
level
relationships within the current level are not pursued at
this stage, should
relationships
irrelevant - it may be neither,
even if it seems
never
premature
and even if it is premature,
it
may be the last time the informant thinks to mention it.
An
occasional
problem arises in the form of Actions
user authority claims either use or derive no Data.
which
the
Typical examples
are Actions which generate time signals or which perform an archlving service. Such claims are very rarely valid. A timer process is almost invariably provided with some kind of start-up signal and an
archive
is only of ,se if, at some time, things can be retrieved from it.
When validity
faced by
with such claims the analyst should
asking
starts or stops.
question
the user authority to consider how
A frequent problem with requirement
is concentration on normal operations and neglect
their
the
Action
specifications
of aspects such as
start-up, close-down and break-down. This is the cause of a number of peculiarities detectable by analyses recommended in CORE.
Another
recurring
problem
with
analysis
of
environment
requirements is that of disagreement among user authorities about the requirements. get
it
unless then, customer
The
resolved.
task of the analyst is to detect the problem It is not the analyst's job
make
responsibility is delegated by the customer the
authority avoids
resides with the customer
making
a decision,
it may be
the
decision,
authority.
authority. necessary
and
Even
If
the
for
the
analyst to provoke a decision.
The
normal
technique
for doing that is formally to
propose
decision (eg in a progress report) indicating the timescale in
a
which
71
the decision must be confirmed or rejected to avoid cost and schedule problems.
For some contracts it may be possible to proceed as if the
decision
has
respond.
In
been any
accepted case,
if the
customer
authority
does
the problem and its consequences have
documented early and if the customer authority is accountable hls/her
not been
within
organisation there will be a strong incentive to resolve
it
as soon as possible.
Sometimes very
making
dangerous.
the
recommendation
is
politically
In such cases it is often more constructive to list
advantages
emphasis
an outright
and disadvantages of each
option,
with
particular
on the points which make one option more sensible than
the
others.
The precise means of provoking a decision may require for the personalities involved. writing
too
early
may
be
dlsorganlsed
that
the
longer
documented, the
With some people,
putting things in
counter-productive. the
wait
Some
before
the
the more the analyst's position is at risk.
techniques
Nevertheless,
are
used
is
a
matter
of
adjustment
subjective
may
be
so
problem
is
Hence, when Judgement.
the problem and the decision must be documented by the
analyst and approved by the customer authority.
One
valld
documented decision by the customer authority
Is
to
postpone the actual resolution of the problem, with acceptance of the consequential risks to schedules and cost. work
or
This may prevent
further
require renegotiation of the schedule and costs or spawn
a
subcontract to perform a feasibility study on each of the options.
3.2.6
The
Use o f I n f o r m a t i o n G a t h e r i n g I n f o r m a t i o n
product
unstructured
body
of of
Information
Gathering
i n f o r m a t i o n about
requirements at the current
the
level of recursion.
is
a
consistent
probable
but
environment
I t i s used l a t e r
in
72 the
same level to assist in deducing structural,
and
data flow relationships.
temporal,
control
Part of it is used in lower levels
to
prompt in later Information Gathering activities. At the lowest level of recursion part of it is used to indicate whether completion of the agreed task corresponds to completion of Environment Specification.
Data Structuring
Outputs
recorded
during Information Gathering are
used
during
Data Structuring to prompt for hierarchic and derivation dependencies among the Data relevant to the current recurslve step.
Action S t r u c t u r i n g
Actions,
conditions,
relationships
recorded
dependencies
events,
during
inputs
Information
and
input/output
Gathering,
and
Data
recorded during Data Structuring are used during Action
Structuring (Isolated) to prompt for hierarchic and temporal/control/ data flow relationships.
Next Level Information Gathering
Premature level
is
information
used
at
the
carried over from the next level
to
prompt
current during
recurslve Information
Gathering, as described earlier.
Completion
At
the
lowest
presence
of
identify
design
level
of recurslon
the
absence
premature information helps demonstrate constraints
origlnally agreed scope.
or
to
indicate
or
continued
completion
deficiency
in
or the
73
3.2.6
Example
Information Gathering for the top level Viewpoints in the example started in section 3.1 is presented here.
It is done, as if from two
sources.
The the
Central Station Viewpoint information has been gathered from
example
description in the previous paper.
tabular form in figure 3.2 : gathered
It is
shown
in
a
I. The Customer Site Viewpoint has been
from another source,
possibly by another team of analysts.
It is shown in figure 3.2 : 2.
First consider figure 3.2 : I. The main lesson to be learned here is
that the user authority is quite likely to say a lot
about
the
current manually operated system (red, orange, blue and green lights, for
example).
as
stated
I n many c a s e s ,
will
the
the information
might have been relevant would have been the alarm status each
light
fact,
at this level,
the
here,
What
In
t o do w i t h
lights
system.
indicates.
have nothing
as with
proposed
the only distinction would
be
between the safe state and one of the alert states.
Note
also
the
inputs and outputs which are "internal"
to
the
Central Station. These should for the moment be treated as premature. They may be pulled in as relevant by later analyses at this level.
A
third
outputs,
point
is
the mention of the Archive
but not as a source
this case,
of inputs.
as a destination
of
T h i s s h o u l d be q u e s t i o n e d .
In
we will assume for the moment that the user authority
is
adamant that the Central Station makes no use of Archived information which
is
relevant to the proposed system.
In the full
later
reliability analysis shows this to be a mistake.
workshop The
a
mistake
will not be detected on this Course.
In
practice,
this
first
set
of information
is
largely
wrong
or
74 SOURC,E
J
......... INPUT
I
CustOmer'" " " C u r r e n t
Alarm State~--Monltor
Ok to Resume Monitoring Central ~ ' / Station I
l
Customer " i .....
-
-I
Schedule
Station
)
f
Alarm State
Central
I
I
I~
Consult Schedule
Genuine Alarm Indication
........... Central Station
j
site
I I
Central
,I,, , GenuineAlarm
Station
)
Archive
Indication
i Customer ,, }..... Clearance Site )
Telephone Customer Contact
Problem Report
Wait for Clearance
Ok to Resume Monitoring
Figure 3.2 : I
Central Station
) " Alarm State
the Lights
Red Light ( / Orange Light / Blue Light //) Green LighI I
Slte
SOURCE
,OUTPUT , ........... ) DESYINAT!,Q N
,AC,T ION
m
'I ' Customer I Site
I
I " Central I
Station
ExampleInformation Gathered for Central Station
.....ACTI O,N,,,
INPUT
Problem Report
I
i
Investigate Problem (
OUTPUT AlarmCall ,
Clearance Local Alarm - - A l a r m Status System
Check Alarm State
"\
I I I I i H,I
DESTINAT!ON Emergency Services Central
I Station I ...... Audio-Vlsual Alarm l'--Environment ( Safe Status I
? t
to '~'ScheduteDecision
Customer Decision Management~Subscribe
I ~Decision to ) Terminate
Monitor Premises/~/ Open Subscription
~AlarmAlarmStatus~ Alert
Signed Contract ~ I
Central Station
Enter Schedule Close Subscription
Notice
Figure 3.2 : 2 Example Information Gathered for Customer Site
75
out
of
scope
or
deficient.
It will be assumed
for
the
current
exercise to be replaced by a better quality version.
The
second table,
Viewpoint
in figure 3.2 :
(Customer Management).
will
assume
included
scope
This should be questioned
- first
if the user authority is
adamant
with the user authority and later, about its relevance,
2 refers to an out of
with the customer authority.
In this case,
that the customer authority agrees it should have
and
the
necessary
contractual
negotiations
we been
permit
its
inclusion as an Indirect Viewpoint.
The
second point to note is the absence of inputs to the Action,
Monitor Premises. The similarity of outputs compared with Check Alarm States gives a strong hint that this represents renaming. That should be checked. We will assume that it is indeed renaming.
A third point to note is the absence of inputs or outputs for the Archive.
This should be questioned. There should in fact be outputs,
at least to store copies of outputs to the Central Station.
Comparison with the Central Station table indicates a of
opinion about the Data exchanged.
difference
The Central Station expects to
receive the Current Alarm State from the Customer Site.
The Customer
Site expects to send an Alarm Safe Status and an Alert Alarm
Status.
Differences should be queried with the user authorities and resolved.
There are exchanges mentioned by the Customer Site, which are not confirmed
by
the
Central
Termination
Notice).
authorities
to
Finally, They
are
Station
These
determine
should
( e g . Signed be
whether they
checked are
Contract, with
really
Formal
both
user
relevant.
there are omissions from both. Some are detected later.
found
because
of analyst experience
causing
the
prompts, because of CORE analyses and in some cases by luck.
right
?6
3.3. Data Structuring 3.3.1
Introduction
This
intermediate
recursive step. the
sub-step
is the second in the
general
CORE
It is the first attempt ~t identifying structure
(usually)
unstructured information recorded during
in
Information
Gathering for the current level of analysis.
The
purpose
of Data S t r u c t u r i n g i s to i d e n t i f y
and
environment
on outputs from each Viewpoint at the current
thought
order
constraints
detectable
hierarchic
analysis.
derivation
any
imposed
In so doing it may demonstrate that some Data, to
be
premature detail,
is really needed to
by
the
level
of
previously Justify
the
isolation
for
Actions
are
stated constraints.
The each
process
Viewpoint
normally
not
of Data Structuring is performed in currently under analysis.
used
at
this stage unless
Inputs they
and can
demonstrate
a
derivation dependency between outputs.
By
the nature of construction of the Viewpoint Hierarchy,
from Data exchanges with Indirect Viewpoints,
apart
the structured set
of
Viewpoint outputs forms also the structured set of Viewpoint inputs.
3.3.2
Strategy
Data Structuring for each Viewpoint is performed in three stages. First a provisional hierarchic structure is formed, based on analysis of
"packets" of Data.
A "packet" is basically Data which is at some
time passed alone from one Viewpoint to another.
Then the derivation
77
order
of the "packets" is determined and finally any constraints
on
the internal layout of the "packets" are recorded.
Technically and
queried.
unnecessary structural constraints are Incompatibility
checked
with Data Structuring at
the
for
parent
Viewpoint level is checked for and queried.
3.3.3
Prompts
As room
with the other intermediate sub-steps, in
there is insufficient
this paper to explain fully all the prompts
used
at
this
stage, but the main ideas are summarised below :
Packets
The
initial prompts are based on discovering which of the stated
outputs for the Viewpoint under analysis are ever passed in isolation to
another Viewpoint.
information. Others
are
These outputs are referred to as
Packets
of
They are not the only Packets used in Data Structuring. sometimes
necessary
as
a
result
of
hierarchic
relationships among the Packets already known.
Dependent Packets
The next type of prompt is used to discover the need to refer additional as
part
Packets. of
another
to
Some existing Packets are sometimes passed also Packet.
hierarchy among such Packets,
In order
to
define
completely
it is sometimes necessary to
additional
information which does not ever go on its own to
Viewpoint.
This
the
identify another
is itself a Packet because it is part of the parent
level Packet but is logically separate from the child level Packet.
Help in deducing separation of outputs into Packets can come from
78
the
Data structuring information produced at the previous
level
of
Viewpoints (other than at the top level, of course).
Hidden P a c k e t s A
third type of prompt seeks to discover a third type of Packet.
This
is
Data which is never passed alone from the
analysis than
to another Viewpoint,
one existing Packet.
prompt
Viewpoint
under
but which is passed as part of
more
The result of these first three types
is a Packet Hierarchy which is then used to
investigate
of the
logical order of derivation of Data.
Hints has
at hidden Packets might come from a look at the Data which
been
marked
Information
as
premature.
Gathering)
In
making
the
decision
it should be marked as below
Data which is not premature.
some
(during existing
If it is below more than one Data name,
it is probably a hidden Packet.
D e r i v a t i o n Dependencies
Having identified the basic Packets and hierarchic
relationships
among them, the user authority is prompted for any dependencies among the
Packets.
derivation
For
of
example the contents of one are necessary to
another,
or the contents of one
another is produced at all, This
type
of
prompt
determines
or whether it continues to be
is interlaced with prompts
to
the
whether produced.
discover
the
with identifying derivation dependencies may come from
the
conditions of derivation.
Help
derivation dependencies identified among Data relevant at the Viewpoint level. Data
at
parent
That is likely to identify major dependencies among
the current level.
Also,
consideration
of
relationships
between Events and Data may help discover Data dependencies.
79
Conditions of Derivation
The user authority is prompted to state whether each Packet, when it
is
derived,
is derived unconditionally,
whether more than
one
instance is derived before any dependent Packets are derived and, so,
whether
the
multiple
instances
are
produced
if
successively
(iteration) or in parallel (replication) or a combination of the two.
Help
with
identifying
relationships
between
Information
agreed
Conditions
Gathering
replication
conditions of derivation can
and
of Viewpoints,
during Start-Up.
from
and
Data,
identified
the
known
information
available from the
Also,
come
Viewpoint
from during about
Hierarchy
the apparent existence of Data loops
(le Data which appears to be both before and after other Data in
the
stated dependencies) is a strong indication of iteration.
Constraints
on Format
Consideration
of format is strictly a design issue,
yet in
the
environment there frequently are format constraints. For example, use of
public
communications
systems
may well
impose
some
protocol
requirements. These are sought when all the other Data structuring is complete. Each Packet is considered individually to discover any such constraints.
The
constraints
are recorded and indicated
as
externally
imposed
design constraints.
3.3.4
Analyses
Examples specification analyses
of are
analyses aimed at detecting suggested in the previous
incompletion section.
of
Examples
Data of
for peculiar or dubious Data relationships in what has been
80
specified are described below:
Multiple contexts for packets
Any
Packet
indication
of
environment several
which
appears
possible
in
more
than
one
configuration management
or
in
the proposed system.
places
or
appears in other
context problems
the
looks
particularly
informed
of
the
damaging, possible
the
customer
consequences
for
to such
If the practice
authority
(eg
the
sent
need
practices should be checked with the user authority.
an
in
When a Packet is
Packets,
is
should
later changes
be
may be
performed on one occurrence but not on another).
Multiple times of derivation
This
case is usually similar to that of multiple contexts or
an
instance
of
or
evidence
of an undetected iteration.
user
use
authority
of the same name for
or
customer
two
different
purposes
It should be checked with
authority as
indicated
for
the
multiple
contexts.
Data, Event or Condition not mentioned in Information Gathering
This can only occur if some previuosly undiscovered component has been
mentioned
condition
should
complete/correct
or
an be
existing checked
name
and
has
the
been
mis-spelled.
specification
adjusted
The to
the component specification.
Recursive Data Structures
Occasionally often
recursive
Data structures do occur,
but
they appear to occur because of careless use of names.
very similar in appearance to the case of multiple contexts. is
detected
it
should
be checked
with
the
user
Just
as
It
is
When it
authority
for
81
validity.
3.3.5
Tactical
One
of
automated
Issues
the
biggest
support
problems of application
of
CORE
is that of keeping up to date with
without
all
the
new
information and changes to existing information. This is particularly the case with the information collected during Information Gathering. Since
it
is mentioned during an informal interview process,
it
is
highly likely later to require many changes/updates as structural and temporal relationships are investigated.
Data Structuring will normally cause large numbers of changes and Action tidy
Structuring will cause many more. copy
Keeping an up to date
of Information Gathering information is
impractical
and for
manual use of CORE. It is recommended that the information be kept in a
tabular form and updated in handwriting until it can be
have
shown
to
been completely covered by the various Data and Action diagrams
produced apply
later.
and
Given automated support,
these limitations do
the whole information base can and should be kept
up
not to
date.
The
problems
aggravated saving
by
known
derivation
of
volume
another
of
information
and
of the recommended CORE
information
constraints)
until
this the
case, user
changes
tactics
about authority
identify the constraints.
- that
structure has
independent
attempt
getting
independent opinion on how the environment
an
to
(in
of
The
are of and
made
an
benefit
of
behaves
far
outweighs the disadvantage of additional changes it generates.
Another structures There
is
serious mentioned
problem can arise if the various earlier are challenged
rather
dubious than
Data
checked.
a very large difference between the attitude generated
by
statements llke "Can you tell me why that is not structured llke this
82
structured llke that, it should be like this .o.!". If a constructive attitude from the user authority is desired then confrontation should be a last resort.
Nevertheless,
the analyst does have a duty to point out
practices and their possible consequences. to
do
the in
The most constructive way
so is to record the existence of the
consequences,
dubious
practice,
the alternatives considered and later,
the
forseen
if appropriate
reasons for rejection by the customer authority - and note that, the
case
authority
of detected damaging practices,
rather
it
is
than the user authority who must
the
customer
authorise
their
continued use.
3.3.6
Use of Data Structuring Information
The
products
structure.
of
The
relationships
Data
first
Structuring
is
a
simple
among Packets of Data.
are
three
definition
types of
It uses a simple
of
Data
hierarchic box-and-llne
notation.
The
second
dependencies notation
is
among
a
more
Data
complicated
Packets.
definition
of
derivation
This is usually expressed
consisting of a modified form of the diagrammatic
in
a
notation
used in Jackson's JSP, which has extensions to cater for parallelllsm and indeterminate order.
The
third
type of Data structure is one which
imposed format constraints. to
illustrate
likely
i11ustrates
any
It may use the extended JSP notation (eg
where format is and is not constrained),
but
also to include speclal-purpose layout descriptions
it
is
supplied
by the user or customer authority.
Of
the
dependencies
three are
types of
Data
structure,
only
normally used in performing later
the
derivation
CORE
analyses.
83
They are used to assist Action Structuring and, Viewpoint analysis,
at the next level of
to prompt during Data Structuring,
as described
above.
During
Action
dependencies
Structuring
(Isolated),
the
known
derivation
are used to prompt for discovery of dependencies
among
the Actions available from Information Gathering.
3.3.7
Example
From
the
Requirement, perform
example we
Data
will
developed in previous papers Just take the outputs of
Structuring
on them.
on
Environment
Customer
In practice,
the
Site
and
outputs
for
Central Station should also be structured.
Looking
at
figure
:
2
in
the
section
simplicity
that the user authority asserts that each of these is
at
some
passed
is
alone
to
another Viewpoint
in any of the others.
We
Information
there
contained
eight outputs defined.
on
Gathering,
time
are
3.2
will
and
assume
that
none
The result is that there are
"packets" whose order of derivation must be established.
for
eight
They are :
. Alarm Call . Clearance . Audio-Vlsual
Alarm
. Alarm Safe Status . Alert Alarm Status . Signed Contract . Schedule . Formal Termination Notice
It le.
is usually worth prompting on the basis of "start-do-stop"
what
authority
comes first and what comes last? will
In this case,
confirm that nothing else can happn until
the a
-
user Signed
84
Contract has been sent by the Customer Site and nothing else
happens
after issue of a Formal Termination Notice. Hence, these would appear to be the first and last outputs.
In
fact,
this will later be shown to be a mistake,
the subject of later analyses.
For the moment,
the analyst has no grounds for suspicion,
but that is
we will assume
that
and accepts the assertion.
For any one customer there is only one issue of a Signed Contract and
a
Formal Termination Notice.
there could be reliabilty problems
If a customer leaves and (eg.
rejoins
if the system keeps a record
of all customer names - past and present), but for the moment we will assume
that a rejoining customer will be treated Just llke
any
new
customer.
There
are,
however many Customer Sites,
as is indicated in t h e
Viewpoint Hierarchy established in an earler paper. Hence, there will be
many Signed Contracts and many Formal Termination
Notices
- one
pair for each Customer Site.
The next question is, which packet comes next? The answer is that no
monitoring
been
entered,
of the Customer Site can occur until a
has
defining the Customer Site operations such as opening
and closing times. one schedule?
Schedule
Hence that comes next, but can there be more than
The answer is,
yes. For example a shop may change its
opening hours during festivals such as Christmas.
Then it would need
to define a new schedule before and after Christmas.
What comes next?
After a Schedule is entered the user authority tells the that after
analyst
the Customer Site's Local Alarm Systems are re-initiallsed any break in the normal
and
(ie safe) alarm state a new Safe Alarm
Status is to be transmitted to the Central Station.
This then
comes
85
after each new Schedule is issued.
What c o m e s n e x t ?
Hopefully, entered.
In
nothing practice,
else
happens
until the
something might.
next
Schedule
is
There might be one or more
alarms. Hence, between each issue of a Schedule there might be one or more
alarms,
Status or, from
each to be followed by a new issue of the
Safe
Alarm
if the alarm coincides with the arrival of a new schedule
Customer Management,
by issue of the new Schedule followed
by
the Safe Alarm Status.
What is output during an alarm?
The
first
outputs will be an Alert Alarm Status to the
Central
Station and an Audlo-Visual Alarm (le. bells and flashlng llghts~) to the
Environment.
Customer Site,
Note
that
this is
the
Environment
around
the
not the CORE Environment of just the proposed system.
These outputs may be considered as occuring in any order.
After the issue of the Alert Alarm Status, and in no way affected by
the
Audio-Visual Alarm,
the Central Station should
notify
the
Customer Contact for the Customer Site of the problem. This may cause the
issue
of
an Alarm Call to the Emergency Services and
must
be
followed by issue of a Clearance to the Central Station.
This accounts for all the identified packets and the
established
ordering relationships are summarlsed in figure 3.3 ~ I.
As before, the
top
consists
the shadow box indicates replication,
segment of the boxes indicate a temporal hierarchy of 221 and 222).
symbols
(eg
22
Boxes below another box normally occur in
the order of their appearance, The
the numbers in
from left (earlier) to right (later).
in the top left of some boxes are used
to
modify
the
86 .... l,
,i oli (Customer i) Isit~ LL JData ,,, i
[
,,, ,,,
l
I_~ IStgned
I
, ,,
I,,
l
ii
[*,, ,21 Ic°ntract I )Service I ID.ta ,I )
( IContract i I,, l
I,,
I
I
ISafe
iTerminationl JNotice
1
I*
21¸11
I I t
• 222,1l )Alert 1 IData t I J I )
( 2221Zll I Alert I Ioutp.ts I
IAlarm lStatus
,,,,,,
I I
i
I
222112l lEmergency I )Outputs I ) ../ 1 l
I I
I
t
,22,2u31
1
I
I
I
lClearance I
I
,,
Io 222112111 IAtarm t ICall I
Io 222zz2121 I I ).ull 1
I ......
I ..................
I
,,
lo 22221 I ! tNull 1 I I
Ivisual IAla~.
I
1 I I
,
I Iu .22~ii21 )A.dio- I
lu )
,
I 1
,I
t0
I I 22211ti lAlert I
...221
l
,lS,tatus
l
I 2221 I Alert I )Options I I I.
221t.
l Alarm
I
]Premises I IMonitotingI )O~ta , ,I I .I
I ) ISchedule 1 I t,,
I .....
iFOrmal
(
Figure 3.3 : I Example Data Derivation Order
87
normal order.
For are
example,
the asterisk
("*") indicates iteration - eg
there
numerous occurrences of "Contract Service Data" between issue of
Signed
Contract
indicates consist
a of
standard The
and
Formal
Termination
Notice.
selection among alternatives - eg either an Alarm Call or "Null".
letter
"Emergency
undetermined
"U"
indicates
that
the
outputs
names
Packets.
issued
These
relationships
names
are
the
at this stage,
necessary
among the Packets.
some of which are Packets.
changes
Structuring
in
an
to
gives
a
the
originally
of
Information to
indicate
They are not themselves
In practice there are frequently new Data names
numerous
output.
i is the appearance
(ie names which did not appear in
information.
derivation
a
Alarm in an undetermined order.
A final point to note about figure 3.3 :
Gathering
is
is
order - eg "Alert Data" consists of both "Alert Outputs"
and Audio-Vlsual
Data
are
"o"
Outputs"
Note that "Null"
term in this notation to indicate that nothing
letter
new
The
discovered
There are also frequently
agreed
names,
as
the
Data
better mutual understanding between
the
user
authority and analyst about what is going on. None of these are shown here,
and
equivalent discoveries and changes
occur
later,
during
Action Structuring.
3.4. Action Structuring ( Isolated ) 3.4.1 Introduction
This recurslve between
intermediate step. Actions
It
sub-step
is the third in
attempts to discover and
in the environment,
behaviour of the proposed system.
the
record
general
CORE
relationships
which may affect the
required
They may even be relationships
the
88
proposed system is required to enforce when it is installed.
The relationships sought are temporal order (A occurs before control
(a
condition
set
by
A determines
whether
B
B),
occurs
or
continues to occur) and data flow (an output from A is used by B).
The
process
of Action Structuring is performed in
two
stages.
First, the Viewpoints at the current level of analysis are considered in
isolation.
Then the Actions of the current level Viewpoints
combined to form a set of relationships consistent with the Viewpoint of the parent level.
are
isolated
This paper describes the first of the
two stages, consideration of the Viewpoints in isolation.
Given consider then
adequate all
tool support,
it is probably more
sensible
the Viewpoints in combination at the first
extract
the isolated Viewpoints from the
stage
comblation,
described
at here.
one
time,
There
so
the
manually
applied
and
Without
adequate tool support this could lead to the need to handle too information
to
much
approach
are some people who start with the
is
combined
Viewpoints, even for manual application.
3.4.2 Strategy
Action
Structuring
seeks three types of
ordering
relationship
between Actions and attempts to demonstrate their compatibility. Once they
have
been
demonstrated to be compatible
the
temporal
order
relationship is redundant. Until compatibility has been demonstrated, the
expression of all these types of relationship provides
numerous
opportunities for detecting omissions and errors because of
apparent
incompatibilities between the stated relationships.
This
is an illustration of another recurring theme in CORE:
use of apparent redundancy in the developing specification to
the
detect
problems with what has been said to date. In fact, the information is
89 only redundant once a11 the forms of expression have been shown to be compatible.
Until
acquisition
of
a
then
the
complete
information
and
is
consistent
necessary
to
specification
the
of
the
environment behaviour to be supported.
The process of Action Structuring (Isolated) is driven by prompts based
on
the
Data
derivation
previous intermediate sub-step. relationships are sought, or
relationships
established
at
the
As with Data Structuring, hierarchic
often as a result of discovering Iteratlve
control relationships among Actions which have a peculiar mixture
of temporal and Data flow or control flow relationships expressed.
3.4.3 Prompts
The main ideas behind prompting at this intermediate sub-step are summarlsed
below.
The
ideas
discussed are not the
only
possible
sources of prompts, but they indicate the types of analysis which can lead to automated detection ofthe need for more information.
Data derivation order
The
main
information
driving
force
behind
Action
available from Data Structuring,
Structuring about
is
the
tlle derivation
order of Data. Examples are :
If
Data items are derived in a specific order,
then the Actions
which derive them must occur in similar order.
If Data items are mutually exclusive and are output by Actions,
then
the
Actions are likely (not certain) to be
different mutually
exclusive.
If
a
Data item is produced iteratively then
outputs it is likely (not certain) to be iterated.
the
Action
which
90
Control relationships between Events, Conditions and Actions
Relationships "control",
between Events and Conditions and the Actions they
established
during Information Gathering can be used
to
indicate probable time-ordering relationships among Actions.
Action Loops
An
Action
Actions
is
which appears to occur both before
a
and
probable indication of an iterative
after
other
relationship
in
which they all participate.
Absence of hierarchic relationships
An
Action
always
part
level.
If
there
of an
is
an
hierarchy
(below the highest level of
another Action - at least at the
there
not
be
another
level
performed
wholly by
is
Viewpoint
another
is a missing parent Action) or the
relationship has been overlooked. need
analysis)
parent
Action at this stage is not part of indication of the need for
(ie
Viewpoint
Action,
of
Action
"part
of"
If a parent Action is missing, the
Viewpoint
currently
it
under
analysis.
Temporal order with no corresponding Control or Data dependency
If
one
Action is said to occur after another and
corresponding certainly
Data
or control flow dependency,
should be one,
then
there
is
no
there
almost
or the temporal dependency does not really
exist.
Data flow which appears t o contradict temporal order
If is
said
an Action derives Data which is used by another Action to
occur
before the first,
then
there
is
which
probably
an
91
iterative relationship in which the Actions if
an
Action
derives
participate.
Data which it is also said
to
Similarly, use,
it
is
probably iterated or part of an iteration at a higher level.
Previous level Action Structuring
The
ordering
relationships
parent Viewpoint level, current
among Actions
established
at
the
together with the mapping of Actions at
the
level on to the parent level Actions can be used to
suggest
probable ordering constraints at the current level.
3.4.4 Analyses
Examples
of
analyses
aimed at detecting incompletlon
at
this
intermediate sub-step are suggested in the previous section. Examples of analyses for peculiar or dubious Action relationships in what
has
been specified are described below :
Multiple c o n t e x t s
This Data It
is similar t o Data in multiple contexts,
Structuring. can
be
discussed
It can lead to configuration management problems.
evidence of
overlapping
responsibilities.
It
evidence of re-use of the same name for different purposes. a
valid
Actions Data.
interpretation, are
during
which is that two
performed at different times,
functionally operating
A special notation is used to record such cases.
on
can
be
There is identical different
In any case,
the analyst should query such instances to confirm the condition.
Recurslon
Actions
which directly or indirectly invoke themselves do occur,
but usually require handling with special care.
Sometimes such cases
only appear to occur - usually because of an accepted practice in the
92
environment of using the name of an Action as the name of one of decomposed
parts.
For
example,
a
"Quality Control" Action
its by
a
department may be implemented by several "Quality Control" Actions by the
department's
staff.
Such naming conventions in
a
Requirement
Specification are dangerous and should be avoided where possible.
ActionsD
Data,
Events
or
Conditions
not
mentioned
during
Information Gathering or Data Structuring
A
common problem at each successive intermediate sub-step
Information logically
gathering
is
the discovery of
new
information
should have been discovered during Information
Failing
to
record
and
integrate them into
after
those
which
Gathering.
parts
of
the
specification which logically reference them (eg new Data may have to be
integrated into Information Gathering and into
Data
Structuring
products) is a guarantee of an incomplete or inconsistent Requirement Specification.
3.4.5 Tactical Issues
As from
with
earlier intermediate sub-steps,
previous
levels
current
Viewpoint
behave.
This,
is saved until the
information
user
available
authority
for
has indicated how the Viewpoint is understood
as before,
the to
maximlses the chance of a new look at the
environment discovering new information.
A policy which might appear to contradict this is the use of Data Structuring information for the Viewpoint under analysis the
start
of
this
intermediate sub-step to
ordering relationships. user
authority
will
now
prompt
right for
probable
The reason for this policy is that the
who indicated Data derivation order is the
one
be discussing Action ordering and much the same ground
now covered again, relationships.
from
same who is
just looking for confirming Data and control flow
People
are strongly opposed to repeatedly trying
to
93
derive
the same information from scratch and so in
this
case,
the
maximum use is made of the information the user authority has already supplied.
If, for a particular application of CORE, there is not a separate authority
for
each Viewpoint at each level,
the policy
of
saving
previously collected information for later prompting might have to be modified in more places. to
apply
the
would
be
how
the
One of the reasons for getting the Viewpoint Hierarchy agreed
and
attendant
full
However, that would be because of a failure
CORE method
dangers
environment
of
as
missing
recommended.
vital
There
information
about
behaves.
the customer and user authorities agreed during Start-Up is to ensure early
warning
of
danger
signals which
might
prevent
successful
analysis.
A the
common problem at all stages of Requirement re-use
of the same name for different purposes.
assumed that, of
the
specification will be able to distinguish from
noting
explicitly
usually
In the
the
context
later,
implementation stages this may sometimes be true.
worth
v~ x
It is
is
perhaps because of some notational convention, readers
which interpretation of the name is intended. and
Specification
design
Though it
the need in some coding languages for notations
indicate
context
(eg
"with xyz
do
name
:=
is
which
..."
or
,1 yz.name := ....
The
assumption
implicitly
from
Environment
that
the
the
context
Requirements
intended is
stage.
use
will
particularly Often,
be
recognlsed
dangerous
people's
at
the
ability
to
communicate
is severely inhibited by unknown,
same words.
There must either be unique names or some explicit means
must
be
used
to
indicate the version
and
different uses of the
context
of
the
name
currently in use at any place in the specification. Hence, such cases
94
should be queried and,
if necessary, a verslonlng policy agreed with
the customer authority.
A
problem
difficult
at
which
exists
at
all
stages
the time of Action Structuring.
becomes
particularly
That is the means
of
communication between the user authority and the analyst. The analyst needs some
to
show the user authority that some problems exist
information
is missing or to explain hls/her
(the
or
that
analyst's)
understanding of how the user authority said the environment behaves. Also,
different user authorities and possibly the customer authority
must be shown the description of a related Viewpoint,
to
facilitate
discussion of disagreements.
This
problem requires the use of a notation which is capable
expressing audience
as much or as little as is necessary for the problem concerned.
successful analyst
The
CORE diagrammatic notation has been
for that purpose,
and
can
since it is usually explained
be queried by the user authorities
as
of and
quite by
the
discussion
proceeds.
Some
people
notation
go further and use the notation
for the final Requirement Specification.
as
the
principal
Whether this is a
sensible policy is largely dependent on the skill of the design team, whether
they
were involved in its production and how good
are
the
words that go with the diagrams. It is well to remember that the CORE notation
does
not
completely cover the
information
necessary
to
express a requirement unambiguously.
For
very
certainly Requirement
high
quality
Specifications
it
be necessary to use a more formal notation for the and
it
is probably advisable to do
Environment Requirement. individual
Requirement
project
For the moment,
tactics
Specification at each stage.
how
formal
so
even
will System
for
the
it must remain a matter of to
make
the
Requirement
95 3.4.6 Use of Action S t r u c t u r i n g ( I s o l a t e d ) I n f o r m a t i o n
Information recorded during Action Structuring (Isolated) is used later
at
the current Viewpoint level to assist the construction
of
the Action Structuring (Combined) representation.
It is also used at
the
confirm
next
combined
Viewpoint Viewpoints
level (if there is one)
to
that
at that level are consistent with the
the
Isolated
representation at this level.
If the proposed system is one of the lowest level Viewpoints, the Isolated
representation
Hierarchy system
at
the
lowest
level
of
the
Viewpoint
can also be used to aid production of user manuals for the
and the system Viewpoint can be used as a provisional
System
Requirement, against which the full System Requirement can be checked for consistency/coverage.
3.4.7 Example
Taking Site
in
the
Data derivation order established for
the previous paper on the Environment
the
Customer it
is
possible to demonstrate the result of Action Structuring analyses
as
a series of diagrams which represent Data,
Requirement,
control and temporal flow
simultaneously.
What is shown here is the result of what might typically be a
time consuming process.
several meetings,
quite
The diagrams shown would be the result of
each lasting from one hour to half a day and
each
followed by perhaps half a day of analysis and drawing effort.
It still
is worth noting that, an
at the end of such a period,
omission in the representation,
there is
as will be shown
in
later process of Action Structuring (Combined).
It is in fact
probable
incorrect
that
in
a
more
complex
example
relationships will be carried forward to later analyses.
the quite
temporal
96
I
Decision to S.ubscr!be......(.Cus.t0merManargement ) i ",,, 1I,,i, I Conftrmat, ion,,,q,f,S~bscrJptt,o,n ,,(,Cus,tome,~,Mana~ement) :Customer I I
New Schedule (Customer Management) ,,, I l,Customer Site Data Alarm Indl,cation (,Environment) Site I l Problem Report (Central Stat!,on) II Decision to Terminate (Customer Management),'. . . . ProceduresI._L , ,
11
Figure 3.4 : I Top Level Isolated Viewpoint for Customer Site
As 3.3 : for
a
first
step,
consider the top level Data item
in
figure
I. This was called Customer Site Data and was replicated (once
each
Customer Site).
This suggests a top level Action for
the
Customer Site, as shown in figure 3.4 : I.
This
diagram has included all the known inputs to Customer
Site
and shows the one composite output, Customer Site Data. The Action is confirmed as being replicated.
Next, consider the next level of the Data diagram, This consisted of
a
time ordered sequence :
instances
Signed Contract followed by
of Contract Service Data,
followed by Formal
iterated
Termination
Notice.
In
trying
to
draw this,
the Action Diagram
identification
of
tile Condition for termination of
notation the
demands
iteration.
97
This
identifies some Data which has not previously
The
Condition
is
"Termination
been
Date is reached" and
mentioned.
the
Data
is
"Termination Date".
Examination shows Termination Date to be recorded as part of Formal
Termination Notice,
output.
This
the
which was previously said to be the last
means that some Contract Service Data could be
output
after issue of the Formal Termination Notice and before the expiry of Termination Date. mistake.
Now,
In practice it very rarely is,
hence the original
the Data diagram needs revision (not shown here)
and
the Action diagram which decomposes figure 3.4 : 1 is shown in figure 3.4 : 2.
In Action diagrams,
Actions are represented by named boxes. Time
ordering is show~l by left to right order of appearance. Indeterminate order
is shown by vertical alignment.
segment
of
Inputs
The asterisk ("*") in the top
box 2 again indicates iteration.
are shown by named lines with an arrow pointing into the
box. Outputs are shown by named lines with no arrow pointing into the box.
A Condition for termination of an iteration is shown by a named
llne with an arrow pointing at the top of the box. A name in brackets is
the source or destination of the Data.
Contract
Service
Data,
different
parts
For composite names may
go
to
llke
different
destinations, as will be shown in lower level diagrams.
Figure time
3.4 :
ordering
order.
2 shows no explicit Data dependency to Justify the
of box 1 followed by boxes 2 and 3
in
This should be queried with the user authority.
indeterminate In this case
the Justification is an interaction with the Customer Site, which can only
be conf~rmed when the two Viewpoints are combined at
the
next
intermediate sub-step.
Looking now at the next level of the Data diagram, it consists of
98
I
,,
, I)
Decision to Subscribe )Open
(.,,Si,gned,,Co,ntract.(Central,,,Statlon),,, (Customer Management) JSubscrip- I
Ition
i
Termination Date is reached
I V
New,,,,Sc,hedule (Customer Management) . I*R . . . . . . Alarm Indication (Environment) Problem Report (Central Star,ion)
2j
I Customer I Contract Service Data ,,I Schedule I JMonitori,n,91
, 31
De,cision to Terminate (Customer Management) I,,
IClose
I Formal Termination Notice ISubscrip- I (Cent'ra'l Station)+(Archive) Ition I
Confirmation of Termination (Central Station) m
Figure 3.4 : 2 Customer Site Procedures
Contract Service IEnter j Schedule(Central,,,,Station)+(Archive).... Data New Schedule (Customer Management) ISchedule J
I
II
I
I
next Schedule tS entered or Termination Date is reached I V Alarm Indication (Envir,onment)....
I'R,
21 Alert,Options
lCustomer I
, ~,
Problem Report (Central Station) .... IPremtses I.Safe Alarm Status JMonitoring I (Central Station)+(Archive) Figure 3.4 : 3 Customer Schedule Monitoring
99
the of
time ordered sequence of Schedule followed by iterated instances Premises
Monitoring
Data.
Is
there
a
corresponding
Action
structure? The answer is yes, as is shown by figure 3.4 : 3.
In
the top segment of box 2 in figure 3.4 :
means that the iteration is re-entrant.
That is,
3,
the letter
"R"
the next iteration
can start before the current iteration has completed. The reason this particular another
iteration is re-entrant is that in
iteration,
internal to this one,
normal
circumstances
can be terminated by
the
entry of the next Schedule.
The There,
remaining vertically
segment
are
selection of
aligned
mutually
boxes
exclusive
with the letter "0" options.
The
3.4
:
4.
in
the
top
Condition
for
the
of each is shown by the Condition line pointing at the top
the box.
CORE
diagrams for this Viewpoint is figure
users,
Minor variations in this notation are adopted
by
some
but there should be no difficulty in interpreting these
other notations.
The below,
diagrams
for the Central Station
Viewpoint
are
presented
as figures 3.4 : 5 to 3.4 : 8. Only one additional comment is
relevant.
In figure 3.4 : 8, box 2 has a temporal peculiarity in its inputs and
outputs.
Problem
The
Report
problem
is sent.
Clearance appears to arrive Where such cases
are
before
the
they
are
noticed,
usually the result of an unnoticed iteration, or of a need to further decompose
For
the
the
Action.
moment,
it
is assumed that
the
peculiarity
is
not
noticed,
because leaving it helps demonstrate in section 3.5 how the
analyses
at the next intermediate sub-step permit detection of
cases.
such
100 I
11 I Safe
)Set
)Alarms I.
1
Alarm,,.Status,,,(Cent,ral Sta,tio,n),+(,,A,rc,h,ive,,).........
I Alarm Status is set or I next Schedule is entered V
I*
21Au,d,,!,O-VisualAlarm (Environment)
~_lCustomer ) Alarm indication {Environment)
lAlarm I IMonitoring I Alert Alarm Status {Central ,,Stat, ion)+(Archlv,e,,,) ....
)
I
Alert Alarm Status is set
I V
Problem Report,,,(Central Statl,,£n)
I'o ....... 3l Clearance (Central Statlon)+(Archive,) )Emergency ) IProceduresl Alarm Call {Emergency $,e,rvices)
I
I
Alert Alarm Status is not set
1 V
I0 . . . .
I
tN.11 l
41
l
I 1
Figure 3.4 : 4 CustomerPremises Monitoring
101
'11
(Customer Site) Signed Contract Schedule (Customer Site) Safe Alarm Status (Customer Site) Alert Alarm S t a t u s (CustomerSite) Clearance (Customer Site) Formal Termination Notice,(Customer Site)
Central
I
I Station
Central Station Data
I
I ProceduresLL
I Figure 3.4 : 5 Top Level Isolated Viewpoint for Central Station
S,i)ned Contract (Customer Site)
I
II
Jlnstall I Confirmation of,,,Subsc,riptlon ISubscriberJ (Customer Management)+(Archlve)
I,
)
Termination Date is reached
I V
Schedule (CustomerSite) Safe Alarm Status (Customer Site) Alert Alarm Status (Customer Site) Clearance (,CustomerSite)
Formal Termination Notice (Customer Site)
I'R JSubscriberJ. Subscriber Service Data JSchedule J JMonltorlngJ
i
i
'I"
31
IDelete I Confirmation of Termination lSubscriber I (Customer Management)+{Archive)
l
m
Figure 3.4 i 6 Central Station Procedures
102
I
Subsrclber Service Data
11
,,,L
L.Stored Sche,du)e (Archive) )Store ISchedule I
Schedule (Customer Site)
I
)
next Stored Schedule is entered or Termination Date is reached
I
V
(Customer Site) 2J Problem Report + (Archive) S~,fe,Alarm,$ta,tus,,,,(.C~stomer S,!t,e,) *R Alert Alarm Status (Customer Site) jSubscrlberL~S,afe State Recoed (Arch|re) I Clearance (Customer Site) .)Premlses I Alert Alarm Record (Archive) ( IMonltoring( ,J
,
i
i
I
i,
. . . . . . .
:-~;
"
I
Figure 3.4 : 7 Subscriber Schedule Monitoring
L
,
I Record' Safe, Alarm Status........I S a f e (Customer Site) IState
I
I( I l,Safe,,State,,Record(Archive,).... I
I Alert Alarm Status is set
I V
)o Alert Alarm Status (Customer Site) Clearance (Customer Site)
2J
I Alarm ) Alert,,,,,A)arm Rec,or,d,,,,,(,,A,rchlve) IMonitoringl Problem Report (Customer Site) I ) + (Archive)
Alert Alarm Status is not set
1 V
1o I INull I
,3J I I 1
Figure 3.4 : 8 Subscriber Premises Monitoring
103
3.5. Action Structuring ( Combined ) 3.5.1
Introduction
This
intermediate
recursive
step.
information integrated
It
sub-step attempts
is the fourth in the to
combine
the
general
isolated
Viewpoint
recorded at the previous intermediate sub-step representation
which
is consistent
with
CORE
into
the
an
isolated
Viewpoint recorded for the parent Viewpoint at the previous recursive level.
The
relationships
sought
are
the
establishing the isolated Viewpoints, Viewpoint boundaries. should
be
no
same
as
those
sought
in
but the analyses now cross the
At the end of this intermediate sub-step there
analytically detectable
inconsistencies
between
or
incompleteness of the Viewpoints being combined.
3.5.2
Strategy
The
approach
used
is to take a known
Data
flow
relationship
between Viewpoints at the current level of recurslon as the basis for a combined chain of Actions. Data
flow,
(which other
may
other be
To the first two Actions and the chosen
known Data flows are added.
The
linked
performed by one of the first two Viewpoints
Viewpoints at the current level of recurslon) are then
preserving
known temporal and control constraints known from
Structuring
(Isolated).
The process is then repeated,
Actions or
by
added, Action
bringing
in
more known Data flows and preserving constraints, until the Viewpoint combination is complete.
Then
the combined Viewpoint representation is compared with
the
104 representation of the parent level Isolated Viewpoint to consistency
of
decomposition,
demonstrate
Data flow and temporal
and
control
constraints between the levels. When
consistency
recursion
is
potential
problems
provided
near
has been demonstrated, completion. of
What
the current
remains
is
to
analyse
reliability or availability of
by the Viewpoints under consideration.
level
the
of for
service
That is one of
the
subjects of the final paper on Environment Requirements.
3.5.3
Prompts
The are
basic ideas behind prompting at t~is
based
difference that
on derivation order and Data flow between
intermediate between
Actions.
The
this stage and Action Structuring (Isolated)
the derivation order information from Data
Action
sub-step
Structuring
(Isolated),
Structuring
whereas at the current
is
drives
stage,
the
driving force is the derivation order between Actions produced during Action Structuring (Isolated).
The main ideas behind prompts based on existing Action derivation order and Data flow relationships are summarised below :
Confirmation of Correspondence Between Data Flow and Time-Order
Two
Actions,
connecting
Data
Data
(le
flow
performed by different Viewpoints,
which
flow normally occur in the order indicated the
producing
Action
occurs
first).
have
a
by
the
There
are
complications to this simple concept (see (d) below), so it has to be confirmed.
Common Condition for Performance of Actions
If
the performance or continued performance (where iteration
involved)
of
two
Actions
performed
by
different
Viewpoints
is is
105 controlled
by
the
same Condition and both appear
after
integrated
Actions
(ie Actions which |lave already
been
into
the
the
same
integrated
chain of Actions under analysis) their performance may
in
practice both be controlled by one test.
Mutually E x c l u s i v e Conditions f o r Performance of A c t i o n s
If
the
occurrence
of
two
Actions
performed
by
different
Viewpoints is controlled by opposite values of the same Condition and both appear after the same integrated Actions,
they may in
practice
be mutually exclusive Actions selected by one test.
Actions which Exchange Data
If
two Actions,
Data for the other,
performed by different Viewpoints,
each derive
there may be a previously unmentioned
iteration
involved (with both feed-forward and feed-back of information) or the real
operation
appears
than
it
It may be necessary
to
one or more of the Actions to demonstrate the validity
of
from either Viewpoint in isolation.
decompose the
of the environment may be more complicated
interaction.
It may also be necessary to decompose the Data
to
demonstrate the validity of the interactions.
Unordered Actions which have a Data Relatlonshlp
If
two Actions,
relationship,
but
performed by different Viewpoints, are
have a Data
agreed by the user authorities to
parallel or at least in an undetermined order,
occur
in
there may either be a
mistake in their joint perception of how the environment operates
or
the
be
Data
long-lived does
not
flow Data,
may be one of several special types - eg it such as exists in a shared library,
care whether the Data changes,
available when required.
may
where a
so long as there
is
user Data
106 In
the
establish
case of special types of Data flow,
it is important
to
the precise nature of the flow - eg must it always be
latest Data which is used?;
FIFO (or LIFO,
are past values queued and if so,
etc.) selection policy used?;
the is
a
what happens to "lost"
Data flows?
Temporal Order with no corresponding Data or Control Relationship
If,
in
combining Viewpoints,
two Actions are integrated into a
chain of Actions in a particular time order, flow
relationship
probably
a
Data
relationship heading the
of
fact
applied
has or
been
but no Data or
stated between
control flow missing
does not really exist).
them, (or
then
the
control there
time
This was discussed
ordering under
Action Structuring (Isolated) and is an i11ustratlon that all the analyses performed at that stage can
at
this stage with a widened scope (le
is
crossing
be
the of re-
Viewpoint
boundaries).
3.5.4
Analyses
Examples
of
analyses aimed at detecting
incompletlon
at
this
intermediate sub-step ace suggested in the previous section. Analyses for
peculiar or dubious Action relationships can be divided into two
types
:
those
which
are also applied
and
those
which seek to detect
(Isolated) Actions,
Data
flows,
proposed
system,
etc.
either
in
during the
Action need
Structuring for
the environment or
special in
the
to ensure continued and reliable provision of
the
service the system is to support.
The latter
former types of analyses are not re-described here are
considered
so
important and are
normally
and so
the
poorly
covered in Requirement Specifications, that they are the subject of a separate recursive
intermediate step.
sub-step
in CORE,
the last
for
each
CORE
Those analyses are one of the subjects of the
last
107
paper on Environment Specification.
Hence,
for the present paper, no special analyses are described.
What must be emphasised, however, is that the analyses for hierarchic coverage
between
demonstrate
the parent Viewpoint and the
complete
coverage,
both upward
current and
downward,
proceeding to the rellabillty/availability analyses. there
level
must before
If they do not,
is a danger of some reliability measures being missed and some
being mentioned twice (or two types of measure to deal with the
same
problem).
3.5.5
Tactical Issues
In
practice there may be recorded inconsistencies and
omissions
and
there may be omissions arising from systematic failure to detect
any
pointers
to
information,
the
missing
premature
information.
There
for the current level of
may
also
Viewpoints,
be which
indicates that there is more to be said at a lower level.
Only
the
omission
analyst's
experience can
of pointers to vital information.
reduce the chances of such omissions, all
links
However, receive
defend
between it
a
is
against
systematic
The CORE prompts greatly
because they gradually
known elements of interest in
still possible that the user
the
expose
environment.
authority
may
never
prompt for some information and may assume that the
need
for it is self-evldent.
Hence, CORE
it
is important that the analyst should never apply
techniques as a mindless ritual.
systematic
omission
less
probable
Progress will be if the
analyst
faster
makes
use
the and of
experience and common sense as the techniques are applied.
The
analyses
differences
performed at this stage are quite llkely
of interpretation of how the environment
to
show
behaves.
This
108 should
first be
queried with the differing user authorities but
in
the event of unresolved disagreements, it is not the analyst's Job to referee. The
customer
between
user
authority must deal with unresolved
authorities,
though the analyst may
disagreements
reasonably
make
recommendations or at least indicate the consequences of deciding
in
favour of each option.
Another possible are
differences
example,
happen
it
source of d i f f e r e n c e s ,
of i n t e r p r e t a t i o n
is
quite
i s the chance t h a t
between
Viewpoint
common f o r d e p a r t m e n t h e a d s t o
there
levels. think
For things
one way (according to "the book") while the department
staff
actually do things another way (eg because "the book" way is wrong or too
inefficient in practice).
Again, authority
the
relevant user authorities and possibly the
customer
will be needed to rule on which version is to be supported
by the proposed system.
This too will cause re-work, perhaps back at
previous recursive levels.
Where error, the
the
there
error
manuals. must not
user authority agrees that what he/she
said
was
need be no recourse to the customer authority,
is
embedded in the
customer
organlsatlon's
If "the book" way is indeed wrong,
unless
procedures
the customer
authority
be asked for a ruling on how the case is to be treated. normally
customer
It
within the analyst's area of authority to rewrite
organisation's
procedures
manuals
in
without
is the
explicit
agreement.
In
general,
re-work with
of previous intermediate sub-steps.
to
The problems associated
re-work are particularly acute if use is made
notations, even
resolution of the differences will usually lead
of
diagrammatic
such as the CORE notation, without automated support. For
quite small systems,
diagrammatic re-work can consume a
large
109
proportion avoid
of
using
without
the project schedule. diagrams
completely,
automated support,
It is usually unacceptable but major
dependence
on
may well escalate the cost of
to
them,
producing
the Environment Requirement.
One type of problem arises because of a facility permitted in use of
the
CORE
presentation judged
to
diagrammatic of
be
notation.
In
order
to
permit
the Environment Requirement Viewpoints appropriate to various audiences,
CORE
at
the
a
rate
permits
the
definition of "cosmetic" Actions. These are Actions which are defined solely
to reduce the complexity of any one level of
Action
diagram
complexity.
A
cosmetic
diagram,
Action is simply a collection of Actions on
a
CORE
replaced by one single named Action with inputs and outputs
consistent with those of the Actions contained. The reasons and rules for use of such Actions are not covered here,
but it is important to
remember t h a t
it will complicate t h e
if such Actions are introduced,
process of establishing consistency between levels.
Whether subjective
and
when
Judgement,
to
use
cosmetic Actions
weighing up the benefits in
is
a
matter
for
controlling
tile
complexity of presentation against the complexity of analysis.
3.5.6
Use of Action Structuring (Combined) Information
Action
Structuring
(Combined) information is used in the
final
intermediate sub-step of the general CORE recursive step, where it is assessed
for potential
problems of reliability and availabflity
of
the service provided by the combined Viewpoints.
As (with when
with the
the products of all the
other
intermediate
possible exception of the Information Gathering
CORE is applied manually) the information recorded is
sub-steps products part
of
110 the
eventual
Environment
Requirement~
which
development of the System Requirement and~
is
used
to
aid
possibly, of user manuals
for the proposed system.
3.5.7
Example
The
combination
Viewpoints
of
the
Customer
Site
and
Central
is presented here in the order £t would be
Station
presented
to
readers after the exercise is complete. Hence, figures 3.5 : I to 3.5 : 4 would normally be presented and described in that order.
The
process of deriving the diagrams most profltably starts
lowest
up
presented figure There
the
level of the Isolated Viewpoint diagrams (le at figures 3.4 :
4 and 3.4 : works
at
8 in the previous paper on Environment Requirements) and
to
the
top.
The order of
derivation
of
here was thus the reverse of the order of
3.5 :
4 was derived first~
the
presentation
then figure 3.5 :
were iterations in the process,
diagrams
3 and so
so that some of the
on.
diagrams
were re-drawn several times, as later diagrams showed the need.
Figure 3.5 : 1 shows a few interesting points. First, there is an additional notational convention used in Combined diagrams.
An arrow
pointing at the lower face of an Action box is labelled with the name of the Viewpoint which performs it. If no such arrow appears then the Action level
is of
corollary
performed by a combination of Viewpoints at interest
and thus
requires
further
the
current
decomposition.
is that if the arrow does appear then the Action
The
requires
no further decomposition at the current level.
llence,
in
figure
Site,
i the Action
"Open
the Action
"Install
Subscription"
is
Subscriber"
is
performed
by
performed
by Central Station and the Action "Schedule Monltoring" is
performed
by
3.5:2.
Customer
3.5 :
a combination of both,
and is
decomposed
in
figure
111
I] Signed Decision to ( ],,Contract (Archive) Subscribe ]Open (Customer ISubscrJp- J )
[
Management) Ition
I
Customer Site
I I I I
21
.t_)Install I,,Confirmationof Subscrlp)Ipn,(A£chiv@),, )Subscriber(
)
) ] Central Station
Termination Date is
reached
I V
3]
Safe Alarm Status (Archi,,ve,)....... Safe Alarm Record (Archive) Alert Alarm Status (Archive) Alert Alarm Record (A,K~,,hlve) Problem Report ( A r c h i v e ) Clearance (Archive) Alarm Call (Emergency Services) Schedule (Archive) Stored Schedule (Archive) ,,[ Audio-Visual Alarm (Environment)
]*R
I I New Schedule (Customer Management),,,] Schedule Monitoring Alarm Indication (Environment)
41
.....
Decision to Terminate (Customer Management)
I ( Formal )) 41] Termination ))Close ].Notice ))Subscrlp__I J )]tion,,, J J
I
Customer Site
(Archive)
I
]
I I
i__Delete
421 (CustomerManagement)+(Archive) 14Confirmation of Termination
(Subscriber((
I
.....II
Central J Station I
I
,Su,bscriber Deletion Figure 3.5 : I
Alarm Procedures
................ j
112 A
second point of interest is the Action "Schedule
It is an iterated Action involving both Viewpoints. of
Monitoring ~'.
It is an example
the kind of Action whose parts (ie the sub-Actlons
the individual Viewpoints) are often
performed
by
referred to by the same name by
both individual Viewpoints.
Versioning
or
name qualification would be necessary to
the various meanings.
distinguish
In this example name qualifiers have been used
(Customer is a qualifier meaning the Action is that performed at
the
Customer Site, Subscriber means that it is performed for the Customer Site by the Central Station and no qualifier means it is the combined Action of both Viewpoints).
A 4,
third point of interest in figure 3.5 : which
contains
decomposition case,
the
of
other
boxes.
This
is
a box without going to another
an
example
diagram.
In
Combined Action "Subscriber Deletion" consists of
Subscription" Subscriber"
two
i is the box labelled
performed
by
Customer
Site
performed by Central Station.
followed
by
of this
"Close "Delete
It was judged to be
most
sensible to show the decomposition on the same diagram as its parent.
Whether this
paper.
the
judgement was right is not a matter of concern
It is simply included to show that such
for
dec~mpositlons
can be done. They frequently are done as the diagrams are being built and discussed with user authorities. They should be used sparingly in the final product,
as tile resulting diagrams can be quite complex to
draw and to interpret.
The
fourth and final point of interest here is the absence of
Data flow justifying the temporal order between "Install and the subsequent Actions.
This should be queried.
such cases in the remaining figures.
This paper does
resolution of the cases detectable in the example.
a
Subscriber"
There are other not
address the
113 3.5
Figure
:
2
represents
the
decomposition
of
"Schedule
Monitoring", It contains one composite Action, "Premises Monitoring", which is a re-entrant iteration and is decomposed in figure 3.5 : 3. Figure
3.5
:
3 contains two Actions ("Record Safe
"Customer
Alarm
Viewpoints
and have no ordering relationship between them.
information
Monitoring")
which
was
not
which
evident
are
from
performed
State"
the
by
and
different
Isolated
This
is
Viewpoint
diagrams. It was deduced as the diagrams were combined.
In figure 3.5 : instance
of
Viewpoints
3 tlle composite Action,
"Alarm Handling" is
the combination of selections in each of
the
an
Isolated
into a single selection in the Combined Viewpoints.
This
composite Action is decomposed in figure 3.5 : 4.
The
final
remembered pointed
point of interest is in figure 3.5 :
that in the previous paper,
out
a temporal
4.
It
may
peculiarity
in relation to the Action "Alarm Monitoring" in
be was
figure
3.4 : 8. The Clearance appears to arrive before the Problem Report is sent.
When a t t e m p t i n g t o combine t h e two V i e w p o i n t s , apparent
need
interaction (figures
for
an
between
explicit
"Alarm M o n i t o r i n g " and
3 . 4 : 8 and 3 . 4 : 4 ) .
"Clearance"
flows
backward
flow
this in
shows as t h e
time
"Emergency
for
Procedures"
I f "Alarm M o n i t o r i n g " o c c u r s f i r s t
backwards in time and if
"Emergency
the
then
Procedures"
occurs first then "Problem Report" flows backwards in time.
The r e s o l u t i o n iteration, the
o f such a n o m a l i e s i s n o r m a l l y e i t h e r
w i t h one o f t h e Data f l o w s b e i n g f e e d b a c k t o t h e s t a r t
next iteration,
o r t h e d e c o m p o s i t i o n o f A c t i o n s a n d / o r Data
d e m o n s t r a t e an a d d i t i o n a l Isolated
m e n t i o n o f an
Viewpoints.
tepmoral interaction
The l a t t e r
to
not discovered for the
is the case in
A c t i o n "Alarm H o n i t o r i n g " must be s p l i t
of
this
example.
The
i n t o t h e p a r t which sends t h e
" P r o b l e m R e p o r t " and t h e p a r t which "Waits f o r C l e a r a n c e " . Tile l a t t e r
114 )
....
zl
.IEnter ) Schedu,)e,,(Arch,,ly,e)., New Schedule (Customer Management) JSchedule I
I
I
l
Customer Site
J. . . . .
2J
__]Store I Stored Schedule (Archive), ISchedule I
l
i
)
Central Station
Next Schedule is entered or I Termination Date is reached V
$,a,feAlarm,Status *R ...........3 i...... Premises Alarm Indication (Environment)
(,,Archlve) ...S,a,f,e ...... Alarm Record (Archive) Alert Alarm Status "('A'rchive)
iiil,',",'ilX"yert Alarm Reco,,,,(Archive> Monitoring ! ....P,,roblem Report (A,,r,c,h,l,ve) Clearance (Archive) Audio-Visual Alarm (Environment)
Figure 3.5 : 2 ScheduleMonitoring
115
i ISet lAlarms ! I
11 I Safe,Alar~ Status (Archive)
I I
Customer Site
I ) I
,
,,,
,,
,,
,,,
.L_IRecord
ISafe ,l,S,t,ate, I
,
I Safe State Record (Arc,hive,)..........
I )
Central Station Alarm Status is set or J next Schedule is entered V
),*,q...........
3( Audio-Visual Alarm (Environment)
Alarm Indication
]Customer I
(Environment)
I Alarm I Alert ,A,],,a,rm,Status (Arch,,Ive) ' JMonitoringl Alert Alarm Status Is set l Customer Site
(Archive) ,,,
,,,4[Alert Alarm Reco,rd Io IAlarm (,Problem Report (Ar~ive) IHandling J,,,,,Clearance(Arc,'hlve) _
I
J Alarm Call,(Emer)e~ Services) Alert Alarm Status is not set
Io I INull 1.... Figure 3.5 : 3 Premises Monitoring
sl I 1 1
116 II Alert Alarm Record (Arc,hlve) , Alert Alarm Status ,lNoify
I
jSub'scrtberl Problem Report
J.Contact,
(Archive)
t
)
(
1
Central
I
Statlon
I ....
21 Alarm Call (Emergency Servfces)
~ IEmergency I IProcedures[ C,lea,rance .... (Arch,l,ve)
I
Customer Site Clearance is received
I V
I* lwai't
31 I I
I for
IC,lea~a,rice
I
Central Station Figure 3,5 : 4 Alarm Handling
is
just
an Idle loop (as far as current analyses ),ave shown)
which
terminates as soon as the Customer Site issues the "Clearance".
Note of
the
that idle
Monitoring", In
this case,
the "Clearance"
is just
l o o p and a r g u a b l y in the sense
is
a control
not really
of being used within
on t h e an
input
continuation to
"Alarm
"Wait for Clearance".
"Alarm Monitorlng" is a potential source of confusion
when using the notation described here. notatlon~ not of the analyses.
This is a deficiency of
the
117
3.6. Completion 3.6.1 Introduction
This
final paper on the Environment Requirement covers the final
intermediate sub-step of the general CORE recursive step,
the
final
step of the overall CORE approach and the llnk to System Requirement.
The final intermediate sub-step is one which deals with potential problems
with the reliability and availability of the service to
supported
by
the
modifications
in
identification
Until
the
additional
proposed the
of
system.
Note
that
it
behaviour of the environment
additional requirements on the
may
lead
and/or
to
proposed
lowest level of recurslon the decision on
to the
system.
where
the
measures are to be implemented (in the environment or
the system) is left open.
be
in
At the lowest level the relevant decisions
are made.
The
final
relatively agreed the
step
trivial
of
the overall CORE approach
process of demonstration of
deals
with
the
of
the
completion
scope of tlle task of producing an Environment Requirement and
more
complex process of dealing
with
additional
information,
recorded but beyond the originally agreed scope.
Linking the
to the System Requirement deals with demonstrating
information
contained in the Environment can be used
development
of
Requirement
covers
to
the System Requirement and that the eventual all
the Environment Requirements
consistent with the required Actions, their valid operation.
in
that
a
guide System manner
Data flows and Conditions
for
118 3 . 6 , 2 Completion of a Recursive Step
Strategy
The process
which may l e a d t o t h e i n t r o d u c t i o n
Conditions lead
analysis
final recursive sub-step is primarily a subjective
to
and
of Actions,
Events not previously identified.
Data
flows,
This in turn
re-work of previous intermediate sub-steps at
the
may
current
level of recursion. Occasionally it may lead to re-work of the higher level of recursion.
The basic strategy is to investigate each Action, Condition leading
Data flow
problem
to discover whether anything about it may cause a to
or failure to provide the
break-d~wn
and
required
service
then an acceptable means of
dealing
within defined constraints. If a problem is discovered, with
it is sought.
techniques
or
additional
This might involve use of preferred
modification
requirements
Alternatively,
it
of the environment or to
might
prevent involve
the
development
introduction
problem
introduction
of
occurring. additional
requirements to detect and possibly recover from the problem when does
occur.
schedule
In
practice
limitations
there is no reason other
than
why a combination of such measures
of
cost
it and
should
be
excluded.
Prompts
The prompts used at this stage are based on a list of things that generally could go wrong with Actions,
Data flows and Conditions and
a llst of possible techniques for handling such problems.
For a
number
illustrate
each of
Action,
tile
possibilities.
the intent
user
authority
is
A few e x a m p l e s a r e
of the q u e s t i o n i n g .
questioned included
about
here
to
119 . If
iteration
is
involved,
could
there
be
convergence
problems or error build-up?
• What
would happen if inputs were in error or out of expected
range?
• If
several Viewpoints communicate with one Action
by
another
Viewpoint,
could there be
performed
contentlon/deadlock
problems?
• What happens if the mechanism (Viewpoint) which performs
the
Action breaks down or becomes overloaded?
• Could
its
outputs
be out of range for
Actions
which
use
interference
in
them, or could they be corrupted in transmission?
• Is
there
performance
a
danger
of
the
of
unauthorlsed
Action and if so,
what
would
be
the
result?
. Could i t
For
each
be i n v o k e d by an u n a u t h o r i s e d
Data
flow,
agent
the user authority
is
(Viewpoint)?
questioned
about
possibilities such as :
• Could it be inaccurate or out of bounds?
. Could it be corrupted in transmission?
. Could
it
cause
any
receiving Action
to
be
unstable
in
operation?
• If
the Data is iterated,
could there be too many
or could it take too long to process them all?
instances
120
. Could it be subject to unauthorlsed access or modification?
For Conditions, the tests on Data evaluated for the Condition are much the same as for Data flows. Other possibilities exist, such as :
• Could the condition be evaluated incorrectly?
. What
happens
if the Condition changes while
an
Action
it
controls is in progress?
• Is
there
any
selection
not
exhaustively
covered
by
Conditions? (eg if P>Q do A if P
llaving discovered the existence of a problem, is
not
dealing
necessarily with
it.
going to be able to identify the The
reliability
change
expensive,
high
the user authority
choice
of
may
procedures
reliability
be
between
in the
a
best low
way
cost,
of low
environment
or
use
of
techniques
or
use
of
development
expensive, high reliabilty design constraints.
The
analyst
may prompt on possible measures to
deal
with
the
problem. Examples of measures which might be suggested are :
. Use
of
formal design and implementation techniques for
all
or selected parts of the development process
. Use
of
sampling techniques in a
manually
applied
quality
control process when the system is operating
• Use
of replication either in the environment (eg two
monitoring equipment) or in the proposed constraints
system
(eg
people design
demanding equipment replication) or in both
dual key control)
(eg
121
. Replication of Data or of communications channels
. Use
of
handshaking, encryption,
checksumming, etc.
. Use of fault tolerance techniques (eg input checks,
recovery
measures)
• Use
of
limiters
constraints
(either
hardware
or
software
or manual checking and emergency
design
procedures
in
the environment)
. Use of filtering techniques (eg to reduce the volume of
Data
transfers)
. Use
of
priority
proposed
system
techniques (eg
to
in
the
provide
environment
reduced
or
service
the
during
peak load periods)
The full list of prompts is dependent on the experience put producing
the CORE guidelines and on the experience of the
applying CORE.
into
analysts
This is an instance of the need for analysts to
make
use of their own experience rather than relying just on CORE.
A each
final form of prompt is for the cost of failure to
with
problem and the amount the customer is prepared to spend on its
avoidance. risk
deal
This
evaluations
may involve helping the customer authority and
cost/benefit
analyses.
CORE
perform
provides
no
guidelines in thls area, other than that it should be done.
Analyses CORE analyses at this stage are fairly simple, though tedious. It must
be
considered
demonstrated that each Action, from
the point of view of
Data flow,
etc.
has
reliability/availability
been and
122
that
for each problem identified a decision has been made on how
to
d e a l with it.
There remains the customer organisation's analysis of the current Viewpoint analyst,
level.
but to the customer authority.
authority hands
}low this is done is not up to
reviews
the current level representation
customer
to
the
personally, or accepts
with the analysts as the representation
calls in independent reviewers.
or
It may be that the customer
it over to the user authorities for review,
agreement
the
CORE,
is
or
their
produced,
or
CORE does not give guidelines on how
authority gains sufficient confidence to sign off
the
current level of representation.
Tactical
Issues
Huch of the information gathered for the purposes of reliability/ availability
analysis consists of definitions of
constraints.
does not demand the mention of literal constraints (eg. must complete within 5 msec."). "5
requirement.
numbers
in
constant
Requirement
is
5
is
though
it is common
Specifications,
for example,
XYZ
rather than to
include
the design nature
an such
of
illustrated by the fact that it is rarely true
response time of, number
Even
"Action
The use of literal constants such as
msec." is almost invariably a design constraint,
absolute
CORE
the
that
a
5.00001 msec. would be damaging. The
chosen because it is a "round"
number
and
therefore
easier to remember.
In
CORE
constraints
Environment such
Requirements,
it
is
encouraged
as response times are expressed as parameters
that and
the demanded literal constants should be attached to the parameter in an
appendix to the main requirement.
For example,
in the
case
of
"Action XYZ" above, the requirement is that "Action XYZ must complete within
XYZ-Time-Limit" and in an appendix,
Limit = 5 msec." would appear.
the statement "XYZ-Time-
t23 The
benefit of this approach is that "XYZ-Time-Limit"
likely later
is
quite
to be referenced from several places in the requirement and a change of mind (eg to 6 msec,) requires a change only
in
one
place. If the literal constant is embedded in the main requirement at each point of reference,
it must be changed at each point. Moreover,
if 5 msec. is a design constraint on more than one Action, the change cannot be a simple global edit of 5 msec. to 6 msec., because the new value does not necessarily apply to the other Actions.
Where similar
possible, manner.
absolute
all
The
design
constraints are dealt
with
in
main body of the specification deals with
requirement
and references ai~ appendix
for
the
a the
demanded
design constraints.
One problem analysts sometimes suffer from is over-zealousness in pursuing
reliability
in
some areas.
It must be
remembered
that,
having found a problem, a valid decision on how to deal with it is to ignore it.
The customer is entitled to require an unreliable system,
provided that the decision is recorded by the analyst and approved by the customer authority.
This mind.
leads
to another issue which the analyst
should
bear
in
The normal user authorities, particularly if they are later to
become
actual users of the system,
efficient,
easy
suggestions
to
use
system.
for their solution,
will always opt for a Hence,
faced with
there will be a
reliable,
problems
predisposition
and to
select the suggestion ~lich fits these goals best.
The
problem
constrained of
the
customer problem of
is
that the user authorities
directly by consideration of cost.
customer authority. authority
are
frequently
not
That is the business
The analyst should always
before introducing any measure to
consult cope
which would cause a change in the organisation or
with
the a
behavlour
the environment or which would significantly increase the cost of
124 the
proposed system.
There is,
of course an element of subjectivity
in what constitutes a significant increase in cost. to
agree a figure a t
the Start-Up step,
It might be best
or to consult the
customer
authority about every rellabillty/ availability decision.
One CORE
[inal issue to be resolved in the practical
is
application
the contractual arrangement for approving or rejecting
products
of
any level of recursion.
The things that must
the
be
determined (preferably at Start-Up) are the form of expression
of
prewhich
will be "signed off" by the customer authority, the time within which problems which
will be reported by the customer authority and the form
problems
must
be reported in order to be dealt with
in
by
the
signing-off,
the
analyst.
For
example,
if
there is no
timescale
for
analyst's schedule may be put at risk by continuing to the next level without
approval.
If
there
expression of the requirement, the
form
This
is
no
agreed
form
information
lead
to
according
rejected
with
rubbish"
or
major
re-work just
to
to a different standard.
not how things happen",
Actions,
that
rejection
will
flows,
etc.,
Data
be
specific,
which
are not
audience.
re-present
the
If the
product
the
tellable means of improving it on a second pass. agreed
intended
dramatic but meaningless comments such as "That's
for
it is always open to question whether
actually used is "reasonable" for the
could
(standard)
same
"It's
analyst
is all
has
no
llence, it should be
indicating correctly
particular decomposed,
constrained, etc.
Example The
example
developed
in t h e
previous
papers
on
Environment
Requirements contain a large number of potential problem areas
which
should really be considered. In this Course there is time to indicate only a few examples.
t25
First,
consider
happens
figure
3.5 ~
I in the
previous
paper.
What
if the Customer Site issues a Formal Termination Notice with
a Termination Date which is at or before the current date?
It may be
impossible to avoid some unwanted alarm processing if such a date
is
entered. Should there be a minimum notice period? Should the proposed system
be
involved in assisting checks on adherance to the
notice
requirements?
If so,
how is it to know what is the
minimum current
date?
Next,
look at figure 3.5 :
2. What happens if the Customer Site
issues an incorrect Schedule? Clearly there are likely to be a number of false alarms which may divert the Central Station's attention away from
genuine
Schedule
alarms.
Should
semantic checks be
before it is transmitted?
premature
information
decomposed
at
later
to
If so,
that will be
be looked at when the
Viewpoint levels.
required
the
stored
as
Site
is
acceptable
to
Customer
Would it be
on
require double entry of a Schedule to trap careless typing errors? If so the "Enter Schedule" Action should be iterated.
Next, look at figure 3.5 ; 3. What happens if one of the Customer Site's
Local Alarm Systems develops a fault and keeps indicating
an
alarm?
What
be
if the fault is cyclic?
The Central Station
could
overloaded by false alarm indications. What happens when the Customer Site is opening or closing?
There nay be temporary alarm indications
each time this happens.
What 9.00,
happens if several hundred Customer Sites regularly open at
but
others
distinguish between
8.50
intelligence
open
at 9.30?
How is
the
Central
Station
to
the temporary false alarms from the occasional real ones and 9.30? to
The answer is probably
to
introduce
tile Customer Site "Alarm Monitoring",
so
that
some it
inhibits alarm outputs ten minutes either side of opening and closing hours
- but that is a gift to an enterprising burglar and a disaster
if a fire starts during the dead period.
126 Finally,
look
at figure 3.5 =
4.
What happens if the
Central
Station fails to spot an Alert Alarm Status transmission? Clearly, it might fail to issue a Problem Report and hence fail in its obligation to
the
Customer
introduced,
Site.
Some
form
of
and if it is not received,
acknowlwdgement
should
be
the Customer Site should re-
transmit the Alert Alarm Status.
What if tlle Central Station notices tne Alert Alarm forgets
to
Contact
for
burglary
issue a Problem Report, the Customer Site?
or fire,
Status,
or cannot contact the
In such cases,
Customer
in the event
how can the distinction be made
but
between
of
a
Central
Station negligence and Customer Contact negligence?
What
if
the
Customer Contact?
Central Station takes a long time
to
notify
the
What constitutes too long? ~lat happens to prevent
notification taking too long?
Clearly, here. be
the
list of possible problems is longer than is
shown
What is evident is that problems can and should systematically
sought and dealt with.
measures lower
They should be the subject of
additional
at the current level or postponed for reconsideration at
level (ie marked as premature) or occasioally referred back to
an earlier level or rejected as too improbable or not worth the of
a
protecting
problem
and
against. the
Whatever happens,
decision
made should be
the possibility recorded
cost
of
the
somewhere
and
referenced to any measures introduced to deal with the problem.
3.6°3 Completion of Environment Requirement
After analysis Start-Up.
p e r f o r m a n c e o f each a g r e e d l e v e l o f r e c u r s i o n i n t h e process,
CORE
t h e a n a l y s t w i l l have c o m p l e t e d th'e t a s k a g r e e d a t
Each Viewpoint in the agreed Viewpoint llierarchy will have
been analysed to a level agreed by the customer to the initial plans,
authority.
Relative
the task is now complete. The situation is not
127 that
simple!
The the
lowest
Also, in
typical situation will be that, agreed level,
in spite of having analysed
there is still
"premature"
information.
there will usually be information which could not be
the
timescales originally planned and which is now
missing.
There
will
be
re-work in progress
for
recorded
previous
because of agreed mistakes discovered at later levels. may
be
supplied
whole new Viewpoint structures discovered to
as
levels
Finally there be
important,
even though they were excluded at the Start-Up stage°
What
actually
happens
at
this point may be
determined
mixture of factors such as contractual constraints~
by
a
current level of
spend relative to budget, availability of staff and desire for future goodwill
from
contracts). such
the
customer
organ|sat|on
(eg.
to
get
future
CORE cannot provide general guidelines on how to
situations.
They
are
a
matter
for
individual
handle
project
or
organisation strategy and tactics, rather than technical issues.
Contractually,
as soon as the lowest level of Viewpoint has been
represented and signed off and all re-work contractually required has been agreed and signed off,
the task is complete.
Technically,
important Viewpoints should be analysed and represented, completed
all re-work
and all omissions and inconsistencies removed.
That being
practically
improbable,
requirement
is one in which everything which could be represented in
the
CORE recommends instead that
all
agreed schedule is represented and any
the
analytically
complete
detectable
omissions or inconsistencies are detected and recorded.
3.6.4 Linking to System Requirement
The
most
common
application of CORE is to take
the
Viewpoint
llierarchy clown to tile point at which tile proposed system appears as a Viewpoint.
Then
tlle system Viewpoint is in
effect
a
provisional
128 System Requirement. Mapping between the CORE system Viewpoint and the eventual System Requirement is then relatively straightforward.
The
CORE
Actions
system
Viewpoint
identifies Actions
and
chains
which must be performed by the proposed system.
Actions
are
not
normally
expressed
as
algorithms
environment forces some algorithmic constraint. usually
in
flows.
though,
system
unless
the
Such constraints are
the form of Action chains with necessary
Generally
The
of
internal
Data
the CORE expression can be treated
as
a
stimulus/response definition of the required system Actions, together with constraints on their occurrence.
Constraints in
on the occurrence of Actions are normally
expressed
the form of a series of layers of Conditions extractable from the
various
levels
Requirement. notations
A
for
applications
by
Viewpoint
representation
in
the
Environment
d a n g e r i n h e r a n t i n t h e use o f p r o c e d u r a l l y Requirement S p e c i f i c a t i o n
by
Requirement, limited
of
recognising
extracting the e x t r a c t e d
the
that
for
oriented
can be c o n t r o l l e d the
purposes
s t i m u l u s / r e s p o n s e view
for
of of
CORE System
Actions,
Conditions permits the expression
of
the
System R e q u i r e m e n t w i t h o u t f o r c i n g t h e a p p e a r a n c e o f a l g o r i t h m i c
(ie.
design oriented) specifications.
This of
i s not to a s s e r t
any v a l u e .
purposes
of
that algorithmic specifications
I f such e x p r e s s i o n s a r e deemed u s e f u l
are
(eg.
s i m u l a t i o n of proposed system + environment
never
for
the
behaviour)
the original CORE representations still exist to assist in that area. They
would
certainly
require
supplementing
by
more
detailed
algorithms than are normally available from CORE analyses.
Either System
a t tile end o f t h e CORE a p p l i c a t i o n
Requirement a p p l i c a t i o n ,
or at the start
some d e c i s i o n s must be
which o f t h e C o n d i t i o n s c o n t r o l l i n g
made
of the about
t h e p e r f o r m a n c e o f A c t i o n s by t h e
p r o p o s e d s y s t e m a r e t o be m o n i t o r e d by t h e s y s t e m i t s e l f .
These w i l l
129 require
explicit
representation
in terms o~
Data
(perhaps via external sensor inputs) to the system. are
not
to
be monitored by the system must
entities
known
Conditions which
appear
as
procedural
checks in tile relevant user manuals.
Special the
information
development
carried over from application of CORE
of the System Requirement is that
which
design constraints and preferred development policies. form
of
expresses
A
design constraint is any premature information
into
particular left
after
analysis of the lowest level of the CORE Viewpoint Hierarchy. This is by
nature
unstructured and may either be structured
Requirement
or
carried
design policies.
during
over as an unstructured list
of
System
preferred
The particular policy adopted is a matter of System
Requirement tactics.
3.6.5
Conclusions
The
description of the process of producing an
attempted
Environment
has
to demonstrate systematic ways of extracting and analysing
information
about aspects of the environment to be supported by
the
proposed system.
It is advisable a n d possible to establish a strategy for analysis and
tactics
strategy
for
and
control of
tactics
perturbations
should make use of
to
the
strategy.
The
analytic
and
prompting,
psychological techniques to achieve maximum quality of
specification
and responsible attitudes through clear definition of responsibilties and
accountability
possible
the
for
techniques
decisions or lack of them. used should be well defined
As
far and
as
is
easy
to
apply.
It which can
is
advisable and probably possible to use a simple
requires little training of the user community and aid
notation yet
analysis and demonstrate the existence of problems and
which the
130 need for decisions.
The notation should support the use of prompting
techniques.
The selected notation should be capable of transformation into more
formally
interpret reverse
defined notation which might require more
than
are normally available in the
transformation
should
be
possible~
user
skills
community.
though it
is
a to The
to
be
expected that the more formal notation would contain greater and more precise
expressive
notation,
so
power
than
would be
possible
in
the reverse transformation would involve
the a
simple
filtering
~peratlon.
Use of tool support for promptinz, control
analysis, expression, quality
and achievement of accountability is valuable for any system
and probab]y essential for large systems or systems with a high
cost
of failure.
The
CORE a p p r o a c h
many o f t h e s e perfect
areas
answer
Requirement, systematically
but
is
an e x a m p l e o f one w h i c h a t t e m p t s
and i s e v o l v i n g
to it
the
to address
problems
of
d o e s show t h a t
than analysts
often
producing
the task
think.
them all. an
to address It
is
not a
Environment
c a n be p e r f o r m e d
more
Chapter
4
A Graph Model Based Approaeh to Speeifieations This chapter presents an approach for
defining
the many levels
of
specifications of a d i s t r i b u t e d system which is based on a graph model for representing the decomposition of functions.
The previous chapter focused
on the procedures for systematically c l a r i f y i n g the i n i t i a l
poorly formu-
lated concerns and goals of a system into a more precise d e f i n i t i o n of the system requirements. Although a method of representing this level of requirements was used to i l l u s t r a t e the procedures, the procedures are general enough to work with many d i f f e r e n t representation techniques. The focus of t h i s chapter is the d e f i n i t i o n c i s e l y defining
required system level
of an approach for pre-
characteristics,
then decomposing
these requirements down to the specification of the units of code in the selected programming language.
The underlying problem addressed is the
i d e n t i f i c a t i o n of a unified model for representing all of the intermediate levels of requirements and design which preserves the properties specified at the system level.
Of p a r t i c u l a r
interest is the specification of the
allowed concurrency of system functions,
for i t
is t h i s
allowed concur-
rency which is exploited by a distributed processor. Section
4.1
presents
the graph model
remainder of the chapter is based.
foundations
on which the
Section 4.2 presents an overview of a
method for developing system level requirements based on the graph model. Section 4.3 describes the process of further ments down to the f i n i t e
state machine l e v e l l .
decomposing these requireSection 4.4 presents an
overview of the problems to be addressed in the design of a distributed processor to s a t i s f y these requirements.
Section 4.5 defines an approach
for t r a n s i t i o n i n g the requirements into a d i s t r i b u t e d design.
132
4.1. The Graph Model of Decomposition This section presents a graph model based approach for representing the concepts of decomposition, allocation, interface design, and exception handling in a way which defines and preserves system level requirements for
sequencing and concurrency of system functions, their
their outputs.
inputs, and
A way to incorporate these concepts into a language for
expressing system requirements, and checking them for consistency is presented. This will provide the foundation for defining a Systems Requirements Engineering Methodology presented in the next section.
4.1.1
The Concept of Decomposition
The purpose of the Graph Model of Decomposition is to provide a quasiformal definition of the conditions for decomposing a function structure of lower level functions.
into a
Previous requirements representation
techniques which used the concept of decomposition have failed to capture simultaneously the characteristics of preserving input/output concurrency and structure, of preserving the c r i t e r i a for completion of a function, and of preserving performance traceability and invariants of the transformations.
An overview of how the Graph Model of Decomposition does this is
presented in the following section; for details, see [Alford 79a]. First
for
background, a system function
is
defined
as required
transformation of inputs into outputs lasting over an interval
of time
which ceases i t s operation when one of its completion c r i t e r i a is satisfied.
We use the term "Item" to indicate a generic unit of input to or
output from a function.
An item may contain several concurrent subsequen-
ces of lower level items which occur over an interval of time.
A comple-
tion criterion is a Boolean condition on the input which defines a reason for exiting a function; a function may have several completion c r i t e r i a , and the next function to be perform usually depends on which completion criterion was used to exit the function.
One may which to define the
transformation in terms of preserving some specific invariants (e.g., for each element input,
an output will
be produced).
To support top-down
performance decomposition, we attach to the function a set of performance indices (e.g., accuracy, timing, etc.) which measure the effectiveness of the transformation.
133 A function can thus be viewed as a very large atomic action which operates over an interval
of time, with the details of the transformation
and internal states of the function not v i s i b l e .
To gain such v i s i b i l i t y ,
the function may be decomposed into a set of lower level functions, some of which operate concurrently, some of which must occur in a specific sequence. As we shall see, these decompositions are not unique, and thus the selection of a specific decomposition constitutes a design decision. The concept of decomposition requires careful d e f i n i t i o n is to be avoided.
We define the concept in three steps.
if
ambiguity
F i r s t sequences,
concurrency, selection, and replication of functions are defined in terms of a graph whose nodes are functions; F-net.
we call
this
a Function Net, or
The solid arcs which connect the nodes of the F-Net represent time
precedence relationships.
I f a function has two completion c r i t e r i a ,
arcs must exit the node representing the function. F-Net i n d i c a t e concurrency, r e p l i c a t i o n (i.e.,
two
Special nodes of the the a f u n c t i o n is
replicated a number of times, and all copies are operating concurrently), synchronization selections.
of
completion
of
concurrent
functions,
and rejoin
of
An F-Net may contain dotted arrows connecting the boxes to
item names to represent the relationship between a function and the items which i t inputs and outputs). Sequence and concurrency
Figure 4.1 presents the nomenclature. of
input
and output
items
are
defined
s i m i l a r l y by using a directed graph having items as nodes; this is called an Item Net, or
1-Net.
concurrency, i t e r a t i o n ,
Such graphs have special
nodes to
indicate
and replication over an index set.
The second step to defining the concept of decomposition is to define a function composition by synthesizing the composition graph and i t s referenced functions into the characteristics of a system function.
An
l-Net of the items input by the functions on the F-Net is constructed; similarly, The overall
an l-Net of the outputs of the composition is constructed. completion
criteria
of
the
composition
is
combining the graph logic with the completion c r i t e r i a functions on the F-Net. is
defined
F-Net.
constructed
by
of each of the
The set of performance indices of the composition
as the set of performance indices of the functions
on the
Figure 4.2 presents a summary of this approach.
With these preliminaries, decomposition is now defined as a r e l a t i o n ship between a function and a function composition i f five c r i t e r i a are
t34
F-Net: - m~s
~
nJ, crt~s
wt~ $tNC~.E BT~Cf
MU.TI e'~J[ EIIT - ARCS REPQESDIT ]~t~EC~ENCE (SEOLtENCE)
- SPECIAL I~OES
$ CONCU~AEI'ICT • ITE~ATIOel
&* I~EPLICATION (, RE,~II~ S&ECTION
~-Net: - ~OOES~AE I ~
- A,qCS REPRESENT I~ECEDE'NC[ (SEQUEI~-,~) - SPECIAL NOOES i C~R~?
- ITERATI0ll i " RE~IC.kTION ( ~ S E ( ~ E S )
,,. RE,JOIN SELECTION
Figure 4.1:
Graphs of F-Nets and I-Nets
A ~ ( T I O ~ COeeOSifIOe IS A $YNTVISIS Or A COmOSiTIOe C,,~PX ~ 0 its REFr~RE0~UNCTIO~S r t ~rO A FU~CTtC~~0"
~'o " (to'
If--
--
0 --
---
"~'O1
°o' Do' Co' Po )
00 • C~OSITI0el OF (~.rfN$ P N E D NOTE: INTERMEDIATEIe~WdTS/OUTPb'T$OEL[TEO
0 - 6(I} I . . . . . Dlq) ~ 13,- .
.
.
.
.
Figure 4.2:
~I,
~ ?PJ~SeC~J~ATIOM
PO " (Pl . . . . . PPI~ SET ~W r ~ R F O I ~ : ~ I/¢O|CES
Function Composition
135
satisfied (see Figure 4.3): o
Input sequences and output sequences must be preserved where defined, although the function composition inputs and outputs may add more detail.
o
The completion c r i t e r i a must match, in particular the number and type of exits.
o Any invariants of the function transformations must be preserved. o The performance index of the function must be computable from those of the functions of the function composition. This definition is transitive ( i . e . the decomposition of a decomposition is
a legal
decomposition of the original
function).
Moreover, this
definition of decomposition incorporates hierarchical control theory, generalized state space theory, decomposition by concurrent functions, and a version of the Michael Jackson Program Design Method as special cases. These are briefly discussed in the following subsections. 4.1.2
Decomposition by Object
Hierarchical Control Theory popularized by Mesarovic [Mesarovic 70] has as its fundamental theorem that any controller which handles subsequences of inputs (e.g., from different objects) can be expressed in terms
A FUNCTION
i) z) 3)
COMPOSITION F0 IS SAIl) TO BE A ~COI'IPOSITION OF A FUJ~"TION F IF
z¢ ro o &oo IF 0 ( X}-~Y THEN0o ( X)-,Y
4)
C "
5)
P ,,e" (Pl ..... ~'N')
I
CO
INPUT/OUTI:"6T SEQUENCES~E~rRVED NAPPING ~ESERVED CO~ETION CRITERIAPRESERVED P[I~FORMANCE TRAC~ILITI P~SBY~
FO
XI---
x-c, =z p
X: X Z _ Y,B--
C1 Figure 4.3:
Definition of Decomposition
¢2
136 of a set of c o n t r o l l e r s for each subsequence with a higher level control function.
Figure 4.4 i l l u s t r a t e s
the approach.
Assume that a system
function F maps input item X into output item Y over an interval
of time,
and that the item X can be expressed as a set of concurrent subsequences (XI,..,,Xn)
and that the item ¥ can be defined as a set of concurrent
subsequences ( Y I , . . . , Y n ) ;
usually XI and YI are the inputs and outputs of
the system related to the Ith object being addressed by the system.
Then
the theorem states that F can always be expressed as a r e p l i c a t i o n
of
subfunctions, FI, one for each input XI, which maps XI and a control
CI
into YI"
To produce the controls CI, a status SI is generated to summar-
ize each XI, and the control rules of the function H are used to calculate all
of the controls (CI,..,Cn)
from all
of the status items ( S I , . . , S n ) .
Mesarovic proves this can always be done, although the decomposition is not unique. Thus the problem of defining a control function is decomposed into two smaller problems:
the problem defining how to deal with each
input stream XI; and and the problem of defining the interactions between objects.
The Graph Model of Decomposition provides the c a p a b i l i t y
of
expressing the fact that a function is replicated, one for each member of a domain (or indexing) set.
The replication construct and requires that
there always be a branch containing a function to provide the necessary coordination.
MOTIYATtOI( -
t l o ~ r O~'TI~FT I5 FR~ ~IFREREt4T OBJECTS FUI~T,IOM WILL ~
APPROACH
RERFOI~rD BY O|F!rEREMT SYST~X ELF.~NT$
,~Emt~C,lC~ Cm~OLr~OaV ~V x , (X I ..... ~) Y • (YI . . . . . ~'I() I~
v • V(I) " '
r I • rl(XI, C I)
$I " GI {XI) (cz. . . . . cx)..(s t . . . . . s~)
Figure 4.4:
Decomposition by Object
1
137
4.1.3
Decomposition by Time Sequence
As discussed in Section 2.1.2, a f i n i t e
state machine with i n i t i a l
state SO can be viewed as a function which accepts a sequence of discrete inputs (Xl,..,Xn) and generates a sequence of discrete outputs (Y1,...,Yn) plus a f i n a l state Sn.
The weakness noted of this representation approach
was that i t produces a " f l a t " model, i . e . , may require l i t e r a l l y millions of states to represent a real system.
The Graph Model of Decomposition
provides a hierarchical approach for structuring these states which reduces to a s t r i c t state-space model when all sequences have been defined. Figure 4.5 provides an overview of the approach. For example, suppose the input to a system function, F is the time sequence XI followed by X2 followed by X3.
There are at least two ways F can be decomposed to deal
with the time inputs:
save up the inputs until all have arrived and then
apply F; or perform partial transformations on intermediate inputs. either
case, F can always be represented as a graph of
In
intermediate
functions F1, F2, and F3, each of which accepts only one external input Xi and produces not more than one external output plus the results of the processing so far, the Ai.
Since the Fi can be viewed as large atomic
actions, the Ai represent the instantaneous states when Fi has completed. The resulting decomposition is not unique; different decompositions result from different choices of the states Ai.
(qDTIVATION
-
APPROACH
INmJ'rs AJmxvE T~ME SPACEO C,[)¢F.J~ALIZ~ STATESPACE THEORY
ZF X - (XI(T l) .... X N (TN)) A/CO F:X~Y
THF~F CANALWAYS BEAEPRESF._NTEDAS
,
11
I
x2
F
. (Fl.... FN)
FI
: X 1-...IM. AI
Fz
:(Xz, AI)~A. z
FN
:(x N, A~.I)--',Y
~ERE r ~
X%--" - ~ l x z-
-.,,}
x3
Figure 4.5:
Decomposition by Time Sequence
AI "2
I- I A z
138
When the Xi inputs
are refined to the point that they represent discrete
rather than subsequences (e.g.,
data sets,
where all
data is
logically input as one unit), then the composition function collapses into a s t r i c t state-space model where the completion criteria, Ci , become the state transition functions. Thus any time function accepting an input sequence can (non-uniquely]) be decomposed into a f i n i t e state machine.
4.1.4
Decompositionfor Input/Output Modularity When the approach described in the previous section is combined with
the fact that inputs and outputs may be described in terms of sequences, selections, functions results.
iterations, to
and concurrency, the principle
preserve modularity with
respect to
of
decomposing
inputs
and outputs
This concept was popularized in Michael Jackson's Program Design
Methodology [Jackson 75]. Figure 4.6 presents an overview of the approach as represented by the Graph Model of Decomposition. Consider a function, F, which has input X consisting of the sequence XI followed by either X2 or X3 then X4, and the output Y consisting of Y1 followed by Y2 (note that the Xi and Yi may themselves be subsequences). Then F can always be expressed in terms of
W(II'IVA?I~
. ~
TO ESTA~II~ ~ I ~
¥II14 RI~ECT TO IN~/T/O~FrS~J?
APP~CH
- ~FIRE S?I~JCIXJ~£~ ~L~qCTIONS rO I N N ~CX I ? ~ OF ~
ImmgT
SCI41~w~L. F.AC}(I;~m OF THE O~JT SCHEMA.
I
\
\
..,
,
,,
L
JJ,
x~
/'I 12--
ill
Figure 4.6:
Decomposition by I/0 Structure
..
139 a composition of functions which input and output the individual Xi and Yi and intermediate values. The modularity considerations thus forces the function structure to be similar to the input/output structures.
Thus the
problem of transforming a structure of input items into a structure of output items can always reduced to the selection of a function composition plus the d e f i n i t i o n of the functions which accept no more than one external input and generate no more than one external output.
As before, the
decomposition is non-unique. 4.1.5
Decomposition
The final
by Concurrent
Function
special case of decomposition is that of a concurrent func-
tion representation.
The motivation is to decompose the d e f i n i t i o n of the
transformation of input X to output Y by a sequence of transformations, with the output of one being the input to the next.
Figure 4.7 presents
the example where F is defined in terms of J acting on X, with H acting on the r e s u l t ,
and G transforming the result into the output Y.
I f X is a
time sequence, then J could be acting on one element of the input while G is transforming a previous element; hence J, H, and G can be represented as concurrent
functions
which input
and output shared items.
Thus a
function can always be decomposed into a set of concurrent functions; before, the decomposition is non-unique.
ROTIVATION
.
P,KTIO. ~scRzs~ mY a SEQUEMCE OF TFums~om,mTICms F(x) - ;(.(J(x)))
APPROACH
-
EXPRESSAS CONCURRENTFUNCTIONS TO ALLOW FURTHER
~COHPOSITI~S
I~+--P'¥ Figure 4.7:
Decomposition by Concurrent Function
as
140
4.1.6 Allocation A system can be viewed in two different ways.
On the one hand, a
system can be viewed as an entity which performs a transformation of inputs into outputs; on the other hand, a system is defined as a set of interconnected components with a common goal (e.g., to perform the specified transformation).
Allocation of function to component is the bridge
between the functional view and the component view of a system. Figure 4.8 illustrates the result of combining the concept of allocation with the previously discussed concepts of decomposition.
The use
of the different types of decomposition of a system function generally results in a graph model which replicates functions for each input object, which identifies time sequences of functions for each object, and expresses them in terms of concurrent functions.
Allocation of functions to
subsystems can be expressed as a partitioning of these functions ( i . e . , each function assigned to exactly one p a r t i t i o n ) ,
and each partition is
then assigned to be performed by exactly one system component. Note that not only are the individual functions Fij (and the coordination function) allocated,
but also the structure of sequences and concurrency across
objects, i . e . , F13i always happens before F23i , but F13i has no ordering
J
Figure 4.8:
Allocation as a Partition of a Graph
141 and may occur before, after, or concurrent with F13j . This removes the ambiguity with respect to sequences inherent in SADT and other requirements techniques which consider only data flow. Thus the concepts of formal decomposition provide a foundation for the unambiguous expression of subsystem requirements in terms of allocation of decomposed system functions.
This approach is e x p l i c i t l y
hierarchical,
and can be applied to any level of system component.
4.1.7. Interface Design Figure 4.8 i l l u s t r a t e s the fact that the boundary which separates the partitions of functions allocated to two different subsystems is pierced by arcs (indicating control is passed from one function in one subsystem to another), and dotted lines indicating items output by functions in one subsystem which are input to functions in another component.
One inter-
pretation of this boundary is that i t represents the requirement to pass both control and items of information between the subsystems. This concept can be formalized by associating with each boundary an interface function, whose purpose is to pass the required of control and items.
This
function:
interface function
satisfies
all
of the properties of a
i t has inputs, outputs, invariants of the transformation ( i . e . ,
i t must pass the output of each function of one component to the corresponding function of the other subsystem), a completion criterion ( i . e . , i t finishes when the last item is passed between the components), and natural performance indices (e.g., time and r e l i a b i l i t y to pass information). The techniques of decomposition and allocation discussed above can be applied to the interface function to yield multiple layers of interface design. level
At each level of design, a the boundary separating the previous
of functions is associated with an interface function, which is
decomposed and allocated, leaving a lower level boundary. Thus the top level interface may be decomposed into a pair of functions which merge all of the parallel
inputs together into a serial string of messages with a
common format ( i . e . , a multiplexor), and a function which distributes the messages to the appropriate processing functions; these are allocated to the sending and receiving components. tions
The boundary between these func-
is then associated with a lower level
might be decomposed into
functions
interface function, which
which organize
the messages into
142
packets, pass a string of packets, and then re-combine the packets into messages. Thus this approach provides a unified way to formally define both interface
requirements and designs,
including
the derivation
of
communication protocols.
4.1.8 Layers of Requirements The desire to express a methodology as a sequence of steps leads to an apparent contradiction
when issues
tolerance are addressed.
of
resource management and fault
Classical Top-Down Systems Engineering theory
suggests that one should decompose functions and then allocate them to components.
A paradox arises from the fact that t is only after allo-
cation that component resources needed to accomplish each function can be identified, total u t i l i z a t i o n estimated, and hence the need for resource management can be established.
Since resource management is a control
function which requires allocation, this must be represented back at the system level.
Thus the functions must be allocated in order to determine
whether control functions must be defined and allocated. Similarly, classical systems engineering theory proposes that
one
f i r s t define system functions and allocations, then perform a Failure Mode Effects Analysis to identify potential problems, and then add functions to detect, avoid, isolate, and recover from the failures.
These functions
must also be decomposed and allocated to the components. This process has t r a d i t i o n a l l y j u s t i f i e d the concept of "iterating" the system design. Our approach to handling this problem is illustrated in Figure 4.9. The composition graph is e x p l i c i t l y designed to be produced in several layers,
with
the
first
layer
representing
sufficient resources and no faults).
the
standard
flow
(i.e.,
Additional layers of functions and
paths are added to address resource/fault exceptions by adding appropriate exits to the functions on the standard flow, and then identifying how the exception w i l l be handled locally with entry back into the standard flow. I f local recovery is not possible, an exception exit of the composition occurs which must match an exception exit of the function decomposed. Recovery from a fault is thus associated with re-entry to the standard flow level of requirements. left
Note that the original standard flow graph is
as an undisturbed, invariant
subgraph of the combined graph.
Although this concept is new to systems engineering, a version of the
143 STMO/U~O WI~ E~CEPTI~ ~YER
$T~DARO
FI
A~,F'T TO ~C~[R ANO T~,Y AGAIN
EXCEPTIO~ EXIT
Figure 4.9:
Layers of Requirements
approach was demonstrated by Liskov on the CLU operating system. This approach has d i s t i n c t handling
advantages of providing
complex problems.
First
concerns
for
defined,
and then layers of requirements are added for
exception without disturbing previous layers.
the
a separation of standard
flow
is
each class
of
This separation of concerns
promotes a systematic methodology for doing the system design and presenting the results of the design a c t i v i t y . 4.1.9
Discussion
This
section
approach for interface faults.
has presented
representing
design,
the
and addition
the
basic
concepts of
concepts
of
a graph model
decomposition,
functions
to
provide
allocation, tolerance
to
The concepts of decomposition provide a way of specifying both
sequence and concurrency of inputs and functions. of
of
concurrency
at the
system level
is v i t a l
The i d e n t i f i c a t i o n to
the specification
of
distributed systems: at best, a distributed system can only exploit the concurrency available in the problem. In the next section, a systematic method for
defining
system requirements
foundations w i l l be presented.
based on these
graph
model
144
4.2. System Requirements Definition The previous section provided an overview of how the Graph Model of Decomposition
is
used to
specify
decomposition,
allocation,
interface
design, and layers of requirements for f a u l t detection and recovery. In this section, we w i l l show how these graph model foundations are used to derive a systems requirements and analysis methodology.
The Systems
Requirements Engineering Methodology (SYSREM) consists of the seven phases of a c t i v i t i e s
presented in Table 4.1.
terms of i t s
role
Each phase is described below in
in the methodology, the specific steps necessary for
completion, and the c a p a b i l i t i e s of automated tooflw which could aid the developer in doing the job.
4.2.1 Phase 1 - Define System The system development process begins with a user requirement to do "something". T h i s "something" is generally described in a system needs document which outlines overall objectives, performance requirements, and cost/schedule constraints. performance indices,
Phase 1 identifies the system inputs, outputs,
and potential
constraints
or guidelines
for
the
system development. The user is required to state the system mission and objectives,
system constraints
(e.g.,
constraints
on cost,
schedule,
special constraint on type of components to be used to build the system), The user is required to identify any special classes of input (e.g., the system has different classes of users) as well as standard scenarios of
Figure 4.10:
PHASE 1
DEFINE SYSTEM
PHASE 2
IDENTIFY COMPONENTS
PHASE 3
DECOMPOSE TO SYSTEM LOGIC
PHASE 4
DECOMPOSE AND ALLOCATE
PHASE 5
ESTIMATE FEASIBILITY AND COST
PHASE 6
IDENTIFY CRITICAL ISSUES AND RESOURCES
PHASE 7
ADD RESOURCEMANAGEMENTAND FAULT TOLERANCE
PHASE 8
PLAN INTEGRATION AND TEST
PHASE 9
OPTIMIZE OVER DESIGNS
Phases of Systems Requirements Engineering Methodology
t45
of inputs. The performance indices of the system measure how well the system is operating, and is used to make the tradeoff decisions; this can include such factors as response times or efficiency of a transformation of inputs to outputs, as well as development cost and schedule. 4.2.2
Phase 2 - - I d e n t i f y Components
Phase 2 identifies the potential classes of components or subsystems from which the system might be decomposed. There may be more than one potential combination of sensors, data processors, controllers, and communications components which might be used to build the system. The purpose of this phase is to identify potential combinations to which requirements might be allocated.
These are system classes, because the exact details
of the subsystems are subject to the allocation of system requirements to the subsystem. Thus, separate potential configurations will be identified for
later
analysis
with respect to allocation
of requirements to the
subsystems of these configurations. To support this phase, the capability is needed for
identifying
a
number of subsystem class configurations, and their interfaces in block diagrammatic fashion, with a mechanism for naming and identifying these configurations. In addition, a mechanism is needed for associating subsystem design variables with the subsystem. These subsystem design variables will then be used to predict subfunction performance allocated to the subsystem, and be used with estimating rules to predict cost and schedules of manufacturing of subsystems.
In addition, the cost esti-
mating relationships themselves should be recorded for future reference. 4.2.3
Phase 3 - - Decompose to System Logic
In Phase 3, the decompositions of the system function down to the system logic level are identified. The system logic is defined by the time sequence of functions which deal with the inputs to the system. This system logic is simulated during this phase to predict system performance as a function of the design variables of the system function. Since more than one potential decomposition may exist, the system data base may hold many decompositions related by a graph structure of decomposition relationships.
!46
To support this Phase, the user needs the following capabilities: o
Define
composition
and decomposition,
and check
them f o r
consistency. o Identify and manage a structure of alternative decompositions of functions. This system function
includes the capability of defining configurations from a graph of
potential possible
decompositions. o Provide the a b i l i t y to define new system configurations in terms of old system configurations plus modifications. o Provide the a b i l i t y
to
extract
all
relevant
information
for
a
specific configuration in terms of functions and their decomposition hierarchy. o Provide an on-line capability to portray graphically a composition and from that display to select functions for further display, or for
identification
of existing decomposition, or for
display of
decomposition to the indicated function. 4.2.4
Phase 4 - - Decompose and Allocate
The decomposition process is
continued
in
functions which might be allocated to specific configurations.
order
to
get
subsystems of
to
the
specific
Again, simulators may be used to predict the system
performance and frequencies of subsystem subfunctions
as a function of
scenario and design parameters. More than one allocation will be examined for f e a s i b i l i t y , cost, and schedule and different allocations of performance to the subsystems may be examined in order to reach balance points for a particular configuration. For each allocation, constraints is identified.
a candidate allocation of performance index This requires the following Capabilities:
o Provide the a b i l i t y to designate a specific allocation of subfunctions
to
particular
capability of
subsystems of
configuration.
color coding a specific
P r o v i d e the
allocation on a graphics
terminal. o Provide the capability of
identifying
and manipulating
such an
allocation configuration. This means to define such an allocation, and to define new allocations in terms of old allocations with modification.
147 o Provide the c a p a b i l i t y of analyzing p o t e n t i a l a l l o c a t i o n s of s p e c i f i c system c o n f i g u r a t i o n s f o r completeness, i . e . , every subfunction being uniquely allocated to a specific subsystem. o Provide the a b i l i t y
to specify performance bounds on performance
indices of the subfunctions performance allocations
allocated
to
the
subsystems.
must also be specified
such that
possible configurations can be considered simultaneously,
These several and new
ones can be specified in terms of old ones plus modifications. 4.2,5
Phase 5 - - Estimate F e a s i b i l i t y
and Cost
Each subsystem allocations must now be analyzed for f e a s i b i l i t y cost.
This involves d e f i n i t i o n
ments,
identifying
estimation,
candidate
of interfaces,
DP distributed
summarizing architecture
and estimation of cost and f e a s i b i l i t y .
and
the requireclasses,
load
The following steps
are performed. Step 5a - I n t e r f a c e
Design
An interface design must be postulated for each interface in order to estimate the required DP resources to service the interface i . e . ,
memory
space to store data and processing time to encode/decode the data.
This
requires the following c a p a b i l i t i e s : o Provide the a b i l i t y to extract output pairs
and display the l i s t
between subfunctions
a