CHICKEN(1)                 OpenBSD Reference Manual                 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 -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.


       -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 -no-lambda-info
           1 -no-trace
           2 nothing.


       -disable-c-syntax-checks
              Disable basic syntax checking of embedded C code fragments.


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


       -disable-stack-overflow-checks
              Disables detection of stack-overflows.


       Disables specific class of warnings, may be given multiple times.


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


       -explicit-use
              Disables automatic use of the units library and eval instead of
              an application unit.


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


       -extension
              Mostly equivalent to -prelude 'ofine-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 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.


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


       -inline
              Enables procedure inlining.


       -inline-limitthreshold
              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-stylestyle
              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 exttt{suffix}.


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


       -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_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 L. Winkelmann (felix@call-with-
       current-continuation.org).


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



                                  10 Sep 2002                       CHICKEN(1)
