Cybernetics and Software

geographertonguesAI and Robotics

Nov 30, 2013 (3 years and 8 months ago)

137 views

Cybernetics and Software

Dr K. Dimopoulos

CITY College

2

Cybernetics:


Control and Communication in the
Animal and the Machine

-
Norbert Wiener, 1944


[n] The field of science concerned with
processes of communication and
control (especially the comparison of
these processes in biological and
artificial systems).

3

Origins


Κυβερνήτης
:

The steersman of a ship,
responsible for controlling the steering
wheel and thus affecting the direction of
the ship.


Governor:

Latin corruption of the Greek
word. Also a 19
th

century centrifugal
mechanism used in mills to control the
angular speed of the mill.

4

Cooking in the old days


When more heat was
required the baker
added more coal or
wood to the stove.


The baker had to
monitor the fire to
keep the temperature
constant.


The baker was part of
the system: no
automation.

5

Modern day cooking


Switch


Heating elements
( resistances)


Thermometer


Thermostat

6

Cybernetic Cycle


Cause


effect in traditional thinking not
enough.


Feedback of information.


The effect is used to determine the next
cause.


This loop in information allows us to
define self
-
regulating systems, where
errors in the system are detected and
are corrected by the system.

7

Software Cybernetics


[n] the field of science
concerned with processes of
communication and control in
software systems.

8

Software Test Process


A software
P

can be in one of the
following states:


Test
:
P

is executed until a failure (or more)
is detected.


Debug
:
P

is investigated to detect and
correct the error(s).


End
: The remaining errors are acceptable.


Testing and Debugging take place
concurrently.

9

When should we stop?


When the quality of
P

is good! But how
can I tell this?



The Quality depends on:



The reliability of
P

to be achieved by a
target date (deadline)


The number of errors remaining in
P

10

Managing the test process


Some Considerations:


Constitution of test team (how many testers to
use?)


Experience of each tester


Selection of test tools


LIMITED BUDGET


The manager must decide how much effort is
needed.


This is like cooking in the old days.

11

Closed Loop (feedback) Control

w
f
+

w
f


+


w
f
+

w
f


+


r
observed
(t)

r
expected
(t)

r
error
(t)

Actual STP

s
c

r
0

STP Model

s
c

r
0

Initial

Settings

(w
f
,

)

Controller





w’
f

+

+




w
f

Test Manager

w
f
: workforce



: quality of the test process

12


Physical and Software Systems: An Analogy

Dashpot

Rigid surface

External force

Xequilibrium

X: Position

Number of remaining

errors

Spring Force

Effective Test Effort

BLOCK

Software

Mass of
the block

Software complexity

Quality of the

test process

Viscosity

Xcurrent

Spring

To err is

Human

13

Physical Systems: Laws of Motion [1]

First Law
:


Every
object
in a state of
uniform motion

tends to
remain in that state of motion unless an
external
force

is applied to it.

Does not (seem to) apply to testing because the
number of errors does not change when no external
effort is applied to the application.

14

Physical Systems: Laws of Motion [2]

Newton’s Second Law:


The relationship between an object's
mass m
, its
acceleration
a
, and the applied force
F

is
F = ma
.

First Postulate:


The relationship between the
complexity S
c

of an
application, its rate of reduction in the number of
remaining errors, and the applied effort

E

is
E=S
c

.

r

..

15

Physical Systems: Laws of Motion [3]

Third Law:



For every
action force
, there is an equal and

opposite
reaction force
.



When an
effort
is applied to test software, it leads to
(mental)
fatigue
on the tester.

Unable to quantify this relationship.

16

Spring = Test force

The magnitude of the
effective test effort

is proportional to the

product of the applied work force and the number of remaining

errors.

f
f
e w r


The magnitude of the
force

of a spring is proportional to the

product of the spring constant and the change in compression.

F kx

17

Dashpot = quality of STP

The

error

reduction

resistance

is

proportional

to

the

error

reduction

velocity

and

inversely

proportional

to

the

overall

quality

of

the

test

phase
.

1
r
e r



The

force

of

a

dashpot

is

proportional

to

the

velocity

and

the

dashpot

constant
.

F dx

18

Deriving the model of the STP


Using the first postulate, the sum of all efforts
must equal the software complexity times the
rate of decrease of errors:

1
f
r
f c
c
e e S r
w r r S r
 

  
  

The above equation is directly proportional to
a standard control problem that has a known
solution.

19

Feedback in STP


Can assist the manager in making
decisions regarding


the expansion of or reduction in workforce
and


the change in the quality of the test
process.


Can provide information about whether
the objectives will be met and if not
what actions to take.