Building System Models for RE Chapter 12 Modeling System Operations.

Slides:



Advertisements
Similar presentations
Three-Step Database Design
Advertisements

Design by Contract.
Nested state diagrams:Problems with flat state diagram
Models of Concurrency Manna, Pnueli.
CS 290C: Formal Models for Web Software Lecture 4: Implementing and Verifying Statecharts Specifications Using the Spin Model Checker Instructor: Tevfik.
IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
lamsweerde Chap.12: Modeling System Operations © 2009 John Wiley and Sons Building System Models for RE Chapter 12 Modeling.
Formal Specification of Topological Relations Erika Asnina, Janis Osis and Asnate Jansone Riga Technical University The 10th International Baltic Conference.
Building System Models for RE Chapter 11 Modeling System Agents and Responsibilities.
1 Design by Contract Building Reliable Software. 2 Software Correctness Correctness is a relative notion  A program is correct with respect to its specification.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
Software Engineering COMP 201
Use-case Modeling.
Written by: Zvika Gutterman Adam Carmi
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Use cases and requirement specification - 1 Use case diagrams 3 use cases System boundaries Remember: Use case diagramming is a tool, not the requirements.
Object Oriented Analysis OOA. OOA Deliverables Static Object model –one single diagram Scenarios –set of diagrams Object Dictionary –one set of comprehensive.
System behaviors: state machine diagrams
Chapter 10 Class and Method Design
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
Use Case Modeling Written by: Zvika Gutterman Adam Carmi.
lamsweerde Chap.11: Modeling System Agents © 2009 John Wiley and Sons Building System Models for RE Chapter 11 Modeling.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
Unified Modeling Language
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
[ §6 : 1 ] 6. Basic Methods II Overview 6.1 Models 6.2 Taxonomy 6.3 Finite State Model 6.4 State Transition Model 6.5 Dataflow Model 6.6 User Manual.
USE Case Model.
RUP Requirements RUP Artifacts and Deliverables
Functional Modeling Joseph Valacich, Joey George and Jeff Hoffer, Essentials of System Analysis and Design, 4 th edition, Prentice Hall, 2009.
Chapter 5 Class Design. The Deliverables of the Class Design Process Class diagrams are further refined in this phase of development Object diagrams are.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
111 Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract,
AXEL VAN LAMSWEERDE UNIVERSITY OF LOUVAIN PRESENTED BY AMRITAM SARCAR From System Goals to Software Architecture.
Conceptual Modelling – Behaviour
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
Deriving Operational Software Specification from System Goals Xin Bai EEL 5881 Course Fall, 2003.
System sequence diagrams
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
Chapter 2: Variables, Functions, Objects, and Events JavaScript - Introductory.
Functional Modeling Joseph Valacich, Joey George and Jeff Hoffer, Essentials of System Analysis and Design, 4 th edition, Prentice Hall, 2009.
Chapter 17. Assertions State Assertion – predicate intended to express that a descriptive or prescriptive property holds in an arbitrarily chose current.
Systems Analysis and Design in a Changing World, Fourth Edition
lamsweerde Chap.4: Formal Requirements Specification © 2009 John Wiley and Sons Fundamentals of RE Chapter 4 Requirements.
Inferring Declarative Requirements Specification from Operational Scenarios IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 24, NO. 12, DECEMBER, 1998.
Refining the Use Cases 1. How Use Cases Evolve  Early efforts typically define most of the major use cases.  The refining stages complete the process.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Interpreting the Object Constraint Presented by: Ed Kausmeyer.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
Application Analysis. Application Interaction Model The purpose of analysis is to understand the problem so.
Modeling with UML – Class Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
Welcome to M301 P2 Software Systems & their Development
Building System Models for RE
System sequence diagrams
Requirements: Use Case Models and Narratives
State Machine Diagrams
TIM 58 Chapter 8: Class and Method Design
Use Cases Based on the paper
Analysis models and design models
Protocols CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 8) Meyer, B., Applying design by contract, Computer,
Chapter 7 Goal Orientation in RE
Software Development Process Using UML Recap
Presentation transcript:

Building System Models for RE Chapter 12 Modeling System Operations

Building models for RE Goals Objects Operations Agents & responsibilities what ?

The operation model  Functional view of the system being modeled –what services –what services are to be provided ? (statics) –under what conditions –under what conditions for goal satisfaction ?  Represented by operationalization diagram, UML use cases  Multiple uses... –software specifications --input for development team –description of environment tasks & procedures –basis for deriving... black-box test data executable specs for animation, prototyping –definition of function points (for size estimation), work units, user manual sections –satisfaction arguments, traceability management

Modeling system operations: outline  What are operations?  Characterizing system operations –Operation signature –Domain pre- and postconditions –Operation performer  Goal operationalization –Required pre-, post-, trigger conditions for goal satisfaction –Agent commitments –Goal operationalization and satisfaction arguments  Goals, agents, objects & operations: the semantic picture  Representing operation models –Operationalization diagrams –UML use case diagrams  Building operation models: heuristics & derivation rules

What are operations?  Operation  Operation Op = set of input-output state pairs (binary relation) Op  InputState  OutputState xv –state = tuple of functional pairs x i  v i (cf. Chap.10) xv x i : variable, v i : corresponding value –input variables: object instances to which Op applies output variables: object instances upon which Op acts –attributes of i/o variables instantiated as state variables applications  Operation applications yield state transitions (events) instance i/o variable state variable operation

What are operations? (2) operationalize  Op must operationalize underlying goals from goal model –to make these satisfied => application under restricted conditions  Generally deterministic: relation over states is a function –no multiple alternative outputs from same input  Atomic  Atomic: map input state to state at next smallest time unit –not decomposable into finer-grained operations  decompose underlying goals, not operations ! (semantically simpler) startOpendOp –for operations lasting some duration: use startOp/endOp events  May be applied concurrently with others –intra-agent concurrency (beside inter-agent concurrency) –e.g. OpenDoors || DisplayWhichPlatform  Software operations, environment operations (tasks) –e.g. PlanMeeting, SendConstraints

Characterizing system operations  Basic features: Name, Def, Category  Signature –declares the input-output relation over states input/output variables & their type (object from object model) scope may be restricted to specific attributes (nothing else changes) used in pre-, postconditions –graphical or textual annotation

Characterizing system operations: domain pre- and postconditions  Conditions capturing the class of state transitions that intrinsically defines the operation  DomPre  DomPre: condition characterizing class of input states in domain –descriptive, not prescriptive for some goal  DomPost  DomPost: condition characterizing class of output states in domain –descriptive, not prescriptive for some goal

Characterizing system operations: operation performer performs  An agent performs an operation if the applications of this operation are activated by instances of this agent (cf. Chap.11)  Consistency rules between operation model & agent model: –every input/output state variable in signature of operation performed by an agent must be monitored/controlled by it in the agent model –every operation is performed by exactly one agent cf. Unique Controller constraint in agent model

Modeling system operations: outline  What are operations?  Characterizing system operations –Operation signature –Domain pre- and postconditions –Operation performer  Goal operationalization –Required pre-, post-, trigger conditions for goal satisfaction –Agent commitments –Goal operationalization and satisfaction arguments  Goals, agents, objects & operations: the semantic picture  Representing operation models –Operationalization diagrams –UML use case diagrams  Building operation models: heuristics & derivation rules

Goal operationalization operationalizes  A set of operations operationalizes a leaf goal if their spec ensures that the goal is satisfied prescriptive  These specs are prescriptive conditions on the operations... –ReqPre –ReqPre: necessary condition on Op's input states to ensure G: mayonly if when DomPre true, Op may be applied only if ReqPre true (permission) –ReqTrig –ReqTrig: sufficient condition on Op's input states to ensure G: mustas soon as when DomPre true, Op must be applied as soon as ReqTrig true (obligation) –ReqPost –ReqPost: condition on Op's output states to ensure G

Specifying operations textually: example Operation OpenDoors Def Operation controlling the opening of all train doors // Input tr: Train / {Speed, Position}, Output tr: Train / DoorsState DomPre The doors of train tr are closed DomPost The doors of train tr are open ReqPre For DoorsClosedWhileNonzeroSpeed The speed of train tr is 0 ReqPre For SafeEntry&Exit Train tr is at a platform ReqTrig For FastEntry&Exit Train tr has just stopped at a platform

Specifying operations textually: another example Operation SendAccelerationCommand Def Operation of sending an acceleration command to a train Input tr: Train, cm: CommandMsg; Output sm: Sent % association instance % DomPre not Sent (cm, tr) DomPost Sent (cm, tr) ReqPost For SafeAccelerationCommand The commanded acceleration sent to tr is within safe range with respect to the preceding train’s position and speed ReqTrig For CommandMsgSentInTime No acceleration command has been sent to tr since 3 seconds

Goal operationalization (2)  A leaf goal is generally operationalized by multiple operations  An operation generally operationalizes multiple goals –all ReqPre/ReqPost are implicitly conjoined with DomPre/DomPost mustone –if DomPre true, must be applied as soon as one ReqTrig true (not applied if one or more ReqTrig true with DomPre false) mayall –if DomPre true, may be applied provided all ReqPre true (not applicable if all ReqPre true with DomPre false)  Consistency constraint on obligations & permissions: if if DomPre and (ReqTrig 1 or … or ReqTrig M ) then then (ReqPre 1 and … and ReqPre N )

Agent commitments  For every goal G under responsibility of agent ag, for every operation Op operationalizing G, ag must guarantee that Op is applied... when when Op’s DomPre holds, as soon as as soon as one of Op’s ReqTrig holds only if only if all Op’s ReqPre hold, so as to so as to establish Op’s DomPost together with all Op’s ReqPost  Extra consistency rules between operation and agent models: –ag responsible for G must perform all operations operationalizing G –if these operations operationalize other goals, ag must be responsible for these goals too

Agent commitments (2)  Agent non-determinism: eager vs. lazy behavior on ReqPre’s –eager –eager: agent instance applies operation as soon as all ReqPre true (maximal progress) –lazy –lazy: agent instance applies operation only when obliged (due to one ReqTrig true)  Agent concurrency: ReqTrig’s on multiple operations true in same state –true parallelism, intra-agent or inter-agent

Goal operationalization and satisfaction arguments  The goal and operation models may be used to argue that operational requirements ensure higher-level objectives –bottom-up chaining of operationalization & refinement links {Spec(Op 1 ), …, Spec(Op M )}  OperationalizedGoal {Subgoal 1 …, Subgoal N, DOM }  ParentGoal (cf. Chap.8)  Yield derivational traceability links for free –backwards –backwards: why this operational spec, for what goals? –forwards –forwards: how is this goal ensured?

Satisfaction arguments & derivational traceability: example

Modeling system operations: outline  What are operations?  Characterizing system operations –Operation signature –Domain pre- and postconditions –Operation performer  Goal operationalization –Required pre-, post-, trigger conditions for goal satisfaction –Agent commitments –Goal operationalization and satisfaction arguments  Goals, agents, objects & operations: the semantic picture  Representing operation models –Operationalization diagrams –UML use case diagrams  Building operation models: heuristics & derivation rules

Goals, objects, agents, operations: the semantic picture object states agents operations smallest time unit behavioral goals time

Representing operation models: operationalization diagrams

Representing operation models: UML use case diagrams use case  A use case outlines the operations an agent has to perform +: interactions with... the agents controlling operation inputs the agents monitoring operation outputs +: optional (ill-defined) links... extendto exception operations with preconditions ("extend") includeto sub-operations ("include")  A use case should operationalize the leaf goals underlying the operations in it  Decompose goals, NOT operations  Decompose goals, NOT operations !! (=> precise semantics)  Generation of use cases from the operation & agent models is straightforward (see hereafter)

UML use case diagrams: example OpenDoors... SendAccelerationCommand CloseDoors doorsActuator Speed & Accel Controller OnBoardController... boundary interaction operation agent performing agent

UML use case diagrams: another example Staff BorrowBookCopy WhoBorrowedWhat? AddBookCopy RemoveBookCopy ReturnBookCopy WhichBooksOnTopic? ExtendLoan UpdateCatalog CheckForReservation > TooManyCopies > NotAvailable > ReserveBookCopy RefuseLoan Patron Browser LibrarySoftware precondition

Modeling system operations: outline  What are operations?  Characterizing system operations –Operation signature –Domain pre- and postconditions –Operation performer  Goal operationalization –Required pre-, post-, trigger conditions for goal satisfaction –Agent commitments –Goal operationalization and satisfaction arguments  Goals, agents, objects & operations: the semantic picture  Representing operation models –Operationalization diagrams –UML use case diagrams  Building operation models: heuristics & derivation rules

Derive operations from goal fluents  For each behavioral goal: list atomic conditions F in its spec  For each F, look for... –initiating operationfalse –initiating operation: makes F true when F was false => DomPre = not F, DomPost = F –terminating operationtrue –terminating operation: makes F false when F was true => DomPre = F, DomPost = not F

Identify operations from interaction scenarios  For each interaction event in a scenario... ? is this an operation application by the source agent with output monitored by the target agent ? ? what is the atomic condition characterizing the interaction on the source agent timeline... right before interaction => DomPre right after interaction => DomPost

Strengthen DomPre, DomPost with conditions required by goals  Identify required permissions  Identify required permissions: if an operation's DomPost effect can violate a goal G under condition C... ReqPrenot => ReqPre for G: not C e.g. OpenDoors : ReqPre for " Moving  Closed" : not Moving  Identify required obligations  Identify required obligations: if an operation's DomPost effect is prescribed by a goal G to hold whenever condition C gets true... ReqTrig => ReqTrig for G: C e.g. OpenDoors : ReqTrig for " StoppedAtPlatform  Open" : StoppedAtPlatform  Identify required additional effects  Identify required additional effects: if an operation's DomPost is not sufficient to ensure the target condition T of goal G... ReqPost => ReqPost for G: missing subcondition from T e.g. PlanMeeting : ReqPost for ConvenientMeeting: date not in excluded dates

Generating use case diagrams from operationalization diagrams For each agent ag in agent diagram: enclose all operations performed by ag in a rectangle labelled ag ; for each such operation op in corresponding operationalization diagram: for each other agent ag-env in the agent diagram: if ag-env controls one of op’s input object attribute/association or monitors one of op’s output object attribute/association then include ag-env around ag’s rectangle and draw an interaction link between op and ag-env transfer op's DomPre, DomPost, ReqPres, ReqTrigs, ReqPosts