VIENNA DEVELOPMENT METHOD -II. Improving the Incubator System  The software will not only record the current temperature of the system, but will also.

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Repetition Control Structures
1 1 Slide STATISTICS FOR BUSINESS AND ECONOMICS Seventh Edition AndersonSweeneyWilliams Slides Prepared by John Loucks © 1999 ITP/South-Western College.
Software Testing and Quality Assurance
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
1 Semaphores Special variable called a semaphore is used for signaling If a process is waiting for a signal, it is suspended until that signal is sent.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Testing an individual module
Chapter 11: Classes and Data Abstraction
Chapter 12 Pointers and linked structures. 2 Introduction  The data structures that expand or contract as required during the program execution is called.
Recall The Team Skills Analyzing the Problem
© The McGraw-Hill Companies, 2006 Chapter 7 Implementing classes.
C++ fundamentals.
CONTROL STATEMENTS Lakhbir Singh(Lect.IT) S.R.S.G.P.C.G. Ludhiana.
‘C’ LANGUAGE PRESENTATION.  C language was introduced by Dennis Ritchie..  It is a programming language, which can make a interaction between user and.
Tasks 1.Check you have the following posts: 1.Hardware and Software 2.Input and Output 3.Components of a Computer 2.ALL fonts should be a sensible size.
QUALITY MANAGEMENT SYSTEM ACCORDING TO ISO
Math – Getting Information from the Graph of a Function 1.
Ranga Rodrigo. Class is central to object oriented programming.
Managing Software Quality
Lecture 16 March 22, 2011 Formal Methods CS 315 Spring Adapted from slides provided by Jason Hallstrom and Murali Sitaraman (Clemson)
Analyzing the Requirements with Formal Specifications Vienna Development Method Specification Language (VDM-SL) Book: Formal Software Development From.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
From Use Cases to Test Cases 1. A Tester’s Perspective  Without use cases testers will approach the system to be tested as a “black box”. “What, exactly,
Central Processing Unit
 Once the system has been installed it will be monitored to check whether it is working correctly. Sometimes problems with a system will not be found.
CSI 3125, Axiomatic Semantics, page 1 Axiomatic semantics The assignment statement Statement composition The "if-then-else" statement The "while" statement.
An introduction to specification in VDM-SL At the end of this lecture you should be able to: write a formal specification of a system in VDM-SL; correlate.
Chapter 11: Classes and Data Abstraction. C++ Programming: Program Design Including Data Structures, Fourth Edition2 Objectives In this chapter, you will:
Low-Level Detailed Design SAD (Soft Arch Design) Mid-level Detailed Design Low-Level Detailed Design Design Finalization Design Document.
CSC264 Modelling and Computation 10. Modelling State Steve Riddle, John Fitzgerald, Maciej Koutny Computing Science Semester /06.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Repetition Control Structures Simple Program Design Third Edition A Step-by-Step Approach 5.
An introduction to specification in VDM-SL At the end of this lecture you should be able to: write a formal specification of a system in VDM-SL; correlate.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Chapter 7 Problem Solving with Loops
1 SEQUENCE DIAGRAM EXAMPLE The domain model, showing the navigability of the associations, and the Reserve video (staff scenario) use-case description.
C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 12: Classes and Data Abstraction.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 05: Classes and Data Abstraction.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
1 Exceptions When the Contract is Broken. 2 Definitions A routine call succeeds if it terminates its execution in a state satisfying its contract A routine.
Programming Fundamentals Enumerations and Functions.
Software Testing Reference: Software Engineering, Ian Sommerville, 6 th edition, Chapter 20.
Full Design. DESIGN CONCEPTS The main idea behind this design was to create an architecture capable of performing run-time load balancing in order to.
TA: Shreya Rawal.  A use case is a description of a system’s behavior as it responds to a request that originates from outside of that system (Usually.
 Software reliability is the probability that software will work properly in a specified environment and for a given amount of time. Using the following.
Domain Testing Functional testing which tests the application by giving inputs and evaluating its appropriate outputs. system does not accept invalid and.
State Machine Model.
VDM: Vienna Development Method
More JUnit CS 4501 / 6501 Software Testing
Deadlock Freedom by Construction
Formal Methods in Software Engineering
Why it is required and how to confirm
Axiomatic semantics Points to discuss: The assignment statement
Thursday’s Lecture Chemistry Building Musspratt Lecture Theatre,
Loops CIS 40 – Introduction to Programming in Python
CS 1111 Introduction to Programming Fall 2018
Use Cases Based on the paper
Training Module Introduction to the TB9100/P25 CG/P25 TAG Customer Service Software (CSS) Describes Release 3.95 for Trunked TB9100 and P25 TAG Release.
Interaction Modeling Extracted from textbook:
Peter Seibel Practical Common Lisp Peter Seibel
Assertions References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 4/25/2019.
CSE 1020:Software Development
 Is a machine that is able to take information (input), do some work on (process), and to make new information (output) COMPUTER.
Formal Methods Lecture 16 March 22, 2011 CS 315 Spring 2011
Presentation transcript:

VIENNA DEVELOPMENT METHOD -II

Improving the Incubator System  The software will not only record the current temperature of the system, but will also control the hardware  The system will be able to respond to a request from the user to change the temperature, and to signal the hardware to increase or decrease the temperature.  When the software receives such a signal, in addition to recording the new temperature, it must send back a response  This response tells the hardware whether changes are required or not required to achieve the temperature that has been requested.

Improving the Incubator System 1.New system will behave according to initial behavior 2.In the new system, the temperature of the incubator will not be recorded until a message is received from the hardware 3.The operations on the system will not be able to run until the initial temperature is set. 4.It will be necessary for the software to record both the actual temperature of the system and the requested temperature

The UML diagram for the new software The previous class IncubatorMonitor

Specifying enumerated types  Three operations of the class IncubatorController requestChange, increment and decrement) have an output of type Signal;  Signal is not a standard UML type such as Integer;  The internal details of this Signal class are relevant to the specification of the IncubatorMonitor class

Specifying Enumerated Types  The signal that must be sent to the hardware could be one of three possible values:  an instruction to the hardware to increase the temperature;  an instruction to the hardware to decrease the temperature;  an instruction to the hardware to do nothing. A type that consists of a number of named values is often referred to as an enumerated type;

In VDM-SL the types clause is the appropriate place to define new types. UML Specification of Signal type A type is defined by type construction

Specifying the state of the IncubatorController ·  There need to be two components of the state  hold the actual temperature  hold the temperature that has been requested  when the system first comes into being these values will be undefined, therefore be set to nil

The Invariant  The actual temperature must not be allowed to go outside the range of -10 to +10 degrees;  We also know the possibility that actual temprature could be equal to the nil value;  The same is true for the requested temperature.  They are defined as make function

Improving the Readibility of the Specification by using a function  T he purpose of this function is to check whether an integer value, val, is within the range MIN and MAX as defined earlier  we can now use this function in the invariant,:

Specifying the Operations for the IncubatorController  Initial temperature of the system;  This will be invoked by the hardware when the incubator has established a initial temperature  Initialization clause  The initialization clause is simply a function that states the conditions that must exist  When the system first comes into being - it is not an operation that can be invoked during the system's life time.

 setInitialSet operation requires an input parameter TempIn  read-write access is needed to the actualTemp component,  Preconditon: the first conjunct is validating the input - if the input value is out of range, then the behavior of the system for this operation is not defined; the second part ensures the actual temperature of the incubator has a value of nil,  Once the temperature has been set, the temperature has an actual value, and this operation could not take place again unless some other operation set the temperature back to nil; The setInitialTemp Operation

The requestChange Operation  This operation records the value of the temperature  It has been requested by the user of the system, and to signal the hardware to take the appropriate action in order to bring about the change;  It will require an input of an integer, and will result in an output of type Signal.

 we need access to both components of the state, but the mode of access is different in each case;  case of requestedTemp requires to have write access to this component  we must record the temperature that has been requested;  case of actualTemp, requires read access in order to compare it to the requested temperature and determine the action that must be taken by the hardware.  the precondition is similar to that of the previous operation, but we are checking that the actual temperature is not undefined, thus the initial temperature had been properly set.  the postcondition consists of two conjuncts;

The increment operation The precondition consists of three conjuncts  The first checks that the actual temperature is less than the requested temperature (otherwise we should not increment it); Since all operations must preserve the invariant, assume that the requested temperature will not be greater than MAX, so this conjunct automatically checks that the actual temperature is less that the maximum allowed temperature; The second and third conjuncts check that an initial temperature and a requested temperature has been set.

Operations for the Requested Temperature and the Actual Temperature:

A standard template for VDM-SL specifications

values MAX:  =10 MIN : Z=--10 The system that monitored the temperature of an incubator