Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
thma committed Oct 8, 2023
1 parent 425802f commit 7e68c11
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
8 changes: 4 additions & 4 deletions docs/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
<p><a href="https://github.com/thma/lambda-ski/actions"><img src="https://github.com/thma/lambda-ski/workflows/Haskell-CI/badge.svg" alt="Actions Status" /></a>
<a href="https://github.com/thma/lambda-ski"><img src="https://thma.github.io/img/forkme.png" height="20" ></a></p>
<h2 id="abstract">Abstract</h2>
<p>In this post i will show how to significantly improve the performance of a combinator based interpreter by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>.</p>
<p>I will also give some performance comparisons between the different approaches.</p>
<p>In this post I will show how to significantly improve the performance of combinator based reducers by using a alternative abstraction algorithms. These algorithms are based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follow <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">Ben Lynn’s implementation of Kiselyov’s ideas</a>.</p>
<p>I will also give detailed comparisons of the different approaches regarding emitted code size and execution performance on different reducers.</p>
<h2 id="introduction">Introduction</h2>
<p>In previous blog posts i have shown how functional languages can be implemented using a small set of combinators.</p>
<p>In previous blog posts I have shown how functional languages can be implemented using a small set of combinators.</p>
<p><strong>The first post</strong>, <a href="https://thma.github.io/posts/2021-12-27-Implementing-a-functional-language-with-Graph-Reduction.html">Implementing a functional language with Graph Reduction</a> described an approach that sets up three major components:</p>
<ul>
<li><p>A parser for a tiny functional language based on the untyped λ-calculus.</p></li>
Expand All @@ -40,7 +40,7 @@
<p>I also did some performance measurements and found that the version using native Haskell functions is about 10-100 times faster than the graph reduction engine.</p>
<p>Another significant finding was that the performance of functions with two or more arguments was significantly worse than the performance of functions with one argument.</p>
<p>This is caused by the inefficient code generation of the classic bracket abstraction: <a href="https://tromp.github.io/cl/LC.pdf">The output size grows quadratic</a> with internal complexity and number of variables. As each additional combinator or application will require additional execution time it’s easy to see why a quadratic growth in combinator code size will drastically decrease performance. There have been many attempts to optimize bracket abstraction by <a href="https://www.cantab.net/users/antoni.diller/brackets/intro.html">introducing additional combinators</a> and by applying additional optimization rules.</p>
<p><strong>In the present post</strong> i will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p><strong>In the present post</strong> I will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p>My implementation closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>. I have made only minor changes to make the code more readable and to make it work with the parser and compiler of the first post.</p>
<h2 id="from-λ-calculus-to-combinators">From λ-calculus to combinators</h2>
<p>My parser can parse programs of a very rudimentary language that is basically just pure λ-calculus plus integers. Here is an example:</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ <h1>Optimizing bracket abstraction for Combinator Reduction</h1>
<p><a href="https://github.com/thma/lambda-ski/actions"><img src="https://github.com/thma/lambda-ski/workflows/Haskell-CI/badge.svg" alt="Actions Status" /></a>
<a href="https://github.com/thma/lambda-ski"><img src="https://thma.github.io/img/forkme.png" height="20"></a></p>
<h2 id="abstract">Abstract</h2>
<p>In this post i will show how to significantly improve the performance of a combinator based interpreter by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>.</p>
<p>I will also give some performance comparisons between the different approaches.</p>
<p>In this post I will show how to significantly improve the performance of combinator based reducers by using a alternative abstraction algorithms. These algorithms are based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follow <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">Ben Lynn’s implementation of Kiselyov’s ideas</a>.</p>
<p>I will also give detailed comparisons of the different approaches regarding emitted code size and execution performance on different reducers.</p>
<h2 id="introduction">Introduction</h2>
<p>In previous blog posts i have shown how functional languages can be implemented using a small set of combinators.</p>
<p>In previous blog posts I have shown how functional languages can be implemented using a small set of combinators.</p>
<p><strong>The first post</strong>, <a href="https://thma.github.io/posts/2021-12-27-Implementing-a-functional-language-with-Graph-Reduction.html">Implementing a functional language with Graph Reduction</a> described an approach that sets up three major components:</p>
<ul>
<li><p>A parser for a tiny functional language based on the untyped λ-calculus.</p></li>
Expand All @@ -78,7 +78,7 @@ <h2 id="introduction">Introduction</h2>
<p>I also did some performance measurements and found that the version using native Haskell functions is about 10-100 times faster than the graph reduction engine.</p>
<p>Another significant finding was that the performance of functions with two or more arguments was significantly worse than the performance of functions with one argument.</p>
<p>This is caused by the inefficient code generation of the classic bracket abstraction: <a href="https://tromp.github.io/cl/LC.pdf">The output size grows quadratic</a> with internal complexity and number of variables. As each additional combinator or application will require additional execution time it’s easy to see why a quadratic growth in combinator code size will drastically decrease performance. There have been many attempts to optimize bracket abstraction by <a href="https://www.cantab.net/users/antoni.diller/brackets/intro.html">introducing additional combinators</a> and by applying additional optimization rules.</p>
<p><strong>In the present post</strong> i will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p><strong>In the present post</strong> I will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p>My implementation closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>. I have made only minor changes to make the code more readable and to make it work with the parser and compiler of the first post.</p>
<h2 id="from-λ-calculus-to-combinators">From λ-calculus to combinators</h2>
<p>My parser can parse programs of a very rudimentary language that is basically just pure λ-calculus plus integers. Here is an example:</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<p><a href="https://github.com/thma/lambda-ski/actions"><img src="https://github.com/thma/lambda-ski/workflows/Haskell-CI/badge.svg" alt="Actions Status" /></a>
<a href="https://github.com/thma/lambda-ski"><img src="https://thma.github.io/img/forkme.png" height="20" ></a></p>
<h2 id="abstract">Abstract</h2>
<p>In this post i will show how to significantly improve the performance of a combinator based interpreter by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>.</p>
<p>I will also give some performance comparisons between the different approaches.</p>
<p>In this post I will show how to significantly improve the performance of combinator based reducers by using a alternative abstraction algorithms. These algorithms are based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov and closely follow <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">Ben Lynn’s implementation of Kiselyov’s ideas</a>.</p>
<p>I will also give detailed comparisons of the different approaches regarding emitted code size and execution performance on different reducers.</p>
<h2 id="introduction">Introduction</h2>
<p>In previous blog posts i have shown how functional languages can be implemented using a small set of combinators.</p>
<p>In previous blog posts I have shown how functional languages can be implemented using a small set of combinators.</p>
<p><strong>The first post</strong>, <a href="https://thma.github.io/posts/2021-12-27-Implementing-a-functional-language-with-Graph-Reduction.html">Implementing a functional language with Graph Reduction</a> described an approach that sets up three major components:</p>
<ul>
<li><p>A parser for a tiny functional language based on the untyped λ-calculus.</p></li>
Expand All @@ -36,7 +36,7 @@
<p>I also did some performance measurements and found that the version using native Haskell functions is about 10-100 times faster than the graph reduction engine.</p>
<p>Another significant finding was that the performance of functions with two or more arguments was significantly worse than the performance of functions with one argument.</p>
<p>This is caused by the inefficient code generation of the classic bracket abstraction: <a href="https://tromp.github.io/cl/LC.pdf">The output size grows quadratic</a> with internal complexity and number of variables. As each additional combinator or application will require additional execution time it’s easy to see why a quadratic growth in combinator code size will drastically decrease performance. There have been many attempts to optimize bracket abstraction by <a href="https://www.cantab.net/users/antoni.diller/brackets/intro.html">introducing additional combinators</a> and by applying additional optimization rules.</p>
<p><strong>In the present post</strong> i will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p><strong>In the present post</strong> I will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper <a href="https://okmij.org/ftp/tagless-final/ski.pdf">Optimizing bracket abstraction</a> by Oleg Kiselyov.</p>
<p>My implementation closely follows Ben Lynn’s implementation of Kiselyov’s algorithm in <a href="https://crypto.stanford.edu/~blynn/lambda/kiselyov.html">his blog post</a>. I have made only minor changes to make the code more readable and to make it work with the parser and compiler of the first post.</p>
<h2 id="from-λ-calculus-to-combinators">From λ-calculus to combinators</h2>
<p>My parser can parse programs of a very rudimentary language that is basically just pure λ-calculus plus integers. Here is an example:</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Optimizing bracket abstraction for Combinator Reduction
author: Thomas Mahler
tags: haskell, lambda-calculus, combinatory logic, cartesian closed categories, bracket abstraction, graph reduction, Y-combinator, recursion, graph-reduction, Haskell in Haskell
tags: haskell, lambda-calculus, combinatory logic, cartesian closed categories, bracket abstraction, graph reduction, Y-combinator, recursion, graph-reduction, Haskell in Haskell, performance, optimization, bulk combinators, Kiselyov, Ben Lynn
---


Expand All @@ -11,13 +11,13 @@ tags: haskell, lambda-calculus, combinatory logic, cartesian closed categories,

## Abstract

In this post i will show how to significantly improve the performance of a combinator based interpreter by using an alternative abstraction algorithm. This algorithm is based on the paper [Optimizing bracket abstraction](https://okmij.org/ftp/tagless-final/ski.pdf) by Oleg Kiselyov and closely follows Ben Lynn's implementation of Kiselyov's algorithm in [his blog post](https://crypto.stanford.edu/~blynn/lambda/kiselyov.html).
In this post I will show how to significantly improve the performance of combinator based reducers by using a alternative abstraction algorithms. These algorithms are based on the paper [Optimizing bracket abstraction](https://okmij.org/ftp/tagless-final/ski.pdf) by Oleg Kiselyov and closely follow [Ben Lynn's implementation of Kiselyov's ideas](https://crypto.stanford.edu/~blynn/lambda/kiselyov.html).

I will also give some performance comparisons between the different approaches.
I will also give detailed comparisons of the different approaches regarding emitted code size and execution performance on different reducers.

## Introduction

In previous blog posts i have shown how functional languages can be implemented using a small set of combinators.
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) described an approach that sets up three major components:

Expand All @@ -37,7 +37,7 @@ Another significant finding was that the performance of functions with two or mo

This is caused by the inefficient code generation of the classic bracket abstraction: [The output size grows quadratic](https://tromp.github.io/cl/LC.pdf) with internal complexity and number of variables. As each additional combinator or application will require additional execution time it’s easy to see why a quadratic growth in combinator code size will drastically decrease performance. There have been many attempts to optimize bracket abstraction by [introducing additional combinators](https://www.cantab.net/users/antoni.diller/brackets/intro.html) and by applying additional optimization rules.

**In the present post** i will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper [Optimizing bracket abstraction](https://okmij.org/ftp/tagless-final/ski.pdf) by Oleg Kiselyov.
**In the present post** I will show how to significantly improve the performnce by using an alternative abstraction algorithm. This algorithm is based on the paper [Optimizing bracket abstraction](https://okmij.org/ftp/tagless-final/ski.pdf) by Oleg Kiselyov.

My implementation closely follows Ben Lynn's implementation of Kiselyov's algorithm in [his blog post](https://crypto.stanford.edu/~blynn/lambda/kiselyov.html). I have made only minor changes to make the code more readable and to make it work with the parser and compiler of the first post.

Expand Down

0 comments on commit 7e68c11

Please sign in to comment.