IntroductionIntroduction Copyright, 2003 © Jerzy R. Nawrocki Models and Analysis.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

2k-p Fractional Factorial Designs
AGVISE Laboratories %Zone or Grid Samples – Northwood laboratory
Advanced Piloting Cruise Plot.
Copyright McGraw-Hill/Irwin, 2002 Significance of Resource Pricing Marginal Productivity Theory of Resource Demand MRP as a Demand Schedule Determinants.
Copyright © 2003 Pearson Education, Inc.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 116.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 28.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 75.
Chapter 1 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
2-1 Solving Linear Equations and Inequalities Warm Up
/4/2010 Box and Whisker Plots Objective: Learn how to read and draw box and whisker plots Starter: Order these numbers.
Click to edit Master title style Page - 1 OneSky Teams Step-by-Step Online Corporate Communication Support 2006.
Add Governors Discretionary (1G) Grants Chapter 6.
CALENDAR.
You will need some paper!
Adding and Subtracting Decimals
Chapter 2: The Straight Line and Applications
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
Addition Facts
Year 6 mental test 5 second questions
Who Wants To Be A Millionaire? Decimal Edition Question 1.
SADC Course in Statistics Graphical summaries for quantitative data Module I3: Sessions 2 and 3.
IntroductionIntroduction Copyright, 2000 © Jerzy R. Nawrocki Models and Analysis.
The 5S numbers game..
Break Time Remaining 10:00.
Effort and Schedule Estimation Copyright, 1999 © Jerzy R. Nawrocki Personal Software.
The basics for simulations
INAR 342 FINISHING. INAR 342 : FINISHING Aim of the Course This course is designed to heighten the students understanding of the rules and principles.
CSS446 Spring 2014 Nan Wang. 2 Instructor Instructors: –Nan Wang Office: TEC 232 Phone: (601) Meeting time and location:
Columbus State Community College
15. Oktober Oktober Oktober 2012.
Problems, Skills and Training Needs in Nonprofit Human Service Organizations Dr. Rick Hoefer University of Texas at Arlington School of Social Work.
We are learning how to read the 24 hour clock
CMPT 275 Software Engineering
© 2012 National Heart Foundation of Australia. Slide 2.
Benjamin Banneker Charter Academy of Technology Making AYP Benjamin Banneker Charter Academy of Technology Making AYP.
How creating a course on the e-lastic platform 1.
Addition 1’s to 20.
Start. 5a - 5 = 7a - 19 A. 7 B. 16 C. -7 D. None of these.
2.10% more children born Die 0.2 years sooner Spend 95.53% less money on health care No class divide 60.84% less electricity 84.40% less oil.
Main Idea/Vocabulary Solve inequalities by using the Multiplication or Division Properties of Inequality.
Week 1.
Visions of Australia – Regional Exhibition Touring Fund Applicant organisation Exhibition title Exhibition Sample Support Material Instructions 1) Please.
Static Equilibrium; Elasticity and Fracture
Clock will move after 1 minute
By Rasmussen College. 1. What majors or programs do you offer? 2. What is the average length of your programs? 3. What percentage of your students graduate?
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
One step equations Add Subtract Multiply Divide Addition X + 5 = -9 X = X = X = X = X = 2.
Planning at CMM level 2 Copyright, 2000 © Jerzy R. Nawrocki Requirements Engineering.
Schutzvermerk nach DIN 34 beachten 05/04/15 Seite 1 Training EPAM and CANopen Basic Solution: Password * * Level 1 Level 2 * Level 3 Password2 IP-Adr.
RequisitePro (2) Copyright, 2001 © Jerzy R. Nawrocki Requirements Engineering.
CMM Level 2: Repeatable Copyright, 2000 © Jerzy R. Nawrocki Quality Management.
Introduction to VDM Copyright, 2003 © Jerzy R. Nawrocki Models and Analysis of Software.
Quality of Usage Scenarios Copyright, 2000 © Jerzy R. Nawrocki Quality Management.
Introduction to Z Copyright, 2002 © Jerzy R. Nawrocki Models and Analysis of Software.
Introduction to SoDA Copyright, 2001 © Jerzy R. Nawrocki Requirements Engineering.
DiscussionsDiscussions Copyright, 2001 © Jerzy R. Nawrocki Requirements Engineering.
Introduction to Quality Management Copyright, 2000 © Jerzy R. Nawrocki Quality.
Introduction to SoDA Copyright, 2001 © Jerzy R. Nawrocki Quality Management Lecture.
Requirements Engineering Lecture 2
VDM - Part II Models and Analysis of Software Lecture 4
Introduction to PRINCE 2
Presentation transcript:

IntroductionIntroduction Copyright, 2003 © Jerzy R. Nawrocki Models and Analysis of Software Lecture 2 Models and Analysis of Software Lecture 2

J. Nawrocki, Models & Analysis (2) From the last lecture Rational Robot isnt as good as Rational claims. Rational Robot is too difficult and time consuming. More info about Cactus and DOM (with a little help of students ). We should try to solve some more practical problems, not only the easy Notice Board. I think this subject should be done during laboratories. There was a little bit of jumping between the slides.

J. Nawrocki, Models & Analysis (2) Plan of the lecture Specification styles A model-based specification An axiomatic specification An unexpected specification Course organisation

J. Nawrocki, Models & Analysis (2) Specification styles Formal methods Model-basedModel-basedAxiomaticAxiomatic ImperativeImperativeDeclarativeDeclarative FunctionalFunctionalLogicalLogical AlgebraicAlgebraic

J. Nawrocki, Models & Analysis (2) Plan of the lecture Specification styles A model-based specification An axiomatic specification An unexpected specification Course organisation

J. Nawrocki, Models & Analysis (2) A model-based specification Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {};INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {}; m

J. Nawrocki, Models & Analysis (2) A model-based specification Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {};INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; m

J. Nawrocki, Models & Analysis (2) A model-based specification Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {};INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; LOOKUP (name: Name) r: TelephoneNo ext rd dir: Directory; ext rd dir: Directory; pre name dom dir; pre name dom dir; post dir (name); post dir (name); LOOKUP (name: Name) r: TelephoneNo ext rd dir: Directory; ext rd dir: Directory; pre name dom dir; pre name dom dir; post dir (name); post dir (name); m

J. Nawrocki, Models & Analysis (2) A model-based specification Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend Directory = Name TelephoneNo state telbook of dir: Directory dir: Directoryend INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {};INIT() ext wr dir: Directory; ext wr dir: Directory; post dir = {}; post dir = {}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; ADD (name: Name, telno: TelephoneNo) ext wr dir: Directory; ext wr dir: Directory; post dir = dir {name telno}; post dir = dir {name telno}; LOOKUP (name: Name) r: TelephoneNo ext rd dir: Directory; ext rd dir: Directory; pre name dom dir; pre name dom dir; post dir (name); post dir (name); LOOKUP (name: Name) r: TelephoneNo ext rd dir: Directory; ext rd dir: Directory; pre name dom dir; pre name dom dir; post dir (name); post dir (name); DELETE (name: Name) ext wr dir: Directory; ext wr dir: Directory; post dir = {name} dir ; post dir = {name} dir ; DELETE (name: Name) ext wr dir: Directory; ext wr dir: Directory; post dir = {name} dir ; post dir = {name} dir ; m

J. Nawrocki, Models & Analysis (2) Plan of the lecture Specification styles A model-based specification An axiomatic specification An unexpected specification Course organisation

J. Nawrocki, Models & Analysis (2) An axiomatic specification scheme DIRECTORY = class type Name, PhoneNo, Dir value empty: Dir, add: Name x PhoneNo x Dir Dir, add: Name x PhoneNo x Dir Dir, lookup: Name x Dir PhoneNo, lookup: Name x Dir PhoneNo, delete: Name x Dir Dir delete: Name x Dir Dir scheme DIRECTORY = class type Name, PhoneNo, Dir value empty: Dir, add: Name x PhoneNo x Dir Dir, add: Name x PhoneNo x Dir Dir, lookup: Name x Dir PhoneNo, lookup: Name x Dir PhoneNo, delete: Name x Dir Dir delete: Name x Dir Dir axiom forall name, name1: Name, t: PhoneNo, d: Dir delete (name, empty) empty delete (name, empty) empty delete (name, add(name1, t, d)) delete (name, add(name1, t, d)) if name = name1 if name = name1 then delete (name, d) then delete (name, d) else add (name1, t, delete (name, d)) else add (name1, t, delete (name, d)) end end axiom forall name, name1: Name, t: PhoneNo, d: Dir delete (name, empty) empty delete (name, empty) empty delete (name, add(name1, t, d)) delete (name, add(name1, t, d)) if name = name1 if name = name1 then delete (name, d) then delete (name, d) else add (name1, t, delete (name, d)) else add (name1, t, delete (name, d)) end end Not d ?

J. Nawrocki, Models & Analysis (2) An axiomatic specification axiom forall name, name1: Name, t: PhoneNo, d: Dir lookup (name, add(name1, t, d)) lookup (name, add(name1, t, d)) if name = name1 then t if name = name1 then t else lookup (name, d) else lookup (name, d) end end pre name = name1 name d pre name = name1 name d axiom forall name, name1: Name, t: PhoneNo, d: Dir lookup (name, add(name1, t, d)) lookup (name, add(name1, t, d)) if name = name1 then t if name = name1 then t else lookup (name, d) else lookup (name, d) end end pre name = name1 name d pre name = name1 name d scheme DIRECTORY = class type Name, PhoneNo, Dir value empty: Dir, add: Name x PhoneNo x Dir Dir, add: Name x PhoneNo x Dir Dir, lookup: Name x Dir PhoneNo, lookup: Name x Dir PhoneNo, delete: Name x Dir Dir delete: Name x Dir Dir scheme DIRECTORY = class type Name, PhoneNo, Dir value empty: Dir, add: Name x PhoneNo x Dir Dir, add: Name x PhoneNo x Dir Dir, lookup: Name x Dir PhoneNo, lookup: Name x Dir PhoneNo, delete: Name x Dir Dir delete: Name x Dir Dir

J. Nawrocki, Models & Analysis (2) Plan of the lecture Specification styles A model-based specification An axiomatic specification An unexpected specification Course organisation

J. Nawrocki, Models & Analysis (2) Another axiomatic specification type ext_nat_numbers is sorts nat sorts nat opns 0 nat opns 0 nat suc: nat nat suc: nat nat _ + _ : nat, nat nat _ + _ : nat, nat nat type ext_nat_numbers is sorts nat sorts nat opns 0 nat opns 0 nat suc: nat nat suc: nat nat _ + _ : nat, nat nat _ + _ : nat, nat nat eqns forall x,y ofsort nat x + 0 = x; x + 0 = x; x + succ(y) = succ(x+y); x + succ(y) = succ(x+y); eqns forall x,y ofsort nat x + 0 = x; x + 0 = x; x + succ(y) = succ(x+y); x + succ(y) = succ(x+y); int zero () int succ (int x) int plus (int x, int y) int zero () int succ (int x) int plus (int x, int y) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) Our intuition: plus(2, 3)= 5 Our intuition: plus(2, 3)= 5

J. Nawrocki, Models & Analysis (2) An unexpected implementation int zero () int succ (int x) int plus (int x, int y) int zero () int succ (int x) int plus (int x, int y) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) Our intuition: plus(2, 3)= 5 Our intuition: plus(2, 3)= 5 int zero () { return 1; } { return 1; } int zero () { return 1; } { return 1; }

J. Nawrocki, Models & Analysis (2) An unexpected implementation int zero () int succ (int x) int plus (int x, int y) int zero () int succ (int x) int plus (int x, int y) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) Our intuition: plus(2, 3)= 5 Our intuition: plus(2, 3)= 5 int zero () { return 1; } { return 1; } int zero () { return 1; } { return 1; } int succ (int x) { return 2*x; } { return 2*x; } int succ (int x) { return 2*x; } { return 2*x; }

J. Nawrocki, Models & Analysis (2) An unexpected implementation int zero () int succ (int x) int plus (int x, int y) int zero () int succ (int x) int plus (int x, int y) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) Our intuition: plus(2, 3)= 5 Our intuition: plus(2, 3)= 5 int zero () { return 1; } { return 1; } int zero () { return 1; } { return 1; } int succ (int x) { return 2*x; } { return 2*x; } int succ (int x) { return 2*x; } { return 2*x; } int plus (int x, int y) { return x * y; } { return x * y; } int plus (int x, int y) { return x * y; } { return x * y; }

J. Nawrocki, Models & Analysis (2) An unexpected implementation x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) x plus(x, zero())= x x plus(x, zero())= x x,y plus(x,succ(y))= succ(plus(x,y)) x,y plus(x,succ(y))= succ(plus(x,y)) Our intuition: plus(2, 3)= 5 Our intuition: plus(2, 3)= 5 int zero () { return 1; } { return 1; } int zero () { return 1; } { return 1; } int succ (int x) { return 2*x; } { return 2*x; } int succ (int x) { return 2*x; } { return 2*x; } int plus (int x, int y) { return x * y; } { return x * y; } int plus (int x, int y) { return x * y; } { return x * y; }... but plus(2,3)= 6 The implementation satisfies those conditions

J. Nawrocki, Models & Analysis (2) Plan of the lecture Specification styles A model-based specification An axiomatic specification An unexpected specification Course organisation

J. Nawrocki, Models & Analysis (2) LecturesLectures GUI Testing and Rational Robot Introduction to Software Models VDM – part I 2.04 VDM – part II 9.04 Z Statecharts 7.05 Petri Nets Introduction to Software Test Automation Advanced Topics in Test Automation Tools for Automate Testing 4.06 Test Automation Case Studies Summary

J. Nawrocki, Models & Analysis (2) LabsLabs Extreme 90 Rational Sitecheck Rational Robot – part I Rational Robot – part II Rational Robot – part III VDM + Z Statecharts + Petri Nets

J. Nawrocki, Models & Analysis (2) Course organisation 13: Presence at lectures 20: Seminar 20: Laboratory classes 50: Written exam : Total Grading rules : : : : : : : : : : 3.0

J. Nawrocki, Models & Analysis (2) Course organisation Each student has to give a presentation lasting for 20 minutes. Any topic concerning Models & Analysis of Software will be accepted. The presentation does not have to be original. It can be based on someones paper or book. Title, name, address, keywords and abstract (about half a page) must be submitted to Bartek Walter at least 10 days before the presentation. Schedule will be prepared by Bartek Walter. Presentation at seminar

J. Nawrocki, Models & Analysis (2) Course organisation Each presentation gets from 1 up to 10 points. The best grade is excluded and the author is expected to grade his presentation at 10 points. The presentation grade is an average of the remaining grades. Average presentation grade will be multiplied by 2 to get overall presentation grade. Presentation grade

J. Nawrocki, Models & Analysis (2) SummarySummary Model-based specifications: an abstract implementation Axiomatic specifications: relations and superposition Problem of unexpected implementations

J. Nawrocki, Models & Analysis (2) Further readings A. Harry, Formal Methods Fact File, John Wiley & Sons, Chichester, 1996 (Chapters 1 - 3).

J. Nawrocki, Models & Analysis (2) Quality assessment 1. What is your general impression? (1 - 6) 2. Was it too slow or too fast? 3. What important did you learn during the lecture? 4. What to improve and how?