DFD Yourdon
DFD Yourdon
DFD Yourdon
By
Angkanit Pongsiriyaporn
By
Angkanit Pongsiriyaporn
October 2007
i
Abstract
ii
Table of Contents
Title Page
Acknowledgments i
Abstract ii
Table of Contents iii
List of Figures v
Chapter 1 Introduction 1
1.1 Background 1
1.2 Objectives and Scope 3
iii
Chapter 4 Case Studies Yourdon DFD Tool 36
4.1 Introduction 36
4.2 Data Flow Diagram for Automatic Telling Machine (ATM) 36
4.3 Data Flow Diagram for Mail Order Company 39
4.4 Summary 45
References 49
Biography 51
iv
List of Figures
Title Page
v
Figure 4.4 Overview Diagram for Mail Order Company 43
Figure 4.5 Answer Enquiry Sub-Process 44
Figure 4.6 Process Order Sub-Process 44
Figure 4.7 Stock Control Sub-Process 45
vi
Chapter 1
Introduction
1.1 Background
Requirements refer to the needs of the users. They include why the system is
to be developed, what the system is intended to accomplish and what constraints
(ranging from performance and reliability, to cost and design restrictions) are to be
observed.
The contribution of sub-standard requirements to systems that are delivered
late, over budget and which don’t fulfil the needs of users is well-known (Boehm,
1981). Traditionally, the requirements phase of a project was seen as little more than a
front-end to development and as a result was not accorded the same degree of
precision as down-stream activities.
The process of formulating, structuring and modelling requirements is
normally guided by a requirements method. That is, a systematic approach to
discovering, documenting and analysing requirements. Each method will normally
have an associated notation that provides a means of expressing the requirements.
Kotonya and Sommerville (1998) contend that a requirements method should
have certain properties that will enable it to address the difficult problem of
establishing a complete, correct and consistent set of requirements for a software
system. These properties include the following:
• Suitability for agreement with the end-user: the extent to which the
notation is understandable to someone with without formal training.
• Precision of definition of notation: the extent to which requirements may
be checked for consistency and correctness using the notation.
• Assistance with formulating requirements: a requirements method must
enable the capture, structuring and analysis of many idea, perspectives and
relationships at varying levels of detail.
• Definition of the world outside: a requirements model is incomplete unless
it models the environment with which a system interacts.
1
• Scope for malleability: requirements are built gradually over time and
continue to evolve throughout a systems’s entire lifecycle. The approach
used and resultant specification must therefore be capable of tolerating
incompleteness and be adaptable to change.
• Scope for integrating other approaches: no one requirements approach can
adequately articulate all requirements for a system. It is therefore
important a requirements method can support the incorporation of other
modelling techniques to allow their complementary strengths to be brought
to bear on a problem.
• Scope for communication: the requirements process is a human endeavour,
so a method needs to be able to support the need for people to
communicate their ideas and obtain feedback.
• Tool support: system development generates a large amount of
information that must be analyzed. A tool imposes consistency and
efficiency on the requirements process.
2
1.2 Objectives and Scope
This special study is concerned with the last type of model listed above,
namely Data Flow Models. Data Flow modelling is based on the notion that systems
can be modelled as a visualization of the data interaction that the overall system (or
part of it) has with other activities, whether internal or external to the system. Though
their use has diminished somewhat in recent years with the emergence of object
oriented approaches (and the defacto standard Unified Modelling Language, or UML
(Fowler & Scott, 1999), in particular), they continue to be used in one form or
another1 in the aersopace and defence industries in particular.
As the final entry in the desired list of method properties (outlined in sub-
section 1.1) shows, CASE tool support is essential if a method is to have any realistic
hope of scaling up for industrial use and thus entering the mainstream of software
engineering (and area in which formal or mathematical methods for example are often
said to fall short). And while it is true that there are already commercial tools
available supporting Data Flow Diagrams, as there are for the numerous other
notations used by practitioners in modelling, analyzing and building computer
systems2, therein lies the problem!
A lack of well-defined approaches to integration of CASE tools currently
leads to inconsistencies and limits traceability between their respective data sets.
Traceability is the common term for mechanisms to record and navigate relationships
between artifacts produced by development and assessment processes. Effective
management of these relationships is critical to the success of projects involving the
development of complex computer-based systems3.
1
RTN-SL (Paynter, Armstrong, & Haveman 2000) for example is a graphical language for defining
both the functions - termed activities - and behavior of Real-Time systems. Activities are concurrent
processes that exchange information and synchronize through shared data in their connections. RTN-
SL is widely used in the development of software controlling missile systems.
2
These include use case diagrams that help in establishing requirements, to (often specialized) design
notations (such as RTN-SL), to computer languages such as Java and Ada; for dependable systems
Failure Modes and Effects Analysis may be used to express failure behavior of functions and
components, while the safety case - arguments and evidence supporting claims of trustworthiness - may
be expressed as Goal Structures.
3
Traceability data can be used for many purposes, including helping verify a system meets its
requirements, tracking the effects of changes in requirements, understanding the evolution of an artifact
and determining the rationale underpinning design and implementation (Spanoudakis, 2004).
3
This lack of integration means ultimately that either engineers choice of tools
and hence notations and techniques is compromised (i.e., they concede to use only
those whose tools can be integrated), or they use their preferred assortment with
poorly integrated tools and risk compromising (i.e., impairing4) quality and their
overall ability to manage a project.
In an effort to overcome the tool integration problem, some vendors have
taken to producing integrated suites of tools, normally supporting a particular
software development process. Worthy examples include IBM’s Rational software
suite (tailored to the Rational Unified Process (Krutchten, 2000) which while offering
lifecycle traceability with ease across artifacts expressed in UML, linking and
navigating to notations expressed in other tools is far from straightforward. This is
particularly significant for developers of dependable systems who must model for
example, real-time and failure behaviour of a system, aspects not easily represented or
beyond the scope of the UML.
Our position is therefore this; at present, it is not unreasonable that engineers
should demand the freedom to select and use the techniques, methodologies and
notations they wish to use (when they want to use them) and not to have the
engineering process driven (and therefore compromised by) the software tools
available.
This special study will therefore build on previous work (Mattayon, 2007;
Tianvorakoon, 2006) undertaken in the School of Technology at Shinwatra University
towards an integrated CASE tool framework for software/systems engineering. The
framework known as MAST (Meta-modelling Approach to System Traceability)
features in a number of published works (Mason, 2006; Mason & Mattayom, 2007;
Mason & Tanvorakoon, 2006) which introduce the mechanics of the framework itself,
before going on to describe integrated CASE tools for a range of notations. Readers
are referred to these references for more information. We concentrate here on
developing a Data Flow Diagram tool that can be accommodated within MAST.
4
For example, this author knows of a situation where a system architecture was potentially impaired by
engineers ‘shoehorning’ the original design into a flatter model to accommodate their tools’ - or more
precisely its underlying SQL database - (then) inability to handle recursion.
4
The rest of this report is therefore organized as follows: Chapter 2 provides a
review of significant literature on data-flow modelling, detailing in particular the
Yourdon approach to DFD construction. Chapter 3 describes and demonstrates the
author’s work towards development of an appropriate MAST compatible tool; this
work is demonstrated by example in Chapter 4 using various case studies. Chapter 5
offers some conclusions and ideas for future work.
5
Chapter 2
Literature Review
2.1 Introduction
As indicated in Chapter One, the process of eliciting, structuring and
formulating software requirements is normally guided by a method, Data-Flow
Models being one such example.
In this chapter, we introduce the notion of Data-Flow Diagram methods,
concentrating in particular on the Yourdon notation for which tool support is to be
developed. Reader attention is drawn to other Requirements Engineering
methodologies, notably object-oriented methods, such as the Unified Modelling
Language or UML (ibid.) which models a system as a group of interacting objects and
also formal methods such as Z (Spivey, 1989) which are mathematically-based
techniques for the specification, development and verification of software. However
discussion on such topics is beyond the scope of this report.
The chapter also introduces a number of ‘keynote’ works that formed vital
background reading for the project. These provide a broad context to the work
presented.
6
notation by software engineers concerned with direct implementation of models of
user requirements.
Transform
Data dictionary
Library card
Return date Library
Requested item Issue library
Library item assistant
user
Issued item
Figure 2.2 The Context-Level Data-Flow Diagram for Issue Library System
The creation of the context level Data-Flow Diagram also permits the
developer to sketch the boundaries of the target system, so that the client and
developer can agree on the scope of the system to be developed.
7
User database
user details
update details
Library
card update
Check
user
user
details
UserID
Library User status
user
requested
ItemID
item Check
Item
item
status
issued item return date
Issue Library
item assistant
item details
Update details
Item database
Figure 2.3 Level 1 of the Data-Flow Diagram for the Issue Library Item
The next level (level 1) of the data-flow diagram for the library system is
constructed by decomposing the top-level system bubble into sub-functions. Figure
2.3 shows the next level of decomposition of the library system. Each function in
Figure 2.3 represents a potential subsystem through further decomposition. Note
figures 2.1 through 2.3 are for reader-orientation only at this stage. A more detailed
explanation follows in sub-section 2.3.
It can be seen from the above that the notation is very simple and requires very
little explanation; one can simply look at the diagram and understand it. This is
particularly important when we consider who is supposed to be looking at it – i.e.; not
only the analyst, but also the end user!
An important point to note is the lack of uniformity in industry concerning the
DFD notation. Whereas the above figures introduce the highly popular convention
featured in work by both DeMarco and Yourdon (and the focus of this particular
report), variations employ rectangles or rounded rectangles for bubbles, ellipses or
shadowed rectangles for sources and destinations, and squared-off C’s for data stores.
The differences are however purely cosmetic.
8
2.2.1 Structured analysis.
The data flow approach is typified by the structured analysis method (SA).
The structured analysis method has undergone several refinements since its
introduction in the late 1970s, although its underlying principles have remained the
same. Two major strategies dominate structured analysis; the ‘old’ method
popularised by DeMarco (1979) and Yourdon (1988).
1) DeMarco’s approach
DeMarco favours a top-down approach in which the analyst maps the current
physical system onto the current logical data-flow model. The approach can be
summarized in four steps:
• analysis of current system
• derivation of logical model
• derivation of proposed logical model
• implementation of new physical system
The objective of the first step is to establish the details of the current physical
system, then to abstract from those details the logical data-flow model. The derivation
of the proposed logical model involves modifying the logical model to incorporate
logical requirements. Implementation of the proposed model can be considered as
arriving at a new physical system design.
9
structured analysis. These extensions resulted in a more robust analysis method that
could be applied effectively to engineering problems.
1) The process
The first component of the DFD is known as a process. Common synonyms
are a bubble, a function, or a transformation. The process shows a part of the system
that transforms inputs into outputs; that is, it shows how one or more inputs are
changed into outputs. The process is represented graphically as a circle, as shown in
Figure 2.4.
Note that the process is named or described with a single word, phrase, or
simple sentence. A good name will generally consist of a verb-object phrase such as
VALIDATE INPUT or COMPUTE TAX RATE.
2) The flow
A flow is represented graphically by an arrow into or out of a process; an
example of flow is shown in Figure 2.5. As indicated above, the flow is used to
describe the movement of chunks, or packets of information from one part of the
system to another part.
10
Figure 2.5 An Example of a Flow
For most of the systems, the flows will represent data, that is, bits, characters,
messages, floating point numbers, etc. But DFDs can also be used to model systems
other than automated, computerized systems; we may choose, for example, to use a
DFD to model an assembly line in which there are no computerized components. In
such a case, the packets or chunks carried by the flows will typically be physical
materials. The flows are of course named. The name represents the meaning of the
packet that moves along the flow.
It is important to remember that the same content may have a different
meaning in different parts of the system. For example, consider the fragment of a
system shown in Figure 2.6. The same chunk of data (e.g., 089-410-9955) has a
different meaning when it travels along the flow labelled PHONE-NUMBER than it
does when it travels along the flow labeled VALID-PHONE-NUMBER. In the first
case, it means a telephone number that may or may not turn out to be valid; in the
second case, it means a phone number that, within the context of this system, is
known to be valid.
11
Note also that the flows show direction: an arrowhead at either end of the flow
(or possibly at both ends) indicates whether data (or material) are moving into or out
of a process (or doing both). The flow shown in Figure 2.6, for example, clearly
shows that a telephone number is being sent into the process labelled VALIDATE
PHONE NUMBER.
3) The store
The store is used to model a collection of data packets at rest. The notation
Yourdon uses for a store is two parallel lines, as shown in Figure 2.7. Typically, the
name chosen to identify the store is the plural of the name of the packets that are
carried by flows into and out of the store.
12
ORDER DETAILS INQUIRY
ORDER ORDER
ENTER RESPONSE
ORDERS TO
ORDERS INQUIRY
ACKNOWLEDGMENT RESPONSE
Figure 2.9 shows a different kind of store: the implementation store. We might
imagine the systems designer interposing an ORDERS store between ENTER ORDER
and PROCESS ORDER because:
• Both processes are expected to run on the same computer, but there isn’t
enough memory (or some other hardware resource) to fit both processes at
the same time (less likely nowadays, but still possible). Thus, the ORDERS
store has been created as an intermediate file, because the available
implementation technology has forced the processes to execute at different
times.
• Either or both of the processes are expected to run on a computer hardware
configuration that is somewhat unreliable. Thus, the ORDERS store has
been created as a backup mechanism in case either process aborts.
• The two processes are expected to be implemented by different
programmers (or perhaps, different groups of programmers working in
different geographical locations). Thus, the ORDERS store has been
created as a testing and debugging facility so that, if the entire system
doesn’t work, both groups can look at the contents of the store to see
where the problem lies.
13
ORDER DETAILS
ORDER ORDER
ENTER RESPONSE
ORDERS TO
ORDERS INQUIRY
If we were to exclude the issues and model only the essential requirements of
the system, there would be no need for the ORDERS store; we would instead have a
DFD like the one shown in Figure 2.10.
ORDER DETAILS
ENTER RESPONSE
ORDER TO RESPONSE
ORDERS INQUIRY
INVALID ORDER
14
In most cases, the flows to and from a store will be labelled although some
analysts prefer to omit labels to and from stores.
A flow from a store is normally interpreted as a read or an access to
information in the store. Specifically, it can mean that:
• A single packet of data has been retrieved from the store; this is, in fact,
the most common example of a flow from a store. Imagine, for example, a
store called CUSTOMERS, where each packet contains name, address,
and phone number information about individual customers. Thus, a typical
flow from the store might involve the retrieval of a complete packet of
information about one customer.
• More than one packet has been retrieved from the store. For example, the
flow might retrieve packets of information about all the customers from
New York City from the CUSTOMERS store.
• A portion of one packet from the store. In some cases, for example, only
the phone number portion of information from one customer might be
retrieved from the CUSTOMERS store.
• Portions of more than one packet from the store. For example, a flow
might retrieve the zip-code portion of all customers living in the state of
New York from the CUSTOMERS store.
15
In all these cases, it is evident that the store is changed as a result of the flow
entering the store. It is the process (or processes) connected to the other end of the
flow that is responsible for making the change to the store.
4) The terminator
A terminator is graphically represented as a rectangle, as shown in Figure
2.11. Terminators represent external entities with which the system communicates.
Typically, a terminator is a person or a group of people, for example, an outside
organization or government agency, or a group or department that is within the same
company or organization, but outside the control of the system being modeled. In
some cases, a terminator may be another system, for example, some other computer
system with which the target system will communicate.
There are three important things that we must remember about terminators:
• They are outside the system being modeled; the flows connecting the
terminators to various processes (or stores) in a system represent the
interface between the target system and the outside world.
• As a consequence, neither the systems analyst nor the systems designer are
in a position to change the contents of a terminator or the way the
terminator works. That is the systems analyst is modeling a system with
the intention of allowing the systems designer a considerable amount of
flexibility and freedom to choose the best (or most efficient, or most
reliable, etc.) implementation possible. The systems designer may
implement the system in a considerably different way than it is currently
implemented; the systems analyst may choose to model the requirements
of the system in such a way that it looks considerably different than the
way the user mentally imagines the system now. But the systems analyst
16
cannot change the contents, or organization, or internal procedures
associated with the terminators.
• Any relationship that exists between terminators will not be shown in
the DFD model. There may indeed be several such relationships, but,
by definition, those relationships are not part of the system we are
studying. Conversely, if there are relationships between the
terminators, and if it is essential for the systems analyst to model those
requirements in order to properly document the requirements of the
system, then, by definition, the terminators are actually part of the
system and should be modelled as processes.
17
Figure 2.12 An Example of an Infinite Sink
18
Figure 2.14 A Legitimate Case of a Write-only Store
6) Levelled DFDs
Thus far in this chapter, we have concentrated on simple DFDs. However, real
projects are often very large and complex. Section 2.2.3.5 has already suggested that
we should avoid overly complex diagrams (such as Figure 2.15). But how? If the
system is intrinsically complex and has perhaps hundreds of functions to model, how
can such complexity be avoided.
19
The answer is to organize the overall DFD in a series of levels so that each
level provides successively more detail about a portion of the level above it. This is
analogous to the organization of maps in an atlas; we would expect to see an overview
map that shows us an entire country, or perhaps even the entire world; subsequent
maps would show us the details of individual countries, individual states within
countries, and so on. In the case of DFDs, the organization of levels is shown
conceptually in Figure 2.16.
The top-level DFD – known as the Context Diagram - consists of only one
bubble, representing the entire system; the dataflows show the interfaces between the
system and the external terminators (together with any external stores that may be
present, as illustrated by Figure 2.14).
20
The DFD immediately beneath the context diagram is known as Figure 0 or
Overview diagram. It represents the highest-level view of the major functions within
the system, as well as the major interfaces between those functions. As discussed in
Section 2.2.3.5, each of these bubbles should be numbered for convenient reference.
The numbers also serve as a convenient way of relating a bubble to the next
lower level DFD which more fully describes that bubble. For example:
• Bubble 2 in Figure 0 is associated with a lower-level DFD known as
Figure 2. The bubbles within Figure 2 are numbered 2.1, 2.2, 2.3, and so
on.
• Bubble 3 in Figure 0 is associated with a lower-level DFD known as
Figure 3. The bubbles within Figure 3 are numbered 3.1, 3.2, 3.3, and so
on.
• Bubble 2.2 in Figure 2 is associated with a lower-level DFD known as
Figure 2.2. The bubbles within Figure 2.2 are numbered 2.2.1, 2.2.2, 2.2.3,
and so on.
• If a bubble has a name (which it should have!), then that name is carried
down to the next lower level figure. Thus, if bubble 2.2 is named
COMPUTE SALES TAX, then Figure 2.2, which partitions bubble 2.2
into more detail, should be labeled “Figure 2.2: COMPUTE SALES
TAX.”
But how do you ensure that the levels of DFDs are consistent (balanced) with
each other? The issue of consistency turns out to be critically important, because the
various levels of DFDs are typically developed by different people in a real-world
project; a senior systems analyst may concentrate on the context diagram and Figure
0, while several junior systems analysts work on Figure 1, Figure 2, and so on. To
ensure that each figure is consistent with its higher-level figure, we follow a simple
rule: the dataflows coming into and going out of a bubble at one level must
correspond to the dataflows coming into and going out of an entire figure at the next
lower level which describes that bubble. Figure 2.17 shows an example of a balanced
dataflow diagram; Figure 2.18 shows two levels of a DFD that are out of balance.
21
Figure 2.17 A Balanced DFD Fragment
22
Figure 2.18 An Unbalanced DFD Fragment
How do you show stores at the various levels? The guideline is as follows:
show a store at the highest level where it first serves as an interface between two or
more bubbles; then show it again in EVERY lower-level diagram that further
describes (or partitions) those interface bubbles. Thus, Figure 2.18 shows a store that
is shared by two high-level processes, A and B; the store would be shown again on
the lower-level figures that further describe A and B. The corollary to this is that local
stores, which are used only by bubbles in a lower-level figure, will not be shown at
the higher levels, as they will be subsumed into a process at the next higher level.
23
Figure 2.19 Showing Stores at Lower Levels
24
Figure 2.20 A DFD with Control Flows and Control Processes
A control flow may be thought of as a pipeline that can carry a binary signal
(i.e., it is either on or off). Unlike the other flows discussed in this chapter, the control
flow does not carry value-bearing data. The control flow is sent from one process to
another (or from some external terminator to a process) as a way of saying, “Wake
up! It’s time to do your job.” The implication, of course, is that the process has been
dormant, or idle, prior to the arrival of the control flow.
A control process may be thought of as a supervisor or executive bubble
whose job is to coordinate the activities of the other bubbles in the diagram; its inputs
and outputs consist only of control flows. The outgoing control flows from the control
process are used to wake up other bubbles; the incoming control flows generally
indicate that one of the bubbles has finished carrying out some task, or that some
extraordinary situation has arisen, which the control bubble needs to be informed
about. There is typically only one such control process in a single DFD.
As indicated above, a control flow is used to wake up a normal process; once
awakened, the normal process proceeds to carry out its job as described by a process
specification. The internal behavior of a control process is different, though: this is
where the time-dependent behavior of the system is modelled in detail. The inside of a
control process is modelled with a state-transition diagram (Harel, 1988) which shows
the various states that the entire system can be in and the circumstances that lead to a
change of state.
25
2.3 Keynote Papers
In compiling this report, a number of keynote works from current literature
were identified. These helped provide both background and context to the project. In
this subsection we briefly describe those works.
26
elicitation, modeling and analysis, communicating requirements, agreeing
requirements, and evolving requirements – in a format ideal for those new to the field.
Many of the open research issues they highlight remain that way today. These
include the need for richer models for capturing and analysing non-functional
requirements, such as security, performance and dependability; means for bridging the
gap between requirements elicitation approaches and more formal (mathematical)
specification and analysis techniques; and systematic means for reusing requirements
models (in turn facilitating better selections of commercial of the shelf, or COTS
software).
27
2.3.4 No silver bullet - essence and accidents of software engineering.
This well-known paper is an almost certain inclusion on any software
engineering undergraduate student list, or post graduate for the matter! Written by
Fred Brooks in 1986 (Brooks, 1986) it argues that software engineering is too
complex and diverse for a single "silver bullet" to improve most issues, and that each
issue accounts for only a small portion of all software problems. That hasn’t
prevented every new technology and practice to have emereged ever since from being
trumpeted as a silver bullet to solve the software crisis (cf. formal methods, UML,
CASE tools, maturity models, etc.) In that sense it highlights the need for perspective;
Yes object-oriented methods undoubtedly have their place; but then so too still do
formal and structured analysis methods.
28
is considered the concurrent existence of availability, confidentiality and integrity),
threats to these attributes (faults, errors and failures) and the means by which
dependability is achieved (fault prevention, fault tolerance, fault removal and fault
forecasting).
2.4 Summary
This chapter has demonstrated that the dataflow diagram is a simple but
powerful tool for modeling the functions in a system. The material in this chapter is
sufficient for modeling most classical business-oriented information systems. For
those engaged in real-time systems development (e.g., process control, missile
guidance, or telephone switching), the real-time extensions discussed in Section 2.2.4
will be important; for more detail on real-time issues, consult (Ward & Mellor, 1985).
To be effective in an industrial setting, any methodology needs tool support. In
Chapter Three we describe development of a tool supporting Data Flow Diagrams
based on the Yourdon methodology.
29
Chapter 3
Tool Support for Yourdon Data Flow Diagram Methodology
3.1 Introduction
Irrespective of its potential utility, any modeling notation requires effective
tool support to render it practical in an industrial context. Therefore in this chapter we
describe development of a (prototype) CASE tool for drawing Data Flow Diagrams
expressed in the Yourdon notation, from the initial requirements, through design and
implementation.
Figure 3.1 Waterfall Model of Software Process for Yourdon DFD Tool
30
1999) to discover functional requirements, which together with the constraints, were
then expressed in natural language.
When the requirements are fully completed, emphasis moves on to design,
with the aim to provide a "blueprint" for implementers (coders) to follow; i.e. a plan
for implementing the requirements. Here, Class Diagrams (Folwer & Scott, ibid)
were used to determine the static structure of the system (both in terms of the tool
itself and the database interface), while Sequence Diagrams (Folwer & Scott, ibid.)
enabled us to model interactions among objects (instances of classes) and processes
over time. A database schema was then produced describing the way in which these
objects are represented in a database, and the relationships among them. The
Graphical User Interface, so important in a tool such as this, was designed through
consultation with systems analysts and other potential users (although in keeping with
findings of past research, these were the main source of requirements instability).
Once the design is fully completed, then the system can be implemented. For
this task, Eclipse and the GMF (Graphic Modelling Framework) were chosen.
As with any system developed according to a Waterfall type methodology, we
began testing and debugging the system towards the latter stages of implementation;
any faults introduced in earlier phases are removed here. Under normal
circumstances, the system would enter service at this point, whereupon it moves into a
maintenance phase which continues throughout its operational life, allowing new
functionality to be introduced and any remaining bugs removed. However, the
maintenance phase is not relevant here as we were merely developing a prototype to
support and test a hypothesis.
3.3 Requirements
The requirements for the tool were gathered in two ways; a comprehensive
review of Yourdon Structured Analysis was undertaken (as described in Chapter
Two). Among the requirements yielded were the following:
• The system shall support the Yourdon graphical notation syntax,
representing processes as circles, flows as arcs, stores as parallel lines and
terminators as rectangles.
• The system shall enable terminators to connect to processes (only) using
flows.
31
• The system shall enable processes to connect to stores and to other
processes (only).
• The system shall support control processes as dashed circles and control
flows as dashed arcs.
• The system shall only enable control processes to connect to processes
using control flows (direction of flow from control process to process).
• The system shall support developments of DFDs as a series of levels with
each level providing successively more detail about a portion of the level
above it.
• The system shall support balanced DFD levelling to ensure consistency
between diagram levels.
32
5) The user selects appropriate DFD element type (process, terminator, store,
or control process) from palette
6) User left clicks position on location to position element type in main
drawing window
7) User names the new element
// repeat steps 5)-7)
8) User selects flow or control flow from palette
9) User moves mouse over source element
10) User left clicks mouse
11) User moves mouse over target element
12) User left clicks mouse
// repeat steps 5)-12) until diagram complete
3.4 Design
Given the requirements above, a Class Diagram was designed showing the
class structure, along with a Sequence Diagram showing interactions between classes
in the system and the user. These appear in Figures 3.2 and 3.3 respectively.
33
Figure 3.3 Sequence Diagram for Yourdon CASE Tool
A design was produced for the graphical user interface based on the
requirements described in Section 3.3. This is shown in Figure 3.4
Following design, the system was implemented using the Eclipse GMF
(Graphic Modeling Framework)
34
3.5 Summary
This chapter has described the process used to develop the Yourdon DFD tool,
as well as introducing key requirements and design artefacts. The tool is demonstrated
using case studies in the following chapter
35
Chapter 4
Case Studies Using Yourdon DFD Tool
4.1 Introduction
This chapter presents selected case studies undertaken in validating the
Yourdon Data Flow Diagramming tool described in introduced in Chapter Three.
Specifically, two case studies will be used, one for an Automatic Telling Machine and
one for a Mail Order company. In each case, the system requirements (facts assumed
to have been gathered from key stakeholders) are described and then the
corresponding screenshots from our Yourdon CASE tool inserted to provide
illustration.
1) Validate card
This process receives the card and id keyed by the CUSTOMER. These
details are checked by reading information in a file (data store) of client account
details. If invalid, an error message is displayed to the CUSTOMER and their card
returned. If valid, a valid id signal is sent to the Select Service function.
2) Select service
This process receives the valid id signal from Validate Card, followed by a
service request instruction from the CUSTOMER. If the CUSTOMER chooses to
deposit money a deposit service request is sent to the Deposit process, whereas if the
CUSTOMER chooses to withdraw money, a withdraw service request is sent to the
Withdraw process.
36
3) Deposit
This process receives the deposit service request from Select Service. It then
accepts the amount to be deposited and the deposit envelope from the CUSTOMER.
The client account file is also updated and a deposit receipt issued to the
CUSTOMER together with their returned card.
4) Withdraw
This process receives the withdraw service request from Select Service. It
then accepts the cash amount required which is entered by the CUSTOMER. A check
(read operation) is then made of the client account. If there is enough money
available, client account is updated and cash dispensed to the CUSTOMER along
with their card and a withdraw receipt. If there is not enough money in the account,
an insufficient funds message is displayed to the CUSTOMER and their card returned.
The Context Diagram for the ATM developed using our tool appears in Figure
4.1
37
Figure 4.1 Context Diagram for ATM
38
Figure 4.2 Overview Diagram for ATM
1) Answer enquiry
The process of receiving an initial enquiry and sending out a catalogue of the
company’s products to CUSTOMERS in response. The initial enquiries are stored in a
file called Enquiries.
39
- Send catalogue: This process receives the catalogue request and sends a
catalogue to the CUSTOMER in response.
2) Validate order
This process receives orders from the CUSTOMER; orders are validated by
reading information from a Catalogue file; valid orders are stored in a Customer
Order file; invalid items are sent to the Return Order function of the business; valid
items are sent to a Process Order function.
3) Return order
This process receives the invalid items list and sends out to the CUSTOMER a
returned order
4) Process order
This process receives valid items from the Validate Order process. To compile
the order, it is necessary to read the Stock file to check item availability. In addition,
the Customer Order file is updated and a record entered in a further file recording
Deliveries to Customers. A note of out of stock items is sent to the Stock Control
function and an items unavailable report sent to the Return Order function, while a
purchase note recording the items to be dispatched to the customer is sent to the
Customer Accounting function.
40
5) Stock control
This process receives details of out of stock items from Process Order (or
more precisely, its Check Stock sub-process). A Deliveries Pending file is checked to
see if these items are already on order. If not, a manufacturer order is sent to the
MANUFACTURER requesting items out of stock; a delivery note is received from
the MANFACTURER when these items arrive. The Stock and Deliveries Pending file
are also updated in response to items received. Finally a payment alert is sent to the
Manufacturer Accounting Function.
6) Customer accounting
This process receives the purchase note from Process Order (or more
precisely, its Arrange Delivery sub-process). A customer invoice is then sent to the
CUSTOMER. On receiving payment in, the Revenue file is updated.
7) Manufacturer accounting
This process receives the payment alert note from Stock Control (or more
precisely, its Receive from Manufacturer sub-process). On receiving a
41
manufacturer invoice from the MANUFACTURER, payment out is sent to the
MANUFACTURER and the Outgoing Ledger file updated.
Figure 4.3 presents Context Diagram (Level 0) showing the top level process
and its external entities.
The following figure (Figure 4.4) presents the Overview Diagram of the seven
main business processes for the mail order company. It shows the flows from external
entities to processes, flows between processes, and flows to/from data stores (files)
indicating read/write operations.
42
Figure 4.4 Overview Diagram for Mail Order Company
The following figures (4.5, 4.6 and 4.7) show DFDs showing the relevant sub-
process for the Answer Enquiry, Process Order and Stock Control functions.
43
Figure 4.5 Answer Enquiry Sub-Process
44
Figure 4.7 Stock Control Sub-Process
4.4 Summary
This chapter has demonstrated support for the Yourdon DFD CASE tool
described in Chapter 3. Two case studies were used to do this, the first showing
Context and Overview diagram, the second, showing Context and Overview, as well
as further process decompositions of three Overview diagram processes.
45
Chapter 5
Conclusions and Future Work
5.1 Introduction
This chapter summarizes the project, draws conclusions, highlights limitations
and provides some directions for further work.
46
The following sections provide a brief introduction to possible directions of
further work in the areas identified above.
47
5.4 Lessons Learned
The original platform chosen for the project was Eclipse IDE + GEF (Graphic
Editing Framework). However, GEF was found to be unsuitable for developing a
CASE tool as it is really just a paintbrush like tool. Instead, the GMF (Graphic
Modeling Framework) - a new model framework from Eclipse was considered more
appropriate. GMF provides two main components which are Runtime and Generation
(tooling) for developing graphical editors. Runtime provides service layer and
significant diagramming capabilities, while Generation uses models to define
graphics, tooling, mapping to domain and generating code to the target Runtime.
Before starting the project, my knowledge was only of the framework from
Eclipse which is used to implement many case tools. In retrospect a more thorough
study of tools available should have been done.
48
References
49
Mattayom, C. (2006). Version management of safety cases. Unpublished master’s
thesis, Shinawatra University, Bangkok, Thailand.
Nuseibeh, B., & Easterbrook, S. (2000). Requirements Engineering: A
roadmap. Proceedings of the International Conference on Software Engineering,
35-46.
Orr, K. (1981). Structured requirements definition.
Paynter, S., Armstrong, J., & Haveman, J. (2000). ADL: An activity description
language for real-time networks. Formal Aspects of Computing, 12(2),
120-144.
Ross, D., & Schoman, K. (1977). Structured analysis and design technique (SADT).
IEEE Transaction on Software Engineering 3(1).
Royce, W. (1970). Managing the development of large software systems:
Concepts and techniques. In Technical Papers of Western Electronic Show and
Convention (WesCon), Los Angeles, USA.
Spanoudakis, G. (2004). Rule-based generation of requirements traceability
relations. Journal of Systems and Software, 72(2), 105-127.
Spivey, J. M. (1989). The Z notation: A reference manual. Prentice-Hall.
Tianvorakoon, A. (2006). Model-based approach to system traceability. Bangkok:
Shinawatra University.
Ward, P. T., & Mellor, S. J. (1985). Structured development for real-time systems.
New Jersey: Prentice Hall.
Yourdon, E. (1988). Modern structured analysis. Prentice-Hall.
50
Biography
51