Skip to content

Commit f2d5220

Browse files
committed
start writing the blog
1 parent ba94efd commit f2d5220

6 files changed

+22
-3
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -629,4 +629,3 @@ Here are some ideas for possible future extensions and improvements.
629629
(implicit parallelism for strict operations, and an explicit `P`-combinator)
630630

631631
## Todo
632-
- testcases for bulkOptLog

benchmark/BenchmarkSources.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ tak :: SourceCode
3737
tak = [r|
3838
expected = 4
3939
tak = y(λf x y z -> (if (geq y x) z (f (f (sub1 x) y z) (f (sub1 y) z x) (f (sub1 z) x y ))))
40-
main = tak 18 6 3
40+
main = tak 7 4 2
4141
|]

benchmark/ReductionBenchmarks.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ benchmarks = do
111111
, bench "tak HHI-Eta" $ nf reducerTest takEta
112112
, bench "tak HHI-Bulk" $ nf reducerTest takBulk
113113
, bench "tak HHI-Bulk-Log" $ nf reducerTestLog takBulk
114-
, bench "tak Native" $ nf tak1 (18,6,3)
114+
, bench "tak Native" $ nf tak1 (7,4,2)
115115
]
116116
return ()
117117

kiselyov.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Optimizing bracket abstraction for Combinator based interpreters
2+
3+
## Abstract
4+
5+
6+
## Introduction
7+
8+
In previous blog posts i have shown how functional languages can be implemented using a small set of combinators. The first post, [Implementing a functional language with Graph Reduction](https://thma.github.io/posts/2021-12-27-Implementing-a-functional-language-with-Graph-Reduction.html) proceeded in three major steps to implement a functional language:
9+
10+
- A parser for a tiny functional language based on the untyped λ-calculus.
11+
12+
- A compiler from λ-calculus to a fixed set of combinatory logic combinators (S,K,I,B,C and Y (aka. SICKBY)).
13+
14+
- A graph-reduction engine which implements the combinator rewrite rules as an efficient graph reduction
15+
16+
The second post, [Evaluating SKI combinators as native Haskell functions](https://thma.github.io/posts/2022-02-05-Evaluating-SKI-combinators-as-native-Haskell-functions.html), demonstrated how
17+
18+
19+
20+
In this post i will show how to optimize the implementation of the lambda calculus using combinators. The optimization is based on the paper [Optimizing bracket abstraction](http://okmij.org/ftp/Computation/lambda-calc.html#bracket-opt) by Oleg Kiselyov.

performance-stats.xlsx

10.1 KB
Binary file not shown.

~$performance-stats.xlsx

165 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)