Sei sulla pagina 1di 11

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Lecture 2: Context for RE What is engineering?


Last
Last Week:
Week: “Engineering is the development of cost-effective solutions to practical
INTRO
INTRO problems, through the application of scientific knowledge”
Syllabus
Syllabus
Course
CourseGoals
Goals
Definitions
“…Cost-effective…”
Definitions
! Consideration of design trade-offs, esp. resource usage
This
This Week:
Week: ! Minimize negative impacts (e.g. environmental and social cost)
Context
Context for
for RE
RE
What
“… Solutions …”
What isis Engineering?
Engineering?
Types ! Emphasis on building devices
Types of of engineering
engineering project
project
RE
RE inin the
the engineering
engineering lifecycle
lifecycle “… Practical problems …”
Systems
Systems Thinking
Thinking ! solving problems that matter to people
! improving human life in general through technological advance

Next
Next Week:
Week: “… Application of scientific knowledge …”
Project
ProjectStarting
Startingpoints:
points: ! Systematic application of analytical techniques
{Stakeholders,
{Stakeholders, Boundaries,
Boundaries,
Goals,
Goals,Scenarios,
Scenarios,Risks}
Risks}

© 2000-2004, Steve Easterbrook 1 © 2000-2004, Steve Easterbrook 2

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Devices vs. Systems Is software different?


! Normal design: ! Software is different!
! Old problems, whose solutions are well known ! software is invisible, intangible, abstract
" Engineering codifies standard solutions " Software alone is useless - its purpose is to configure some hardware to do
" Engineer selects appropriate methods and technologies something
! Design focuses on well understood devices ! there are no physical laws underlying software behaviour
" Devices can be studied independent of context
! there are no physical constraints on software complexity
" Differences between the mathematical model and the reality are minimal
! software never wears out
! Radical design: " …traditional reliability measures don’t apply
! software can be replicated perfectly
! Never been done, or past solutions have failed
" …no manufacturing variability
" Often involves a very complex problem
! Bring together complex assemblies of devices into new systems ! Software Myths:
" Such systems are not amenable to reductionist theories
! Myth: Cost of software is lower than cost of physical devices
" Such systems are often soft: no objective criteria for describing the system
! Myth: Software is easy to change
! Examples: ! Myth: Computers are more reliable than physical devices
" Most of Computer Engineering involves normal design ! Myth: Software can be formally proved to be correct
" All of Systems Engineering involves radical design (by definition!) ! Myth: Software reuse increases safety and reliability
" Much of Software Engineering involves radical design (soft systems!)
! Myth? Computers reduce risk over mechanical systems
© 2000-2004, Steve Easterbrook 3 © 2000-2004, Steve Easterbrook 4
University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Professional Responsibility Project Management


! ACM/IEEE code of ethics: ! A manager can control 4 things:
! PUBLIC - act consistently with the public interest.
! CLIENT AND EMPLOYER - act in a manner that is in the best interests of your client ! Resources (can get more dollars, facilities, personnel)
and employer, consistent with the public interest. ! Time (can increase schedule, delay milestones, etc.)
! PRODUCT - ensure that your products and related modifications meet the highest ! Product (can reduce functionality - e.g. scrub requirements)
professional standards possible. ! Risk (can decide which risks are acceptable)
! JUDGEMENT - maintain integrity and independence in your professional judgment.
! MANAGEMENT - subscribe to and promote an ethical approach to the management of ! To do this, a manager needs to keep track of:
software development and maintenance.
! Effort - How much effort will be needed? How much has been expended?
! PROFESSION - advance the integrity and reputation of the profession consistent with
the public interest. ! Time - What is the expected schedule? How far are we deviating from it?
! COLLEAGUES - be fair to and supportive of your colleagues. ! Size - How big is the planned system? How much have we built?
! SELF - participate in lifelong learning and promote an ethical approach to the practice ! Defects - How many errors are we making? How many are we detecting?
of the profession. " And how do these errors impact quality?

! Of particular relevance in RE: ! Initially, a manager needs good estimates


! Competence - never misrepresent your level of competence ! …and these can only come from a thorough analysis of the problem.
! Confidentiality - respect confidentiality of all stakeholders
! Intellectual property rights - respect protections on ideas and designs
! Data Protection - be aware of relevant laws on handling personal data You
Youcannot
cannotcontrol
controlthat
thatwhich
whichyou
youcannot
cannotmeasure!
measure!
© 2000-2004, Steve Easterbrook 5 © 2000-2004, Steve Easterbrook 6

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Where Projects Come From Software Types


! Initiation of the project ! Source of Requirements: ! Information Systems
! Problem-driven ! Customer-specific
! software to support organizational work
" A problem has arisen that demands a " Specific customer with a specific
response problem ! includes files/databases as well as applications
" e.g. existing system is “broken” " The customer is the ultimate authority ! More than 70% of all software falls in this category, written in languages
! Change-driven ! Market-based such as COBOL, RPG and 4GLs.
" Changes in the business or its " System designed to be sold widely
environment " Examples: Payroll and personnel, Financial transactions, Customer relations
" Marketing team acts as proxy for
" existing system becoming less useful customers & users database, …
! Opportunity-driven " Product must generate customers
" New technology opens up new ! Socially-useful ! Control Systems
possibilities; " System is intended as a general benefit ! software that drives some sort of a hardware process
" New markets open up; to society
" etc " No (paying) customer
" Examples: flight control, industrial plant, an elevator system, credit card reader.
! Legacy-driven " E.g. some open source / free software;
" Project created because of prior software created in scientific research ! Generic Services
commitment ! Hybrid ! systems that provide some services for other systems
" e.g earlier work left unfinished " developed for a specific customer, but
want to market the software eventually " Examples: many internet applications, e.g. search engines, stock quote services,
credit card processing, etc.
! Such systems will be developed using a variety of languages and middleware,
including Java, C++, CORBA, HTML/XML etc.

© 2000-2004, Steve Easterbrook 7 © 2000-2004, Steve Easterbrook 8


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Project Context Lifecycle of an Engineering Project


! Existing System ! Lifecycle models
! There is nearly always an existing system ! Useful for comparing projects in general terms
" May just be a set of ad hoc workarounds for the problem ! Not enough detail for project planning
! Studying it is important:
" If we want to avoid the weaknesses of the old system… ! Examples:
" …while preserving what the stakeholders like about it ! Sequential models: Waterfall, V model
! Rapid Prototyping
! Pre-Existing Components
! Phased Models: Incremental, Evolutionary
! Benefits:
! Iterative Models: Spiral
" Can dramatically reduce development cost
" Easier to decompose the problem if some subproblems are already solved ! Agile Models: eXtreme Programming
! Tension:
" Solving the real problem vs. solving a known problem (with ready solution)
! Comparison: Process Models
! Used for capturing and improving the development process
! Product Families
! Vertical families: e.g. ‘basic’, ‘deluxe’ and ‘pro’ versions of a system
! Horizontal families: similar systems used in related domains
" Need to define a common architecture that supports anticipated variability

© 2000-2004, Steve Easterbrook 9 © 2000-2004, Steve Easterbrook 10

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Waterfall Model V-Model


perceived
need ! View of development:

Level of abstraction
! a process of stepwise refinement system system
! largely a high level management requirements integration
requirements view

! Problems: software acceptance


! Static view of requirements - requirements test
design ignores volatility
! Lack of user involvement once preliminary software
specification is written design integration
! Unrealistic separation of
“analyse “test
code specification from design
and detailed component and
! Doesn’t accommodate
design test integrate”
prototyping, reuse, etc. design”
test
code and unit
debug test

integrate
time

© 2000-2004, Steve Easterbrook 11 © 2000-2004, Steve Easterbrook 12


Source: Adapted from Dorfman, 1997, p7 & Loucopoulos & Karakostas, 1995, p29
University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Prototyping lifecycle Phased Lifecycle Models


Source: Adapted from
Dorfman, 1997, p9

Release 1
Incremental development
design code test integrate O&M
(each release adds more
Preliminary design build evaluate release 2
functionality)

Requirements
requirements prototype prototype prototype design code test integrate O&M
release 3
design code test integrate O&M

Specify full release 4


design code test integrate
requirements design code test integrate O&M

version 1
! Prototyping is used for:
reqts design code test integrate O&M
! understanding the requirements for the user interface
! examining feasibility of a proposed design approach lessons learnt
version 2
! exploring system performance issues
reqts design code test integrate O&M
! Problems: lessons learnt
! users treat the prototype as the solution Evolutionary development version 3
! a prototype is only a partial specification (each version incorporates reqts design code test integrate
new requirements)
© 2000-2004, Steve Easterbrook 13 © 2000-2004, Steve Easterbrook 14
Source: Adapted from Dorfman, 1997, p10

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

The Spiral Model Agile Models


Determine goals, Evaluate
alternatives,
ts 4 ris alternatives ! Basic Philosophy
ain
constraints str ka
! Reduce communication barriers E.g. Extreme Programming
con nal
ysi and risks
s3 s " Programmer interacts with customer
int 4
! Instead
! Instead of
of aa requirements
requirements spec,
spec,
s tra ris
con ka ! Reduce document-heavy approach use:
nal use:
4

ysi
es

- s " Documentation is expensive and of


str " User
User story
story cards
tiv

" cards
Con
3
3
es

ri limited use
na

aint
s2 ana sk " On-site
" On-site customer
customer representative
representative
tiv
er

lys ! Have faith in the people


na

es
ive -
alt

is ! Pair
! Pair Programming
Programming
at ern

tiv
er

na ints risk 2
s2

er " Don’t need fancy process models to tell


alt

analysi
alt stra ! Small
Small releases
releases
Al

n s1 them what to do! !


co
budget4 budget3 budget2 budget1 prototype1 prototype2 prototype3 prototype4
! Respond to the customer " E.g.
" E.g. every
every three
three weeks
weeks
requ concept of " Rather than focussing on the contract ! Planning
! Planning game
game
me e
s

ire
i r e ar
nt

aile

lifec ments, " Select


Select and
and estimate
estimate user
user story
story cards
cards
ign

operation "
w
r e soft

ycle
Weaknesses
sig e

at
at the
the beginning
beginning of
of each
each release
det

release
des

plan
de war

dev !
qu

elo
n

! Write
Write test
test cases
cases before
before code
ft

pm ! Relies on programmer’s memory ! code


ent ated
so

int
egr pla
n valid ents ! The
! The program
program code
code is
is the
the design
design doc
doc
" Code can be hard to maintain
ati irem
de

on requ " Can


Can also
also use
use CRC
CRC cards
cards (Class-
co

and ! Relies on oral communication " (Class-


tes ed, Responsibility-Collaboration)
Responsibility-Collaboration)
tp dat it " Mis-interpretation possible
lan vali sign un t
i e d de te
s Develop ! Assumes single customer ! Continuous
! Continuous Integration
Integration
f
veri em " Integrate
" Integrate and
and test
test several
several times
times aa day
day
Plan syst and representative
implemen acceptance test
tation pl
an test " Multiple viewpoints not possible
test ! Only short term planning
" No longer term vision
© 2000-2004, Steve Easterbrook 15 © 2000-2004, Steve Easterbrook 16
Source: Adapted from Pfleeger, 1998, p57 Source: Adapted from Nawrocki et al, RE’02
University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Extreme Programming Is there a “Requirements Lifecycle”

Collect
User stories
Specification

Planning
Each cycle: game
Release
approx 2 weeks complete Agreement

Write test common


cases fair
code view

integrate personal
view
test vague
Representation
informal semi-formal formal

© 2000-2004, Steve Easterbrook 17 © 2000-2004, Steve Easterbrook 18

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Inquiry Cycle
Note similarity with
Prior Knowledge Process of scientific can you RAIN, RAIN
(e.g. customer feedback) Investigation: stop the GO AWAY!
Requirements models are
RAIN?
Initial hypothesis theories about the world;
Designs are tests of those
theories
Observe
(what is wrong with
the current system?)
Look for anomalies - what can’t
the current theory explain?
Model …it’s what is it you
Intervene really want?
(describe/explain the snowing!
(replace the old system)
observed problems)
Carry out the Design experiments to Create/refine
experiments test the new theory a better theory

Design
(invent a better system)

© 2000-2004, Steve Easterbrook 19 © 2000-2004, Steve Easterbrook 20


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

The story so far:


! What is engineering?
! Not that different from science
! Greater awareness of professional responsibility
" because of immediate scope for harm to the public
! Systems and Software Engineering involve radical design

! Engineering Projects
! You cannot control that which you cannot measure Systems Thinking
" …and many important measures are derived from initial problem analysis
! Constraints:
" Is there a customer?
" Existing system / existing components / existing product family

! Project Lifecycles
! Useful for comparing projects in general terms
! Represent different philosophies in software development
! Requirements evolve through their own lifecycles too!

© 2000-2004, Steve Easterbrook 21 © 2000-2004, Steve Easterbrook 22

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

General Systems Theory Role of the Observer


! How scientists understand the world: ! Achieving objectivity in scientific inquiry
! Reductionism - break a phenomena down into its constituent parts 1. Eliminate the observer
" E.g. reduce to a set of equations governing interactions " E.g. ways of measuring that have no variability across observers
! Statistics - measure average behaviour of a very large number of instances 2. Distinguish between scientific reasoning and value-based judgement
" E.g. gas pressure results from averaging random movements of zillions of atoms " Science is (supposed to be) value-free
" Error tends to zero when the number of instances gets this large " (but how do scientists choose which theories to investigate?)

! But sometimes neither of these work: ! For complex systems, this is not possible
! Systems that are too interconnected to be broken into parts ! Cannot fully eliminate the observer
! Behaviour that is not random enough for statistical analysis " E.g. Probe effect - measuring something often changes it
" E.g. Hawthorne effect - people react to being studied
! General systems theory ! Our observations biased by past experience
! Originally developed for biological systems: " We look for familiar patterns to make sense of complex phenomena
" E.g. to understand the human body, and the phenomena of ‘life’ " E.g. try describing someone’s accent

! Basic ideas:
" Treat inter-related phenomena as a system
! Achieving objectivity in systems thinking
" Study the relationships between the pieces and the system as a whole ! Study the relationship between observer and observations
" Don’t worry if we don’t fully understand each piece ! Look for observations that make sense from many perspectives

© 2000-2004, Steve Easterbrook 23 © 2000-2004, Steve Easterbrook 24


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Relativism Relativism is everywhere


! Truth is relative to many things ! Truth often depends on the observer
! The meanings of the words we use ! “Emergent properties of a system are not predictable from studying the
" E.g. law of gravity depends on correct understanding of “mass”, “distance”, parts”
“force” etc " Whose ability to predict are we talking about?
! The assumptions we make about context ! “Purpose of a system is a property of the relationship between system &
" E.g. law of gravity not applicable at subatomic level, or near the speed of light environment”
" E.g. Which is the step function: " What is the purpose of: General Motors? A University? A birthday party?

The agricultural revolution Transistor switching ! Weltanshaungen (! “worldviews”)


Food production

! Our Weltanshaungen permeate everything

Current
" The set of categories we use for understanding the world
" The language we develop for describing what we observe

! Ethno-centrism (or ego-centrism)


! The tendency to assume one’s own category system is superior
" E.g. “In the land of the blind, the one-eyed man is king”
Time 10-9 sec Time " But what use would visually-oriented descriptions be in this land?
4000 years

© 2000-2004, Steve Easterbrook 25 © 2000-2004, Steve Easterbrook 26

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

The principle of complementarity Definition of a system


! Raw observation is too detailed ! Ackoff’s definition:
! We systematically ignore many details ! “A system is a set of two or more elements that satisfies the following
" E.g. the idea of a ‘state’ is an abstraction conditions:
! All our descriptions (of the world) are partial, filtered by: " The behaviour of each element has an effect on the behaviour of the whole
" Our perceptual limitations " The behaviour of the elements and their effect on the whole are interdependent
" Our cognitive ability " However subgroups of elements are formed, each has an effect on the behaviour
" Our personal values and experience of the whole and none has an independent effect on it”

! Complementarity: ! Other views:


! Two observers’ descriptions of system may be: ! Weinberg: “A system is a collection of parts, none of which can be changed
" Redundant - if one observer’s description can be reduced to the other on its own”
" Equivalent - if redundant both ways " …because the parts of the system are so interconnected
" Independent - if there is no overlap at all in their descriptions ! Wieringa: “A system is any actual or possible part of reality that, if it
" Complementary - if none of the above hold exists, can be observed”
! Any two partial descriptions (of the same system) are likely to be complementary " …suggests the importance of an observer
! Complementarity should disappear if we can remove the partiality ! Weinberg: “A system is a way of looking at the world”
" E.g. ask the observers for increasingly detailed observations " Systems don’t really exist!
! But this is not always possible/feasible " Just a convenient way of describing things (like ‘sets’)

© 2000-2004, Steve Easterbrook 27 © 2000-2004, Steve Easterbrook 28


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Elements of a system Conceptual Picture of a System


! Boundary ! Subsystems
! Separates a system from its ! Can decompose a system into parts
environment ! Each part is also a system
! Often not sharply defined ! For each subsystem, the remainder
! Also known as an “interface” of the system is its environment
! Subsystems are inter-dependent
! Environment
! Part of the world with which the ! Control Mechanism
system can interact ! How the behaviour of the system is
! System and environment are inter- regulated to allow it to endure
related ! Often a natural mechanism

! Observable Interactions ! Emergent Properties


! How the system interacts with its ! Properties that hold of a system, but
environment not of any of the parts
! E.g. inputs and outputs ! Properties that cannot be predicted
from studying the parts

© 2000-2004, Steve Easterbrook 29 © 2000-2004, Steve Easterbrook 30

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Hard vs. Soft Systems Types of System


Hard Systems: Soft Systems: ! Natural Systems ! Human Activity Systems
! E.g. ecosystems, weather, water ! E.g. businesses, organizations,
! The system is… ! The system… cycle, the human body, bee colony,… markets, clubs, …
! …precise, ! …is hard to define precisely ! Usually perceived as hard systems ! E.g. any designed system when we
! …well-defined ! …is an abstract idea also include its context of use
! …quantifiable ! …depends on your perspective
! Abstract Systems " Similarly for abstract and symbol
! E.g. set of mathematical equations, systems!

! No disagreement about: ! Not easy to get agreement computer programs,…


! Information Systems
! Where the boundary is ! The system doesn’t “really” exist ! Interesting property: system and
! Special case of designed systems
! What the interfaces are ! Calling something a system helps us description are the same thing
" Part of the design includes the
The internal structure to understand it
!
! Symbol Systems representation of the current state of
some human activity system
! Control mechanisms ! Identifying the boundaries,
! E.g. languages, sets of icons, ! E.g. MIS, banking systems,
! The purpose ?? interfaces, controls, helps us to
streetsigns,… databases, …
predict behaviour
! Examples ! The “system” is a theory of how
! Soft because meanings change
some part of the world operates
! Control systems
! A car (?) ! Designed Systems ! Special case of designed systems
! Examples: ! E.g. cars, planes, buildings, " Designed to control some other system
freeways, telephones, the internet,… (usually another designed system)
! All human activity systems
! E.g. thermostats, autopilots, …

© 2000-2004, Steve Easterbrook 31 © 2000-2004, Steve Easterbrook 32


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Information Systems Control Systems

Maintains Tracks and controls


Needs Needs to ensure
information the state of
information safe control of
about
about

Subject System Subject system

Uses Uses

Usage System Information system Usage System Control system

contracts builds contracts builds

Development System Development System


© 2000-2004, Steve Easterbrook 33 © 2000-2004, Steve Easterbrook 34
Source: Adapted from Loucopoulos & Karakostas, 1995, p73

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Software-Intensive Systems Open and Living Systems


! Openness
! The degree to which a system can be distinguished from its environment
! A closed system has no environment
" If we describe a system as closed, we ignore its environment
" E.g. an egg can be described as a closed system
! A fully open system merges with its environment

! Living systems
! Special kind of open system that can preserve its identity and reproduce
" Also known as “neg-entropy” systems
! E.g. biological systems
" Reproduction according to DNA instructions
! E.g. Social systems
" Rules of social interaction act as a kind of DNA

© 2000-2004, Steve Easterbrook 35 © 2000-2004, Steve Easterbrook 36


University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Purposefulness Scoping a system


! Types of behaviours: ! Choosing the boundary
!Reaction to a stimulus in the environment ! Distinction between system and environment depends on your viewpoint
"The stimulus is necessary and sufficient to cause the reaction
! Choice should be made to maximize modularity
!Response to a stimulus in the environment
"The stimulus is necessary but not sufficient to cause the response ! Examples:
!Autonomous act: " Telephone system - include: switches, phone lines, handsets, users, accounts?
"A system event for which a stimulus is not necessary " Desktop computer - do you include the peripherals?
! Tips:
! Systems can be: " Exclude things that have no functional effect on the system
!State-maintaining " Exclude things that influence the system but which cannot be influenced or
"System reacts to changes in its environment to maintain a pre-determined state controlled by the system
"E.g. thermostat, some ecosystems
" Include things that can be strongly influenced or controlled by the system
!Goal-directed
" Changes within a system should cause minimal changes outside
"System can respond differently to similar events in its environment and can act autonomously in an
unchanging environment to achieve some pre-determined goal state " More ‘energy’ is required to transfer something across the system boundary than
"E.g. an autopilot, simple organisms within the system boundary
!Purposive
"System has multiple goals, can choose how to pursue them, but no choice over the goals themselves ! System boundary should ‘divide nature at its joints’
"E.g. computers, animals (?)
! Choose the boundary that:
!Purposeful " increases regularities in the behaviour of the system
"System has multiple goals, and can choose to change its goals
" simplifies the system behavior
"E.g. people, governments, businesses, animals

© 2000-2004, Steve Easterbrook 37 © 2000-2004, Steve Easterbrook 38

University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Example Scoping Problem Layers of systems

Subsystems System Environment


appropriate for:
Secretary

Subscriber’s
Analysis of repair Wires, connectors,
problems receivers household phone Telephone calls.
interrupts system

Analysis of Subscribers’ phone Regional phone


Exchange Marsha
phone individual phone Telephone calls
Steve systems network
phone calls
influences
Toby Student Analysis of regional Telephone calls Regional phone National telephone
influences charge sales strategy network market and trends
rates
Analysis of phone Regional phone National telephone Global communication
company’s long
networks market and trends systems
term planning

© 2000-2004, Steve Easterbrook 39 © 2000-2004, Steve Easterbrook 40


Source: Adapted from Carter et. al., 1988, p6
University of Toronto Department of Computer Science University of Toronto Department of Computer Science

Describing System Behaviour Summary: Systems Thinking


! State
! a system will have memory of its past interactions, i.e. ‘state’
! the state space is the collection of all possible states

! Discrete vs continuous
! a discrete system:
" the states can be represented using natural numbers
! a continuous system:
" state can only be represented using real numbers
! a hybrid system:
" some aspects of state can be represented using natural numbers

! Observability
! the state space is defined in terms of the observable behavior
! the perspective of the observer determines which states are observable

© 2000-2004, Steve Easterbrook 41 © 2000-2004, Steve Easterbrook 42


Source: Adapted from Wieringa, 1996, p16-17

Potrebbero piacerti anche