2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.1 CSC 4504 : Langages formels et applications (La méthode Event-B) J.

Slides:



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

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Refinement.1 CSC 4504 : Langages formels et applications (La méthode Event-B)
Bellwork If you roll a die, what is the probability that you roll a 2 or an odd number? P(2 or odd) 2. Is this an example of mutually exclusive, overlapping,
There is a pattern for factoring trinomials of this form, when c
Slide 1 Insert your own content. Slide 2 Insert your own content.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 7 System Design Techniques.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Chapter 40 - Physiology and Pathophysiology of Diuretic Action Copyright © 2013 Elsevier Inc. All rights reserved.
Mathematical Treasure-hunt: Sequences
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Chapters 1 & 2 Theorem & Postulate Review Answers
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Dividing Monomials.
Combining Like Terms. Only combine terms that are exactly the same!! Whats the same mean? –If numbers have a variable, then you can combine only ones.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
List and Search Grants Chapter 2. List and Search Grants 2-2 Objectives Understand the option My Grants List Grant Screen Viewing a Grant Understand the.
Addition using three addends. An associative property is when you group numbers in anyway and the answer stays the same.
0 - 0.
ALGEBRAIC EXPRESSIONS
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULTIPLICATION EQUATIONS 1. SOLVE FOR X 3. WHAT EVER YOU DO TO ONE SIDE YOU HAVE TO DO TO THE OTHER 2. DIVIDE BY THE NUMBER IN FRONT OF THE VARIABLE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Year 6 mental test 10 second questions Numbers and number system Numbers and the number system, fractions, decimals, proportion & probability.
BALANCING 2 AIM: To solve equations with variables on both sides.
ZMQS ZMQS
ABC Technology Project
O X Click on Number next to person for a question.
© S Haughton more than 3?
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Twenty Questions Subject: Twenty Questions
Take from Ten First Subtraction Strategy -9 Click on a number below to go directly to that type of subtraction problems
CSC 4504 : Langages formels et applications
2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applicationsEvent-B/Intro.1 CSC 4504 : Langages formels et applications (La méthode Event-B) J.
2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.1 CSC 4504 : Langages formels et applications (La méthode Event-B)
2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/DataStructures.1 CSC 4504 : Langages formels et applications (La méthode Event-B)
2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/PurseCode.1 CSC 4504 : Langages formels et applications (La méthode Event-B)
Linking Verb? Action Verb or. Question 1 Define the term: action verb.
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
+ WELCOME! TISP: Uruguay 10 May Results from Day 1: Sort it Out Ship the Chip TISP: Uruguay 10 May 2009.
Properties of Exponents
1 First EMRAS II Technical Meeting IAEA Headquarters, Vienna, 19–23 January 2009.
Event 4: Mental Math 7th/8th grade Math Meet ‘11.
2012: J Paul GibsonT&MSP: Mathematical FoundationsMAT7003/Introduction.1 MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson,
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
‘You Be George’ Activity. ProblemLearning TargetRight?Wrong?Simple mistake? More study? 1 Place Value: I can write numerals in expanded form to 10 thousands.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
We will resume in: 25 Minutes.
1 Ke – Kitchen Elements Newport Ave. – Lot 13 Bethesda, MD.
Bottoms Up Factoring. Start with the X-box 3-9 Product Sum
1 Unit 1 Kinematics Chapter 1 Day
FIND THE AREA ( ROUND TO THE NEAREST TENTHS) 2.7 in 15 in in.
O X Click on Number next to person for a question.
Number Bonds to = = = = = = = = = = = 20.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 14: Protection.
Emissions to date as a % of 09/10 emissions (minus 10%) Percentage of 09/10 emissions (minus 10%) not yet used Pan Government emissions PAN GOVERNMENT.
2009 Quinín Freire 1 THE MAGIC OF LEARNING Where do animals live?
Discrete Structures Chapter 6: Set Theory
2012: J Paul GibsonTSP: MSC SAI Mathematical FoundationsMAT7003.Computability- Answers.1 MAT 7003 : Mathematical Foundations (for Software Engineering)
2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/TrafficLights.1 CSC 4504 : Langages formels et applications (La méthode Event-B)
Presentation transcript:

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.1 CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207 Purse

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.2 Purse: Informal Specification of an interactive system 1.A purse contains coins 2.Coins are positive integers, but not all integers have a corresponding coin 3.We wish to start with an empty purse 4.We allow 2 operations: Add a coin Pay a certain (integer) sum (by removing the correct number of coins from the purse, i.e by removing coins whose total is equal to the sum requested Specify in an Event-B context Specify in an Event-B machine

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.3 Purse context and simple test for two coins Try to prove the theorem yourselves

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.4 Purse machine: Proof Obligations Generated Automatically by Tool

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.5 Interactive proof that add_coin respects the invariant

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.6 Interactive proof that add_coin respects the invariant

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.7 Interactive proof that add_coin respects the invariant Add hypothesis (lemma)

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.8 Interactive proof that add_coin respects the invariant Expand and autoprove

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.9 Interactive proof that add_coin respects the invariant Add hypothesis from context?

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.10 Interactive proof that add_coin respects the invariant Found a problem in specification Should have written: PURSES = COINS → ℕ

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.11 Interactive proof that add_coin respects the invariant Fix specification and proof obligations are discharged auotmatically

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.12 TASK TO ATTEMPT: Try to specify the event pay_sum In order to help you, first consider the event remove_coin We will first attempt to develop a new machine as a refinement of the first machine We see why this causes a problem – and get a better understanding of refinement We then specify remove_coin without refinement

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.13 Add remove_coin event by extending/refining Purse_mch0 State which variables of extended machine you which to use (As well as any new variables) Taken from mch0 A new event that does not take into account any variant in mch0

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.14 Add remove_coin event by extending/refining Purse_mch0 New proof obligation to discharge

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.15 Add remove_coin event by extending/refining Purse_mch0 Problem: the refinement requires us to show that the new event does not change the state of the refined machine

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.16 Add remove_coin event to Purse_mch0 Proof obligation (PO) discharged automatically

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.17 Formal Methods Pedagogic Experiment (For next week?) Class has to split into 2 groups 1) First build Java machine for Purse and add pay-sum method. Then, when you are sure the Java is correct specify the corresponding Event-B machine 2) First try to build Event-B machine of Purse including the pay-sum event. Then, implement the machine in Java. Teams in each group (1 or more people) must record time spent on each part (Java and Event-B)

2009: J Paul GibsonT&MSP-CSC 4504 : Langages formels et applications Event-B/Purse.18 PaySum Purse Pay_sum(10) 2 is nondeterministic = 10 or 5+5 Pay_sum(4) is not possible = « event not allowed » Pay_sum(2) is deterministic = 2