ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Chicken (Scheme implementation) - Wikipedia, the free encyclopedia

Chicken (Scheme implementation)

From Wikipedia, the free encyclopedia

Chicken Scheme
Developed by Felix Winkelmann
Latest release 3.2 / May, 2008
OS Cross-platform
Genre Programming language
License BSD License
Website call-with-current-continuation.org
Standard(s) R5RS (mostly), R6RS (α)

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 is free software available under the BSD license.

Contents

[edit] 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.

Chicken's design was inspired by a 1994 paper by Henry Baker that outlined an innovative strategy for Scheme compilation into C. A scheme program is compiled into C functions. These C functions never reach the return statement; instead, they call a new continuation when complete. These continuations are C functions themselves and are passed on as extra arguments to other C functions. They are calculated by the compiler.

So far, this is the essence of continuation-passing style. Baker's novel idea is to use the C stack for the Scheme heap. Hence, normal C stack operations such as automatic variable creation, variable-sized array allocation, and so on can be used. When the stack fills up (that is, the stack pointer reaches the top of the stack), a garbage collection can be initiated. The design used is a copying garbage collector originally devised by C.J. Cheney, which copies all live continuations and other live objects to the heap. 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 full, the Scheme heap consists of the C stack as the nursery together with the two heaps required by the generational garbage collector. This approach gives the speed of the C stack for many operations, and it allows the use of continuations as simple calls to C functions. Further, Baker's solution guarantees asymptotic tail recursive behavior, as required by the Scheme language standard. The implementation in the Chicken scheme compiler is even asymptotically safe for space.

[edit] Limitations and deviations from the standard

Chicken Scheme is mostly R5RS-compliant. The basic distribution offers only part of the numerical tower and Lisp-macros instead of hygienic macros. The missing features can be installed as extensions (see below).

There is currently a maximum of 126 arguments to a procedure. There is a workaround for some architectures that extends the maximum number of arguments per procedure to 1000.

[edit] 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. SWIG also supports Chicken.

[edit] See also

[edit] References

[edit] External links


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -