Type-Based Reasoning about Efficiency
- D. Seidel∗
- J. Voigtl¨
ander
University of Bonn
August 3rd, 2011
∗Supported by the DFG under grant VO 1512/1-1.
Type-Based Reasoning about Efficiency D. Seidel J. Voigtl ander - - PowerPoint PPT Presentation
Type-Based Reasoning about Efficiency D. Seidel J. Voigtl ander University of Bonn August 3rd, 2011 Supported by the DFG under grant VO 1512/1-1. Parametric Polymorphism in Haskell A standard function: map g [ ] = [ ] map g ( a :
∗Supported by the DFG under grant VO 1512/1-1.
1
1
1
1
1
1
1
1
2
2
2
2
2
2
3
3
◮ Short Cut Fusion [Gill et al., FPCA’93]
4
◮ Short Cut Fusion [Gill et al., FPCA’93] ◮ The Dual of Short Cut Fusion
◮ . . .
4
◮ Short Cut Fusion [Gill et al., FPCA’93] ◮ The Dual of Short Cut Fusion
◮ . . . ◮ Knuth’s 0-1-principle and the like
4
◮ Short Cut Fusion [Gill et al., FPCA’93] ◮ The Dual of Short Cut Fusion
◮ . . . ◮ Knuth’s 0-1-principle and the like
◮ Bidirectionalization [V., POPL’09]
4
◮ Short Cut Fusion [Gill et al., FPCA’93] ◮ The Dual of Short Cut Fusion
◮ . . . ◮ Knuth’s 0-1-principle and the like
◮ Bidirectionalization [V., POPL’09] ◮ . . . ◮ Testing polymorphic properties
4
5
5
5
5
5
6
6
6
7
7
7
7
8
8
8
8
8
9
τ1θ
9
τ1θ
9
τ1θ
9
τ1θ
9
10
10
10
τ1∅, ∆Nat,ρ = idN)
10
τ1∅, ∆Nat,ρ = idN)
10
11
11
12
12
12
13
13
14
τ1→τ2,ρ= {(f, g) | cost(f) = cost(g)
τ1,ρ. (f ¢ x, g ¢ y) ∈ ∆¢ τ2,ρ})
14
τ1→τ2,ρ= {(f, g) | cost(f) = cost(g)
τ1,ρ. (f ¢ x, g ¢ y) ∈ ∆¢ τ2,ρ})
α,ρ = C(ρ(α)), ρ(α) := R ∈ Rel, ∆¢ Nat,ρ = idN×Z)
14
τ1→τ2,ρ= {(f, g) | cost(f) = cost(g)
τ1,ρ. (f ¢ x, g ¢ y) ∈ ∆¢ τ2,ρ})
α,ρ = C(ρ(α)), ρ(α) := R ∈ Rel, ∆¢ Nat,ρ = idN×Z)
14
τ1→τ2,ρ= {(f, g) | cost(f) = cost(g)
τ1,ρ. (f ¢ x, g ¢ y) ∈ ∆¢ τ2,ρ})
α,ρ = C(ρ(α)), ρ(α) := R ∈ Rel, ∆¢ Nat,ρ = idN×Z)
14
15
15
15
15
15
15
16
16
16
16
16
16
16
16
17
17
17
17
18
18
18
18
◮ develop of “cost-aware” logical relation and its
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
◮ mechanize derivation of cost-aware statements,
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
◮ mechanize derivation of cost-aware statements, ◮ apply to automatic program transformations,
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
◮ mechanize derivation of cost-aware statements, ◮ apply to automatic program transformations, ◮ extend to full recursion, other language features,
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
◮ mechanize derivation of cost-aware statements, ◮ apply to automatic program transformations, ◮ extend to full recursion, other language features, ◮ investigate call-by-name/call-by-need,
19
◮ develop of “cost-aware” logical relation and its
◮ realize that more effort has to go into the actual
◮ establish a number of building blocks/heuristics
◮ mechanize derivation of cost-aware statements, ◮ apply to automatic program transformations, ◮ extend to full recursion, other language features, ◮ investigate call-by-name/call-by-need, ◮ use more realistic cost measures?
19
20
21
22
23
24
25