axel van lamsweerde university of louvain presented by amritam sarcar from system goals to software...

57
AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Upload: brandon-barker

Post on 02-Jan-2016

215 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

AXEL VAN LAMSWEERDE

UNIVERSITY OF LOUVAIN

PRESENTED BY

AMRITAM SARCAR

From System Goals to Software Architecture

Page 2: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Seminar Outline(1/2)

The Problem The Mismatch Problem Resolving the Mismatch Problem The Problem on the Research Side

ObjectivesBackground : Goal Oriented REKAOS goal-oriented RE methodIntertwining between late RE & early AD

Page 3: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Seminar Outline(2/2)

Generating Goal Refinements Obstacles State Machine

From Requirements to S/W SpecsDataflow ArchitectureArchitectural RefinementsGenerating PatternsConclusionLimitations and Future Work

Page 4: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

The Problem(1/2)

Requirements Engineering (RE) = elicit, specify, analyze & document ...

objectives, functionalities, qualities, constraints structured models of system-to-be

Architectural Design (AD) = organize, specify, analyze & document ...

components, interactions, configurations, constraints structured model of software-to-be

Page 5: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

The Problem(2/2)

Poor understanding of... Relationships Requirements <-> Architecture Intertwining RE <-> AD

No systematic way to ... Build/Modify architecture to meet Functional/Non

Functional Requirements Integrate Architectural Constraints in Requirements

Requirement-Architecture Mismatch

Page 6: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

The Mismatch Problem

Requirements volatility vs. architectural stability

New generation software ... Ubiquitous, Mobile Heterogeneous Open Mission-Critical Operating in changing, (hostile) environments Open source (permanent, distributed evolution)

Page 7: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Resolving the Mismatch Problem

Identifying Major source of failure: Lack of user involvement 13% Incomplete requirements 13% Changing requirements 9% Unrealistic expectations 10% Unclear goals 5%

Main software problems are in... requirements specification > 50% responses requirements management 50% responses

Page 8: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

The Problem on the Research Side

Much work on architectural description & analysis ACME, C2, DARWIN, RAPIDE, WRIGHT, UML2.0 (?), ...

The architecture has to be there – Architectural patterns & styles

Some work on architectural refinement.

Little work on architecture derivation.

Page 9: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Objectives

Support requirements/architecture co-design/ co evolution

Support architecture derivation from requirements models & software specs

Make derivation process… systematic, incremental leading to provably/arguably correct & “good”

architecture highlighting architectural views (e.g. security view)

goal-based architectural design process

Page 10: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background

Page 11: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background(What is it about)?

Requirements elaboration is hard ...

Requirements are not there, Ranges from high-level, strategic objectives Detailed, technical requirements Involves software + environment Requires evaluation of alternatives, selection Architectural decisions Raises conflicting concerns Requires anticipation of unexpected behaviours

Page 12: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background : Goal Oriented RE(1/5)

Goal: prescriptive statement of intentDomain prop: descriptive statement about domainAgent: active component, controls behaviours

software-to-be, existing software, device, human

Goal achievement requires agent cooperation

The more fine-grained a goal is, the less agents are required

Requirement: goal assigned to software agentExpectation: goal assigned to environment agent

Page 13: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background : Goal Oriented RE (2/5)

Different goal categories ...Functional: prescribe expected services

Satisfaction, information, ...Non functional, refined in application-specific

terms: quality of service:

accuracy security: confidentiality, availability, integrity, ... usability performance, ...

Development goals: Maintainability: min coupling, max cohesion, ... Reusability, interoperability, ...

Domain-specific architectural constraints

Page 14: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background : Goal Oriented RE(3/5)

Goal G is AND-refined into sub goals G1, ..., Gn iff achieving G1, ..., Gn contributes to achieving G The set {G1, ..., Gn} is called refinement of G Gi is said to contribute positively to G

The set {G1, ..., Gn} is a complete AND-refinement of G iff G1, ..., Gn are sufficient for achieving G in view of known domain properties {G1, ..., Gn, Dom} |= G

Page 15: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background : Goal Oriented RE(4/5)

Goal G is OR-refined into refinements R1, ..., Gm iff achieving the sub goals of Ri is one alternative to achieving G (1 <= i <=m) Ri is called alternative for G

Page 16: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Goal Oriented RE(1/2)

Different types of goals ... Soft Goal achievement cannot be established in clear

sense Goal satisfying, qualitative reasoning Achieve/Maintain goal achievement can be verified

Page 17: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Goal Oriented RE(2/2)

Page 18: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Modeling Goals and Responsibilities

Page 19: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Modeling Objects

Goal oriented UML Class Diagrams.

Goal Operationalization.

Page 20: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Background : Goal Oriented RE(5/5)

Goal operationalization: G is correctly operationalized by Op1, ..., Opn iff the

specs of Op1, ..., Opn are necessary & sufficient for ensuring G

{Spec(Op1), ..., Spec(Opn)} |= G completeness

G |= {Spec(Op1), ..., Spec(Opn)} minimality

Page 21: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

KAOS Goal Oriented RE MethodKAOS Goal Oriented RE Method

Page 22: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

KAOS Goal Oriented Method

Page 23: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Specifying Goals, Objects and Operations

Page 24: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Some Bits of Real Temporal Logic

Page 25: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Specifying Goals : Formal

Page 26: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Specifying Operations : Formal

Operation OpenDoors Input tr: Train ; Output tr': Train DomPre tr.Doors = "closed" domain

description DomPost tr.Doors = "open" ReqPre for DoorsClosedWhileMoving: permission

s: Station At (tr, s) ReqTrig for NoDelay: obligation

Stopped (tr)

Page 27: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Intertwining between late RE and early AD(1/3)

Page 28: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Intertwining between late RE and early AD(2/3)

Alternative Goal Refinements

Alternative Agent Assignments

Page 29: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Intertwining between late RE and early AD(3/3)

Alternative granularities for Software Agents

Page 30: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Formal Goal Level Reasoning

Early analysis on partial models, intertwined with model construction Wide range of opportunities:

checking/deriving goal refinements checking/deriving operationalizations generating obstacles generating boundary conditions for conflict goal mining from scenarios generating state machines from operationalizations reusing goal-based specs by analogy

Page 31: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Checking Goal Refinements(1/4)

Aim: show that refinement is correct & complete

R, Ass, Dom |-- G R: conjunctive set of requirements or sub goals

Approach 1: Use TL theorem prover Heavyweight, non-constructive

Approach 2: Use formal refinement patterns Lightweight, constructive:

To complete partial refinements To explore alternative refinements

Page 32: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Checking Goal Refinements(2/4)

Idea:Build library of patterns (structured by

tactics)Prove patterns once for allReuse through instantiation, in matching

situation e.g. frequent patterns:

Page 33: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Checking Goal Refinements(3/4)

Page 34: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Checking Goal Requirements(4/4)

Approach 3: Early bounded model checking checking of goal models partial models incremental checking/debugging on selected object instances (propositionalization)

Output: OK KO + counter-example scenario

Page 35: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Generating Obstacles(1/2)

MovingOnRunway => WheelsTurning Goal Negation:

MovingOnRunway ¬ WheelsTurning Regress t Through Dom:

?Necessary conditions for wheels turning ?• WheelsTurning => ¬ Aquaplaning

Page 36: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Generating Obstacles(2/2)

Using formal obstruction patterns In fact we just used a frequent pattern:

Page 37: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Verifying Operationalizations

Page 38: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Generating State Machines(1/4)

Page 39: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Generating State Machines(2/4)

Step 1: Build FSM class declarations for each e: Entity È Agent in Object model

create a new FSM class; build state attribute declaration for all

behavioural attributes and relationships of e ; for each behavioural attribute attr

identify all legal states of attr in DomPre/DomPost identify additional legal states of attr in Goal

Page 40: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Generating State Machines(3/4)

Step 2: Build transitionsFor each op in Operation model

create a new transition class; op.DomPre source state; (propositionalization) op.DomPost destination state;

(propositionalization) op.ReqPre guard condition; op.ReqTrig trigger condition; op.DomPost , op.ReqPost ® action vector; host the transition;

Page 41: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Step3: Structure the state space source state structuring:

if states s1, s2 have same transition to same dest state then aggregate s1, s2 into more general state;

guard migration: if guard Grd on transition T refers to state s of hosting object then move Grd as substate s of T.SourceState (+ i/o transitions)

additional state space structuring by analyst

Generating State Machines(4/4)

Page 42: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

GSM machines (1/2)

From goal operationalizations to GSM machines

Synchronizing animations

Page 43: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

GSM machines (2/2)

Interacting with world visualizations

Mapping GSMs to

visualizations

Page 44: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

From Requirements to S/W Specs(1/2)

From requirements to software specs Requirements vs. software specifications:

Page 45: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

From Requirements to S/W Specs(2/2)

Example: Req:

MotorReversed MovingOnRunway Target Spec:

Reverse = ‘enabled’ WheelPulses = ‘on’ Accuracy Goals:

MovingOnRunway WheelPulses = ‘on’

expectation on wheelSensor MotorReversed Reverse = ‘enabled’

expectation on motor Actuator

Page 46: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Output of Architecture Derivation Process

Page 47: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Deriving an Abstract Dataflow Architecture

For each “functional” or “critical” goal assigned to software-to-be: Define one dedicated component ...

software agent + all operations operationalizing this goal interface = monitored & controlled variables in goal

formulation

Derive dataflow connector between components from

data dependency links Flows (d, C1, C2) = Controls (C1, d) Monitors (C2, d)

Page 48: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Deriving Dataflow Architecture

Page 49: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Refinement to meet Architectural Constraints

Domain-specific constraints ... from environment agents: features, inter-relationships global constraints on architectural design space

e.g. Meeting scheduling system:

Distribution of participants, meeting initiatorDocument styles by rules

Apply rule matching architectural constraint Proof obligation: rule application must preserve

properties of components & connectors (e.g., data flows)

Page 50: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Refinement to meet Architectural Constraints

Page 51: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Refinements to meet Architectural Constraints

Page 52: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Architecture Refinement

Many non-functional goals impose constraints on component interaction Accuracy (C1,C2): data consistency Confidentiality (C1,C2): limitation on info flow Usability (C1,C2): requirement on presentation, dialog etc: MinCoupling (C1,C2), InfoHidden (C1, C2),

Interoperable (C1,C2), ...

Some NFGs impose constraints on single component MaxCohesion (C): fine-grained functionality

Page 53: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

General Patterns

Page 54: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Pattern Application : Meeting Scheduling

Page 55: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Conclusion

Much room for incremental analysis of partial models at goal level

Derivation of architecture from requirements ... – systematic – incremental – locality principle; compositional

Refined connectors/components explicitly linked to non-functional goals

view extraction through architectural net queries:

security view, accuracy view, reusability view, ...

Page 56: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

Limitations and Further Work

Page 57: AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture

THANK YOU