|
Chicken is a compiler and interpreter for the Scheme programming language that compiles Scheme code to standard C. It is mostly R5RS compliant and offers many extensions to the standard. Chicken comes as free software available under the BSD license. A diagram of the operation of a typical multi-language compiler. ...
An interpreter is a computer program that executes other programs. ...
Scheme is a functional programming language and a dialect of Lisp. ...
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. ...
Free software, as defined by the Free Software Foundation, is software which can be used, copied, studied, modified and redistributed without restriction. ...
The BSD license is an acronym for the Berkeley Software Distribution license agreement, and is one of the most widely used licenses for free software (a subset of open source software). ...
Design
Like many Scheme compilers, Chicken uses standard C as an intermediate language. A Scheme program is translated into C by the Chicken compiler, and then a C compiler translates the C program into machine code for the target architecture, producing an executable program. The universal availability of C makes it ideal for this purpose. In computer science, an intermediate language is the language of an abstract machine designed to aid in the analysis of computer programs. ...
Chicken's design was inspired by a 1994 paper by Henry Baker that outlined an innovative strategy for Scheme compilation into C. A C return is never executed; the Scheme procedure compiled into a C function simply calls a new continuation when complete (this is the essence of continuation-passing style). Calls to Scheme procedures are compiled with extra arguments which include the return continuation. Henry Baker is the name of a computer scientist who has made contributions in such areas as Garbage collection and the Actor model. ...
In computing, a continuation is a representation of the execution state of a program (for example, the register contents and call stack) at a certain point in time. ...
The C stack in this implementation is in the Scheme heap, and thus normal C stack operations such as automatic variable creation, variable-sized array allocation, and so on can be used to automatically populate the heap. When the heap fills up (that is, the stack pointer reaches the top of the heap) a garbage collection can be initiated. The design used is a copying garbage collector originally designed by C.J. Cheney, which copies all live continuations and other live objects to the new heap, and execution then continues using the new heap as a C stack. Despite this, the C code does not copy C stack frames, only Scheme objects, so it does not require knowledge of the C implementation. In computer science, a call stack is a special stack which stores information about the active subroutines of a computer program. ...
In computer science, garbage collection (also known as GC) is a form of automatic memory management. ...
Limitations and deviations from the standard Chicken Scheme is mostly R5RS-compliant. The majority of the current deviations will be covered by the forthcoming standard, R6RS. The basic distribution lacks arbitrary-precision arithmetic (bignums). However, these can be installed as an extension (see below). There is currently a maximum of 126 arguments to a procedure. This is a comparatively serious limitation for a Scheme compiler, which may expect to have quite long lists passed as arguments using the apply primitive. There is a workaround for some architectures that extends the maximum numbdr of arguments per procedure to 1000. On a computer, arbitrary-precision arithmetic, also called bignum arithmetic, is a technique that allows computer programs to perform calculations on integers and rational numbers with an arbitrary number of digits of precision, limited only by the available memory of the host system. ...
Add-on software Chicken has a large repository of additional libraries and programs called "eggs". This eggs system is quite similar to RubyGems. It too does not integrate with the packaging system of the user's operating system. RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called gems), a tool to easily manage the installation of gems, and a server for distributing them. ...
See also In computer science, tail recursion is a special case of recursion that can be transformed into an iteration. ...
Adamantix, also known as Trusted Debian, is a security focused operating system based on Debian GNU/Linux. ...
References External links |