Você está na página 1de 38

Viable Software

the Intelligent Control Paradigm for Adaptable and Adaptive Systems

cherring@bigond.net.au http://www.charles-herring.com

Overview
Motivation and Approach Systems Thinking: MVC Revisited The Viable Software Architecture Generative Programming Case Studies Conclusion

Trends and Forces


Impersonal Computing
1 computer, N persons Human Out-of-the-loop

Personal Computing
1 computer, 1 person Human In-the-loop

Proactive Computing
N computers, 1 person M computers, N persons Human Above-the-loop

Direction of Evolution
Simple Deterministic
Window Catch Billiards Shop Lay-Out Penny Tossing Brownian Motion Statistical Quality Cont.

Complex
Digital Computers Planetary Systems Automation Stockholding Conditioned Reflexes Industrial Probability

Exceedingly Complex
Empty

Probabilistic

The Economy The Brain The Enterprise

Approach
How do we build these types of software systems? Is there any knowledge from other fields (outside of computer science) that can help? I chose the Viable System Model
Developed by Stafford Beer Based on Information Theory and Cybernetics Claims to capture the invariants of viable systems Viable: able to maintain a separate existence.

Model View Controller


Observer
call update update

Model
coreData setOfObservers attach(Observers) detach(Observers) notify getData service

View attach getData myModel myController


initialize(Model) makeController activate display update

create manipulate display attach call service

Controller
myModel myView initialize(Model,View) handleEvent update

Systems Thinking
Sensor View Model
myProcess myActuator initialize(Process) makeActuator activate output update create manipulate output attach getData

Environment

feedback

Model Process
call update coreData setOfObservers attach(Observers) detach(Observers) notify getData service

commands

Controller Actuator Controller


myProcess mySensor initialize(Process, Sensor) handleEvent update attach call service

Viable Software
A viable software system is Adaptable over time to be Adaptive.

command results

Separate Control
/ Environment: Present responses

/ Controller: Process Model Control Rule

control

command

/ Process: disturbances Critical Variables Computation

Regulator
command results

/ Controller: Process Model Control Rule response

plans / Environment: Present responses command response plans / Process: disturbances Critical Variables Computation * control / Regulator: * Plan

Auditor
command results

/ Controller: Process Model Control Rule audit reports plans audit requests / Environment: Present responses / Auditor: * Queries control / Regulator: * Plan response

command audit reports response audit request / Process: disturbances Critical Variables Computation * plans

command results

rules

Adaptive

/ Adaptive Controller: Self Model feedback observations rules control Rule Base

/ Controller: Process Model Control Rule audit reports plans audit requests / Environment: Present Future command audit reports response audit request / Process: disturbances Critical Variables Computation * plans responses / Auditor: * Queries control / Regulator: * Plan response

Viable Supervisory Software Architecture

goals

policy results

/ Supervisor: Actor Interface Policy Base rules control

/ Adaptive Controller: Self Model feedback observations rules control alerts Rule Base

/ Controller: Process Model Control Rule audit reports plans audit requests / Environment: Present Future command audit reports response audit request / Process: disturbances Critical Variables Computation * plans responses / Auditor: * Queries control / Regulator: * Plan response

Migration of Control Skills


The Gradient of Software Evolution
Adaptive Viable Systems Supervise Multi Agent Systems Human Skills Adapt Intelligent Adaptive Systems Applications Control Operating Systems Adaptable Control Adapt Software System Supervise

A viable software system is Adaptable over time to be Adaptive.

<<environment>>

Recursion
<<viable system>>
/ Supervisor: goals policy results Supervisor-Supervisor rules control

/ Adaptive Controller: Adaptive-Adaptive / Future: rules control

/ Controller: / Present: response audit reports plans audit requests / Past: / Auditor: * control * / Regulator: * alerts

command audit reports audit request <<viable system>> * plans response

Viable Software Framework

<<viable system>>

0 8

6 5 4 3 1 2 3 4 5

9 7 8

Viable Component
0 6 << viable component >> 5 8 1 9 4 3 2

Component Transfer Protocol


0 6 << viable component >>

System 6 5 4 3 Alert Conditions Goals and Policies Models, Simulations, and Data

Sub-System

Resources and Accountability Requirements

5 8 1 9 7 4 3 2

2 1 8 9 7

Initial Plans and Activities Initial Audit and Inspection Queries

Environment to Adaptive Controller Link Environment to Process Link Links to Other Processes

Generative Programming
Product Line Architecture
Meta-level (Complex Adaptive Systems in General)

Viable System Model

Viable Software Architecture

Viable Software Framework

Component Transfer Protocol

Domain Reference Model & Requirements

Application Specific Requirements

Domain Reference Architecture

Domain Framework & Components

Component Configuration Tools

Application

Domain-Specific level (B2B, Agent Systems, Smart Environments, )

Case Studies
Groove: Diagnosing the System
Mapping Groove into the VSA Adding Adaptive Controller for UI

Smart Environments
Design and Usage Scenario Lecture Room Camera Controller

e-Commerce
Evolving a B2B System B2B Contracts

Groove
Mediated Model-View-Controller Groove Levels
Groove Net and Web Services Transceiver Shared Spaces Tools Sets Tool: Storage and Controlling Code

Add Adaptive User Interface Controller

Fuzzy Set Membership Functions


m Never 1 Infrequent Average Frequent Always

-1.0 VerySlow

-0.5 Slow

0.0 Zero

0.5 Fast

1.0

U(t)

VeryFast

-200

-100

100

200 Promoted

d U(t) dt

Invisible Fading Normal Bold 1

10

20

30

40

50

60

V(t)

Inference
Average Zero Normal

-0.5

0.0

0.5

-100

100

20

30

40

If Usage is Average
Average

and Change in Usage is Zero


Fast

Then Visibility is Normal


Bold

-0.5

0.0

0.5

100

200

30

40

50

If Usage is Average

and Change in Usage is Fast

Then Visibility is Bold

10

20

30

40

50

mcrisp = 35

Rule Table
Visibility V VeryFast Always Frequent Usage: U(t) Average Infrequent Never Promoted Promoted Promoted Bold Normal Change in Usage: dU/dt Fast Promoted Promoted Bold Normal Fading Zero Promoted Bold Normal Fading Invisible Slow Bold Normal Fading Invisible Invisible VerySlow Normal Fading Invisible Invisible Invisible

Smart Lecture Room


Wireless Base Station W Tracking Antenna T T Lock Tracking Beacon SmartBoard C2 L
Door

Tracking Antenna C1 Surveillance Camera Wireless Base Station T

Smart Lecture Room

Lecturer Camera RoomController T

Tracking Antenna Audience Camera C3

Smart Camera
Controller SmartCamController SmartCamExecutive SmartCamOperations SmartCamAuditor

SmartCamMSMQBus SmartCamPlanning SmartCamRegulator

Camera SmartCamMSMQBus

ImageProcessor

SmartCamAccountant

SmartCamPlant

Startup Protocol
SmartRoom Goals Executive Planning Operations Regulator Plant SCExecPolicySOP SCExecPolicySOP SCOpsMsgCommand SCExecResources SCPlantMsgModel SCExecMsgStart SCExecPolicySOP SCExecResources SCExecResources SCExecMsgStart SCExecMsgStart SCOpsStartParams SCPlanPlanParams SCOpsMsgStartCmd SCOpsPlan SCOpsPlan SCOpsMsgStartCmd

Operating
SmartRoom Executive Planning Operations Regulator Plant SCPlantRptRoutine (5) SCOpsMsgCommand SCPlanMsgAdvice SCOpsPlan SCOpsPlan SCOpsRptRoutine SCPlanOpsUpdate SCOpsRptRoutine

SCPlantStateChng SCOpsStateChange SCOpsStateChange Event SCOpsStateChange

e-Commerce Retailer.com
B2B and B2C B2B Subsystems
Wholesalers Shippers Exchange Web Site

B2B Controller: uses Visual Rules Studio


Executive: Contracts Planning: Operations and Market Analysis Operations: Purchasing, Accounting, Shipping, and Contracting

Viable Software
A viable software system is Adaptable over time to be Adaptive.

Migration of Control Skills


The Gradient of Software Evolution
Adaptive Viable Systems Supervise Multi Agent Systems Human Skills Adapt Intelligent Adaptive Systems Applications Control Operating Systems Adaptable Control Adapt Software System Supervise

Dimensions of Viability
Financial International Legal National Customers

The Viable System

Corporate Technological (Software)

Related Work
Mary Shaw - Control Paradigm Kokar and Eracar - Self-Controlling Software Adaptive Object Model - Foote, Johnson and Yoder Adaptive Strategy- Olivier Aubert Beck, Highsmith - XP, Adaptive Software Development Oriezy - Self-Adaptive Software

Conclusion
VSM Isomorphic to Intelligent Controller Pattern Language Theory of Autonomy Conways Law

Questions?
cherring@bigond.net.au http://www.charles-herring.com

Você também pode gostar