Type-Driven Development of Certified Tree of Certified Tree - - PowerPoint PPT Presentation

type driven development of certified tree
SMART_READER_LITE
LIVE PREVIEW

Type-Driven Development of Certified Tree of Certified Tree - - PowerPoint PPT Presentation

Type-Driven Development Type-Driven Development of Certified Tree of Certified Tree Algorithms Algorithms An Experience Report on Dependently-Typed Programming Introduction in Coq Initial take Why dependent types? Reynald Affeldt 1


slide-1
SLIDE 1

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Type-Driven Development of Certified Tree Algorithms

An Experience Report on Dependently-Typed Programming in Coq Reynald Affeldt 1 Jacques Garrigue 2,4 Xuanrui Qi 2,3 Kazunari Tanaka 2

1National Institute of Advanced Industrial Science and Technology, Japan 2Graduate School of Mathematics, Nagoya University, Japan 3Department of Computer Science, Tufts University, USA 4Inria Paris, France

September 8, 2019 The Coq Workshop 2019, Portland, Oregon

1 / 22

slide-2
SLIDE 2

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our story

Dependently-typed Programming in Coq: Why and How?

The “Why” Why did we use dependent types in Coq? Under what occasions are they useful? The “How” What is the best approach towards dependently-typed programming in Coq? How did we approach it?

2 / 22

slide-3
SLIDE 3

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our story

Dependently-typed Programming in Coq: Why and How?

The “Why” Why did we use dependent types in Coq? Under what occasions are they useful? The “How” What is the best approach towards dependently-typed programming in Coq? How did we approach it?

2 / 22

slide-4
SLIDE 4

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our story

Dependently-typed Programming in Coq: Why and How?

The “Why” Why did we use dependent types in Coq? Under what occasions are they useful? The “How” What is the best approach towards dependently-typed programming in Coq? How did we approach it?

2 / 22

slide-5
SLIDE 5

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Quick recap: what were we working on?

Bit vectors with efficient insert & delete: 100 101 1111 10101 1111 delete 2nd bit

  • Represented using a red-black tree
  • Insertion and deletion might involve inserting/deleting

nodes

3 / 22

slide-6
SLIDE 6

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The motivation

Deletion from red-black trees is too hard.

  • long standing problem with a few proposed solutions

[Kahrs 2001; Germane & Might 2014], but none of them totally satisfactory for us;

  • complex invariant hard to describe precisely
  • difficult to transcribe to our non-standard tree structure

(bit-borrowing, leaf merging, etc.)

4 / 22

slide-7
SLIDE 7

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Take 1

We tried transcribing Kahrs’ Haskell code directly to Coq without trying to fully understand it. But you guessed...

5 / 22

slide-8
SLIDE 8

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Take 1

We tried transcribing Kahrs’ Haskell code directly to Coq without trying to fully understand it. But you guessed...

5 / 22

slide-9
SLIDE 9

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Using dependent types

Problem:

  • not sure about how to do case analysis;
  • not sure about the exact invariants;
  • not sure about the auxiliary structures required.

Idea: use dependently-typed programming to guide programming process.

6 / 22

slide-10
SLIDE 10

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Auxiliary structures?

The intermediate data structures required for re-balancing the tree:

Inductive near_tree : nat -> nat -> nat -> color -> Type := | Bad : forall {s1 o1 s2 o2 s3 o3 d}, tree s1 o1 d Black -> tree s2 o2 d Black -> tree s3 o3 d Black -> near_tree (s1 + s2 + s3) (o1 + o2 + o3) d Red | Good: forall {s o d c} p, tree s o d c -> near_tree s o d p.

Re-balancing requires temporarily breaking the red-black tree invariants, hence the need for auxiliary structures.

7 / 22

slide-11
SLIDE 11

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Auxiliary structures?

The intermediate data structures required for re-balancing the tree:

Inductive near_tree : nat -> nat -> nat -> color -> Type := | Bad : forall {s1 o1 s2 o2 s3 o3 d}, tree s1 o1 d Black -> tree s2 o2 d Black -> tree s3 o3 d Black -> near_tree (s1 + s2 + s3) (o1 + o2 + o3) d Red | Good: forall {s o d c} p, tree s o d c -> near_tree s o d p.

Re-balancing requires temporarily breaking the red-black tree invariants, hence the need for auxiliary structures.

7 / 22

slide-12
SLIDE 12

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Take 2: Ltac

  • use tactics to develop the program
  • we ascribe strict types to each function, allowing to be

completely sure that our code is correct

  • as a side effect, we got a very clean specification
  • no “external” lemmas which can be easy to forget
  • all desired invariants were encoded into the types

8 / 22

slide-13
SLIDE 13

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Take 2: Ltac

  • use tactics to develop the program
  • we ascribe strict types to each function, allowing to be

completely sure that our code is correct

  • as a side effect, we got a very clean specification
  • no “external” lemmas which can be easy to forget
  • all desired invariants were encoded into the types

8 / 22

slide-14
SLIDE 14

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Programming Coq with tactics

The Pros

  • “No brainer”: no need to fully understand the algorithm

[Chlipala 2013]

  • Easy to refactor: when underlying data structures change
  • Quick fixes & adapting to changes

9 / 22

slide-15
SLIDE 15

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Programming Coq with tactics

The Cons

  • You don’t know what you’re actually doing
  • Readability: other people don’t know what you’re doing
  • Semantics of Ltac changes frequently

10 / 22

slide-16
SLIDE 16

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Type-driven development?

“Type-driven” in what sense? Regular development: design the algorithm, and then write types to check that you’re correct. Type-driven development: write types to declare what you want, and then code until it type checks It type checks, ship it!

11 / 22

slide-17
SLIDE 17

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Type-driven development?

“Type-driven” in what sense? Regular development: design the algorithm, and then write types to check that you’re correct. Type-driven development: write types to declare what you want, and then code until it type checks It type checks, ship it!

11 / 22

slide-18
SLIDE 18

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Type-driven development?

“Type-driven” in what sense? Regular development: design the algorithm, and then write types to check that you’re correct. Type-driven development: write types to declare what you want, and then code until it type checks It type checks, ship it!

11 / 22

slide-19
SLIDE 19

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Type-driven development?

“Type-driven” in what sense? Regular development: design the algorithm, and then write types to check that you’re correct. Type-driven development: write types to declare what you want, and then code until it type checks It type checks, ship it!

11 / 22

slide-20
SLIDE 20

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Applying the TDD methodology

At first, we had no clue about what the delete algorithm should look like! We began with a complete specification:

Definition ddelete (d: nat) (c: color) (num ones : nat) (i : nat) (B : tree w num ones (incr_black d c) c) : { B' : tree (num - (i < num)) (ones - (daccess B i)) d c | dflatten B' = delete (dflatten B) i }.

12 / 22

slide-21
SLIDE 21

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Applying the TDD methodology

At first, we had no clue about what the delete algorithm should look like! We began with a complete specification:

Definition ddelete (d: nat) (c: color) (num ones : nat) (i : nat) (B : tree w num ones (incr_black d c) c) : { B' : tree (num - (i < num)) (ones - (daccess B i)) d c | dflatten B' = delete (dflatten B) i }.

12 / 22

slide-22
SLIDE 22

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Applying the TDD methodology

Finding the missing auxiliary structure We started to develop our function and found out that we needed to keep track of whether the height of a node has been decreased:

Inductive del_tree : nat -> nat -> nat -> color -> Type := | Stay : forall {num ones d c} pc, color_ok c (inv pc) -> tree w num ones d c -> del_tree num ones d pc | Down : forall {num ones d}, tree w num ones d Black -> del_tree num ones d.+1 Black.

13 / 22

slide-23
SLIDE 23

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Applying the TDD methodology

Refining the type Now, we can write specifications for helper functions as well:

Definition balleft {lnum rnum lones rones d cl cr} (c : color) (l : del_tree lnum lones d cl) (r : tree w rnum rones d cr) (ok_l : color_ok c cl) (ok_r : color_ok c cr) : { B' : del_tree (lnum + rnum) (lones + rones) (incr_black d c) c | dflattend B' = dflattend l ++ dflatten r }.

Iterative development process similar to using holes and case-split iteratively in Agda or Idris.

14 / 22

slide-24
SLIDE 24

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Extraction

Two types of extraction:

  • Extracting ML code from code defined using tactics
  • “Extracting” a non-dependently-typed core of the

algorithm within Coq (see ITP talk tomorrow)

15 / 22

slide-25
SLIDE 25

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Extraction

Two types of extraction:

  • Extracting ML code from code defined using tactics
  • “Extracting” a non-dependently-typed core of the

algorithm within Coq (see ITP talk tomorrow)

15 / 22

slide-26
SLIDE 26

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Extraction

Two types of extraction:

  • Extracting ML code from code defined using tactics
  • “Extracting” a non-dependently-typed core of the

algorithm within Coq (see ITP talk tomorrow)

15 / 22

slide-27
SLIDE 27

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Take 3: rewrite using Program

Program is a framework for dependently-typed programming in

Coq [Sozeau 2006; 2008].

  • Cleaner code: automatically generate type coercions for

terms

16 / 22

slide-28
SLIDE 28

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-29
SLIDE 29

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-30
SLIDE 30

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-31
SLIDE 31

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-32
SLIDE 32

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-33
SLIDE 33

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-34
SLIDE 34

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-35
SLIDE 35

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-36
SLIDE 36

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Bad

  • Many problems with unification engine: existential

variables caused a lot of problems

  • program_simpl was too aggressive sometimes, destroying

goals in the process

  • Solution: disable program_simpl, unless the goal was

directly solved by it.

  • Bad error messages and mysterious failures
  • Error: the kernel does not support existential

variables

  • Workaround: explicitly match on each argument that

needs to be matched

  • Performance issues with Program
  • Simplifying and rewriting

17 / 22

slide-37
SLIDE 37

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Good

  • Readability and writability
  • Obligation mechanism improves “modularity”
  • Non-structural recursion using measure

18 / 22

slide-38
SLIDE 38

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Good

  • Readability and writability
  • Obligation mechanism improves “modularity”
  • Non-structural recursion using measure

18 / 22

slide-39
SLIDE 39

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Good

  • Readability and writability
  • Obligation mechanism improves “modularity”
  • Non-structural recursion using measure

18 / 22

slide-40
SLIDE 40

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Experiences with Program

The Good

  • Readability and writability
  • Obligation mechanism improves “modularity”
  • Non-structural recursion using measure

18 / 22

slide-41
SLIDE 41

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-42
SLIDE 42

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-43
SLIDE 43

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-44
SLIDE 44

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-45
SLIDE 45

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-46
SLIDE 46

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

The other alternative: Equations

Dependent pattern-matching compiler for Coq [Sozeau 2010; Sozeau & Mangin 2019].

  • Even more readable code (Agda-like)
  • funelim tactic supports easy pattern-matching in proofs
  • No more Axiom K [Sozeau & Mangin 2019]

Equations was the perfect alternative for us, but currently some

bugs prevent us from using it with MathComp. e.g. issues #195, #212, #216, #217, #81 (closed), #179 (closed)

19 / 22

slide-47
SLIDE 47

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our takeaways

  • Dependent types in Coq are often useful. Use them as you

see fit!

  • Type-driven development is a great way to write programs

that you don’t know how to write!

  • Tactics can be used to write programs, quite reliably
  • Coq community needs to look at dependent types more

(fix bugs, develop tools, etc.)

20 / 22

slide-48
SLIDE 48

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our takeaways

  • Dependent types in Coq are often useful. Use them as you

see fit!

  • Type-driven development is a great way to write programs

that you don’t know how to write!

  • Tactics can be used to write programs, quite reliably
  • Coq community needs to look at dependent types more

(fix bugs, develop tools, etc.)

20 / 22

slide-49
SLIDE 49

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our takeaways

  • Dependent types in Coq are often useful. Use them as you

see fit!

  • Type-driven development is a great way to write programs

that you don’t know how to write!

  • Tactics can be used to write programs, quite reliably
  • Coq community needs to look at dependent types more

(fix bugs, develop tools, etc.)

20 / 22

slide-50
SLIDE 50

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our takeaways

  • Dependent types in Coq are often useful. Use them as you

see fit!

  • Type-driven development is a great way to write programs

that you don’t know how to write!

  • Tactics can be used to write programs, quite reliably
  • Coq community needs to look at dependent types more

(fix bugs, develop tools, etc.)

20 / 22

slide-51
SLIDE 51

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Our takeaways

  • Dependent types in Coq are often useful. Use them as you

see fit!

  • Type-driven development is a great way to write programs

that you don’t know how to write!

  • Tactics can be used to write programs, quite reliably
  • Coq community needs to look at dependent types more

(fix bugs, develop tools, etc.)

20 / 22

slide-52
SLIDE 52

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Future directions

  • Editor support (esp. for Equations)
  • Erasure of type indices `

a la [Brady, McBride & McKinna 2003]

  • Showing only computationally-relevant terms
  • Bug fixes and a better program_simpl tactic

21 / 22

slide-53
SLIDE 53

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Future directions

  • Editor support (esp. for Equations)
  • Erasure of type indices `

a la [Brady, McBride & McKinna 2003]

  • Showing only computationally-relevant terms
  • Bug fixes and a better program_simpl tactic

21 / 22

slide-54
SLIDE 54

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Future directions

  • Editor support (esp. for Equations)
  • Erasure of type indices `

a la [Brady, McBride & McKinna 2003]

  • Showing only computationally-relevant terms
  • Bug fixes and a better program_simpl tactic

21 / 22

slide-55
SLIDE 55

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Future directions

  • Editor support (esp. for Equations)
  • Erasure of type indices `

a la [Brady, McBride & McKinna 2003]

  • Showing only computationally-relevant terms
  • Bug fixes and a better program_simpl tactic

21 / 22

slide-56
SLIDE 56

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Future directions

  • Editor support (esp. for Equations)
  • Erasure of type indices `

a la [Brady, McBride & McKinna 2003]

  • Showing only computationally-relevant terms
  • Bug fixes and a better program_simpl tactic

21 / 22

slide-57
SLIDE 57

Type-Driven Development

  • f Certified

Tree Algorithms Introduction Initial take Why dependent types? Producing better code Conclusion

Final remarks

Come to our ITP talk tomorrow at 16:30!

  • R. Affeldt, J. Garrigue, X. Qi, K. Tanaka. “Proving Tree

Algorithms for Succinct Data Structures”. https://github.com/affeldt-aist/succinct

22 / 22