CHICKEN(1)

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 -block -debug-level 0

-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-syntax
    Aborts compilation process after macro-expansion and syntax checks.

-compile-time-macros-only
    Makes low-level macros (defined with define-macro only available at compile-time. By default low-level macros are also available at run-time. Note that highlevel-macros ("syntax-case")
     defined in compiled code are never available at run-time.

-compress-literals threshold
    Compiles quoted literals that exceed the size threshold as strings and parse the strings at run-time. This reduces the size of the code and speeds up compile-times of the host C compiler, but has a small run-time performance penalty. The size of a literal is computed by counting recursively the objects in the literal, so a vector counts as 1 plus the count of the elements, a pair counts as the counts of the car and the cdr, respectively. All other objects count 1.

-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
1 nothing.

-dependency-output filename
    Specifies target filename for dependency rule generated by the -write-dependencies option.

-disable-interrupts
    Equivalent to -prelude "(declare (interrupts-disabled))"

-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.

-explicit-use
    Disables automatic use of the units library and eval . Use this option if compiling a library unit instead of an application unit.

-extend filename
    Loads a Scheme file before compilation commences. This feature can be used to extend the compiler.

-feature symbol
    Registers symbol to be a valid feature identifier for cond-expand

-ffi
    Compile C/C++ code and generate Scheme bindings.

-ffi-define symbol
    Defines a macro that will be accessible in foreign-parse declarations.

-ffi-include-path path
    Set include path for "easy" FFI parser.

-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 kilobytes, 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.

-hygienic
    Load the syntax-case macro package and enable high-level macros in compiled code. This option registers the hygienic-macros feature identifier.

-hygienic-at-run-time
    Makes hygienic ("syntax-case") macro system available at run-time. Note that this has a slight overhead, because the hygienic macro definitions have to be loaded.

-include-path pathname
    Specifies an additional search path for files included via the include special form. This option may be given multiple times. If the environment variable CHICKEN_INCLUDE_PATH is set, it should contain a list of alternative include pathnames separated by ; . The environment variable CHICKEN_HOME is also considered as a search path.

-lambda-lift
    Enable the optimization known as lambda-lifting.

-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 . Each line in the created file gives the name and the line-number (if available) of a procedure call. With this option given, the generated code is slightly faster.

-no-feature symbol
    Unregisters feature identifier symbol

-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 -lambda-lift
2 -optimize-leaf-routines -lambda-lift -usual-integrations
3 -optimize-leaf-routines -lambda-lift -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
    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 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 script formatprofile to display the profiling information in a more user-friendly form.

-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.

-quiet
    Disables output of compile information.

-r5rs
    Equivalent to -hygienic -strict

-require-for-syntax name
    Loads the syntax-extension name before the source program is processed.

-srfi-7
    Process source file as SRFI-7 configuration language.

-strict
    Disable non-standard macros. Implies -strict-letrec

-strict-srfi-0
    Disable non-standard macros except cond-expand Implies -strict-letrec

-strict-reader
    Disable non-standard read syntax.

-strict-letrec
    Enable fully R5RS compliant letrec

-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.

-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.

Reads the source-file
    filename and performs macro-expansions. This makes macros defined in that file available without actually compiling the code.

-write-dependencies
    Output a rule suitable for make which specify any dependencies of the currently compiled file to included source files. If -dependency-output is not given, the rule is written to standard output. You can specify the -check-syntax option additionally to avoid compilation of the source file.

ENVIRONMENT VARIABLES

CHICKEN_HOME
    Should contain the pathname where support- and include-files can be found.

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 .

DOCUMENTATION
More information can be found in the Chicken Manual which is provided in HTML format as manual.html in the distribution.

BUGS
Submit bug reports by e-mail to felix@call-with-current-continuation.org

AUTHOR
Chicken was implemented by Felix Winkelmann (felix@call-with-current-continuation.org).

SEE ALSO
csi(1) csc(1) chicken-config(1)