mainlibbf - Summary

 
 
Membership Info
Group Admin:
1 active member

Group identification
Id: 8481
System Name: libbf
Name: libbf
Group Type: non-GNU software and documentation

Search in this Group


 

This group is not part of the GNU Project.

The library supports regular Brainfuck source code as input, composed of the following 8 opcodes
                            [ ] + - < > . ,

The library includes :

  • a naive Brainfuck interpreter
  • a less naive Brainfuck interpreter
  • a FAST! Brainfuck interpreter with optimization passes
  • a cross-compiler with optimization passes for the following target architectures :

  i386, x86_64 (amd64), ppc, arm, sparc, mips, mipsel

  • a in-memory Brainfuck optimizer-compiler and launcher for

  those architectures

The optimizer-interpreter includes a profiling tool.
The optimizer-interpreter/compiler includes a step-by-step memory display.
Brainfuck code can be output into equivalent C or Java code.

The optimization process transforms the 8 Brainfuck opcodes into a slightly larger
opcode set enabling basic and complex expression detection (affectation, addition/substraction/multiplication)
and simplifications, loop removal, etc...

The library supports many sizes for the Brainfuck data cell (regular Brainfuck data cell is 8 bits) :

  • 8, 16, 32, 64 bits for the various interpreters
  • 8, 16, 32, 64, 64n bits for the compiler for 64 bits supported architectures (x86_64)
  • 8, 16, 32, 32n bits for the compiler for 32 bits supported architectures (i386, ppc, arm, sparc, mips, mipsel)


For i386 and x86_64 compiled code execution (under GNU/Linux, Win32, FreeBSD, OpenBSD), the library offers
a suspend-and-resume feature.

The library offers a rather nice "free" dynamic memory allocation feature for running brainfuck code.
It works through page protection mechanism and catching of SIGSEGV signals.
It has been successfully tested for the following cases:

  • GNU/Linux x86_64 optimizer-interpreter and compiler
  • GNU/Linux / Win32 / FreeBSD / OpenBSD i386 optimizer-interpreter and compiler
  • Solaris SPARC optimizer-interpreter and compiler
  • GNU/Linux ppc optimizer-interpreter and compiler


Dynamic allocation should also work for the optimizer-interpreter for all GNU/Linux hosts.

Last added feature : a converter from (a small subset of) C code to BrainFuck code !

Registration Date: Sat 15 Apr 2006 01:43:42 PM UTC
License: GNU Lesser General Public License
Development Status: 3 - Alpha

 

Latest News rss feed

No news found

Quick Overview
 Memberlist (1 member)

Communication Tools
 Mailing Lists (1 public mailing list)

Development Tools
 Task Manager (open items: 0, total: 0)

Back to the top

Powered by Savane 3.14-8aba.
Corresponding source code