Geometry Construction Languages Neuper guide User-Interaction - - PowerPoint PPT Presentation

geometry construction languages
SMART_READER_LITE
LIVE PREVIEW

Geometry Construction Languages Neuper guide User-Interaction - - PowerPoint PPT Presentation

Lucas- Interpreter Walther Geometry Construction Languages Neuper guide User-Interaction Calculations Lucas Interpreter by Lucas-Interpretation Requirements GCLLucIn A case study, work in progress Example Specfication Area method


slide-1
SLIDE 1

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Geometry Construction Languages guide User-Interaction by Lucas-Interpretation

A case study, work in progress Walther Neuper

Institute for Softwaretechnology Graz University of Technology

3rd Workshop on Formal and Automated Theorem Proving and Applications February 4-5, 2011 Belgrade, Serbia

slide-2
SLIDE 2

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-3
SLIDE 3

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-4
SLIDE 4

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Lucas-interpretation combines proving and programming

i n t e r p r e t e r

specification program

Proving and Programming

slide-5
SLIDE 5

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

The IS AC-prototype is based on Isabelle

i n t e r p r e t e r

specification program

Proving and Programming Isabelle/Isar

logical operating system (contexts etc)

slide-6
SLIDE 6

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Programs usually produce

  • utput

Isabelle/Isar i n t e r p r e t e r

logical operating system (contexts etc) specification program

  • utput

Production

slide-7
SLIDE 7

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Lucas-Interpreter is a debugger in single-stepping mode

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Tutoring Authoring i n t e r p r e t e r (P.L)

slide-8
SLIDE 8

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Given a specification and a program . . .

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Authoring

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

i n t e r p r e t e r (P.L)

slide-9
SLIDE 9

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

. . . tutoring starts with precondition fulfilled

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl)

i n t e r p r e t e r (P.L)

slide-10
SLIDE 10

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 1: user accepts or updates or inputs

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = …

i n t e r p r e t e r (P.L)

slide-11
SLIDE 11

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 2: user accepts or updates or inputs

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = … Problem (B, sidecds) L.q = x, 0 = c_2+L.c...

i n t e r p r e t e r (PLI)

slide-12
SLIDE 12

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 3: user accepts or updates or inputs

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = … Problem (B, sidecds) L.q = x, 0 = c_2+L.c... solveSys [0=c_3, … c = q.L, c_2 = -L^2.q/2.

i n t e r p r e t e r (P.L)

slide-13
SLIDE 13

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 4: user accepts or updates or inputs

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = … Problem (B, sidecds) L.q = x, 0 = c_2+L.c... solveSys [0=c_3, … c = q.L, c_2 = -L^2.q/2. y(x) = c_4+c_3.x-1/EI...

i n t e r p r e t e r (P.L)

slide-14
SLIDE 14

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 5: user accepts or updates or inputs

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = … Problem (B, sidecds) L.q = x, 0 = c_2+L.c... solveSys [0=c_3, … c = q.L, c_2 = -L^2.q/2. y(x) = c_4+c_3.x-1/EI... y(x) = 0 + 0.x – 1/EI …

i n t e r p r e t e r (P.L)

slide-15
SLIDE 15

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Problem solved with postcondition fulfilled

dialog module Isabelle/Isar

t u t

  • r

logical operating system (contexts etc) specification program

  • utput

worksheet

Script B (q, L, v, Cs) = LET funs = Subproblem (thy, pbl, met) q, L, v equs = Subproblem … sols = Subproblem … B = Take (LAST funs) B = ((Substitute sols)@ (Rewrite_Set poly)) B IN B In: function q, Length L pre: q is_integrable ∆ L > 0

  • ut: function y(x)

Post: y(0)=0 ∆ y'(0)=0 ∆ V(0)=q.L ∆ M_b(L)=0

Tutoring

Problem (B, bendl) Problem (B, load2bl) Q(x) = c-q.x, M(x) = … Problem (B, sidecds) L.q = x, 0 = c_2+L.c... solveSys [0=c_3, … c = q.L, c_2 = -L^2.q/2. y(x) = c_4+c_3.x-1/EI... y(x) = 0 + 0.x – 1/EI … y(x) = (q.L^2)/(4.EI) . X^2

  • (q.L)/(6.EI) . x^3

+ q /(24.EI) . x^4

i n t e r p r e t e r (P.L)

slide-16
SLIDE 16

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-17
SLIDE 17

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-18
SLIDE 18

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-19
SLIDE 19

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-20
SLIDE 20

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-21
SLIDE 21

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-22
SLIDE 22

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-23
SLIDE 23

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter . . .

1 Guide the user step by step towards a solution.

. . . steps from breakpoint to breakpoint in a program. The user accepts or updates or inputs (dialog module!)

2 Check user input as generous and liberal as possible.

. . . provides provers with logical context of statements. Checking user-input is: prove derivability from context.

3 Explain steps on request by the user.

. . . interpretes human-readable knowledge of Isabelle. Knowledge shall be interlinked with a mathematics wiki. . . .and fulfills these requirements for tutoring

slide-24
SLIDE 24

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-25
SLIDE 25

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Example program in GCL

program circum_center free points 01 point A 10 10 02 point B 40 10 03 point C 30 40 perpendicular bisectors of the sides 04 med a B C 05 med b A C intersection of the bisectors 06 intersec O a b drawing the circumcircle of the triangle ABC 07 drawcircle O A

slide-26
SLIDE 26

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-27
SLIDE 27

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Specification and program

01 point A 10 10 02 point B 40 10 03 point C 30 40 00 specification circum_center 00 input : A, B, C 00 precond : A = B ∧ B = C ∧ C = A ∧ 00 ¬ collinear A B C 00

  • utput

: O 00 postcond: OA = OB ∧ OB = OC ∧ OC = OA 00 program circum_center A B C 04 med a B C 05 med b A C 06 intersec O a b 07 drawcircle O A

slide-28
SLIDE 28

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Translation to area method

01 point A 10 10 02 point B 40 10 03 point C 30 40 00 specification circum_center 00 input : A, B, C 00 precond : PABA = 0, PBCB = 0, PCAC = 0, 00 SABC = 0 00

  • utput

: O 00 postcond: OA = OB, OB = OC, OC = OA 00 program circum_center A B C 04 med a B C 05 med b A C 06 intersec O a b 07 drawcircle O A

slide-29
SLIDE 29

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-30
SLIDE 30

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-31
SLIDE 31

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-32
SLIDE 32

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-33
SLIDE 33

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-34
SLIDE 34

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-35
SLIDE 35

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Program and area method

00 program circum_center A B C ctxt0 = { A = B, B = C, C = A, ¬collinear A B C } 04 med a B C ctxt1 = ctxt0 ∪ { BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1 }

05 med b A C ctxt2 = ctxt1 ∪ { AM2 || AC,

AM2 AC = 1 2, M2N2 ⊥ AC, 4SM2AN2 PM2AM2 = 1 }

06 intersec O a b ctxt3 = ctxt2 ∪ { collinear N1 M1 O, collinear N2 M2 O } 07 drawcircle O A ctxt4 = ctxt3 ∪ { OA = OB, OB = OC, OC = OA }

slide-36
SLIDE 36

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-37
SLIDE 37

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Given a program and a specification . . .

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

Isabelle/Isar

slide-38
SLIDE 38

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

. . . interpretation initialises the context with precondition

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A

Isabelle/Isar

slide-39
SLIDE 39

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 1: context extended with area method formulas

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a

Isabelle/Isar

slide-40
SLIDE 40

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 2: context extended with area method formulas

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a b

Isabelle/Isar

slide-41
SLIDE 41

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 3: context extended with area method formulas

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a b O

Isabelle/Isar

slide-42
SLIDE 42

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Breakpoint 4: same context

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a b O

Isabelle/Isar

slide-43
SLIDE 43

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Context provides data for proof

  • f postcondition

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a b O

Isabelle/Isar

slide-44
SLIDE 44

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
slide-45
SLIDE 45

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
slide-46
SLIDE 46

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-47
SLIDE 47

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Somewhere during stepwise construction . . .

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A

Isabelle/Isar

slide-48
SLIDE 48

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Somewhere during stepwise construction . . .

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a

Isabelle/Isar

slide-49
SLIDE 49

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

. . . the user inputs the next step: logical data created !

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a c

Isabelle/Isar

slide-50
SLIDE 50

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Lucas-Interpretation compares with subsequent contexts

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a c

Isabelle/Isar

slide-51
SLIDE 51

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Lucas-Interpretation compares with subsequent contexts

program circ A B C med a B C med b A C intersec O a b drawcircle O A

program worksheet Lucas-Interpreter

context =

x x x

C B A a c

Isabelle/Isar

slide-52
SLIDE 52

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
  • logical context also for user input
  • several possibilities for handling user input:
  • equality of subsequent statements
  • equality of subsequent contexts
  • equivalence (?) of contexts

⇐ = !!!

  • interpolants measure ’distance’ to postcondition (?)
  • . . .
slide-53
SLIDE 53

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
  • logical context also for user input
  • several possibilities for handling user input:
  • equality of subsequent statements
  • equality of subsequent contexts
  • equivalence (?) of contexts

⇐ = !!!

  • interpolants measure ’distance’ to postcondition (?)
  • . . .
slide-54
SLIDE 54

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
  • logical context also for user input
  • several possibilities for handling user input:
  • equality of subsequent statements
  • equality of subsequent contexts
  • equivalence (?) of contexts

⇐ = !!!

  • interpolants measure ’distance’ to postcondition (?)
  • . . .
slide-55
SLIDE 55

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

A Lucas-Interpreter provides . . .

  • logical context for specific program statements
  • a final context for proving the postcondition
  • logical context also for user input
  • several possibilities for handling user input:
  • equality of subsequent statements
  • equality of subsequent contexts
  • equivalence (?) of contexts

⇐ = !!!

  • interpolants measure ’distance’ to postcondition (?)
  • . . .
slide-56
SLIDE 56

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Outline

1

Transfer experiences from calculations . . . Lucas-Interpretation in calculations Requirements for tutoring software

2

Geometry construction language (GCL) — Lucas-Interpreter Example program in Belgrade GCL Specification separated from program Program statements and area method Lucas-interpretation for GCL Checking user-input

3

Summary

slide-57
SLIDE 57

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-58
SLIDE 58

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-59
SLIDE 59

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-60
SLIDE 60

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-61
SLIDE 61

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-62
SLIDE 62

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-63
SLIDE 63

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-64
SLIDE 64

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Can Lucas-Interpret. on GCL. . .

1 . . . guide the user step by step towards a solution ?

Yes ! (program coded by hand or synthesised) Interesting: where handle cartesian coordinates ?

2 . . . check user input as generous as possible ?

Equivalent contexts by area method’s simplification ? Automation in other axiom systems ?

3 . . . explain steps on request by the user ?

med a B C . . . . BM1 || BC,

BM1 BC = 1 2, M1N1 ⊥ BC, 4SM1BN1 PM1BM1 = 1

Human readability of other axiom systems ?

. . . Belgrade GCL — a promising R&D tool.

slide-65
SLIDE 65

Lucas- Interpreter Walther Neuper Calculations

Lucas Interpreter Requirements

GCL–LucIn

Example Specfication Area method Lucas-Interpreter Check input

Summary

Thank you for attention !

Wiki for joint work on the questions:

https://lsiit-cnrs.unistra.fr/DG-Proofs-Construction

Workshop THedu’11 at CADE: http://www.uc.pt/en/congressos/thedu