Www.wileyeurope.com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons Building System Models for RE Chapter 8 Modeling.

Slides:



Advertisements
Similar presentations
Chapter 7 Goal Orientation in RE
Advertisements

lamsweerde Chap.12: Modeling System Operations © 2009 John Wiley and Sons Building System Models for RE Chapter 12 Modeling.
Building System Models for RE Chapter 12 Modeling System Operations.
Building System Models for RE
lamsweerde Part 1: Introduction © 2009 John Wiley and Sons 1 Requirements Engineering From System Goals to UML Models to.
lamsweerde Part 2: Building System Models for RE © 2009 John Wiley and Sons 1 Part 2: Building System Models for RE Introduction.
Building System Models for RE Chapter 11 Modeling System Agents and Responsibilities.
May 14, May 14, 2015May 14, 2015May 14, 2015 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific University, Azusa,
lamsweerde Chap.9: Risk Analysis on Goal Models © 2009 John Wiley and Sons Building System Models for RE Chapter 9 Modeling.
Introduction to Software Engineering Dr. Basem Alkazemi
Goal-Oriented Requirements Engineering (GORE) “Goal-oriented requirements engineering is concerned with the use of goals for eliciting, elaborating, structuring,
OASIS Reference Model for Service Oriented Architecture 1.0
Software Testing and Quality Assurance
Reza Gorgan Mohammadi AmirKabir University of Technology, Department of Computer Engineering & Information Technology, Intelligent.
Report on Intrusion Detection and Data Fusion By Ganesh Godavari.
Introduction to Software Engineering
Analysing Fault-Tolerant System using KAOS/FAUST C. Ponsard, P. Massonet, J.F. Molderez (CETIC) A. van Lamsweerde (UCL/INGI) Short presentation & Demo.
Computer Engineering 203 R Smith Requirements Management 6/ Requirements IEEE Standard Glossary A condition or capability needed by a user to solve.
System behaviors: state machine diagrams
Requirement Engineering – A Roadmap
1 درس مهندسي نيازمندي استاد دكتر عبداله زاده دانشجو خيرالنسا مرچانت RE in The Year 00: A Research Perspective.
Requirements artifacts – Goals
lamsweerde Chap.11: Modeling System Agents © 2009 John Wiley and Sons Building System Models for RE Chapter 11 Modeling.
Course Instructor: Aisha Azeem
[ §4 : 1 ] 4. Requirements Processes II Overview 4.1Fundamentals 4.2Elicitation 4.3Specification 4.4Verification 4.5Validation Software Requirements Specification.
The chapter will address the following questions:
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 7 Requirements Engineering Software Engineering: A Practitioner’s Approach, 6/e Chapter.
S/W Project Management
TDT 4242 Inah Omoronyia and Tor Stålhane Guided Natural Language and Requirement Boilerplates TDT 4242 Institutt for datateknikk og informasjonsvitenskap.
Chapter 4 – Requirements Engineering
Rational Unified Process Fundamentals Module 4: Disciplines II.
Business Analysis and Essential Competencies
lamsweerde Requirements Engineering © 2009 John Wiley and Sons 1 Requirements Engineering From System Goals to UML Models.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Requirements Engineering Processes l Processes used to discover, analyse and.
Identify steps for understanding and solving the
lamsweerde Requirements Engineering © 2009 John Wiley and Sons 1 Requirements Engineering From System Goals to UML Models.
UML Profile to Support Requirements Engineering with KAOS Presented by Chin-Yi Tsai.
Report on Intrusion Detection and Data Fusion By Ganesh Godavari.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 4: Developing Requirements.
AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Validating Requirements Determining Completeness and Correctness of Requirements Using the System Reference Model IV&V Workshop 16 September 2009.
1 Software Requirements l Specifying system functionality and constraints l Chapters 5 and 6 ++
Deriving Operational Software Specification from System Goals Xin Bai EEL 5881 Course Fall, 2003.
TDT 4242 Inah Omoronyia and Tor Stålhane Requirements Specification and Testing An introduction TDT 4242 Institutt for datateknikk og informasjonsvitenskap.
By Germaine Cheung Hong Kong Computer Institute
Human Computer Interaction
Requirements Validation
Chapter 17. Assertions State Assertion – predicate intended to express that a descriptive or prescriptive property holds in an arbitrarily chose current.
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in.
Formal Specification: a Roadmap Axel van Lamsweerde published on ICSE (International Conference on Software Engineering) Jing Ai 10/28/2003.
1 Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
Inferring Declarative Requirements Specification from Operational Scenarios IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 24, NO. 12, DECEMBER, 1998.
Requirement Engineering
Requirements Analysis
Requirement engineering & Requirement tasks/Management. 1Prepared By:Jay A.Dave.
Quality Assurance in the Presence of Variability Kim Lauenroth, Andreas Metzger, Klaus Pohl Institute for Computer Science and Business Information Systems.
Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
HighImpactSoft 2010 Organizing a Better Future. Agenda Specify Goals ScopeDefinitions Process Model Preliminary Requirements Issues and solutions TraceabilityPrototype.
Building System Models for RE
Building System Models for RE
By Dr. Abdulrahman H. Altalhi
Software Requirements analysis & specifications
Building System Models for RE
Chapter 7 Goal Orientation in RE
Presentation transcript:

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons Building System Models for RE Chapter 8 Modeling System Objectives with Goal Diagrams

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 2 Intentional view of the modeled system Chap.8: Goals Chap.9: Risks Chap.10: Conceptual objects Chap.11: Agents on what? why ? who ?

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 3 Goals as seen in Chapter 7  Prescriptive statements of intent the system should satisfy through cooperation of its agents –formulated in terms of problem world phenomena –at various levels of abstraction/granularity  Can be negotiated, weakened, prioritized (unlike domain props)  The finer-grained a goal, the fewer agents required for its satisfaction –requirements, expectations: single-agent goals  Behavioral (Achieve/Maintain) goals, soft goals  Functional, quality, development goals

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 4 A goal model shows contribution links and leafgoal assignments AND-refinement OR- refinement

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 5 Goal modeling: outline  Goal features as model annotations  Goal refinement  Capturing conflicts among goals  Connecting the goal model with other system views  Capturing alternative options  Goal diagrams as AND/OR graphs  Documenting goal refinements & assignments with annotations  Building goal models: heuristic rules & reusable patterns

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 6 Goal features are specified in model annotations Goal Maintain [DoorsClosedWhileMoving] Def All train doors shall be kept closed at any time when the train is moving not [ FormalSpec  in temporal logic for analysis, not in this chapter  ] [ Category Safety ] [ Priority Highest ] [ Source From interview with railway engineer X... ] DoorsClosedWhileMoving precise definition goal features annotation

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 7

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 8 Goal refinement AND-refinement  An AND-refinement of goal G into subgoals G 1,..., G n states that G can be satisfied by satisfying G 1,..., G n refinement The set { G 1,..., G n } is called refinement of G contribute positively Subgoal G i is said to contribute positively to G Achieve [BookRequestSatisfied] Achieve [ CopyBorrowed If Available] Achieve [CopyDueSoon If Not Available] Def In case a requested book has no copy available for check out, a copy of that book shall be made available within 2 weeks for check out by the requesting patron. goal AND-refinement

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 9 AND-refinements should be complete complete AND-refinement  {G 1,..., G n } is a complete AND-refinement of G iff satisfying G 1,..., G n is sufficient for satisfying G in view of known domain properties {G 1,..., G n, Dom}  G Achieve [BookRequestSatisfied] Achieve [ CopyBorrowed If Available] Achieve [CopyDueSoon If Not Available] complete AND-refinement (claim) Achieve[ CopyReserved]Maintain[AvailabilityEnforced]Achieve[AvailabilityNotified]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 10 Complete AND- refinements requirements completeness  Getting complete refinements of behavioral goals is essential for requirements completeness  Domain properties are often used for arguing about complete refinements –classified as... domain invariantsdomain invariants: known to hold in every state "train doors are either open or closed" domain hypothesesdomain hypotheses: assumed to hold in specific states "railway tracks are in good conditions..." –attached to conceptual objects in the object model

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 11 Domain properties in AND- refinements DoorsClosedWhileMoving Moving Iff NonZeroSpeed DoorsClosedWhileNonZeroSpeed domain invariant

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 12 AND-refinements should also be consistent and minimal  Consistent  Consistent: subgoals G 1,..., G n and domain properties in Dom may not contradict each other: {G 1,..., G n, Dom}  false (any behavior would be permitted from false)  Minimal  Minimal: if one subgoal G j is missing, the parent goal is no longer necessarily satisfied: {G 1,..., G j-1, G j+1,..., G n, Dom}  G (to avoid unnecessarily restrictive requirements or expectations)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 13 Refinement trees  Goals are recursively refinable  Leaf nodes = goals assignable to single system agents

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 14 Refinement trees visualize satisfaction arguments

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 15 Chaining satisfaction arguments into argumentation trees To show how requirements ensure higher-level concerns, and recursively MotorRaising  HandBrakeReleased motor.Regime = ‘up’  handBrakeCtrl = ‘off’ motor.Regime = ‘up’  MotorRaising handBrakeCtrl = ‘off’  HandBrakeReleased req

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 16 Chaining satisfaction arguments into argumentation trees To show how requirements ensure higher-level concerns, and recursively HandBrakeReleased  MotorRaising HandBrakeReleased  MotorRaising MotorRaising  HandBrakeReleased motor.Regime = ‘up’  handBrakeCtrl = ‘off’ motor.Regime = ‘up’  MotorRaising handBrakeCtrl = ‘off’  HandBrakeReleased req

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 17 Chaining satisfaction arguments into argumentation trees To show how requirements ensure higher-level concerns, and recursively HandBrakeReleased  DriverWantsToStart HandBrakeReleased  MotorRaising MotorRaising  AccelerPedalPressed  DriverWantsToStart HandBrakeReleased  MotorRaising MotorRaising  HandBrakeReleased motor.Regime = ‘up’  handBrakeCtrl = ‘off’ motor.Regime = ‘up’  MotorRaising handBrakeCtrl = ‘off’  HandBrakeReleased req

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 18 Capturing potential conflicts among goals divergent  Goals G 1,..., G n are divergent in Dom if boundary condition B can be found making them unsatisfiable together: B {B, G 1,..., G n, Dom}  false  Can be captured for later analysis (cf. Chap. 3, 16, 18)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 19 Connecting the goal model with other system views Interface links Interface links relate goals to other sub-models  traceability  Responsibility  Responsibility: instances of Agent are the only ones to restrict behaviors to satisfy Goal  Obstruction  Obstruction: satisfaction of Obstacle inhibits satisfaction of Goal  Concern  Concern: specification of Goal refers to Object  0perationalization  0perationalization: spec of Operations ensures satisfaction of Goal  Coverage  Coverage: behaviors prescribed by Goal cover Scenario Goal Agent Goal Obstacle Goal Object Goal Oper1 Oper2 Goal

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 20 Goal modeling: outline  Goal features as model annotations  Goal refinement  Capturing conflicts among goals  Connecting the goal model with other system views  Capturing alternative options  Goal diagrams as AND/OR graphs  Documenting goal refinements & assignments with annotations  Building goal models: heuristic rules & reusable patterns

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 21 Capturing options: alternative refinements OR-refinement  An OR-refinement of goal G into refinements R 1,..., R m states that G can be satisfied by satisfying all subgoals from any of the alternative refinements R i  Alternative goal refinements yield different system proposals (variants)  Pros/cons to be evaluated against soft goals for selection of best option

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 22 Capturing options: alternative assignments OR-assignment  An OR-assignment of goal G to agents A 1,..., A m states that G can be satisfied by behavioral restrictions of any of the alternative agents A i  Alternative assignments yield different system proposals ( e.g. different degrees of automation)  Pros/cons to be evaluated against soft goals for selection of best option

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 23 Goal diagrams as AND/OR graphs contribute  AND/OR graph shows how goal nodes contribute to each other –roots –roots = high-level system goals functional or non-functional behavioral or soft –leaves –leaves = requirements or expectations assignable to single agents AND-refinement –an AND-refinement links a parent goal to set of conjoined subgoals OR-refinement –an OR-refinement links a parent goal to a set of alternative AND- refinements => alternative system options soft goals in the graph are used to select preferred options  Generally a directed acyclic graph, not a tree –multiple roots (e.g. functional, non-functional goals) –a goal may contribute to multiple parent goals

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 24 Goal diagrams as AND/OR graphs (2) NoTrainCollision SafeTransportation EffectivePassengersTransportation RapidTransportation FastJourney DoorsClosed WhileMoving FastRunWhen GoSignal SignalSetTo GoPromptly BlockSpeed Limited system-as-is to-be WorstCaseStopping DistanceMaintained NoTrainsOn SameBlock HighFrequency AND-refinement OR-refinement

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 25 EffectiveBiblioSearchSystem EffectiveAccessToStateOfTheArt EffectiveLoanSystem BookRequestSatisfied Extensive Coverage Effective BookSupply E-bookAccess CopyBorrowed WhenAvailable Copy Reserved Accurate Classification physLib E-Lib... CopyDueSoon WhenNotAvailable Availability Enforced Availability Notified LimitedLoan Amount LimitedLoan Periods Goal diagrams as AND/OR graphs (3)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 26 Annotating goal refinements & assignments  Optional features –Name –Name: for unambiguous reference –SysRef –SysRef: for associating alternatives to system versions –Tactic –Tactic: for documenting refinement tactic (cf. ref. patterns)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 27 Goal modeling: outline  Goal features as model annotations  Goal refinement  Capturing conflicts among goals  Connecting the goal model with other system views  Capturing alternative options  Goal diagrams as AND/OR graphs  Documenting goal refinements & assignments with annotations  Building goal models: heuristic rules & reusable patterns

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 28 Heuristic rules for early discovery of goals  Analyze current objectives & problems in system-as-is... –preserve strategic, organization-specific objectives & policies  high-level goals for system-to-be e.g. Effective access to state-of-the-art knowledge –preserve application-specific objectives to be found in any system version e.g. Accurate book classification –analyze problems & deficiencies in system-as-is  goals of system-to-be: Avoid / Reduce / Improve them e.g. Anywhere anytime biblio search

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 29 Heuristic rules for early discovery of goals (2) goal-related keywords  Search for goal-related keywords in elicitation material (documents available, interview transcripts, etc.) –intentional: –intentional: in order to, so as to, so that, purpose, objective, aim, achieve, maintain, avoid, ensure, guarantee, want, motivate, expect,... –prescriptive: –prescriptive: shall, should, must, has to, to be, may not, may never,... –amelioration: –amelioration: improve, increase, decrease, reduce, enhance, enable, support, provide,... in order tohas to + refinement links: “in order to X the system has to Y “,... (to be checked against false positives) X Y...

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 30 Heuristic rules for early discovery of goals (3)  Instantiate goal categories –Browse leaves of taxonomies of functional & non-functional goals, looking for system-specific instances Information –e.g. Any Information goal concerning train passengers? Accuracy Any Accuracy goal about train information? Confidentiality Any Confidentiality goal about meeting participants?

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 31 Heuristic rules for later discovery of goals abstractionWHY?  By abstraction (bottom-up) : ask WHY? questions about... - lower-level goals - interaction scenarios being elicited - other operational material available => parent goals refinement HOW?  By refinement (top-down) : ask HOW? questions about... - higher-level-goals => subgoals  Frequent questioning patterns –WHY?HOW? –WHY? directly followed by HOW? on parent goal, to elicit missing “brothers” –HOW ELSE? –HOW ELSE? to explore alternatives

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 32 BookRequestSatisfied CopyBorrowed WhenAvailable Copy Reserved CopyDueSoon WhenNotAvailable Availability Enforced Availability Notified LimitedLoan Amount LimitedLoan Periods HOW? WHY? HOWWHY Building goal models: HOW and WHY questions

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 33 HOWWHY Building goal models: HOW and WHY questions NoTrainCollision SafeTransportation EffectivePassengersTransportation RapidTransportation FastJourney DoorsClosed WhileMoving FastRunWhen GoSignal SignalSetTo GoPromptly BlockSpeed Limited current S2B HOW? WHY? WorstCaseStopping DistanceMaintained NoTrainsOn SameBlock HighFrequency

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 34 WHY Identifying goals from WHY questions about scenario episodes

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 35 Heuristic rules for later discovery of goals (2)  Split responsibilities among agents –to get subgoals involving fewer agents and move towards requirements and expectations

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 36 Heuristic rules for later discovery of goals (3)  Identify soft goals from pros & cons of alternative options refinement –pro => refinement link to missing parent soft goal ? conflict –con => conflict link to missing parent soft goal ?

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 37 Heuristic rules for later discovery of goals (4)  Identify wishes of human agents e.g. MinimalRequirementsOnParticipants  Check the converse of Achieve goal for missing Maintain goal If Achieve [Target If Condition]: ifthensooner-or-later if Condition then sooner-or-later Target  ?   ? OnlyIf Maintain [Target OnlyIf Condition]: alwaysifthen always (if Target then Condition) If OnlyIf e.g. Achieve [ItemSent If Paid]   Maintain [ItemSent OnlyIf Paid] If Achieve [reverseThrustEnabled If PlaneOnGround] OnlyIf  Maintain [reverseThrust OnlyIf PlaneOnGround]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 38 Building goal models: delimiting their scope  Refine  Refine goals … until when ? single... until assignable to single agents as... –requirement –requirement (software agent) –expectation –expectation (environment agent)  Abstract  Abstract goals … until when ?... until boundary of system capabilities is reached: goals that cannot be satisfied solely by system agents e.g. EliminateGreenhouseEffect is beyond capabilities of train system

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 39 Goal refinement … until when ? Maintain [Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain [Safe TrainRespToComd]...

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 40 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... OnBoard TrainControl

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 41 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] OnBoard TrainControl

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 42 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] Tracking System OnBoard TrainControl

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 43 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] Tracking System OnBoard TrainControl Achv[ComdMsg SentInTime] Mt[Safe ComdMsg] Achv[SentMsg DeliveredInTime] Mt[Msg Implem]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 44 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] Speed/Accel Control Tracking System OnBoard TrainControl Achv[ComdMsg SentInTime] Mt[Safe ComdMsg] Achv[SentMsg DeliveredInTime] Mt[Msg Implem]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 45 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] Speed/Accel Control Tracking System Communic Infrastruct OnBoard TrainControl Achv[ComdMsg SentInTime] Mt[Safe ComdMsg] Achv[SentMsg DeliveredInTime] Mt[Msg Implem]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 46 Goal refinement … until when ? Maintain[Safe Speed/AccelCom'ed] Maintain[WC-SafeDistanceBetwTrains] Maintain[Safe TrainRespToComd]... Mt[AccurateEstimate OfSpeed/Position] Mt[SafeComdTo NextTrainFromEstim] Speed/Accel Control Tracking System Communic Infrastruct OnBoard TrainControl Achv[ComdMsg SentInTime] Mt[Safe ComdMsg] Achv[SentMsg DeliveredInTime] Mt[Msg Implem]

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 47  Do not confuse... –goal... –operation... Goal  service from functional model (e.g. use case) operationalize –Services operationalize functional, leaf goals in refinement graph a goal is often operationalized through multiple operations an operation often operationalizes multiple goals –Soft goals are often not operationalized in functional model but used to select among alternatives Building goal models: bad smells DoorsOpen OnlyIf TrainStopped CopyBorrowed IfAvailable Open Doors BorrowCopy 

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 48  Semantic difference –Behavioral goals constrain entire sequences of state transitions –Operations constrain single state transitions  Tip past participle  Tip: use past participle for goal name (state to be reached/maintained, quantity to be reduced/increased,...) infinitive use infinitive for operation name (action to reach/maintain that state) Behavioral goals vs. operations 

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 49  Do not confuse... –OR-refinement... –AND-refinement by case... cf. case analysis: orand (Case1 or Case2)  X equiv (Case1  X) and (Case2  X) OR alternative OR -refinement introduces alternative systems to reach parent goal AND same AND -refinement by cases introduces complementary, conjoined subgoals within same system Building goal models: bad smells (2) Extensive Coverage Effective BookSupply E-bookAccess physLib E-Lib BookRequestSatisfied CopyBorrowed If Available CopyDueSoon If Not Available 

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 50  Avoid ambiguities in goal specification & interpretation... definition –a precise & complete goal definition is essential –grounded on shared system phenomena, and agreed upon by all stakeholders BookRequestSatisfied CopyDueSoon WhenNotAvailable Def A book without any copy available for loan shall have a copy available within 15 days for the requesting borrower WorstCaseStopping DistanceMaintained Def A train shall never get so close to a train in front so that if the train stops suddenly (e.g., derailment) the next train would hit it Building goal models: bad smells (3) 

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 51 From a catalogue of generic, complete AND-refinements... tactics  encode refinement tactics, codify modeller’s experience  guide modeling process by suggesting refinements to be instantiated –instantiated pattern may sometimes require adaptation  provide satisfaction argument for free –(formal) correctness proof done once for all, kept hidden  support model documentation & understanding  can also be used for... –completing partial refinements –exploring alternative options (multiple applicable patterns) Building goal models: reuse refinement patterns

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 52 by milestone  Refinement by milestone –Applicable when milestone states can be identified on the way to the goal's target condition – – Example of use: A sample of refinement patterns milestone-driven refinement

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 53 Refinement by milestone: variant for Maintain goals SafeTrainAccelerationGuaranteed AccelerationSent InTimeToTrain SafeAcceleration Computed SentCommand ReceivedByTrain ReceivedCommand ExecutedByTrain milestone-driven refinement

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 54 by case  Refinement by case –Applicable when the goal satisfaction space can be partitioned into cases (disjoint, covering all possibilities) BookRequestSatisfied CopyDueSoon If Not Available CopyBorrowed If Available case-driven refinement – – Example of use: A sample of refinement patterns (2) Achieve [Target] Achieve [Target2 If Case2] Achieve [Target1 If Case1] if Target1 or Target2 then Target Case1 or Case2 not (Case1 and Case2) (Similar pattern for Maintain goals)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 55  Guard  Guard introduction –Applicable to Achieve goals where a guard condition must be set for reaching the target – – Example of use: A sample of refinement patterns (3) guard introduction

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 56  Divide-and-Conquer –Applicable to Maintain goals where GoodCondition is a conjunction – – Example of use: A sample of refinement patterns (4) divide-and-conquer

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 57  Refinement towards goal realizability not not –Applicable when the goal refers to quantities not monitorable or not controllable by candidate agent GoalOnUnControllableCondition GoalOnControllable Condition ControllableCondition Iff UnControllableCondition resolve lack of controllability GoalOnUnMonitorableCondition GoalOnMonitorable Condition MonitorableCondition Iff UnMonitorableCondition resolve lack of monitorability Child node may be goal (incl. requirement, expectation) or domain property (invariant/hypothesis) A sample of refinement patterns (5)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 58 resolve lack of monitorability DoorsClosedWhileMoving NonZeroSpeed Iff Moving DoorsClosedWhileNonZeroSpeed domain invariant NurseIntervention If CriticalPuseRate Alarm Iff CriticalPulseRate NurseIntervention If Alarm resolve lack of controllability expectation requirement Refinement towards goal realizability: examples of use

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 59 UnMonitorable GoalOnUnMonitorableCondition Monitorable GoalOnMonitorable Condition MonitorableCondition  UnmonitorableCondition MotorRaising MotorRaising  HandBrakeReleased motor.Regime = ‘up’ motor.Regime = ‘up’  HandBrakeReleased motor.Regime = ‘up’  MotorRaising instantiation Refinement towards goal realizability: examples of use (2)

lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 60 UnControllable GoalOnUnControllableCondition Controllable GoalOnControllable Condition ControllableCondition  UncontrollableCondition instantiation HandBrakeReleased motor.Regime = ‘up’  HandBrakeReleased motor.Regime = ‘up’  handBrakeCtrl = ‘off’  HandBrakeReleased req Refinement towards goal realizability: examples of use (3)