1 / 43

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/. Famille http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/Famille.pdf. wizards. ASCII. hommes <: P.

giulia
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/ Famille http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/Famille.pdf T&MSP-CSC 4504 : Langages formels et applications

  2. T&MSP-CSC 4504 : Langages formels et applications

  3. T&MSP-CSC 4504 : Langages formels et applications

  4. T&MSP-CSC 4504 : Langages formels et applications

  5. wizards T&MSP-CSC 4504 : Langages formels et applications

  6. ASCII hommes <: P T&MSP-CSC 4504 : Langages formels et applications

  7. ASCII Representations of the Mathematical Symbols http://www.b-core.com/ONLINEDOC/ASCIISymbols.html Atomic Symbols T&MSP-CSC 4504 : Langages formels et applications

  8. ASCII Representations of the Mathematical Symbols Unary Operators T&MSP-CSC 4504 : Langages formels et applications

  9. ASCII Representations of the Mathematical Symbols Unary Operators Assignment Operators T&MSP-CSC 4504 : Langages formels et applications

  10. ASCII Representations of the Mathematical Symbols Binary Operators T&MSP-CSC 4504 : Langages formels et applications

  11. ASCII Representations of the Mathematical Symbols Quantifiers T&MSP-CSC 4504 : Langages formels et applications

  12. Exemples T&MSP-CSC 4504 : Langages formels et applications

  13. Les relations: T&MSP-CSC 4504 : Langages formels et applications

  14. Exemples T&MSP-CSC 4504 : Langages formels et applications

  15. Les relations: T&MSP-CSC 4504 : Langages formels et applications

  16. Exemples T&MSP-CSC 4504 : Langages formels et applications

  17. Les fonctions: T&MSP-CSC 4504 : Langages formels et applications

  18. Bijection, injection and surjection From Wikipedia, the free encyclopedia T&MSP-CSC 4504 : Langages formels et applications

  19. P hommes femmes Preuve d'un théorème T&MSP-CSC 4504 : Langages formels et applications

  20. Use the Event-B Keyboard (view) for editing complex expressions ! per. not ( per : P & not(per : hommes) & not (per : femmes)) T&MSP-CSC 4504 : Langages formels et applications

  21. Comment? thm1 Proven Automatically √ Proving T&MSP-CSC 4504 : Langages formels et applications

  22. Open perspective • Event-B • Proving • …. • Choose theorem T&MSP-CSC 4504 : Langages formels et applications

  23. Specification: Epoux P hommes femmes Partial injection ASCII - epoux : femmes >+> hommes T&MSP-CSC 4504 : Langages formels et applications

  24. Specification: Epouse P hommes femmes Partial injection ASCII - epouse: hommes >+> femmes T&MSP-CSC 4504 : Langages formels et applications

  25. Epoux-Epouse: Attention! P hommes femmes Partial injection Partial injection ASCII - epoux : femmes >+> hommes epouse: hommes >+> femmes T&MSP-CSC 4504 : Langages formels et applications

  26. Problème: Theorem -epouse = epoux~ - n’est pas vrai -1 ASCII:epouse = epoux~ SYMBOL: epouse = epoux T&MSP-CSC 4504 : Langages formels et applications

  27. Problème: Theorem -epouse = epoux~ - n’est pas vrai Le prouveur n’est pas content T&MSP-CSC 4504 : Langages formels et applications

  28. Specification: Epoux-Epouse - Corrigé P hommes femmes Partial injection ASCII - AXIOM epoux : femmes >+> hommes AXIOM epouse = epoux~ T&MSP-CSC 4504 : Langages formels et applications

  29. Specification: Epoux/Epouse - Verification/Test T&MSP-CSC 4504 : Langages formels et applications

  30. Specification: Famille_ctx0 - Version finale Pourquoi pas la transformer en pdf (en utilisant plugin B2latex)? T&MSP-CSC 4504 : Langages formels et applications

  31. Specification: Famille_ctx0 - Version finale B2Latex T&MSP-CSC 4504 : Langages formels et applications

  32. \documentclass[10pt,a4paper]{report} \usepackage[top=3cm, bottom=2.5cm, left=3cm, right=2.5cm] {geometry} \usepackage {bsymb,b2latex} \usepackage{fancyhdr,lastpage} \lhead{\rm An Event-B Specification of Famille\_ctx0} \rhead {\rm Page \thepage~of \pageref{LastPage}} \lfoot{}\cfoot{}\rfoot{} \pagestyle{fancy} %--------------------------------------------------------- \begin{document} \thispagestyle{empty} \begin{description} \BTitle{Famille\_ctx0}{3 Mar 2009}{02:00:30 PM} \CONTEXT{Famille\_ctx0} \SETS \begin{description} \Item{ P } \end{description} \CONSTANTS \begin{description} \Item{ hommes } \Item{ femmes } \Item{ epoux } \Item{ epouse } \Item{ f } \Item{ ff } \Item{ h } \Item{ hh } \end{description} \AXIOMS \begin{description} \nItem{ axm\_hommes }{ hommes \subseteq P } \nItem{ axm\_femmes }{ femmes = P\setminus hommes } \nItem{ axm\_epoux }{ epoux \in femmes \pinj hommes } \nItem{ axm\_epouse }{ epouse = epoux^{-1} } \nItem{ axm\_fhffhh }{ f\in femmes \land h\in hommes \land ff\in femmes \land hh\in hommes } \end{description} \THEOREMS \begin{description} \nItem{ thm\_test\_axm\_femmes }{ \forall per\qdot \lnot ( per\in P \land \lnot (per \in hommes) \land \lnot (per \in femmes)) } \nItem{ thm\_epouxepouse }{ epoux = epoux; epouse; epoux } \nItem{ thm\_test\_epouse1 }{ \lnot (hh=h) \land \lnot (ff=f) \land epoux = \{ f\mapsto h, ff\mapsto hh\} \limp epouse(hh) = ff } \nItem{ thm\_test\_epouse2 }{ \lnot (hh=h) \land \lnot (ff=f) \land epoux = \{ f\mapsto h, ff\mapsto hh\} \limp epouse(h) = f } \end{description} \END \end{description} \end{document} Latex generated as <contextnameDate>.tex Convert to .pdf (using, eg, MiKTeX) T&MSP-CSC 4504 : Langages formels et applications

  33. Specification: Famille_ctx0.pdf T&MSP-CSC 4504 : Langages formels et applications

  34. Specification: Married - Famille_ctx1 extends Famille_ctx0 thm3 « married is a partial injection » Prover cannot prove it automatically Should we add it as an axiom? T&MSP-CSC 4504 : Langages formels et applications

  35. Specification: Married - Famille_ctx1 extends Famille_ctx0 T&MSP-CSC 4504 : Langages formels et applications

  36. Travaux Pratique (Context)– a completer (avant le 13) • Define: • mere et pere • fille et fils • frere et soeur • cousin • oncle et tante • Validate Theorems, eg: • oncle = cousin; pere • cousin = cousin~ • pere; enfants = mere; enfants • pere; mere~ = {} • pere; frere; fille <: cousin Before we look at the prover we first look (quickly) at Machines … T&MSP-CSC 4504 : Langages formels et applications

  37. Machine Famile_M0 T&MSP-CSC 4504 : Langages formels et applications

  38. Machine Famile_M0 T&MSP-CSC 4504 : Langages formels et applications

  39. Machine Famile_M0 event marry respects the invariant T&MSP-CSC 4504 : Langages formels et applications

  40. Machine Famile_M0 hommes … h1 h2 h3 h4 h5 h6 h7 h8 h9 epoux … … f2 f3 f4 f5 f6 f7 f8 f1 femmes State1 INITIALISATION: State0 hms = {h2} fms = {} ep = {} hms = {} fms = {} ep = {} add_h (h2) T&MSP-CSC 4504 : Langages formels et applications

  41. Machine Famile_M0 hommes … h1 h2 h3 h4 h5 h6 h7 h8 h9 epoux … … f2 f3 f4 f5 f6 f7 f8 f1 femmes State2 State1 hms = {h2} fms = {f3} ep = {} hms = {h2} fms = {} ep = {} add_f (f3) T&MSP-CSC 4504 : Langages formels et applications

  42. Machine Famile_M0 hommes … h1 h2 h3 h4 h5 h6 h7 h8 h9 epoux … … f2 f3 f4 f5 f6 f7 f8 f1 femmes State3 State2 hms = {h2} fms = {f3, f2} ep = {} hms = {h2} fms = {f3} ep = {} add_f (f2) T&MSP-CSC 4504 : Langages formels et applications

  43. Machine Famile_M0 hommes … h1 h2 h3 h4 h5 h6 h7 h8 h9 epoux … … f2 f3 f4 f5 f6 f7 f8 f1 femmes hms = {h2} fms = {f3, f2} ep = { f3 |-> h2} X √ State3 marry(f3,h2) hms = {h2} fms = {f3, f2} ep = {} hms = {h2} fms = {f3, f2} ep = { f2 |-> h2} marry(f2,h2) T&MSP-CSC 4504 : Langages formels et applications

More Related