|
1 | | -<sub>The project has been moved from https://code.google.com/archive/p/visual-lambda/<br/>and from https://bitbucket.org/bntr/visual-lambda as well.</sub> |
| 1 | +<sub>The project was migrated from https://code.google.com/archive/p/visual-lambda/ and from https://bitbucket.org/bntr/visual-lambda.</sub> |
2 | 2 |
|
3 | 3 | # Visual Lambda Calculus |
4 | 4 |
|
5 | 5 |  |
6 | 6 |
|
7 | | -The Visual Lambda environment enables intuitive manipulation of lambda calculus expressions. |
| 7 | +Visual Lambda is a graphical environment and visual programming tool |
| 8 | +for exploring pure lambda calculus using Bubble Notation. |
| 9 | +It represents lambda expressions as colorful, tree-like 2D structures |
| 10 | +and animates beta-reduction steps smoothly, making reductions easy to follow. |
8 | 11 |
|
9 | | - |
| 12 | +**Try it live**: https://bntr.itch.io/visual-lambda |
10 | 13 |
|
11 | | -Also available online at: [https://bntr.itch.io/visual-lambda](https://bntr.itch.io/visual-lambda) |
| 14 | +The project started as a master's thesis (2008); see the thesis for details: |
| 15 | +[visual_lambda.pdf](https://bntr.planet.ee/lambda/work/visual_lambda.pdf). |
12 | 16 |
|
13 | | -## Notation |
14 | | -- [Basics](https://bntr.planet.ee/lambda/visual_lambda_bubble_notation.gif) |
15 | | -- More detailed in this thesis: [visual_lambda.pdf](https://bntr.planet.ee/lambda/work/visual_lambda.pdf) |
| 17 | +This might be useful for students, educators and researchers who want |
| 18 | +an intuitive, interactive way to explore λ‑calculus and reduction strategies. |
16 | 19 |
|
17 | | -## Examples |
18 | | -- Pairs, construction, reduction: [https://www.youtube.com/watch?v=YEyyyzUuUJQ](https://www.youtube.com/watch?v=YEyyyzUuUJQ) |
19 | | -- Predecessors: [https://www.youtube.com/watch?v=CWzn2ucPMdg](https://www.youtube.com/watch?v=CWzn2ucPMdg) |
20 | | -- ['MULT 3 2' evaluation](https://bntr.planet.ee/lambda/visual_lambda_MULT_3_2_=_6.gif) (gif) |
21 | | -- ['((λgm.m(gg))(λgm.m(gg)))M' building and evaluation](https://bntr.planet.ee/lambda/lambda_F_anim.gif) (gif) |
22 | | -- ['Y I' evaluation](https://bntr.planet.ee/lambda/Y_I.gif) (gif) |
| 20 | + |
23 | 21 |
|
| 22 | +## Bubble Notation |
24 | 23 |
|
25 | | -## Dependencies |
26 | | -- python 3 |
| 24 | + |
| 25 | + |
| 26 | +Watch a short demo to get an idea of how Bubble Notation works: |
| 27 | +https://www.youtube.com/watch?v=aRgu8S3Pnb8 |
| 28 | + |
| 29 | +<p><a href="https://www.youtube.com/watch?v=aRgu8S3Pnb8" title="Factorial 3"> |
| 30 | + <img src="https://img.youtube.com/vi/aRgu8S3Pnb8/maxresdefault.jpg" width="600" alt="Factorial 3"/> |
| 31 | +</a></p> |
| 32 | + |
| 33 | +Other video examples: |
| 34 | +- Pairs, construction and reduction: https://www.youtube.com/watch?v=YEyyyzUuUJQ |
| 35 | +- Predecessors: https://www.youtube.com/watch?v=CWzn2ucPMdg |
| 36 | +- Recursion: https://www.youtube.com/watch?v=bGG9exO2kew |
| 37 | + |
| 38 | +Old GIF examples: |
| 39 | +- 'MULT 3 2' evaluation: [MULT_3_2_=_6.gif](https://bntr.planet.ee/lambda/visual_lambda_MULT_3_2_=_6.gif) |
| 40 | +- 'Y I' evaluation: [Y_I.gif](https://bntr.planet.ee/lambda/Y_I.gif) |
| 41 | + |
| 42 | +## Requirements |
| 43 | + |
| 44 | +Dependencies |
| 45 | +- Python 3.8+ |
27 | 46 | - pygame-ce 2.5.6 |
28 | 47 |
|
29 | | -## Runningpython |
30 | | - python main.py |
| 48 | +Install and run locally: |
| 49 | +``` |
| 50 | +pip install pygame-ce==2.5.6 |
| 51 | +python main.py |
| 52 | +``` |
31 | 53 |
|
32 | 54 | ## Controls |
33 | | -- [controls.txt](controls.txt) |
34 | 55 |
|
35 | | -## Predefined expression library |
36 | | -- [library.txt](library.txt) |
| 56 | +See the full UI control reference in [controls.txt](controls.txt). |
37 | 57 |
|
| 58 | +## Expression library |
| 59 | + |
| 60 | +The repository includes a small library of predefined expressions that |
| 61 | +you can paste into the console: see [library.txt](library.txt). |
| 62 | + |
| 63 | +## Related work |
38 | 64 |
|
39 | | -## Related works |
40 | 65 | - [Programming with Visual Expressions, Wayne Citrin](https://web.archive.org/web/20110524135539/users.encs.concordia.ca/~haarslev/vl95www/html-papers/citrin/citrin.html) |
41 | 66 | - [A Graphical Notation for the Lambda Calculus, Dave Keenan](https://dkeenan.com/Lambda/) |
42 | 67 | - [Alligator Eggs, Bret Victor](http://worrydream.com/AlligatorEggs/) ([browser game](https://tibordp.github.io/gator-calculus/)) |
43 | 68 | - More in [Prathyvsh's catalog](https://github.com/prathyvsh/lambda-calculus-visualizations) |
| 69 | + |
| 70 | +## Future work |
| 71 | + |
| 72 | +I still think Bubble Notation is a promising way to represent lambda terms, but this implementation is a bit dated. |
| 73 | +A modern reimplementation could improve interaction and visuals. |
| 74 | +Possible directions: |
| 75 | + |
| 76 | +- Make terms feel more "springy" and react to dragging with natural, physics-like motion. |
| 77 | +- Revisit the lazy-evaluation visualization to make it clearer and more robust. |
0 commit comments