Hans Vangheluwe Software? Model Everything! Compl. Causes Dealing - - PowerPoint PPT Presentation

hans vangheluwe software model everything compl causes
SMART_READER_LITE
LIVE PREVIEW

Hans Vangheluwe Software? Model Everything! Compl. Causes Dealing - - PowerPoint PPT Presentation

Software? Model Everything! Compl. Causes Dealing with Compl. MPM Software Intensive Systems: Dealing with Complexity Hans Vangheluwe Software? Model Everything! Compl. Causes Dealing with Compl. MPM Software? Model Everything! Compl.


slide-1
SLIDE 1

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Software Intensive Systems: Dealing with Complexity

Hans Vangheluwe

slide-2
SLIDE 2

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-3
SLIDE 3

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-4
SLIDE 4

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-5
SLIDE 5

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-6
SLIDE 6

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-7
SLIDE 7

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-8
SLIDE 8

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-9
SLIDE 9

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Model, don’t code

slide-10
SLIDE 10

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-11
SLIDE 11

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-12
SLIDE 12

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-13
SLIDE 13

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-14
SLIDE 14

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-15
SLIDE 15

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-16
SLIDE 16

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-17
SLIDE 17

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity

slide-18
SLIDE 18

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity Model Everything . . . Explicitly

slide-19
SLIDE 19

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity Model Everything . . . Explicitly for design (Engineering) and analysis (Science)

slide-20
SLIDE 20

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

slide-21
SLIDE 21

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Real-World entity Base Model System S

  • nly study behaviour in

experimental context experiment within context Model M Simulation Results Experiment Observed Data

within context

simulate = virtual experiment Model Base a-priori knowledge

validation

REALITY MODEL GOALS

Modelling and Simulation Process

Bernard P . Zeigler. Multi-faceted Modelling and Discrete-Event Simulation. Academic Press, 1984.

slide-22
SLIDE 22

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

Simulation . . . when too costly/dangerous analysis ↔ design

slide-23
SLIDE 23

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

Simulation . . . real experiment not ethical “physical” simulation, training

slide-24
SLIDE 24

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

Simulation . . . evaluate alternatives

slide-25
SLIDE 25

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

Simulation . . . “Do it Right the First Time”

slide-26
SLIDE 26

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

essence: “shooting” problems

slide-27
SLIDE 27

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

defining a “hit”

5 10 15 20 5 10 15 20 25 30

θ

  • rigin (0, 2)

target (30, 1) Height (m) Distance (m)

slide-28
SLIDE 28

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

  • ptimizing a “performance metric”

10 20 30 40 50 60 70 80 90 5 10 15 20 25 30

slide-29
SLIDE 29

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

  • ptimal solution. . . s
slide-30
SLIDE 30

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

Modelling/Simulation . . . and code/app Synthesis

slide-31
SLIDE 31

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation

slide-32
SLIDE 32

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation Formal Verification of Properties (all models, all behaviours)

slide-33
SLIDE 33

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation Formal Verification of Properties (all models, all behaviours) Model Checking of Properties (one model, all behaviours)

slide-34
SLIDE 34

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation Formal Verification of Properties (all models, all behaviours) Model Checking of Properties (one model, all behaviours) Test Generation

slide-35
SLIDE 35

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation Formal Verification of Properties (all models, all behaviours) Model Checking of Properties (one model, all behaviours) Test Generation Simulation (one model, one behaviour) . . . for calibration, optimization, . . .

slide-36
SLIDE 36

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Modelling and Simulation for . . .

The spectrum of uses of models Documentation Formal Verification of Properties (all models, all behaviours) Model Checking of Properties (one model, all behaviours) Test Generation Simulation (one model, one behaviour) . . . for calibration, optimization, . . . Application Synthesis (mostly for models of software)

slide-37
SLIDE 37

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Requirements (“What?”) Detached or Semi-detached Style (classical, modern, . . . ) Number of Floors Number of rooms of different types (bedrooms, bathrooms, . . . ) Garage, Storage, . . . Cellar . . .

slide-38
SLIDE 38

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Requirements (“What?”) Detached or Semi-detached Style (classical, modern, . . . ) Number of Floors Number of rooms of different types (bedrooms, bathrooms, . . . ) Garage, Storage, . . . Cellar . . . Design (“How?”)

slide-39
SLIDE 39

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Requirements (“What?”) Detached or Semi-detached Style (classical, modern, . . . ) Number of Floors Number of rooms of different types (bedrooms, bathrooms, . . . ) Garage, Storage, . . . Cellar . . . Design (“How?”)

slide-40
SLIDE 40

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

System Boundaries System to be built/studied Environment with which the system interacts

slide-41
SLIDE 41

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

System vs. “Plant”

slide-42
SLIDE 42

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

System vs. “Plant”

www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html

slide-43
SLIDE 43

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Number of Components

slide-44
SLIDE 44

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Crowds: diversity, interaction

www.3dm3.com

slide-45
SLIDE 45

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Diversity of Components: Power Window

slide-46
SLIDE 46

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Non-compositional/Emergent Behaviour

slide-47
SLIDE 47

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Emergent Behaviour

slide-48
SLIDE 48

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Engineered Emergent Behaviour

slide-49
SLIDE 49

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Uncertainty Often related to level of abstraction: for example continuous vs. discrete

www.engr.utexas.edu/trafficSims/

slide-50
SLIDE 50

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Question: is the deviation from the trend periodic?

slide-51
SLIDE 51

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Answer: transform to make the solution obvious

slide-52
SLIDE 52

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Guiding principle (∼ physics: principle of minimal action) minimize accidental complexity,

  • nly essential complexity remains

Fred P . Brooks. No Silver Bullet – Essence and Accident in Software Engineering. Proceedings of the IFIP Tenth World Computing Conference, pp. 1069–1076, 1986. http://www.lips.utexas.edu/ee382c-15005/Readings/Readings1/05-Broo87.pdf

slide-53
SLIDE 53

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches

slide-54
SLIDE 54

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches multiple abstraction levels

slide-55
SLIDE 55

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches multiple abstraction levels

  • ptimal formalism
slide-56
SLIDE 56

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches multiple abstraction levels

  • ptimal formalism

multiple formalisms

slide-57
SLIDE 57

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches multiple abstraction levels

  • ptimal formalism

multiple formalisms multiple views

slide-58
SLIDE 58

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Dealing with Complexity: some approaches multiple abstraction levels

  • ptimal formalism

multiple formalisms multiple views Modularity!

slide-59
SLIDE 59

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Abstraction Levels

Different Abstraction Levels – properties preserved

slide-60
SLIDE 60

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Abstraction Levels

Levels of Abstraction/Views: Morphism

detailed (technical) level abstract (decision) level abstraction simulation M_d M_t trajectory model traj_t traj_d

slide-61
SLIDE 61

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Abstraction Levels

Abstraction Relationship foundation: the information contained in a model M. Different questions (properties) P = I(M) which can be asked concerning the model. These questions either result in true or false. Abstraction and its opposite, refinement are relative to a non-empty set of questions (properties) P. If M1 is an abstraction of M2 with respect to P, for all p ∈ P: M1 | = p ⇒ M2 | = p. This is written M1 ⊒P M2. M1 is said to be a refinement of M2 iff M2 is an abstraction

  • f M1. This is written M1 ⊑P M2.
slide-62
SLIDE 62

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Most Appropriate Formalism (Minimizing Accidental Complexity)

Most Appropriate Formalism

slide-63
SLIDE 63

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Most Appropriate Formalism (Minimizing Accidental Complexity)

www.planeshift.it Massively Multiplayer Online Role Playing games need Non-Player Characters (NPCs)

slide-64
SLIDE 64

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM TankWars: high level

Sensors Analyzers Memorizers Strategical Deciders Tactical Deciders Executors Coordinators Actuators Tank Turret Radar FuelTank WeaponDetectionSystem InRangeDetector EnemyTracker FuelStationMap ObstacleMap RepairStationMap PilotStrategy AttackPlanner RefuelPlanner RepairPlanner ExplorePlanner EscapePlanner Pathfinder Steering TurretTankMovementCoordinator MotorControl TurretControl TurretSteering ObstacleDetector WaypointDetector

slide-65
SLIDE 65

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Strategic Deciders – High-level Goals

EnoughFuel NormalOperation

PilotStrategy

Attacking Repairing

damageHigh repaired

Fleeing

[repairTracker. repairPosKnown] [not repairTracker. repairPosKnown] [repairTracker. repairPosKnown]

Exploring

fuelLow

Refueling

fuelFull H* [in enemyTracker.enemyPosKnown && not fuelTank.lowFuel] BBBBBBBBBBBBBBBBBBBBBBB[not fuelTracker.fuelPosKnown] [fuelTracker.fuelPosKnown] Jörg Kienzle, Alexandre Denault, Hans Vangheluwe. Model-Based Design of Computer-Controlled Game Character

  • Behavior. MoDELS 2007: 650-665
slide-66
SLIDE 66

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Strategic Deciders – High-level Goals

EnoughFuel NormalOperation

PilotStrategy

Attacking Repairing

damageHigh repaired

Fleeing

[repairTracker. repairPosKnown] [not repairTracker. repairPosKnown] [repairTracker. repairPosKnown]

Exploring

fuelLow

Refueling

fuelFull H* [in enemyTracker.enemyPosKnown && not fuelTank.lowFuel] BBBBBBBBBBBBBBBBBBBBBBB[not fuelTracker.fuelPosKnown] [fuelTracker.fuelPosKnown] Jörg Kienzle, Alexandre Denault, Hans Vangheluwe. Model-Based Design of Computer-Controlled Game Character

  • Behavior. MoDELS 2007: 650-665

Could have used production rules instead of Statecharts

Eugene Syriani, Hans Vangheluwe: Programmed Graph Rewriting with DEVS. AGTIVE 2007: 136-151

slide-67
SLIDE 67

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

“Management Flight Simulator” using Forrester System Dynamics model

slide-68
SLIDE 68

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Causal Block Diagram model of Harmonic Oscillator

x0 0.0 y0 1.0

IC

x

IC

y −

I OUT

K 1.0 0.0 PLOT

slide-69
SLIDE 69

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Petri Net model of Producer – Consumer

P.Calculating 1 Wait4Cons Buffer Buffer−p 1 Wait4Prod 1 C.Calculating Produce Put in Buffer Rem.from buffer Consume

slide-70
SLIDE 70

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

GPSS model of Telephone Exchange

FN1 12 2 V2 V1 PH 1 LR PH1 V1 H 2 P2 NE P1 S PH1 LNKS R PH1 1 LR PH2 R PH1 LNKS 1 S PH2 FN1 120 Function: 1 LNKS 10

slide-71
SLIDE 71

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multi-Formalism

Multiple Formalisms: Power Window

slide-72
SLIDE 72

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multi-Formalism

Components in Different Formalisms

www.mathworks.com/products/demos/simulink/PowerWindow/html/PowerWindow1.html

slide-73
SLIDE 73

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multi-Formalism

Controller, using Statechart(StateFlow) formalism

slide-74
SLIDE 74

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multi-Formalism

Mechanics subsystem

slide-75
SLIDE 75

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

Multiple (consistent !) Views (in = Formalisms)

slide-76
SLIDE 76

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

View: Events Diagram

slide-77
SLIDE 77

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

View: Protocol Statechart

slide-78
SLIDE 78

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity

slide-79
SLIDE 79

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)

slide-80
SLIDE 80

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)

  • ptimal formalism (need precise meaning)
slide-81
SLIDE 81

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)

  • ptimal formalism (need precise meaning)

multiple formalisms (need relationship)

slide-82
SLIDE 82

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)

  • ptimal formalism (need precise meaning)

multiple formalisms (need relationship) multiple views (need consistency)

slide-83
SLIDE 83

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM Multiple Views/Concerns/Aspects

No Free Lunch!

Solutions often introduce their own accidental complexity multiple abstraction levels (need morphism)

  • ptimal formalism (need precise meaning)

multiple formalisms (need relationship) multiple views (need consistency)

slide-84
SLIDE 84

Software? Model Everything!

  • Compl. Causes

Dealing with Compl. MPM

Multi-Paradigm Modelling ( model everything, minimize accidental complexity ) at the most appropriate level of abstraction using the most appropriate formalism(s) Class Diagrams, Differential Algebraic Equations, Petri Nets, Bond Graphs, Statecharts, CSP , Queueing Networks, Sequence Diagrams, Lustre/Esterel, . . . with transformations as first-class models

Pieter J. Mosterman and Hans Vangheluwe. Computer Automated Multi-Paradigm Modeling: An Introduction. Simulation 80(9):433–450, September 2004. Special Issue: Grand Challenges for Modeling and Simulation.