LEc 7
LEc 7
University
Compu1ng
and
Informa1on
Science
CS
5150
So(ware
Engineering
Models
for
Requirement
Analysis
and
Specifica@on
William
Y.
Arms
Models
for
Requirements
Analysis
and
Specifica@on
Ra@onal
Rose
is
an
IBM-‐owned
system
for
crea@ng
and
managing
UML
models
(diagrams
and
specifica@ons).
It
is
available
on
computers
in
the
Computer
Science
MEng
Lab.
Models:
Diagrams
and
Specifica@on
in
UML
An
informal
modeling
technique
to
show
the
flow
of
data
through
a
system.
External en@@es
Processing steps
Data
flows
Data-‐Flow
Model
Example:
University
Admissions
(first
a^empt)
Rejec@on
Applica@on
Completed
form
Assemble
applica@on
Applicant
Evaluate
applica@on
Acceptance
Acknowledgment Acknowledgment
Special
request
Applicant
database
Decision
Table
Model
Accept X X X
Reject X X X
An
informal
modeling
technique
to
show
the
logic
of
part
of
a
system
and
paths
that
data
takes
through
a
system.
Opera@on
Decision
Manual opera@on
Report
Flowchart
Model
Example:
University
Admissions
Assemble
Applica@on
New
Applica@on
applicant?
complete?
Form
F
Update
T
received
database
T
F
Evaluate
No@fy
New
database
student
record
An
informal
modeling
technique
to
show
the
logic
behind
part
of
a
system.
Example:
University
Admission
Decision
admin_decision
(applica@on)
if
[email protected]
==
null
then
error
(incomplete)
if
[email protected]
>
S1
then
accept(applica@on)
else
if
[email protected]
>
G1
then
accept(applica@on)
else
if
[email protected]
>
S2
and
[email protected]
>
G2
then
accept(applica@on)
else
reject(applica@on)
The
nota@on
used
for
pseudo-‐code
can
be
informal,
or
a
standard
used
by
a
so(ware
development
organiza@on,
or
based
on
a
regular
programming
language.
What
ma^ers
is
that
its
interpreta@on
is
understood
by
everybody
involved.
Modeling
Tools:
Transi@on
Diagrams
0
S1 S2
1 0
1
0 S3 1
Finite
State
Machine
Model
Example:
Therapy
Control
Console
Example:
Radia1on
Therapy
Control
Console
You
are
developing
requirements
for
the
operator's
control
console.
In
an
interview,
the
client
describes
the
procedures
that
the
operator
must
follow
when
opera@ng
the
machine.
You
use
a
finite
state
machine
model
to
specify
the
procedures.
This
shows
the
client
that
you
understand
the
requirements
and
specifies
the
procedures
for
the
developers.
Scenario
The
client
provides
the
following
rough
scenario.
"The
set
up
is
carried
out
before
the
pa@ent
is
made
ready.
The
operator
selects
the
pa@ent
informa@on
from
a
database.
This
provides
a
list
of
radia@on
fields
that
are
approved
for
this
pa@ent.
The
operator
selects
the
first
field.
This
completes
the
set
up.
"The
pa@ent
is
now
made
ready.
The
lock
is
taken
off
the
machine
and
the
doses
with
this
field
are
applied.
The
operator
then
returns
to
the
field
selec@on
and
chooses
another
field."
Finite
State
Machine
Model
State
Transi@on
Diagram
Discuss
each
state
and
transi@on
with
the
[Select
field]
client.
Beam
Pa@ents
Fields
Setup
Ready
on
[Stop]
[lock
on]
[Select
pa?ent]
Finite
State
Machine
Model
State
Transi@on
Table
Select
Select
Enter
lock
off
Start
Stop
lock
on
Pa?ent
Field
Pa@ents Fields
Beam
Ready
Pa@ents
Fields
Setup
on
Beam
Ready
Setup
on
This
table
can
be
used
for
requirements
defini@on,
program
design,
and
acceptance
tes@ng.
Transi@on
Diagram
for
User
Interfaces
Example:
CS
5150
Web
Site
(part)
home
assign-‐
syllabus
projects
books
tests
integrity
about
ments
course
concepts
examples
surveys
materials
scripts
En@ty-‐Rela@on
Model
An en@ty (noun)
Major IsClient
1
1
CS
5150
Client
team
Student
Project
member
1
6
to
8
0:n
1
IsMember
IsContact
En@ty
Rela@onship
Diagram
as
a
Design
Tool
Example:
Database
Schema
for
Web
Data
Event
A
S
Event
1
S
A
Event
n
.
S1
A
Event
1
..
Sm
Event
n
Prototyping
Requirements
A
data
dic1onary
is
a
list
of
names
used
by
the
system
•
Name
(e.g.,
"start_date")
•
Brief
defini@on
(e.g.,
what
is
"date")
•
What
is
it?
(e.g.,
integer,
rela@on)
•
Where
is
it
used
(e.g.,
source,
used
by,
etc.)
•
May
be
combined
with
a
glossary
As
the
system
is
developed,
the
data
dic@onary
in
the
requirements
is
the
basis
of
the
system
data
dic@onary,
which
is
part
of
the
final
specifica@on.
A
Note
on
Class
and
Object
Models
This
course
teaches
class
and
object
models
as
a
tool
for
design,
not
for
modeling
requirements.
Some
people
recommend
class
and
object
models
for
requirements
defini@on,
but
it
is
difficult
to
use
them
without
constraining
the
system
design.
Flow
charts
and
finite
state
machines
are
supported
by
UML
as
design
models,
but
are
equally
useful
for
requirements.