Git Product home page Git Product logo

bit-scheme's Introduction

Copyright (C) 1995 Danny Dube, Universite de Montreal. All rights reserved.

OVERVIEW

This is my implementation of a compact programmation system for
Scheme.  It is composed of a byte-compiler and a run-time module.  The
run-time module and the output of the byte-compiler are compact and
allow the creation of very small executables.

FILES

The tar file contains the following files:
README		This file.
bit.c		Run-time module.
bit.h		Header of the run-time module.
bit.scm		Byte-compiler.
librairie.scm	Scheme library source file.

USE

To compile a Scheme source file, load the byte-compiler in your
favorite Scheme interpreter and use the function "byte-compile".
Ex:	(byte-compile "prog.scm" "prog.c")

To generate the executable, use your C compiler on the produced
file and the run-time module.
Ex:	my-cc prog.c bit.c

FEATURES

The implementation was originally created to show that it is possible
to program a micro-controler (such as the 68HC11) in Scheme.  Because
of this, the implementation is not fully R4RS compliant.  I list here
what is or is not included:

- All the syntax forms are implemented, even the optional ones.

- The library doesn't cover the I/O ports section, since it makes
  little sense in the context of a processor without terminal or file
  system.  Nevertheless, some I/O functions are implemented, but they
  refer only to "standard input" and "standard output".

- The numbers are restricted to exact bounded integers (fixnums).

- Absolutely NO error detection is done.  The program is assumed to be
  bug-free.

- The remaining of the R4RS is implemented correctly, even high level
  features such as first-class continuations and tail-recursion in
  constant space are present.

The implementation produces C code.  The run-time module is fairly
small and the byte-code produced from a Scheme source file is very
compact.  It's up to the C compiler to produce small executable code
with it.

- For example, the byte-compilation of all the library file (~25
  Kbytes) produces about 5.5 Kbytes of byte-code.

- My tests with a modified GCC for the 68HC11 produced an executable
  of ~22 Kbytes (all the Scheme library functions included).  I guess
  that a translation by hand in the 68HC11 assembler could give even
  better results (say 10 to 14 Kbytes).

The garbage collector used in the run-time module is a real-time one.

The implementation is optimized for space, and not at all for speed.
The resulting executables are quite slow.  They're about 30 times
slower than the SCM interpreter.

PAPERS

Some documentation related to the implementation can be found in my
Web page:
	http://www.iro.umontreal.ca/~dube/
The documentation is in french.

There is an article about the real-time garbage collector:
	"Un GC temps re'el semi-compactant"

There is my masters thesis:
	"Un syste`me de programmation Scheme pour micro-contro^leur"

WARNING

I decided to make my implementation accessible because there were many
persons that asked for it.

- I do not pretend this implementation is complete and can be used as
  is (even on the 68HC11).

- The implementation is not well commented and when there are
  comments, they are in french.

- Everybody is free to modify and use it for educational or research
  purposes, but no real support should be expected from me.

AUTHOR

Danny Dube'
Universite' de Montre'al
E-mail: [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.