146
From Software Architecture to Software Gardening: New Paradigms for the Development of Complex Adaptive Systems Thomas Gabor, LMU Munich RoSI Lecture 2019-12-16

FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

From Software Architectureto Software Gardening:New Paradigms for the Developmentof Complex Adaptive Systems

Thomas Gabor, LMU MunichRoSI Lecture 2019-12-16

Page 2: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 2

Complex Adaptive Systems

Complexity

Dynamicity

Trust

Page 3: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 3

Software Architecture Complex Adaptive Systems

Complexity

Dynamicity

Trust

Page 4: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 4

Software Architecture Complex Adaptive Systems

Complexity

Dynamicity

Trust

preserve initial consistencythroughout development

Page 5: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 5

Software Architecture Complex Adaptive Systems

Complexity

Dynamicity

Trust

preserve initial consistencythroughout development

continously (re-)establish(partial) consistency frominitial inconsistency

Page 6: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 6

Software Architecture

Software Gardening?

continously (re-)establish(partial) consistency frominitial inconsistency

preserve initial consistencythroughout development

Page 7: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 7

Page 8: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 8

▹ robot starts top left

▹ must visit workstationsof specific colors

in specific order

▹ must not collidewith obstacles

▹ should choosethe shortest path

Page 9: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 9system test

Page 10: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 10

system test

Page 11: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Systems 11

situations

beha

vior

classical system

Page 12: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptive Systems 12

classical system

adaptive system

situations

beha

vior

Page 13: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptive Systems 13

classical system

adaptive system

situations

beha

vior

Adaptation could be realized by…OptimizationAlgorithms

Reinforcement Learning many more

Page 14: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Optimizing Adaptive Systems 14

classical system

adaptive system

situations

beha

vior

optimal behaviorwith respect togoal function

optimal behaviormay changedynamically

Page 15: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

More Adaptive Systems? 15

situations

beha

vior

Orange is at least as adaptive as Red<=> Orange can solve at least the situations Red can solveAND Orange performs at least as close to the optimum as Red

Page 16: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 16

system test

adaptation

Page 17: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 17

System test

adaptation

bettersystem

Page 18: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 18

System test

adaptation

BesseresSystemeven

bettersystem

Page 19: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 19

System test

adaptation

BesseresSystemeven

bettersystem

Dieselgate problemIf an adaptive system is much more powerful than its test,then it may prefer tricking the test to solving its actual objective.

Page 20: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

situations

beha

vior

Tests 20

test case

Page 21: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

situations

beha

vior

Tests of Adaptive Systems 21

test case

scenarios

Page 22: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

situations

beha

vior

Tests of Adaptive Systems 22

test casetest generator

Page 23: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

situations

beha

vior

Tests of Adaptive Systems 23

test casetest generator

scenarios

logical constraints

requirements

test cases data points

use cases realized baseline

components

Page 24: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

situations

beha

vior

Harder Tests? 24Green is at least as hard as Purple<=> For every scenario generated by Purple, Green generates a scenario that is at least as close to optimal behavior.

Page 25: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 25

System test

adaptation

BesseresSystemeven

bettersystem

adaptation

Page 26: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 26

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bettertest

Page 27: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 27

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

Page 28: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 28

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

is testedby

Page 29: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 29

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

is testedby

is used fortraining

Page 30: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

System and Test 30

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

is testedby

is used fortraining

arms race between system and testScenario Co-Evolution

Page 31: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Coevolution 31

situations

beha

vior

Page 32: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Coevolution 32

situations

beha

vior

Page 33: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Coevolution 33

situations

beha

vior

situations

beha

vior

Page 34: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Coevolution 34

situations

beha

vior

situations

beha

vior

situations

beha

vior

Page 35: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Coevolution 35

situations

beha

vior

situations

beha

vior

situations

beha

vior

When you have too many mice,keep a cat.When you need your lawn mown,keep sheep.

Page 36: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Scenario Co-Evolutionwith Reinforcement Learningand Evolutionary Algorithms

Page 37: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 37system test

Page 38: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 38system test

ReinforcementLearning

Random Generator

Page 39: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Reinforcement Learning 39

Training

Decision

Execution

Reward

RandomInitialization

Result

Page 40: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 40System Test

ReinforcementLearning

Random Generator

Page 41: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 41Test

System

Page 42: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 42Test

System

Random Generator

Page 43: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 43Test

Scenarios

System

Random Generator

Page 44: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 44Test

Scenarios

System

Random Generator

reinforce

Page 45: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 45Test

Scenarios

System

Random Generator

System

reinforce

update

Page 46: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 46Test

Scenarios

System

Random Generator

System

reinforce

update

reinforce

Page 47: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 47Test

Scenarios

System

Random Generator

System

reinforce

update

reinforce

updateSystem

Page 48: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against Random Test 48Test

Scenarios

System

Random Generator

System

reinforce

update

reinforce

updateSystem

reinforce

Page 49: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Small Picture 49system test

ReinforcementLearning

EvolutionaryAlgorithm

Page 50: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Evolutionary Algorithms 50

RandomInitialization Selection

Mutation Recombination

Result

Page 51: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against SCoE Test 51System Test

ReinforcementLearning

EvolutionaryAlgorithm

Page 52: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against SCoE Test 52

Test

System

Random Generator

Page 53: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against SCoE Test 53

Test

System

Random Generator

System

reinforce

update

reinforce

Page 54: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against SCoE Test 54

Test

System

Random Generator

System

reinforce

update

reinforce

evolve

Test

Page 55: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Training against SCoE Test 55

Test

System

Random Generator

System

reinforce

update

reinforce

updateSystem

evolve

Test

Systemupdate

reinforcereinforce

Page 56: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Experimental Setup 56

System

ReinforcementLearning

SCoETest

EvolutionaryAlgorithm

RandomTest

Random Generator

System

ReinforcementLearning

Page 57: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Learning Rates 57

Page 58: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Experimental Setup 58

System

ReinforcementLearning

SCoETest

EvolutionaryAlgorithm

Evaluation

Random Generator

RandomTest

Random Generator

System

ReinforcementLearning

Evaluation

Random Generator

Page 59: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Effective Performance 59

Page 60: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Performance over Time 60

Page 61: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Successful Runs 61

Page 62: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Generated Test Cases 62

Page 63: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Scenario Co-Evolutionas a Tool for Software Engineering

Page 64: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 64

scenario pool

Page 65: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 65

scenario pool

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Page 66: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 66

scenario pool

acquisition

requirements

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Page 67: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 67

augmentation

scenario pool

acquisition

system performance: ??

requirements

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Page 68: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 68

augmentation

scenario pool

break down

acquisition

system performance: ??

requirements

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Page 69: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 69

augmentation

scenario pool

break down

evaluationacquisition

system performance: 42

system performance: ??

requirements

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Page 70: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Criticality Focus 70

augmentation

scenario pool

break down

evaluationacquisition

system performance: 42

system performance: ??

requirements

all means of generatingnew scenarios arecontinuously beingexplored in order toachieve sufficient coverageof the scenario space

Criticality Focus

The importance ofscenarios is weightedaccording to inverse

performance of system-under-test.

Page 71: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 71start of development

Page 72: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 72start of development

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

Page 73: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 73start of development

scenario evolution finds faulty behavior earlyand brings the adaptive system to behavewithin the adaptation borders

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

Page 74: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 74start of development

scenario evolution finds faulty behavior earlyand brings the adaptive system to behavewithin the adaptation borders

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

Page 75: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 75start of development

scenario evolution finds faulty behavior earlyand brings the adaptive system to behavewithin the adaptation borders

adapting to a single customer‘s specificenvironment changes the optimal behaviorslightly

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

Page 76: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 76start of development

running product

scenario evolution finds faulty behavior earlyand brings the adaptive system to behavewithin the adaptation borders

adapting to a single customer‘s specificenvironment changes the optimal behaviorslightly

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

on-site adaptation borders

during deployment narrower boundaries foradaptation with respect to one customer‘sspecific environment may be necessary

Page 77: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Adaptation Cooldown 77start of development

running product

Adaptation Cooldown

As systemdevelopmentprogresses,the space of

possible behavioravailable to the

adaptationmechanismdecreases.

scenario evolution finds faulty behavior earlyand brings the adaptive system to behavewithin the adaptation borders

adapting to a single customer‘s specificenvironment changes the optimal behaviorslightly

off-site adaptation borders

defining the desired limits of the adaptationprocess for all eventual customer scenarios

on-site adaptation borders

during deployment narrower boundaries foradaptation with respect to one customer‘sspecific environment may be necessary

Page 78: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 78

Page 79: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 79

Don’t deploy!

Page 80: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 80

Don’t deploy!

Deploy?

Page 81: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 81

Deploy??Don’t deploy!

Deploy?

Page 82: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 82

Deploy??Don’t deploy!

Deploy?

Page 83: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 83

Deploy??Don’t deploy!

Deploy?

system-under-tests immediatelyadapts to scenario evolution

Page 84: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 84

Deploy??Don’t deploy!

Deploy?

system-under-tests immediatelyadapts to scenario evolution

Page 85: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 85

Deploy??Don’t deploy!

Deploy?

(more) independent line of scenarioswith no immediate feedback for thesystem-under-test

system-under-tests immediatelyadapts to scenario evolution

Page 86: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Eternal Deployment 86

Deploy??

Deploy All

Trustworthiness is aidedby deploying all tests so they can be repeated at

the customer‘s site.

Don’t deploy!

Deploy?

(more) independent line of scenarioswith no immediate feedback for thesystem-under-test

system-under-tests immediatelyadapts to scenario evolution

Page 87: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Tools for a New Framework 87

Adaptation Cooldown

As systemdevelopmentprogresses,the space of

possible behavioravailable to the

adaptationmechanismdecreases.

Criticality Focus

The importance ofscenarios is weightedaccording to inverse

performance of system-under-test.

Deploy All

Trustworthiness is aidedby deploying all tests so they can be repeated at

the customer‘s site.

Page 88: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 88

Software Architecture

Software Gardening?

Page 89: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The Big Picture 89

Software Architecture

Software Gardening?

We need AI to adequately control AI.

Page 90: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Where to go from here? 90

Page 91: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Where to go from here? 91

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

is testedby

is used fortraining

Page 92: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Where to go from here? 92

System Test

adaptation

BesseresSystemeven

bettersystem

adaptation

bessererTesteven

bettertest

is testedby

is used fortraining

“Penguin recombination” specifically designed for tests with sequential execution steps.

Explicit curriculum learning for “gentle introduction” of requirements according to specification into reward.

Generalization of this 1v1 setting to a multi-agent system with various (degrees of) adversaries.

Construction of whole test suites based on diversity and/or incremental complexity.

Qua

ntify

ing

and

dete

ctin

g un

certa

inty

in n

ew s

ituat

ions

Page 93: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

AI and the Compute Method 93

1) “AI researchers have often tried to build knowledge into their agents,

2) this always helps in the short term, and is personally satisfying to the researcher, but

3) in the long run it plateaus and even inhibits further progress, and

4) breakthrough progress eventually arrives by an opposing approach based on scaling computation by search and learning.”

Page 94: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

AI and the Compute Method 94

1) “AI researchers have often tried to build knowledge into their agents,

2) this always helps in the short term, and is personally satisfying to the researcher, but

3) in the long run it plateaus and even inhibits further progress, and

4) breakthrough progress eventually arrives by an opposing approach based on scaling computation by search and learning.”

“The biggest lesson that can be read from 70 years of AI research is that general methods that leverage computation are ultimately the most effective, and by a large margin.”

Page 95: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Computation Power used in AI 95

Page 96: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Computation Power used in AI 96

“Since 2012, the amount of compute used in the largest AI training runs has been increasing exponentially with a 3.5 month doubling time (by comparison, Moore’s Law had an 18 month doubling period).”

Page 97: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Options for the Future 97

AI experimentsbecome more

expensive

Progress in AI research slows

down

We find a way toincrease availablecomputing power

Page 98: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Options for the Future 98

AI experimentsbecome more

expensive

Progress in AI research slows

down

We find a way toincrease availablecomputing power

Page 99: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Options for the Future 99

AI experimentsbecome more

expensive

Progress in AI research slows

down

We find a way toincrease availablecomputing power

Quantum

Computing?

Page 100: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

An Awful Lot of Expertise 100

QuantumPlatform

DomainAnalysis

AIAlgorithms

Page 101: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The PlanQK Platform 101

QAI conceptsspecialistscommunity

AnalysisStandardization

Page 102: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The PlanQK Platform 102

QAI concepts

QAI algorithms

specialistscommunity

AnalysisStandardization

Implementation developers

Page 103: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The PlanQK Platform 103

QAI concepts

QAI algorithms

QAI applications

specialistscommunity

AnalysisStandardization

Implementation developers

Search & Order users

Page 104: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

The PlanQK Platform 104

QAI concepts

QAI algorithms

QAI applications

specialistscommunity

AnalysisStandardization

Implementation developers

Search & Order users

packagedsolution

Page 105: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

So what else is new? 105

Quantum Computing

superposition entanglement

Page 106: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 106

particle

classical physics

Page 107: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 107

particle

spin

classical physics

Page 108: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 108

particle

spin

measure spin

classical physics

Page 109: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 109

particle

spin

measure spin

measured spin

classical physics

Page 110: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 110

particle

spin

measure spin

measured spin

classical physics quantum physics

Page 111: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 111

particle

spin

measure spin

measured spin

classical physics quantum physics

Page 112: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 112

particle

spin

measure spin

measured spin

classical physics quantum physics

Page 113: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 113

particle

spin

measure spin

measured spin

classical physics quantum physics

Page 114: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition 114

particle

spin

measure spin

measured spin

classical physics quantum physics

changed particle

Page 115: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

Registers 115

Page 116: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Registers 116

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

ASCII letter A

Page 117: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition on Registers 117

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

all ASCII lettersat the same time

Page 118: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition on Registers 118

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

measuring

all ASCII lettersat the same time

Page 119: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition on Registers 119

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

measuring

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

ASCII letter E withprobability 1/256

all ASCII lettersat the same time

Page 120: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition on Registers 120

measuring

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

ASCII letter & withprobability 1/256

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

all ASCII lettersat the same time

Page 121: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Superposition on Registers 121

090%

010%

090%

090%

090%

010%

090%

010%

10%1

90%1

10%1

10%1

10%1

90%1

10%1

90%1

measuring

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

ASCII letter E withprobability 0.43

all ASCII lettersat the same time (but probably E)

Page 122: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 122

multiple quantum particles

measure single spin

measured spin

changed particles

Page 123: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 123

multiple quantum particles

measure single spin

measured spin

changed particles

entangled

Page 124: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 124

multiple quantum particles

measure single spin

measured spin

changed particles

entangled

Page 125: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 125

multiple quantum particles

measure single spin

measured spin

changed particles

entangled

Page 126: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 126

multiple quantum particles

measure single spin

measured spin

changed particles

entangled

Page 127: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement 127

multiple quantum particles

measure single spin

measured spin

changed particles

entangled

Page 128: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement on Registers 128

ASCII letters @ A B C at the same time

measuring

ASCII letter A withprobability 1/4

0 0 0 0 0 0 050%

050%

1 1 1 1 1 150%

150%

1

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

Page 129: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Entanglement on Registers 129

measuring

ASCII letter A withprobability 1/2

0 0 0 0 0 0 050%

050%

1 1 1 1 1 150%

150%

1

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

entangled

ASCII letters A B at the same time

Page 130: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Gate Model 130

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

CNOT

050%

050%

050%

050%

050%

050%

050%

050%

50%1

50%1

50%1

50%1

50%1

50%1

50%1

50%1

Page 131: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Gate Model 131

090%

010%

090%

090%

090%

010%

090%

010%

10%1

90%1

10%1

10%1

10%1

90%1

10%1

90%1

Page 132: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Gate Model 132

090%

010%

090%

090%

090%

010%

090%

010%

10%1

90%1

10%1

10%1

10%1

90%1

10%1

90%1

Page 133: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Gate Model 133

090%

010%

090%

090%

090%

010%

090%

010%

10%1

90%1

10%1

10%1

10%1

90%1

10%1

90%1

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

at the end measurequbits

Page 134: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Gate Model

▹direct pathway to universal quantum computer

▹similar architecture to classical computers

▹only protoypes in laboratories

▹currently < 100 qubits

134

Page 135: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 135

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

Page 136: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 136

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

cons

traint

Page 137: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 137

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

cons

traint

Page 138: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 138

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

cons

traint

Page 139: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 139

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

cons

traint

add constraintsinfinitely slowly

while addingno energy

adiabatic quantum computing

Page 140: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 140

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

050%50%

1

cons

traint

add constraintsquite slowlywhile addingalmost no

energy

practical quantum annealing

Page 141: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing 141

0

1

0

1

0

1

0

1

0

1

0

1

cons

traint

add constraintsquite slowlywhile addingalmost no

energy

at the end measurequbits solution to

constraints

Page 142: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Annealing

▹potentially equally powerful

▹architecture built for optimization

▹available commercially

▹currently > 2000 qubits

142

Page 143: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Bringing it all together…

Page 144: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Quantum Neural Blockchain AI 144

all these currently relevant buzzwords are…▹derived from irreversible computation▹based on probabilistic processes▹to some extent compatible…?

Page 145: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Main References

▹ Thomas Gabor, Andreas Sedlmeier, Marie Kiermeier, Thomy Phan, Marcel Henrich, Monika Picklmair, Berhard Kempter, Cornel Klein, Horst Sauer, Reiner Schmid, and J. Wieghardt. Scenario Co-Evolution for Reinforcement Learning on a Grid-World Smart Factory Domain. In The Genetic and Evolutionary Computation Conference (GECCO), 2019.

▹ Thomas Gabor, Marie Kiermeier, Andreas Sedlmeier, Bernhard Kempter, Cornel Klein, Horst Sauer, Reiner Schmid, and Jan Wieghardt. Adapting Quality Assurance to Adaptive Systems: The Scenario Coevolution Paradigm. In International Symposium on Leveraging Applications of Formal Methods (ISoLA), 2018.

▹ Matthias Homeister. Quantum Computing verstehen. Friedr. Vieweg & Sohn Verlag, 2008.

145

Page 146: FromSoftware Architecture toSoftware Gardening: New ... · The Big Picture 3 Software Architecture ComplexAdaptive Systems Complexity Dynamicity Trust. ... training. System andTest

Image Sources

▹ https://www.bostonmagazine.com/news/2015/07/30/boston-2024-winners-losers

▹ https://en.wikipedia.org/wiki/The_Thinker#/media/File:Le_Penseur_in_the_Jardin_du_Musée_Rodin,_Paris_14_June_2015.jpg

▹ https://www.boredpanda.com/jumping-cats/

▹ https://kinder.wdr.de/tv/wissen-macht-ah/bibliothek/kuriosah/bibliothek-daumen-hoch-100.html

▹ https://www.medicalnewstoday.com/articles/320289.php#carry_message

▹ https://en.wikipedia.org/wiki/Mutation#/media/File:Darwin_Hybrid_Tulip_Mutation_2014-05-01.jpg

▹ https://www.heise.de/ct/artikel/Die-Woche-Microsoft-und-Linux-1283059.html

▹ https://phys.org/news/2019-10-guillotine-cruel-poisoning.html

▹ http://blog.stephenwolfram.com/2018/04/buzzword-convergence-making-sense-of-quantum-neural-blockchain-ai/

146