https://github.com/thaliaarchi/bfrs
An optimizing compiler for Brainfuck.
https://github.com/thaliaarchi/bfrs
Last synced: about 2 months ago
JSON representation
An optimizing compiler for Brainfuck.
- Host: GitHub
- URL: https://github.com/thaliaarchi/bfrs
- Owner: thaliaarchi
- License: mpl-2.0
- Created: 2024-09-10T22:03:00.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-11-23T08:53:57.000Z (6 months ago)
- Last Synced: 2025-03-25T23:51:26.684Z (2 months ago)
- Language: Rust
- Size: 321 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bfrs
An optimizing compiler for Brainfuck.
Many patterns of loops are recognized and transformed into the closed form
arithmetic expressions they compute.Architecturally, its intermediate representation is very similar to the
[design of Cranelift](https://vimeo.com/843540328): It has a control-flow graph
with effectful nodes strictly ordered in basic blocks and pure values ordered by
data dependencies, i.e., a control data flow graph. Pure values are managed in
an arena with global value-numbering and are rewritten to an idealized form on
construction.See the [Brainfuck Program Corpus](https://github.com/thaliaarchi/bfcorpus) for
a large collection of Brainfuck programs.