Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VII. System Specification (I)

Slides:



Advertisements
Similar presentations
Chapter 7 System Models.
Advertisements

Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 71 System models l Abstract descriptions of systems whose requirements are being analysed.
Lecture 6 & 7 System Models.
Software Requirements
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 91 Formal Specification l Techniques for the unambiguous specification of software.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Ch5: Software Specification. 1 Overview  Use of specifications  Specification qualities  Classification of specification styles  Verification of specifications.
Finite Automata Chapter 5. Formal Language Definitions Why need formal definitions of language –Define a precise, unambiguous and uniform interpretation.
Real-Time System Requirements & Design Specs Shaw - Chapters 3 & 4 Homework #2: 3.3.1, 3.4.1, Add Error states to Fig 4.1 Lecture 4/17.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 10 Slide 1 Formal Specification.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Formal Specification.
Software Engineering 8. System Models.
Cheng/Dillon-Software Engineering: Formal Methods Model Checking.
Requirements Expression and Modelling
Chapter 5: Specification Yuanfang Cai CS751 Jan 29, 2003.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 9 Slide 1 Formal Specification l Techniques for the unambiguous specification of software.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System Models Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn Lecture 6 & 7.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
المحاضرة الثالثة. Software Requirements Topics covered Functional and non-functional requirements User requirements System requirements Interface specification.
Models of Computation: FSM Model Reading: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Requirements Definition and Specification. Outline Definition and specification Natural language Semi-formal techniques –Program description languages.
Ch. 51 Specification. Ch. 52 Outline Discussion of the term "specification" Types of specifications –operational Data Flow Diagrams (Some) UML diagrams.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Model Based Testing Group 7  Nishanth Chandradas ( )  George Stavrinides ( )  Jeyhan Hizli ( )  Talvinder Judge ( )  Saajan.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Dr Nick Mitchell (Room CM 224)
1 Specification A broad term that means definition Used at different stages of software development for different purposes Generally, a statement of agreement.
Daniel Amyot, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of Waterloo);
Miguel Garzón, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of.
Theory of Computation Automata Theory Dr. Ayman Srour.
From requirements to specification Specification is a refinement of requirements Can be included together as Software Requirements Specifications (SRS)
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XIV. From Requirements to Design in the UP.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini II. Software Life Cycle.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini IX. System Models (III)
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Requirements Specification
CompSci 280 S Introduction to Software Development
Formal Specification.
OPERATING SYSTEMS CS 3502 Fall 2017
Requirements Techniques, cont.
Chapter 5 System modeling
Sequential Flexibility
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Software Requirements
Abstract descriptions of systems whose requirements are being analysed
Finite Automata.
Dynamic Modeling Lecture # 37.
CS 425 Software Engineering
CS 425/625 Software Engineering
Subject Name: SOFTWARE ENGINEERING Subject Code:10IS51
Abstract Types Defined as Classes of Variables
Presentation transcript:

Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VII. System Specification (I)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 2 Objectives To discuss the importance of models for the definition of specifications To show formalisms that can be used to define system models To discuss properties and compare such formalisms To provide examples

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 3 Topics To distinguish among formal and informal specifications Operational vs. Descriptive Models Introduce some operational model: Data Flow Diagrams (DFD) Finite State Machines (FSM) Petri Nets (PN) The material that will be discussed today and tomorrow is covered by [GJM] Chapter 5 and/or [Som] Chapters 8,10

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 4 How to increase Specification Qualities Spec should be: Clear, Unambiguous, Understandable Should not be: Contradictory or Inconsistent, Incomplete Models are description of the system abstracting away unimportant details, so to make the system “tractable” Formal specifications vs. Informal specifications Use of formalisms make spec precise and augment automatic verification possibilities Informal spec more flexible, leave more decision space to the implementer Semiformal often we use notation which semantics has not been defined so precisely (e.g. UML)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 5 Formal Spec and Verification Formal specs are a powerful tool for making easier many development phases in particular for analysis and verification purpose Just some keyword: Model Checking Model Based Testing Simulation and prototyping

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 6 Operational vs. Descriptive Specification Operational specification describe the system in term of the expected behaviour generally providing a model Descriptive specifications describe the system in term of desired properties for the system An example from mathematics: Take a string of length “r” and fix at one of its extreme a pencil. Then fix the other extreme to a sheet using a pin. Now tightening the string move the pencil over the sheet describing a circle. x 2 + y 2 = r 2 which one is a descriptive or an operational specification?

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 7 Operational Specifications – DFD Data Flow Diagrams: Used to specify functions of a system and how data flow from functions to functions Systems are seen as collections of functions that manipulate data Data can be stored in repositories Data can flow Data can be transferred from and to the external environment

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 8 DFD – graphical notation Example – a simple arithmetical function: (a+b)*(a+c*d)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 9 DFD – a supermarket example (I)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 10 DFD – a supermarket example (II) The functionality “gestione acquisti cliente” is certainly a macro activity that could be split In case of supermarket wants to apply discounts for some products, in a certain period, to some clients, how these information could be introduced in the system?

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 11 DFD Characteristics DFD is certainly a semi-formal notation Lack of precise semantics: Function definition can be defined more precisely using more formal description No concept of control in such kind of diagrams Diagrams do not specify how data are used and output are produced Synchronization between functions is not specified

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 12 How to overcome DFD weakness Use of complementary notation to express those aspects that are not adequately described by DFD Augment the DFD introducing mechanisms that allow to express the missing aspects Revise the traditional definition of DFD to make it fully formal

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 13 Operational Specifications – FSM A Finite State Machine (FSM) is an abstract automaton that permits to describe the control flow of a system Mathematically FSM are defined by: A finite set of states Q A finite set of input I A transition function δ: Q x I --> Q A simple switch can be described by the following FSM: Q = [On, Off] I = [Switch] δ = [ (On,Switch) --> Off, (Off,Switch) --> On]

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 14 FSM graphical representation A simple example of an electrical equipment including a safety mechanism:

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 15 FSM with Input and Output A Finite State Machine (FSM) extension permits to distinguish among input and output data Mathematically I/O FSM are defined by: A finite set of states Q A finite set of input I A finite set of output O A transition function δ: Q x I --> Q x O How FSM can be composed originating a system FSM? Resulting machine have a number of state given by the product of the number of states for each composing machine We take a simple (and a bit simplicistic) approach

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 16 FSM – Thinking Philosophers (I)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 17 FSM – Thinking Philosophers (I)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 18 FSM and continuous systems FSM can store a finite quantity of information (Finite-memory devices) FSM can be cumbersome to describe even “finite” systems requiring to formally express details that sometimes are easier to understand using natural language In practice computer always have a finite memory but number of states is unmanageably large. How to manage these situations: Ignore details Complement diagrams with natural language comments Change model (LTS, PN,...) Enrich FSM (i.e. Introduce a language to annotate transitions)

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 19 FSM for a Producer/Consumer System

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 20 Deriving the Parallel Machine

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 21 The Buffered Producer/Consumer System

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 22 FSM limitations Composing machines the number of states raise drastically We could leave the FSM are they are defined for the subsystems and use composition rules. Still some problem persist The system must be always in a unique state and can perform only one action at any instant of time FSM permit to express only synchronous interactions Not really adequate to describe general concurrent systems

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 23 FSM Exercises FSM for a two switch lighting systems Two lamps and one button Different alternatives to model the same system

Ingegneria del Software I – A.A. 2006/2007 Andrea Polini 24 Key points On today lesson we introduced and discussed: Models to describe software systems have been introduce Properties that permit to classify different modelling language Operational vs. Descriptive Formal vs. Semiformal vs. Informal Data Flow Diagram (DFD) Finite State Machine (FSM)