1 / 10

CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207

CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public. it-sudparis.eu /~gibson/Teaching/Event-B/. DataStructures http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/DataStructures.pdf.

dakota
Download Presentation

CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSC 4504 : Langages formels et applications (La méthode Event-B) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/ DataStructures http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/DataStructures.pdf T&MSP-CSC 4504 : Langages formels et applications

  2. TO DO : Answer the Questions As Best You Can • Stacks • Queues • Work in groups of 1, 2 or 3 people T&MSP-CSC 4504 : Langages formels et applications

  3. Question 1: A Stack – typical behaviour of a machine Add(5) Add(2) 2 5 Add(3) 3 2 5 empty 5 Add has no result to return : it just changes the stack state by pushing the element onto the head of the stack T&MSP-CSC 4504 : Langages formels et applications

  4. Question 1: A Stack – typical behaviour of a machine Add(5) Add(2) 2 5 Add(3) 3 2 5 empty 5 Remove = 5 Remove = 2 Remove = 3 Remove returns the head of the stack as the result and changes the state of the stack by popping this head from the top of the stack T&MSP-CSC 4504 : Langages formels et applications

  5. Question 1: A Stack Abstract Context (a) TO DO: Add this context to a RODIN project DataStructures All proof obligations should be automatically discharged T&MSP-CSC 4504 : Langages formels et applications

  6. Question 1: A Stack Abstract Machine (a) TO DO: Add this machine to the project DataStructures Use the interactive prover to prove any Proof Obligation that RODIN has not done automatically T&MSP-CSC 4504 : Langages formels et applications

  7. Question 1: A Stack – add a Length operator Length = 3 Length = 1 Length = 2 Length = 0 Add(5) Add(2) 2 5 Add(3) 3 2 5 empty 5 Remove = 5 Remove = 2 Remove = 3 Length returns the number of elements on the stack but does not change its state (we write this as a skip action in Event-B). TO DO: Update the Stack context and Machine to include Length T&MSP-CSC 4504 : Langages formels et applications

  8. Question 1: A Stack – add a Length operator To validate your specification 1) Add and prove the following theorems in the context: T&MSP-CSC 4504 : Langages formels et applications

  9. Question 2: A Queue Abstract Machine Add(5) Add(2) 2 5 Add(3) 3 2 5 empty 5 Remove = 3 3 2 Remove = 5 Remove = 2 3 T&MSP-CSC 4504 : Langages formels et applications

  10. Question 2: A Queue Abstract Machine • TO DO: • Specify a Queue Context in the DataStructures Project • Specify a Queue Machine in the DataStructures Project • Structure/Notation: push, pop and head - in the Context • add and remove - in the Machine T&MSP-CSC 4504 : Langages formels et applications

More Related