csc 4504 : langages formels et applications (la méthode event-b) j paul gibson, a207

Post on 06-Jan-2016

14 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

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/. OddEven http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/OddEven.pdf. - PowerPoint PPT Presentation

TRANSCRIPT

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.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/

OddEven

http://www-public.it-sudparis.eu/~gibson/Teaching/Event-B/OddEven.pdf

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.2

Simple proofs on properties of odd and even numbers

Express as theorems and use RODIN to prove:

thm1. The addition of two even numbers is even

thm2. The difference between two odd numbers is even

thm3. The multiplication of an even number with an odd number is even

thm4. The multiplication of two odd numbers is odd

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.3

1. The addition of two even numbers is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.4

1. The addition of two even numbers is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.5

1. The addition of two even numbers is even

Autoprovers

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.6

1. The addition of two even numbers is even

instantiate

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.7

1. The addition of two even numbers is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.8

1. The addition of two even numbers is even

Remove selected hypothesis

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.9

1. The addition of two even numbers is even

repeat sequence for instantiation of b

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.10

1. The addition of two even numbers is even

Don’t forget to save if you are making progress

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.11

1. The addition of two even numbers is even

Add hypothesisand select for proofUsing autoprover

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.12

1. The addition of two even numbers is even

Repeat the same sequence for b

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.13

1. The addition of two even numbers is even

Free existential variables

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.14

1. The addition of two even numbers is even

Remove hypotheses (no longer needed)

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.15

1. The addition of two even numbers is even

Try autoprover on original theorem

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.16

1. The addition of two even numbers is even

Instantiate with y+y+y0+y0Remove unnecessary hypothesesAdd new hypothesis:

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.17

1. The addition of two even numbers is even

Add abstract expression: y+y0

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.18

1. The addition of two even numbers is even

This sequence leads to the final proof step

Setting y1 to ae proves the theorem: can the automated prover do this?

p0 fails but p1 manages it

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.19

1. The addition of two even numbers is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.20

1. The addition of two even numbers is even

Save and explore proof tree

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.21

1. The addition of two even numbers is even

The theorem has been marked as proved

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.22

1. The addition of two even numbers is even

What if we change specification of EVEN?

What if we change theorem to prove?

… lets try theorem 3 with context1

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.23

3. The multiplication of an even number with an odd number is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.24

3. The multiplication of an even number with an odd number is even

Enable/DisablePost-tactic

Reset persepective

context1

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.25

3. The multiplication of an even number with an odd number is even

Proof by contradiction(of goal)

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.26

3. The multiplication of an even number with an odd number is even

Pruneand run Post-tactics

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.27

3. The multiplication of an even number with an odd number is even

Proof by contradiction(of hypothesis)

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.28

3. The multiplication of an even number with an odd number is even

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.29

3. The multiplication of an even number with an odd number is even

Circular proof steps:

Try to simplify proof tree, where possible

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.30

3. The multiplication of an even number with an odd number is even

Proof for context2 … try to complete it yourselves

2009: J Paul Gibson T&MSP-CSC 4504 : Langages formels et applications Event-B/OddEven.31

For Next Week: send to me (by email) before 20th March

Prove theorem 2 or theorem 4 for context 2

top related