


local                                                      SCC(1)




NAME
     scc - Scheme to C compiler

SYNTAX
     scc [ option ] ... file ...

DESCRIPTION
     The scc command invokes a Scheme compiler which accepts the
     language defined in the essential portions of _R_e_v_i_s_e_d_3
     _R_e_p_o_r_t _o_n _t_h_e _A_l_g_o_r_i_t_h_m_i_c _L_a_n_g_u_a_g_e _S_c_h_e_m_e, with minor con-
     straints and some additions.  The compiler produces C source
     files which are then compiled using the system's C compiler
     to produce conventional ._o and _a._o_u_t files.  The C code pro-
     duced by this compiler may be intermixed with other C code
     or code written in other languages.

OPTIONS
     These options are accepted by scc.  Other options will be
     assumed to be options of the system's C compiler and they
     will be passed to it when it is invoked.

     -cc  _C _c_o_m_p_i_l_e_r   Compile the Scheme compiler produced C
                       code with _C _c_o_m_p_i_l_e_r.  If this flag is not
                       supplied, then the C compiler _c_c will be
                       used.

     -C                Compile the Scheme programs found in the
                       files _s_o_u_r_c_e.sc and leave the resulting
                       code in _s_o_u_r_c_e.c files.  No further opera-
                       tions are performed.

     -I  _d_i_r_e_c_t_o_r_y     Specifies a directory to be searched by
                       include for source files.

     -f  _s_y_m_b_o_l  _v_a_l_u_e Define the compile-time constant _s_y_m_b_o_l to
                       _v_a_l_u_e. This is equivilant to the construct
                       (define-constant _s_y_m_b_o_l _v_a_l_u_e) appearing
                       in the Scheme source.

     -i                Combine the source and object files into a
                       Scheme interpreter.  The module name for
                       each Scheme source file is automatically
                       determined.  Module names for previously
                       compiled modules must be specified using
                       the -m option.

     -m  _m_o_d_u_l_e-_n_a_m_e   Specifies the name of a previously com-
                       piled module.  Note that the Scheme com-
                       piler will downshift the alphabetic char-
                       acters in the _m_o_d_u_l_e-_n_a_m_e.




                                                                1






SCC(1)                                                      local



     -Ob               Optimize code by omitting bounds checks on
                       vectors and strings.

     -Og               Optimize code by omitting stack trace-back
                       code.

     -On               Optimize code by assuming that all numbers
                       are fixed point.

     -Ot               Optimize code by omitting type error
                       checks.

     -pg               Produce profiled code for run-time meas-
                       urement using _g_p_r_o_f(_1). The profiled
                       library is used in lieu of the standard
                       Scheme library.

     -scgc   _s_t_a_t_f_l_a_g  Enables garbage collection statistics.  If
                       set to 1, then garbage collection statis-
                       tics will be printed.  The default is 0,
                       that will result in no statistics.

     -sch  _h_e_a_p        Specifies the compiler's heap size in
                       megabytes.

     -scl _p_e_r_c_e_n_t      Specifies the percent of the heap allo-
                       cated after a generational garbage collec-
                       tion that will force a full collection.

ENVIRONMENT VARIABLES
     The items controlled by -_s_c.. flags can also be controlled
     by environment variables.  If both the flag and the environ-
     ment variable are provided, then the flag's value will be
     used.

     SCGCINFO          Controls the reporting of garbage collec-
                       tion statistics to the standard error
                       file.  If set to 1, then garbage collec-
                       tion statistics will be printed.  The
                       default setting is 0 that will not print
                       the statistics.

     SCHEAP            Defines the size of the heap in megabytes.
                       The default heap size is 4 MB.

     SCLIMIT           Defines the percent of the heap allocated
                       after a generational garbage collection
                       that will force a full collection.  The
                       default is 33.






2






local                                                      SCC(1)



INPUT FILES
     Following the command options come one or more file names.

     _n_a_m_e.sc           Scheme source.  Scheme source files will
                       be compiled into C files with the name
                       _n_a_m_e.c.

     _n_a_m_e.o            Object file which may have been generated
                       by any compiler.

     _n_a_m_e.a            Object file archive which may have been
                       generated by any compiler.

DIAGNOSTICS
     The disgnostic messages produced by the compiler are printed
     on the standard error file.

FILES
     /.../schemetoc/...  source and documentation
     /.../libsc.a        library
     /.../libsc_p.a      profiled library (optional)
     /.../scc            c-shell script
     /.../sccomp         compiler
     /.../sccomp.heap    saved heap image for the compiler
     /.../predef.sc      predefined functions
     /.../objects.h      definitions which are #include'd in the
     C code
     SC-TO-C_p_r_o_c_e_s_s_i_d.c  temporary C source file
     SC-TO-C_p_r_o_c_e_s_s_i_d.o  temporary object file

LIMITATIONS
     When the compiler is able to identify every call to a pro-
     cedure, it is able to generate it "in-line", and perform
     tail calls by using "goto".  This analysis covers most
     loops, conditional expressions, and finite state machines.
     For non-tail recursive calls, the code generated by the com-
     piler uses the standard C mechanisms for procedure call and
     return.  This therefore requires that each top-level Scheme
     procedure, and any Scheme procedure which has more than one
     call which is not tail-recursive be compiled into its own C
     procedure.  Calls to such procedures will be tail-recursive
     if and only if the host C compiler optimizes tail-recursion.


SEE ALSO
     Harold Abelson and Gerald Jay Sussman with Julie Sussman,
     _S_t_r_u_c_t_u_r_e _a_n_d _I_n_t_e_r_p_r_e_t_a_t_i_o_n _o_f _C_o_m_p_u_t_e_r _P_r_o_g_r_a_m_s, The MIT
     Press.

     Jonathan Rees and William Clinger (Editors), _R_e_v_i_s_e_d_3 _R_e_p_o_r_t
     _o_n _t_h_e _A_l_g_o_r_i_t_h_m_i_c _L_a_n_g_u_a_g_e _S_c_h_e_m_e, SIGPLAN Notices, V21,
     #12, December 1986.



                                                                3






SCC(1)                                                      local



     R. Kent Dybvig, _T_h_e _S_C_H_E_M_E _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Prentice
     Hall, Inc.

     Daniel P. Friedman and Matthias Felleisen, _T_h_e _L_i_t_t_l_e
     _L_I_S_P_e_r, MIT Press.

     Joel Bartlett, documentation files located in the directory
     /.../_s_c_h_e_m_e_t_o_c/....

     sci(1)

QUESTIONS, COMMENTS, AND COMPLAINTS
     bartlett@decwrl.dec.com










































4


99