chicken

Langue: en

Version: 10 Sep 2002 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)

NAME

chicken - A Scheme-to-C compiler

SYNOPSIS

chicken pathname [ option ... ]

DESCRIPTION

Chicken is a compiler for the programming language Scheme supporting most of the features as described in the Revised^5 Report on the Algorithmic Language Scheme .

OPTIONS

-analyze-only
Stop compilation after first analysis pass.

-benchmark-mode Equivalent to -optimize-level 3 -fixnum-arithmetic -disable-interrupts -lambda-lift -block -no-lambda-info

-block
Enable block-compilation. When this option is specified, the compiler assumes that global variables are not modified outside this compilation-unit.
-case-insensitive
Enables the reader to read symbols case-insensitive. The default is to read case-sensitive (in violation of R5RS). This option registers the case-insensitive feature identifier.
-check-imports
Search for references to undefined global variables.
-check-syntax
Aborts compilation process after macro-expansion and syntax checks.
-database-size number
Specifies the initial size of the analysis-database. Should only be used if extremely large files are to be compiled.
-debug modes
Enables one or more debugging modes. See the User's Manual for more information.
-debug-level level
Selects amount of debug-information. level should be an integer.


    0 -no-trace -no-lambda-info
    1 -no-trace
    2 nothing.

-disable-c-syntax-checks
Disable basic syntax checking of embedded C code fragments.
-disable-compiler-macros
Disable expansion of compiler macros.
-disable-interrupts
Equivalent to -prelude '(declare (interrupts-disabled))' .
-disable-stack-overflow-checks
Disables detection of stack-overflows.
-disable-warning class
Disables specific class of warnings, may be given multiple times.


    ext    Suspect extension use.
    type   Suspect type/literal use.
    usage  Suspect feature use.
    style  Suspect feature use.
    syntax Suspect sytax form.
    redef  Redefinition of builtin binding.
    var    Suspect variable use.

-dynamic
This option should be used when compiling files intended to be loaded dynamically into a running Scheme program.
-epilogue filename
Includes the file named filename at the end of the compiled source file. The include-path is not searched. This option may be given multiple times.
-emit-debug-info
Emit additional information for each lambda expression (currently the argument-list, after alpha-conversion/renaming).
-emit-exports filename
Write exported toplevel variables to file filename .
-emit-external-prototypes-first
Emit prototypes for callbacks defined with define-external before any other foreign declarations. This is sometimes useful, when C/C++ code embedded into the a Scheme program has to access the callbacks. By default the prototypes are emitted after foreign declarations.
-emit-inline-file filename
Write procedures that can be globally inlined in internal form to filename , if global inlining is enabled. Implies "-inline -local".
-explicit-use
Disables automatic use of the units library and eval instead of an application unit.
-extend filename
Loads a Scheme file, filename , before compilation commences. This feature can be used to extend the compiler.
-extension
Mostly equivalent to -prelude '(define-extension NAME)' where NAME is the basename of the currently compiled file. Note that if you want to compile a file as a normal (dynamically loadable) extension library, you should also pass the -shared option.
-feature symbol
Registers symbol to be a valid feature identifier for cond-expand
-fixnum-arithmetic
Equivalent to -prelude '(declare (fixnum))' .
-heap-size number
Sets the static heap-size of the generated executable to number bytes. The parameter may be followed by a M or K suffix which stand for mega- and kilo-bytes, respectively. The default heap-size is 16 megabytes.
-heap-initial-size number
Sets the size that the heap of the compiled application should have at startup time.
-heap-growth percentage
Sets the heap-growth rate for the compiled program at compile time.
-heap-shrinkage percentage
Sets the heap-shrinkage rate for the compiled program at compile time.
-help
Print a summary of available options and the format of the command-line parameters and exit the compiler.
-ignore-repository
Do not load any extensions from the repository (treat repository as empty). Also do not consult compiled (only interpreted) import libraries in import forms.
-import pathname
Read exports from linked or loaded libraries from given file. Implies -check-imports
-include-path pathname
Specifies an additional search path for files included via the include special form. This option may be given multiple times.
-inline
Enables procedure inlining.
-inline-global
Enable cross-module inlining.
-inline-limit threshold
Sets the maximum size of potentially inlinable procedures.
-keep-shadowed-macros
Do not remove macro definitions with the same name as assigned toplevel variables (the default is to remove the macro definition).
-keyword-style style
Enables alternative keyword syntax, where style may be either prefix (as in Common Lisp), suffix (as in DSSSL) or none Any other value is ignored. The default is suffix .
-lambda-lift
Enable the optimization known as lambda-lifting.
-local
Assume toplevel variables defined in the current compilation unit are not externally modified.
-no-trace
Disable generation of tracing information. If a compiled executable should halt due to a runtime error, then a file containing a stack-trace will be written to the current directory under the name STACKTRACE With this option given, the generated code is slightly faster.
-no-warnings
Disable generation of compiler warnings.
-nursery number
-stack-size number
Sets the size of the first heap-generation of the generated executable to number bytes. The parameter may be followed by a M or K suffix. The default stack-size depends on the target platform.
-optimize-leaf-routines
Enable leaf routine optimization.
-optimize-level level
Enables certain sets of optimization options. level should be an integer. Each optimization level corresponds to a certain set of optimization option as shown in the following list:


    0 nothing
    1 -optimize-leaf-routines
    2 -optimize-leaf-routines -usual-integrations
    3 -optimize-leaf-routines -usual-integrations -unsafe

-output-file filename
Specifies the pathname of the generated C file. Default is FILENAME.c .
-postlude expressions
Add expressions after all other toplevel expressions in the compiled file. This option may be given multiple times. Processing of this option takes place after processing of -epilogue .
-prelude expressions
Add expressions before all other toplevel expressions in the compiled file. This option may be given multiple times. Processing of this option takes place before processing of -prologue .
-profile
-accumulate-profile Instruments the source code to count procedure calls and execution times. After the program terminates (either via an explicit exit or implicitly), profiling statistics are written to a file named PROFILE.<PID> where <PID> is the process ID of the program being profiled. Each line of the generated file contains a list with the procedure name, the number of calls and the time spent executing it. Use the chicken-profile program to display the profiling information in a more user-friendly form.
-profile-name filename
Specifies the name of the generated profile information file. Only useful in combination with the -profile or -accumulate-profile options.
-prologue filename
Includes the file named filename at the start of the compiled source file. The include-path is not searched. This option may be given multiple times.
-release
Print release number and exit.
-require-extension name
Loads the syntax-extension name before the source program is processed. This is identical to adding require-extension NAME at the start of the compiled program.
-run-time-macros
Makes low-level macros (defined with define-macro also available at run-time. By default low-level macros are not available at run-time. Note that highlevel-macros ("syntax-case") defined in compiled code are never available at run-time.
-to-stdout
Write compiled code to standard output instead of creating a .c file.
-unit name
Compile this file as a library unit.
-unsafe
Disable runtime safety checks.
-unsafe-libraries
Marks the generated file for being linked with the unsafe runtime system. This should be used when generating shared object files that are to be loaded dynamically. If the marker is present, any attempt to load code compiled with this option will signal an error.
-uses name
Use definitions in the given library unit.
-usual-integrations
Specifies that standard procedures and certain internal procedures are never redefined, and can be inlined. This is equivalent to declaring (usual-integrations) .
-verbose
Prints progress information to standard output during compilation.
-version
Prints the version and some copyright information and exit the compiler.

ENVIRONMENT VARIABLES

CHICKEN_PREFIX
Is used as a prefix directory for support files, include-files and libraries.
CHICKEN_INCLUDE_PATH
Contains one or more pathnames where the compiler should additionally look for include-files, separated by ; characters.
CHICKEN_OPTIONS
Holds a string of default compiler options that should apply to every invocation of chicken .

RUNTIME OPTIONS

After successful compilation a C source file is generated and can be compiled with a C compiler. Executables generated with chicken (and the chicken program itself) accept a small set of runtime options.
-:?
Shows a list of the available runtime options and exits the program.
-:aNUMBER
Specifies the length of the buffer for recording a trace of the last invoked procedures. Defaults to 8.
-:b
Enter a read-eval-print-loop when an error is encountered.
-:B
Sounds a bell (ASCII 7) on every major garbage collection.
-:c
Forces console mode. Currently this is only used in the interpreter (csi) to force output of the #;N> prompt even if stdin is not a terminal (for example if running in an emacs buffer under Windows).
-:d
Prints some debug-information at runtime.
-:D
Prints some more debug-information at runtime.
-:fNUMBER
Specifies the maximal number of currently pending finalizers before finalization is forced.
-:hNUMBER
Specifies fixed heap size
-:hgPERCENTAGE
Sets the growth rate of the heap in percent. If the heap is exhausted, then it will grow by PERCENTAGE
-:hiNUMBER
Specifies the initial heap size
-:hmNUMBER
Specifies a maximal heap size. The default is (2GB - 15).
-:hsPERCENTAGE
Sets the shrink rate of the heap in percent. If no more than a quarter of PERCENTAGE of the heap is used, then it will shrink to PERCENTAGE
-:o
Disables detection of stack overflows at run-time.
-:r
Writes trace output to stderr. This option has no effect with in files compiled with the -no-trace options.
-:sNUMBER
Specifies stack size.
-:tNUMBER
Specifies symbol table size.
-:w
Enables garbage collection of unused symbols. By default unused and unbound symbols are not garbage collected.
-:x
Raises uncaught exceptions of separately spawned threads in primordial thread. By default uncaught exceptions in separate threads are not handled, unless the primordial one explicitly joins them. When warnings are enabled (the default) and -:x is not given, a warning will be shown, though.

The NUMBER argument values may be given in bytes, in kilobytes (suffixed with K or k), in megabytes (suffixed with M or m), or in gigabytes (suffixed with G or g). Runtime options may be combined, like -:dc , but everything following a NUMBER argument is ignored. So -:wh64m is OK, but -:h64mw will not enable GC of unused symbols.

DOCUMENTATION

More information can be found in the Chicken User's Manual

AUTHORS

Felix L. Winkelmann and The Chicken Team.

SEE ALSO

csc(1) chicken-bug(1)