IFP - A Logic for Program Extraction1
Ulrich Berger Swansea University BCTCS Durham, April 15-17, 2019
1available at www.cs.swan.ac.uk/∼csulrich/slides.html 1 / 51
The fundamental idea of program extraction 2 / 51 The fundamental - - PowerPoint PPT Presentation
IFP - A Logic for Program Extraction 1 Ulrich Berger Swansea University BCTCS Durham, April 15-17, 2019 1 available at www.cs.swan.ac.uk/ csulrich/slides.html 1 / 51 The fundamental idea of program extraction 2 / 51 The fundamental idea
1available at www.cs.swan.ac.uk/∼csulrich/slides.html 1 / 51
2 / 51
2 / 51
2 / 51
2 / 51
2 / 51
3 / 51
3 / 51
3 / 51
4 / 51
5 / 51
6 / 51
7 / 51
8 / 51
8 / 51
8 / 51
8 / 51
8 / 51
8 / 51
9 / 51
◮ the constants in C, ◮ the function symbols in F, ◮ the predicate symbols in P.
10 / 51
11 / 51
Assumption rule
Γ, A ⊢ A Introduction rules Elimination rules ∧ Γ ⊢ A Γ ⊢ B
Γ ⊢ A ∧ B Γ ⊢ A ∧ B
Γ ⊢ A Γ ⊢ A ∧ B
Γ ⊢ B → Γ, A ⊢ B
Γ ⊢ A → B Γ ⊢ A → B Γ ⊢ A →− Γ ⊢ B ∨ Γ ⊢ A
Γ ⊢ A ∨ B Γ ⊢ B
Γ ⊢ A ∨ B Γ ⊢ A ∨ B Γ ⊢ A → C Γ ⊢ B → C
Γ ⊢ C ⊥ Γ ⊢ ⊥ efq Γ ⊢ A Γ ⊢ ¬¬A raa Γ ⊢ A ∀ Γ ⊢ A(x)
Γ ⊢ ∀x A(x) (x not free in Γ) Γ ⊢ ∀x A(x)
Γ ⊢ A(t) ∃ Γ ⊢ A(t)
Γ ⊢ ∃x A(x) Γ ⊢ ∃x A(x) Γ ⊢ ∀x (A(x) → C)
Γ ⊢ C (x not free in Γ, C) 12 / 51
13 / 51
14 / 51
14 / 51
14 / 51
15 / 51
15 / 51
16 / 51
17 / 51
18 / 51
18 / 51
18 / 51
19 / 51
19 / 51
19 / 51
19 / 51
19 / 51
20 / 51
20 / 51
21 / 51
21 / 51
21 / 51
21 / 51
22 / 51
23 / 51
24 / 51
25 / 51
26 / 51
27 / 51
28 / 51
28 / 51
28 / 51
28 / 51
29 / 51
30 / 51
30 / 51
31 / 51
31 / 51
31 / 51
31 / 51
31 / 51
31 / 51
31 / 51
31 / 51
32 / 51
32 / 51
32 / 51
32 / 51
32 / 51
32 / 51
33 / 51
33 / 51
33 / 51
33 / 51
33 / 51
34 / 51
34 / 51
34 / 51
34 / 51
34 / 51
35 / 51
35 / 51
35 / 51
35 / 51
35 / 51
36 / 51
36 / 51
36 / 51
37 / 51
37 / 51
38 / 51
38 / 51
39 / 51
39 / 51
39 / 51
39 / 51
40 / 51
◮ Quotient and remainder on natural numbers. ◮ Dijkstra’s algorithm (1997, Benl, Schwichtenberg):
◮ Warshall Algorithm (2001, Schwichtenberg, Seisenberger, B):
40 / 51
◮ Quotient and remainder on natural numbers. ◮ Dijkstra’s algorithm (1997, Benl, Schwichtenberg):
◮ Warshall Algorithm (2001, Schwichtenberg, Seisenberger, B):
◮ GCD (1995, B, Schwichtenberg):
◮ Dickson’s Lemma (2001, Schwichtenberg, Seisenberger, B):
◮ Higman’s Lemma (2008, Seisenberger):
◮ Fibonacci numbers from a classical proofs (2002, Buchholz,
40 / 51
◮ Extraction of normalization-by-evaluation (NbE) (2006,
41 / 51
◮ Extraction of normalization-by-evaluation (NbE) (2006,
◮ Cauchy sequences vs signed digit representation (SD):
◮ Integration w.r.t. SD (2011, B):
41 / 51
◮ Extraction of normalization-by-evaluation (NbE) (2006,
◮ Cauchy sequences vs signed digit representation (SD):
◮ Integration w.r.t. SD (2011, B):
◮ List reversal
◮ In-place Quicksort (2014, Seisenberger, Woods, B):
41 / 51
◮ Extraction of a SAT-solver from completeness proof for DPLL
42 / 51
◮ Extraction of a SAT-solver from completeness proof for DPLL
◮ Extraction of monadic parser combinators and left-recursion
42 / 51
◮ Extraction of a SAT-solver from completeness proof for DPLL
◮ Extraction of monadic parser combinators and left-recursion
◮ concurrent programs (Miyamoto, Petrovska, Schwichtenberg,
◮ imperative programs with explicit memory management from
◮ modulus of uniform continuity from Fan Theorem (B) 42 / 51
43 / 51
43 / 51
43 / 51
43 / 51
43 / 51
43 / 51
43 / 51
44 / 51
45 / 51
46 / 51
47 / 51
48 / 51
48 / 51
48 / 51
48 / 51
48 / 51
48 / 51
49 / 51
49 / 51
49 / 51
49 / 51
49 / 51
50 / 51
51 / 51