software evolution and evolutionary computation bridging the gap: the cybernetics of auto- adaptive...
TRANSCRIPT
Software Evolution and Evolutionary Computation
Bridging the Gap: The Cybernetics of Auto-Adaptive Software Systems
A.G. Laws, A. Taleb-Bendiab & S.J. Wade
This work is financed by the UK EPSRC (GR/M02958) under the Systems Engineering for Business Process Change (SEBPC) initiative.
School of Computing & Mathematical Sciences
Introduction
Biological EvolutionLamarckDarwin
Neo-darwinism
Random mutationAdaptation & Evolution
GeneticAlgorithms(Holland)
Evolutionarystudies
(Ray's Tierra)
ArtificialIntelligence
??
A-Life(Langton)
Cybernetics
ManagerialCybernetics
SoftwareEngineering
SoftwareMaintenance
SoftwareEvolution
Self-AdaptiveSoftware
Software Engineering and Maintenance The aim of Software Engineering has been described as:
“...the systematic, principled, design and deployment of applications that fulfil software’s original promise - applications that retain their full malleability throughout their lifetime and that are as easy to modify in the field as they are on the drawing board.” (Laddaga,1997)
In the thirty years since its establishment as a discipline many techniques have been introduced in pursuit of this goal, e.g. structured programming - high-level languages- OO - process maturity etc.
(Lehman, ) All require the software designer to predict every software circumstance and code to be provided to deal with the situation.
While significant improvements have undoubtedly resulted, these efforts have failed to deliver on-going malleability and most software systems exhibit a growing fragility caused by continual adaptation to meet changing requirements.
There is growing evidence to suggest that it is time to reconsider the engineering and maintenance of software systems in a similar manner to physical products and that a more biologically-oriented view should be adopted.
Software Evolution Instrumental in this changed perception has been Lehman’s many
contributions on Software Evolution: Beginning with the description of any software program as:
“...a model of a model within a theory of a model of an abstraction of some portion of the world or of some universe of discourse. (Lehman, 1980)
Allowed a software classification scheme to be derived based on the degree of homomorphism required to obtain a suitable mapping. S-type - fully specifiable i.e. a fully isomorphic mapping is obtainable. P-type - fully isomorphic mapping unobtainable, abstraction and approximation
introduced. E-type - models human activity, abstraction and assumptions embedded, changes
the problem situation, and leads to continuing change and establishes feedback loop, i.e. software operates in a changing environment
Uncertainty Principle - “...the outcome of a real world software system is uncertain and the precise area of uncertainty is also not knowable.”
Laws of Software Evolution - particularly the Eighth “Software evolution processes constitute multi-level, multi-loop, feedback systems
and must be treated as such to achieve any significant improvement over any reasonable base.” (Lehman, 1997)
Self-Adaptive Software Defined by Laddaga in the 1997 DARPA Broad Agency
Announcement as: “...software that evaluates its own performance and changes
behaviour when the evaluation indicates that it is not accomplishing what the software is intended to do...”.
To adapt, the system reacts to environmental change - the problem is recognising the need for change, then planning, enacting and verifying the change - these are management issues - self-managing systems
Progress to date has been informed by three guiding metaphors control systems theory dynamic planning systems self-aware or reflective systems.
“Managing complexity is a key goal of self-adaptive software. If a program must match the complexity of the environment in its own structure it will be very complex indeed! Somehow we need to be able to write software that is less complex than the environment in which it is operating yet operate robustly.” (Robertson, Laddaga et al, 2000)
A View of Biological Adaptation and Evolution Living systems can be described in terms of interdependent variables, each
capable of varying over a range with upper and lower bounds, e.g. bodily temperature, blood pressure, heart rate etc. Environmental change may cause fluctuations but bodily control mechanisms autonomically act to maintain variables at a stable level, i.e. homeostatic equilibrium with the environment
Three types of adaptation to environmental disturbance are available to higher organisms: Short-term change - e.g. Environmental temperature change moves the bodily
temperature variable to an unacceptable value. This rapidly induces an autonomic response in the (human) organism i.e. either perspiring to dissipate heat or shivering to generate heat. Such adaptation is quickly achieved and reversed.
Somatic change - prolonged exposure to environmental temperature change results in the impact of the change being absorbed by the organism i.e. acclimatization. Such change is slower to achieve and reverse.
Genotypic change - adaptation through mutation and hence evolution. A species adapts to change by shifting the range of some variables. e.g. in a cold climate grow thicker fur. Such genotypic change is recorded at a cellular level and becomes hereditary and is irreversible in the lifetime of the individual.
Cybernetics: The Foundations of the Bridge A cross-disciplinary approach developed in the 1940’s and
broadly encompassing contributions from biology, social sciences and nascent computer science.
Wiener defined cybernetics as
“the science of communication and control in the animal and machine”.
Ashby’s contribution... Both the system and the environment in which it exists are
represented by a set of variables that represent that form a state-determined system
Consequently, the environment is defined as those variables whose changes affect the system and those variables that are affected by the system.
Complexity as Variety, i.e. The number of different states a system can adopt.
Ashbean Cybernetics The Homeostat - ultra-stable system
capable of returning to stability after it has been disturbed in a way not envisaged by the designer.
Self-vetoing homeostasis Variety Engineering
The notion of balancing the varieties of systems with different variety levels
Environment - huge variety Operation - much less variety Management - even less variety
Achieved through attenuation and amplification
The Law of Requisite Variety control can only be attained if the variety of the controller is at least as great as the situation to be controlled.
K eyV = V a rie ty
E n v iro n m en t
V V
S y stem
M a n a g e m e n tU n it
V
= A tten u a tion
= A m p lifica tion
Managerial Cybernetics Beer’s VSM implements a control
& communication structure via hierarchies of homeostats (feedback loops)
6 major systems ensure ‘viability’ of the system Implementation S1 Monitoring S2 Audit S3* Control S3 Intelligence S4 Policy S5
Offers an extensible, recursive, model-based architecture, devolving autonomy to sub-systems
Here andNow
Future
Homeostasis
N am e of th e V iab le S ys tem in F ocu s :
T h e V ia b le S ystem M od e l
F orm at © S . B ee r 1 9 8 5
F IV E - P olicy
Sys tem F OU RE x te rn a l & F u tu reS e lf-re fe re n c eS im u la tio nP la n n in g
Sys tem THR E EIn te rn a l & C u rre n tS e lf-o rg a n iz a tio nA u to n o m ic re g u la tio n
ON E
ON E
ON E
L o ca lR eg u la to ry
L o ca lR eg u la to ry
L o ca lR eg u la to ry
S y s te m T W Oa n ti-o sc illa to ry
S y s te m T H R E E *S p o ra d ic A u d it
T W O L o ca la n ti-o sc illa to ry
T W O L o ca la n ti-o sc illa to ry
T W O L o ca la n ti-o sc illa to ry
F u tu re
T O T A LE n v iro n m en t
Direction
What We’re Doing With This Our first attempts saw the
design of a Viable Adaptive Agent Architecture.
Based on Bratman et al’s IRMA approach, the design incorporates a beliefs, desires, intentions (BDI) approach.
The design specifies, in some detail, the higher, deliberative processes of adaptation.
In some respects, the ready-mapping shows the applicability of the VSM-based approach.
Desires
Wor
ldM
odel Deliberation
Process
Intentions
OpportunityAnalyser
EnvironmentalScan
FilteringProcess
Plans
S
urvi
ving
Pla
ns
Intentions
Planning Process
PlanLibrary
Reasoner
Internal Model
InternalModel
Status
ResourceBargaining
Process
Intentions
Overall Plans
Resources
Acco
unta
bilit
y Intentions
System Three
System Four
System Five
Operational
Status
Scheduling
Ov er a ll Sch e dul eLocal Plans
Local Schedule
Local Monitoring data
Local Monitoring data
Local Monitoring data
Ove
rall
Sche
dule
Mon
itorin
g to
nex
t rec
ursio
n
Monitoring data
Perhaps more excitingly: A Practical ApplicationIn-Vehicle Telematics System (IVTS)
IVTS cover a broad range of computer-based systems, these may include or combine: Engine Management Systems Driver’s Information Systems Vehicle Navigation & Tracking Systems Collision Avoidance Systems Vehicle Security Systems
Using Jini + Java RMI allows distributed applications to be developed as a series of clients that interact with application services via a look-up service.
The service-oriented abstraction considers a service as a logical concept that can be discovered dynamically by a client and used according to a contract of use
S ys te m 5P o lic y
S ys te m 4In te llig e n c e
S ys te m 3C o n t ro l
System 3*A udit
V eh icle 1 (S1)
5
4
3
2
2
2
2
3 *
1
Org
an
iza
tion
al E
nvi
ron
me
nt
S y stem 2C o o rd in a tio n
S y stem 2C o o rd in a tio n
V eh icle 2 (S1)
5
3
43 *
1
S y stem 2C o o rd in a tio n
V eh icle 3 (S1)
5
3
43 *
1
S y stem 2C o o rd in a tio n
More IVTS
Removable In-VehicleComputer / Mobile Data
Terminal
EngineManagement
Anti-SlipBraking
High Speed Serial Bus (CAN 2.0 / SAE J1939)
Low Speed Serial Bus (SAE J1850)
DriverInformation
System
TrafficInformation
(TrafficMaster)
USB
/ IEEE
1394
PC
MIA
DocumentScanner
Printer
Wireless WAN(GSM)
Wireless LAN(Spread Spectrum /
Bluetooth)
CD ROM
DockingCradle
RadarCollision
Avoidance
AutonomousDriving
RouteGuidance(CARIN)
AccidentRecording
INTEGRATED IN-VEHICLE
TELEMATICS SYSTEM
Monitoring & Instrumentation Considerations In order to debug, monitor and
manage Jini applications, a dynamic instrumentation system, based again on Jini technology has been developed
Uses: Monitor service - connects with an
application or lookup service and observes dynamic parameters
Logger utility - invoked by a monitor to record data
Analyzer utility - invoked by a monitor to compute complex parameters
A Management Service creates and controls the monitor service
LookupServices
ApplicationServices
JVMsMonitorServices
ManagementServices
AnalyzerUtilities
ObservationsandMeasurements
MonitorConfiguration
Jini ApplicationInstrumentationSystem
LoggerUtilities
Clients
The instrumentation system is implemented by combining Jini’s code mobility capabilities Java’s dynamic proxies Jini’s event models
To apply instrumentation: the management service requests
the application service to set an instrumented parameter
The Look-up service monitor detects a change of state and notifies client
Management service wraps service in monitor service and sends proxy to client
Some Implications and Final Comments
The complete realization of a self-adaptive software system using the conceptual guidance of classical cybernetics and the VSM still has some way to go. Indeed, it isn’t yet clear that full realization is possible and there are still many problems outstanding.
Nevertheless, using off-the-shelf technology that does not necessarily reflect this viewpoint exactly has allowed us to make significant progress and indicates that this approach may supply a ready-made theoretical underpinning for self-adaptive software.
Such approaches herald an exciting new era in software development and offer the potential to realize the fulfil software’s original promise .