2. Bigloo -- Overview of Bigloo

Browsing
Home: | Bigloo A ``practical Scheme compiler'' User manual for version 2.6b December 2003
Previous chapter: | Table of contents
Next chapter: | Modules
Overview of Bigloo
2.1 | SRFI
2.2 | Separate compilation
2.3 | C interface
2.4 | Java interface
2.5 | Object language
2.6 | Threads
2.7 | Type annotations
2.8 | Unicode support
2.9 | DSSSL
Chapters
| Acknowledgements
1. | Table of contents
2. | Overview of Bigloo
3. | Modules
4. | Core Language
5. | Standard Library
6. | Pattern Matching
7. | Object System
8. | Threads
9. | Regular parsing
10. | Lalr(1) parsing
11. | Errors and Assertions
12. | Eval and code interpretation
13. | Macro expansion
14. | Command Line Parsing
15. | Explicit typing
16. | The C interface
17. | The Java interface
18. | Bigloo Libraries
19. | Extending the Runtime System
20. | SRFIs
21. | DSSSL support
22. | Compiler description
23. | User Extensions
24. | Bigloo Development Environment
25. | Global Index
26. | Library Index
| Bibliography
| Bigloo is an implementation of an extended version of the Scheme programming language. Without its extensions Bigloo does not entirely conform to Scheme as defined in the Revised(5) Report on on the Algorithmic Language Scheme (henceforth R5RS) (see info-file `r5rs.info', ). The two reasons are: Bigloo produces C files. C code uses the C stack, so some programs can't be properly tail recursive. Nevertheless all simple tail recursions are compiled without stack consumption. Alternatively, Bigloo may produce JVM (Java Virtual Machine byte code) class files. These classes may use regular Java classes. Bigloo is a module compiler. It compiles modules into `.o' or `.class' files that must be linked together to produce stand alone executable programs or JVM jar files. However, we designed Bigloo to be as close as possible to the R5RS. Hence, when Bigloo includes a feature that is extracted from Scheme and implemented as normal, this feature is only mentioned in this document and not fully described.
2.1 SRFI
The Bigloo version 2.6b supports the following SRFIs: `srfi-0` (conditional execution). `srfi-2` (AND-LET*: an AND with local bindings, a guarded LET* special form). `srfi-6` (Basic String Ports). `srfi-8` (Binding to multiple values). `srfi-9` (Records specification). `srfi-18` (Multithreading support). `srfi-22` (script interpreter invocation). `srfi-28` (Basic Format Strings). `srfi-30` (Multi-line comments).
2.2 Separate compilation
To allow and stimulate separate compilation, Bigloo compiles modules instead of entire programs. A module is composed of a module declaration and a module body, where a module body can be thought of as an incomplete Scheme program. Bigloo strictly enforces variable bindings. That is, it is illegal in a body to refer to unbound variables. In a module declaration, some variables can be declared to be immutable functions. For such variables, the compiler can then check if the number of arguments for some function calls are correct or not. When an arity mismatch is detected, Bigloo signals an error and aborts the compilation process.
2.3 C interface
The goal of the design of Bigloo is to allow the merging of high and low level programming. This means that Bigloo is designed to be fully connected to the already existing outside world of C. This connection has two components: a function call interface and a data storage interface. Bigloo code is able to call C code and vice versa; Bigloo data storage is accessible from C and vice versa. There are no frontiers between the Bigloo and C worlds.
2.4 Java interface
Since release 2.3, Bigloo is able to produce Java Virtual Machine byte codes in addition to C code. By producing class files, it is possible to connect Scheme code and Java code in the same spirit as the Scheme and C connection. This connection has two components: a function call interface and a data storage interface. Bigloo code is able to call Java code and vice versa; Bigloo data storage is accessible from Java and vice versa. There are no frontiers between the Bigloo and Java worlds.
2.5 Object language
Since release 1.9, Bigloo has included an object system. This system belongs to the Clos [Bobrow et al. 88] object system family but whose design has been mainly inspired by C. Queinnec's Meroon [Queinnec93]. It is based on ad-hoc polymorphism (generic functions and methods), uses single inheritance and mono-dispatch, and provides the user with introspection facilities.
2.6 Threads
Since release 2.4d, Bigloo has included a thread library. Bigloo supports Fair threads that are cooperative threads run by a fair scheduler which gives them equal access to the processor. Fair threads can communicate using broadcast events and their semantics does not depends on the executing platform. Fine control over fair threads execution is possible allowing the programming of specific user-defined scheduling strategies.
2.7 Type annotations
Type information, related to variable or function definitions, can be added to the source code. If no type information is provided, runtime checks will be introduced by the compiler to ensure normal execution, provided that the user has not used compilation flags to prevents this. If type information is added, the compiler statically type checks the program and refuses ones that prove to be incorrect.
2.8 Unicode support
Bigloo supports UCS-2 Character encoding and also provides conversion functions between UTF-8 and UCS-2. It still maintains traditional ISO-LATIN1 characters and strings.
2.9 DSSSL
Bigloo helps the DSSSL programmer by supporting keywords, named constants and keyword functions.

This Scribe page has been generated by `scribeinfo`.
Last update Tue Dec 16 13:46:41 2003