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 / 50
The fundamental idea of program extraction A proof is a construction, - - 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 / 50 The fundamental idea of program extraction A proof is a construction,
1available at www.cs.swan.ac.uk/∼csulrich/slides.html 1 / 50
2 / 50
3 / 50
4 / 50
5 / 50
6 / 50
7 / 50
8 / 50
◮ the constants in C, ◮ the function symbols in F, ◮ the predicate symbols in P.
9 / 50
10 / 50
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) 11 / 50
12 / 50
13 / 50
14 / 50
15 / 50
16 / 50
17 / 50
18 / 50
19 / 50
20 / 50
21 / 50
22 / 50
23 / 50
24 / 50
25 / 50
26 / 50
27 / 50
28 / 50
29 / 50
30 / 50
31 / 50
32 / 50
33 / 50
34 / 50
35 / 50
36 / 50
37 / 50
38 / 50
◮ 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,
39 / 50
◮ 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):
40 / 50
◮ 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) 41 / 50
42 / 50
43 / 50
44 / 50
45 / 50
46 / 50
47 / 50
48 / 50
49 / 50
50 / 50