Verification and Validation

Similar documents
Génie Logiciel Avancé - Advanced Software Engineering A Brief Revision of UML

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Ingegneria del Software Corso di Laurea in Informatica per il Management. Introduction to UML

Introduction to Software Engineering. 5. Modeling Objects and Classes

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Class Diagram. Classes consist of. Note that class diagrams contain only classes, not objects.

Metamodeling with Metamodels. Using. UML/MOF including OCL

Model Driven Development Unified Modeling Language (UML)

Verification and Validation

Verification and Validation

UML Modeling I. Instructor: Yongjie Zheng September 3, CS 490MT/5555 Software Methods and Tools

Automation of Semantic Web based Digital Library using Unified Modeling Language Minal Bhise 1 1

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

Génie Logiciel Avancé

SLIDES: Introductory Modeling Example Employing UML and OCL [UML: Unified Modeling Language, OCL:Object Constarint Language]

Object Oriented Modeling

SESE Tour 2018 Toulouse May 22

Component Design. Systems Engineering BSc Course. Budapest University of Technology and Economics Department of Measurement and Information Systems

Object-Oriented Software Engineering Practical Software Development using UML and Java

COSC 3351 Software Design. An Introduction to UML (I)

Génie Logiciel Avancé

OMG Modeling Glossary B

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

The Unified Modelling Language. Example Diagrams. Notation vs. Methodology. UML and Meta Modelling

A UML 2 Profile for Variability Models and their Dependency to Business Processes

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

UML Diagrams & And Some Of Their Elements

A UML 2 Profile for Variability Models and their Dependency to Business Processes

UML-Based Conceptual Modeling of Pattern-Bases

A Conceptual Model of the UML

Index. business modeling syntax 181 business process modeling 57 business rule 40

It s all Done with Mirrors Patterns and OCL. KMF Kent Modelling Framework D.H.Akehurst and O.Patrascoiu

NOTES ON OBJECT-ORIENTED MODELING AND DESIGN

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

Object-Oriented Analysis and Design. Pre-UML Situation. The Unified Modeling Language. Unification Efforts

UML Fundamental. OutLine. NetFusion Tech. Co., Ltd. Jack Lee. Use-case diagram Class diagram Sequence diagram

Unified Modeling Language 2

Introduction to Software Engineering. 5. Modeling Objects and Classes

Object-Oriented Theories for Model Driven Architecture

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

Analyse statique de programmes avioniques

About Transferring License Rights for. PL7 V4.5 and Unity Pro V2.3 SP1 Software

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 5: Modelling with Classes

A PRIMITIVE EXECUTION MODEL FOR HETEROGENEOUS MODELING

Orthographic Software Modeling A Practical Approach to View Based Development

Computer Science 520/620 Spring 2013 Prof. L. Osterweil" Use Cases" Software Models and Representations" Part 4" More, and Multiple Models"

Computer Science 520/620 Spring 2013 Prof. L. Osterweil" Software Models and Representations" Part 4" More, and Multiple Models" Use Cases"

OBJECT ORIENTED DESIGN with the Unified Process. Use Case Realization

UNIT II. Syllabus. a. An Overview of the UML: Visualizing, Specifying, Constructing, Documenting

VHDL par Ahcène Bounceur VHDL

Unified Modeling Language (UML) Fundamentals & Intro to Profiles

UNIT-II Introduction to UML

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

Objectives. Explain the purpose and objectives of objectoriented. Develop design class diagrams

2 UML for OOAD. 2.1 What is UML? 2.2 Classes in UML 2.3 Relations in UML 2.4 Static and Dynamic Design with UML. UML for OOAD Stefan Kluth 1

The learning objectives of this chapter are the followings. At the end of this chapter, you shall

System models Abstract descriptions of systems whose requirements are being analysed. System modelling. Structured methods

UML Class Model Abstract Syntax and Set-Based Semantics

Models versus Ontologies - What's the Difference and where does it Matter?

Unified Modeling Language (UML)

Software Engineering from a

Oral Questions. Unit-1 Concepts. Oral Question/Assignment/Gate Question with Answer

Definition of Information Systems

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Distributed Systems Programming (F21DS1) Formal Verification

Dominique Blouin Etienne Borde

Business Process Modelling

Outline. A little history. Outline. The Unified Modeling Language Opportunities and Challenges for Formal Methods

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

CIS 771: Software Specifications

SUMMARY: MODEL DRIVEN SECURITY

Object-Oriented Design

administrivia today UML start design patterns Tuesday, September 28, 2010

Unified Modeling Language (UML)

Enterprise Architect Training Courses

StarUML Documentation

Model Querying with Graphical Notation of QVT Relations

SE 1: Software Requirements Specification and Analysis

Model Driven Engineering (MDE)

12 Tutorial on UML. TIMe TIMe Electronic Textbook

Software Service Engineering

Blazo Nastov. Journée des doctorant, Nîmes, France 19 June 2014

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Course 3 7 March

Introduction to UML What is UML? Motivations for UML Types of UML diagrams UML syntax Descriptions of the various diagram types Rational Rose (IBM.. M

Teaching Encapsulation and Modularity in Object-Oriented Languages with Access Graphs

Petri Nets" Computer Science 520/620 Spring 2011 Prof. L. Osterweil" Software Models and Representations" Part 3" Some Semantics"

Computer Science 520/620 Spring 2011 Prof. L. Osterweil" Software Models and Representations" Part 3" Petri Nets"

UML Tutorial. Unified Modeling Language UML Tutorial

UML for Real-Time Overview

Semantics of ARIS Model

CimConteXtor User Guide

Today s Topic. Lecture 5. What is UML? Why Use UML. UML Diagrams. Introduction to UML. What is UML Why use UML? UML Diagrams

Engineering Design w/embedded Systems

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Chapter 5, Analysis: Object Modeling

DEVELOPMENT OF AN INTERACTIVE ENVIRONMENT USED FOR SIMULATION OF SHORTEST PATHS ALGORITHMS

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

How useful is the UML profile SPT without Semantics? 1

Transcription:

2017-2018 Cycle Ingénieur 2 ème année Département Informatique Verification and Validation Part II : Components of the UML Burkhart Wolff Département Informatique Université Paris-Sud / Orsay

Plan of the Chapter # Introduction to the UML notation # Syntax and semantics of class model elements and their visialization in diagrams $ Class Invariants $ Constraints $ Operations $ Pre- and Post-Conditions # Syntax and semantics of state machines Ultimate Goal: Specify system components for test and verification 2017-2018 2

The UML... #... is the Unified Modeling Language #... is a normed data-structure, a technical format of model-elements (that may contain other modelelements) with consistent naming for $ various system descriptions $ various code formats #... has various external representations $ as XMI exchange format (tool-independent in theory...) $ as UML diagrams 2017-2018 3

The UML offers the advantage... #... of being a basis for Integrated Development Environments (IDE's like ArgoUML, Poseidon, Rational Rose,...) 2017-2018 4

2017-2018 5

The UML offers the advantage... #... of being a basis for Integrated Development Environments (IDE's like ArgoUML, Poseidon, Rational Rose,...) #... to offer object-oriented specifications #... to offer a formal, mathematical semantics (well, at least to parts of the UML) #... to be fairly widely used in industry, even if not always supported entirely #... is the basis for a whole software-engineering paradigm called Model-Driven Engineering (MDE). 2017-2018 6

The UML 2.0 Diagrams (for corresp. models) # UML, Version 1.1 : 9 types of diagrams # UML, Version 2.0 adds 4 more types of diagrams $ structure composition $ communication $ packaging $ temporal constraints (timing) 2017-2018 7

The UML 2.0 Diagrams (for corresp. models) Static View Architectural View Dynamic View 2017-2018 8

Principal UML diagram types (1) # Structure and Vizualization $ Use Case Models and Use Case Diagrams $ Sequence Models and Sequence Diagrams $ State Machines and State Charts $ Class Models and Class Diagrams $ Object Graphs and Object Diagrams All these Model Elements are discribed in a UML-document itself, the Meta-Object- Framework (MOF) 2017-2018 9

Principal UML diagram types (1) # Use Case Diagrams ( Diagrammes des cas d'utilisation ) : models the system operations by $ the interactions of the system with the external world (external agents communicating with the system seen as a black box.) $ Just the priciple cases, the alternatives, the extensions Emphasis on (top-level) functionality! 2017-2018 10

Example: Use Case Diagram (Conceptual) 2017-2018 11

Example: Use Case Diagram (Design) 2017-2018 12

Summary: A «Use Case Diagram» # A Use-Case Diagram $... just represents the principal user-classes (stake-holders) of a system $... and the top-level activities $... is useful during conceptual modeling in requirement engineering $... has no real semantics, $... but is often used to configure templates " for interfaces " security settings 2017-2018 13

Principal UML diagram types (2) # Interaction Diagram ( Diagrammes d interaction ): the interacion between objects for realizing a functionality $ SequenceDiagram: privileged temporal description of exchanges of events. Notions of utilization scenarios. $ Collaboration Diagram: centered around objects and top-level collaborations of them. 2017-2018 14

Example: Sequence Diagram (high-level) Web Browser Web Server Click Intro Page PageRequest ImageRequest Insert Data ClickBut Submit Transit Form Data (HTTP POST) 2017-2018 15

Example: Sequence Diagram (design-level) webserver: HTTPPworkProc dynamicrenderer: PageRenderer datamanager: DataAccessMgr staticrenderer: StaticPageRdr reqeditpage() getdata() Data create newlink: LinkData alt [Cancel OR Timeout] [else] inslinkdata() Ok code persistlinkdata(newlink) getdata() Data Ok code updcurrentpage() Ok code updstaticpages() succesupdate() 2017-2018 16

Summary: Sequence Diagrams (a) # Two types can be distinguished: $ Diagrams for requirements analysis: description for use-case scenarios of the system, i.e. examples of the interactions of the system, i.e. of top-level behaviour. Good for error-cases. $ Diagrams for system or protocol design: communications between different instances of operations; or events occuring in state machines. Processes can be created, and synchronous and asynchronous communications were modeled. Alternatives possible. 2017-2018 17

Summary: Sequence Diagrams (b) # Two types can be distinguished: $ Semantics of Diagrams for requirements analysis: none. $ Semantics of Diagrams for system design: many ;-) Can be interpreted in Temporal Logic and therefore in automata in many ways... Mostly depends what tools make out of it ;-( 2017-2018 18

Principal UML diagram types (3) # State Charts (ou «machine à états») : a description of behaviour by (hierarchical) automata $ interesting if an object reacts on events (asynchronous as well as synchronous) by the external environment $ or if the internal state of an object leads to a somewhat interesting life-cycle of an object (transitions between well-characterized states of the object) 2017-2018 19

Example: State Chart (design level) 2017-2018 20

Summary: State Charts # Two types can be distinguished: $ Semantics of Diagrams for requirements analysis: many. $ Semantics of Diagrams for system design: many. Can be interpreted in by automata, process calculi, Labelled Transition Systems (LTL) in several, reasonable ways (depends on context and application). 2017-2018 21

Principal UML diagram types (4) # Class Diagrams ( Diagrammes de classes ) : the static structure of the DATA of the system $ the classes of interest to be represented in the system $ the relations between classes $ the attributes and the methods $ the types, required/defined interfaces can be used for top-level views as specific interfaces for local code... 2017-2018 22

Example: A Class Diagram 2017-2018 23

A propos Class Diagrams (1) # Model-Elements $ Class $ Attributes classname classname attribute $ Operations (methods) classname attribute operation(args) $ Packages (grouping mechanism for parts of a class model) packetname 2017-2018 24

A propos Class Diagrams (2) # Model-Elements $ Association (with optional roles cardinalities) * b 1..* a $ Aggregation («has a» relationship with weak linkage) $ Coposition («has a» relationship with strong linkage) $ Specialization (modeling of a is-a relationship between classes) 2017-2018 25

A propos Class Diagrams (3) # Model-Elements $ Visibilities ( optional public and private, see more later) class + attribute - operation(args) $ N-ary associations $ Association Class class $ templates with parameter (usually classes) class parameter 2017-2018 26

A propos Class Diagrams (4) # Model-Elements $ Annotations This is a key component class... typically on classes... can be informal text as well as OCL (see next part!) b a assoc class self.a->forall (y self.b->exists (z z.a = b)) 2017-2018 27

A propos Class Diagrams (1) # Semantics: Classes are: $ types of objects $ tuples attributes AND association ends («roles»), which are collections (Set, Sequence, Bag) of references to other objects $ objects may be linked via references to each other into a state called object graph $ cardinalities, etc. are INVARIANTS in this state. 2017-2018 28

A propos Class Diagrams (2) # Attributes $ can have simple type (Integer, Boolean, String, Real) or primitive type (see Date example) only! $ in diagrams, attributes may NOT have collection type (use therefore associations) $ In a requirement analysis model, everything is public by default (we will refine this notion later) 2017-2018 29

A propos Class Diagrams (3) # operations (in an analysis class diagram) $ we will only distinguish operations linked to a use-case diagram $ we will sometimes not even link them to a specific class this will come later. # operations (in an design class diagram) $ a complete interface; can be compiled from a JAVA Interface! 2017-2018 30

Class Diagrams in Requirements Analysis The static aspects of a model were represented by $ The class diagram Classes with their attributes Class hierarchies via inheritance Relations between classes (associations + cardinalities) The roles at the association ends give an intuitive semantics $ The invariants make the description complete... ce qui n est pas exprimable directement dans le diagramme Plages de valeurs ou contraintes sur des attributs Contraintes complexes sur une association isolée Contraintes globales sur un ensemble d attributs/associations Contraintes sur un ensemble d instances des classes 2017-2018 31

More Specific Details in UML 2 Visibilities: +: public - : private #: protected / : derived Instances: Modifiers: static abstract Parameter modes: in (par défaut) out in out Stéréotypes: 2017-2018 32

More Specific Details in UML 2 role cardinality generalisation The roles were used to navigate accross associations for a:achat, the OCL expr a.poste denotes an instance of Poste. for c:citerne, the OCL expr c.achats denotes an instance of Achat for p:poste, the OCL expr p.courant corresponds to a collection of 0 or 1 instances of Citerne. Le nom de classe peut servir de rôle par défaut (si pas d ambiguïté) 2017-2018 33

More Specific Details in UML 2 Cardinalities in associations can be: $ 1, 2, or an integral number (no expression!) $ * (for «arbitrary»,... ) $ an interval like 1..*, 0..1, 1..3, (not like 1..N) " on donnera systématiquement les cardinalités " Attention à la distinction: une instance (1), au plus une instance (0..1), une collection d instances (* ou 1..*) Multiplicities on attributs and classes can be: 1 0 or 1 String, not string of length 0 or 1!!! 2017-2018 34

More Specific Details in UML 2 Contraints on associations # For generalisation: $ complete, incomplete $ disjoint, overlapping # Between associations $ xor # Collection Types may now also be specified!!! $ no duplicates, unordered $ duplicates, unordered $ no duplicates, ordered $ duplicates, positioned 2017-2018 35

More Specific Details in UML 2 N-ary Associations Association with attributes Association «qualified» 2017-2018 36

Putting all together Inspiré de: «UML 2.0 Guide de référence», Rumbaugh et alli., CampusPress, 2005 2017-2018 37

Principal UML diagram types (5) # Object Diagrams ( Diagrammes d'objects ) : denote a concrete system state, # typically used in connection with a Class Diagram $ attributes have concrete values $ associations were replaced by directed arcs representing the links can be used for debugging purposes... (semantics: fully clear). 2017-2018 38

Example Object Diagram # Corresp. Object Diagram 2017-2018 39

Example Object Diagram # Class Diagram 2017-2018 40

Summary: Object Diagrams # Object Models denote a concrete State of a Class Model; Class Diagram denote (essentially) a Signature of the elements in the state, as well as the possible operations on them. Multiplicities and Cardinalities express INVARIANTS on (valid) Object Models to a given Class Model with this respect, serves as Specification of States. 2017-2018 41

A propos Class Diagrams (3) # Not all constraints on an object graph can be expressed by arrows so far: $ The student numbers should ne distinct $ A student can not acquire a module he has already finished $ A module may not be part of the pre-requisites pré-requis $ A student may only follow a module if he has acquired the necessary pre-requisites $ A student can only follow modules offered at his filière $... 2017-2018 42

Example of a State Machine: a (teaching) module «L ouverture des modules est décidée en début de semestre et dépend de l inscription effective d étudiants. La capacité d accueil est fixe et les inscriptions prises dans l ordre d arrivée. Aucune inscription n est admise une fois le module démarré.» This describes the life-cycle of an isolated module... will we find this later on in the implementation the equivalent of the possible transitions? 2017-2018 43

A propos Class Diagrams (3) # Not all constraints on an object graph can be expressed by arrows so far: $... $ a student can only subscribe a module if he is targeting for a diplome $ Il existe un facteur 3 au plus entre les nombres de crédits de deux U.E. d une même mention (cas des Licences)???! we will need mechanisms to describe all this in the design phase!!! (Object Constraint Language, OCL, We use MOAL...) 2017-2018 44