Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/cm/Doc/manual.tex
ViewVC logotype

Diff of /sml/trunk/src/cm/Doc/manual.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 651, Thu Jun 1 18:34:03 2000 UTC revision 652, Tue Jun 6 02:14:56 2000 UTC
# Line 7  Line 7 
7  \textwidth6.7in\textheight9.1in %\renewcommand{\baselinestretch}{1.2}  \textwidth6.7in\textheight9.1in %\renewcommand{\baselinestretch}{1.2}
8  \columnsep0.25in  \columnsep0.25in
9    
10    \newcommand{\smlmj}{110}
11    \newcommand{\smlmn}{29}
12    
13  \author{Matthias Blume \\  \author{Matthias Blume \\
14  Research Institute for Mathematical Sciences \\  Research Institute for Mathematical Sciences \\
15  Kyoto University}  Kyoto University}
16    
17  \title{{\bf CM}\\  \title{{\bf CM}\\
18  The SML/NJ Compilation and Library Manager \\  The SML/NJ Compilation and Library Manager \\
19  {\it\small (for SML/NJ version 110.29 and later)} \\  {\it\small (for SML/NJ version \smlmj.\smlmn~and later)} \\
20  User Manual}  User Manual}
21    
22  \setlength{\parindent}{0pt}  \setlength{\parindent}{0pt}
# Line 61  Line 64 
64  compilation management while libraries were added as an afterthought.  compilation management while libraries were added as an afterthought.
65  Beginning now, CM takes a very library-centric view of the world.  In  Beginning now, CM takes a very library-centric view of the world.  In
66  fact, the implementation of SML/NJ itself has been restructured to  fact, the implementation of SML/NJ itself has been restructured to
67  meet this approach.  conform to this approach.
68    
69  \section{The CM model}  \section{The CM model}
70    
# Line 69  Line 72 
72  may also contain references to other libraries.  Each library comes  may also contain references to other libraries.  Each library comes
73  with an explicit export interface which lists all toplevel-defined  with an explicit export interface which lists all toplevel-defined
74  symbols of the library that shall be exported to its clients.  A  symbols of the library that shall be exported to its clients.  A
75  library is described by the contents of its {\em description file}.  library is described by the contents of its {\em description
76    file}.\footnote{The description file may also contain references to
77    input files for {\em tools} like {\tt ml-lex} or {\tt ml-yacc} that
78    produce ML source files.  See section~\ref{sec:tools}.}
79    
80  \noindent Example:  \noindent Example:
81    
# Line 112  Line 118 
118  symbol, then the definition (i.e., the ML source file that actually  symbol, then the definition (i.e., the ML source file that actually
119  defines the symbol) must be identical in all cases.  defines the symbol) must be identical in all cases.
120  \label{rule:diamond}  \label{rule:diamond}
121  \item The use of ML's {\bf open} construct is not permitted at top  \item The use of ML's {\bf open} construct is not permitted at the top
122  level.  level of ML files compiled by CM.  (The use is still ok at the
123    interactive top level.)
124  \end{enumerate}  \end{enumerate}
125    
126  Note that these rules do not require the exports of sub-groups or  Note that these rules do not require the exports of sub-groups or
127  sub-libraries to be distinct from the exports of ML source files.  If  sub-libraries to be distinct from the exports of ML source files in
128  an ML source file re-defines an imported name, then the disambiguating  the current library or group.  If an ML source file re-defines an
129  rule is that the definition from the ML source takes precedence over  imported name, then the disambiguating rule is that the definition
130  the definition imported from the group or library.  from the ML source takes precedence over the definition imported from
131    the group or library.
132    
133  Rule~\ref{rule:diamond} may come as a bit of a surprise considering  Rule~\ref{rule:diamond} may come as a bit of a surprise considering
134  that each ML source file can be a member of at most one group or  that each ML source file can be a member of at most one group or
# Line 136  Line 144 
144  The full syntax for library description files also includes provisions  The full syntax for library description files also includes provisions
145  for a simple ``conditional compilation'' facility (see  for a simple ``conditional compilation'' facility (see
146  Section~\ref{sec:preproc}), for access control (see  Section~\ref{sec:preproc}), for access control (see
147  Section~\ref{sec:access}), and accepts ML-style nestable comments  Section~\ref{sec:access}), and it accepts ML-style nestable comments
148  delimited by \verb|(*| and \verb|*)|.  delimited by \verb|(*| and \verb|*)|.
149    
150  \subsection{Name visibility}  \subsection{Name visibility}
151    
152  In general, all definitions exported from members of a library are  In general, all definitions exported from members (i.e., ML source
153  visible in all ML source files of that library.  The source code in  files, subgroups and sublibraries) of a library are visible in all ML
154  those source files can refer to them directly without further  source files of that library.  The source code in those source files
155  qualification.  Here, ``exported'' means either a top-level definition  can refer to them directly without further qualification.  Here,
156  within an ML source file or a definition listed in a (sub-)library's  ``exported'' means either a top-level definition within an ML source
157  export list.  file or a definition listed in a sublibrary's export list.
158    
159  If a library is structured into library components using {\em groups}  If a library is structured into library components using {\em groups}
160  (see Section~\ref{sec:groups}), then---as far as name visibility is  (see Section~\ref{sec:groups}), then---as far as name visibility is
# Line 168  Line 176 
176    
177  However, under CM, the term ``library'' does not only mean namespace  However, under CM, the term ``library'' does not only mean namespace
178  management (as it would from the point of view of the pure group  management (as it would from the point of view of the pure group
179  model) but also refers to actual file system objects.  It would be  model) but also refers to actual file system objects (e.g., CM
180  inconvenient if name resolution problems would result in a  description files and stable library files).  It would be inconvenient
181  proliferation of additional library files.  Therefore, CM also  if name resolution problems would result in a proliferation of
182  provides the notion of groups (or: ``library components'').  Name  additional library files.  Therefore, CM also provides the notion of
183  resolution for groups works like name resolution for entire libraries,  groups (or: ``library components'').  Name resolution for groups works
184  but grouping is entirely internal to each library.  like name resolution for entire libraries, but grouping is entirely
185    internal to each library.
186    
187    When a library is {\em stabilized} (via {\tt CM.stabilize} -- see
188    Section~\ref{sec:api}), the entire library is compiled to a single
189    file (hence groups do not result in separate stable files).
190    
191  During development, each group has its own description file which will  During development, each group has its own description file which will
192  be referred to by the surrounding library or other components thereof.  be referred to by the surrounding library or by other groups of that
193  The syntax of group description files is the same as that of library  library. The syntax of group description files is the same as that of
194  description files with the following exceptions:  library description files with the following exceptions:
195    
196  \begin{itemize}  \begin{itemize}
197  \item The initial keyword {\tt Library} is replaced with {\tt Group}.  \item The initial keyword {\tt Library} is replaced with {\tt Group}.
198  It is followed by the name of the surrounding library's description  It is followed by the name of the surrounding library's description
199  file in parentheses.  file in parentheses.
200  \item The export list can be left empty, in which case CM will  \item The export list can be left empty, in which case CM will provide
201  provide a default export list: all exports from ML source files plus  a default export list: all exports from ML source files plus all
202  all exports from sub-components of the component.  (Note that this does  exports from subcomponents of the component.  (Note that this does not
203  not include the exports of other libraries.)  include the exports of other libraries.)
204  \item There are some small restrictions on access control  \item There are some small restrictions on access control
205  specifications (see Section~\ref{sec:access}).  specifications (see Section~\ref{sec:access}).
206  \end{itemize}  \end{itemize}
# Line 204  Line 217 
217      $/basis.cm      $/basis.cm
218  \end{verbatim}  \end{verbatim}
219    
220  Here, the library description file {\tt foo-lib.cm} would list {\tt  This description defines group {\tt foo-utils.cm} to have the
221  foo-utils.cm} as one of its members:  following properties:
222    
223    \begin{itemize}
224    \item it is a component of library {\tt foo-lib.cm} (meaning that only
225    foo-lib.cm itself or other groups thereof may list foo-utils.cm as one
226    of their members)
227    \item {\tt set-utils.sml} and {\tt map-util.sml} are ML source files
228    belonging to this component
229    \item exports from the Standard Basis Library are available when
230    compiling these ML source files
231    \item since the export list has been left blank, the only (implicitly
232    specified) exports of this component are the top-level definitions in
233    its ML source files
234    \end{itemize}
235    
236    With this, the library description file {\tt foo-lib.cm} could list
237    {\tt foo-utils.cm} as one of its members:
238    
239  \begin{verbatim}  \begin{verbatim}
240  Library  Library
# Line 219  Line 248 
248  \end{verbatim}  \end{verbatim}
249  %note: emacs should be sufficiently un-confused again by now  %note: emacs should be sufficiently un-confused again by now
250    
251    No harm is done if {\tt foo-lib.cm} does not actually mention {\tt
252    foo-utils.cm}.  In this case it could be that {\tt foo-utils.cm} is
253    mentioned indirectly via a chain of other components of {\tt
254    foo-lib.cm}.  The other possibility is that it is not mentioned at all
255    (in which case CM would never know about it and not complain).
256    
257  \subsection{Multiple occurences of the same member}  \subsection{Multiple occurences of the same member}
258  \label{sec:multioccur}  \label{sec:multioccur}
259    
# Line 230  Line 265 
265  at most once.  at most once.
266  \item Libraries can be referred to freely from as many other groups or  \item Libraries can be referred to freely from as many other groups or
267  libraries as the programmer desires.  libraries as the programmer desires.
268  \item A group cannot be used from outside the (uniquely defined)  \item A group cannot be used from outside the uniquely defined library
269  library that it is a component of.  However, within that library it  (as specified in its description file) of which it is a component.
270  can be referred to from arbitrarily many other groups.  However, within that library it can be referred to from arbitrarily
271    many other groups.
272  \item The same ML source file cannot appear more than once.  If an ML  \item The same ML source file cannot appear more than once.  If an ML
273  source file is to be referred to by multiple clients, it must first be  source file is to be referred to by multiple clients, it must first be
274  ``wrapped'' into a library (or---if all references are from within the  ``wrapped'' into a library (or---if all references are from within the
# Line 273  Line 309 
309  configuration changes.  configuration changes.
310    
311  \subsection{Basic rules}  \subsection{Basic rules}
312    \label{sec:basicrules}
313    
314  CM uses its own ``standard'' syntax for pathnames which happens to be  CM uses its own ``standard'' syntax for pathnames which happens to be
315  the same as the one used by most Unix-like systems: path name  the same as the one used by most Unix-like systems: path name
# Line 295  Line 332 
332    
333  \begin{itemize}  \begin{itemize}
334  \item If the first component of a relative pathname is a  \item If the first component of a relative pathname is a
335  ``configuration anchor'' (see Section~\ref{sec:anchors}), then we call  {\em configuration anchor} (see Section~\ref{sec:anchors}), then we call
336  the path {\em implicitly anchored}.  In this case\footnote{as long as  the path {\em implicitly anchored}.  In this case\footnote{as long as
337  CM.Anchor.implict\_anchors is enabled, which currently is the default  CM.Anchor.implict\_anchors is enabled, which currently is the default
338  (see Section~\ref{sec:api})}  (see Section~\ref{sec:api})}
# Line 410  Line 447 
447  Functions that control CM's operation are accessible as members of a  Functions that control CM's operation are accessible as members of a
448  structure named {\tt CM}.  This structure itself is exported from a  structure named {\tt CM}.  This structure itself is exported from a
449  library called {\tt \$smlnj/cm/full.cm} (or, alternatively, {\tt  library called {\tt \$smlnj/cm/full.cm} (or, alternatively, {\tt
450  \$smlnj/cm.cm}).  Other libraries can exploit CM's functionality simply  \$smlnj/cm.cm}).  This library is pre-registered for auto-loading at
451  by putting a {\tt \$smlnj/cm/full.cm} entry into their own description file.  the interactive top level.
 Section~\ref{sec:dynlink} shows one interesting use of this feature.  
452    
453  Initially, only a ``minimal'' version of structure {\tt CM} (exported  Other libraries can exploit CM's functionality simply by putting a
454  by library {\tt \$smlnj/cm/minimal.cm}) is pre-registered at the interactive  {\tt \$smlnj/cm/full.cm} entry into their own description file.
455  prompt.  To make the full version of structure {\tt CM} available, one  Section~\ref{sec:dynlink} shows one interesting use of this feature.
 must explicitly load {\tt \$smlnj/cm/full.cm} using {\tt CM.autoload} or {\tt  
 CM.make}, both of which are also available in the minimal version.  
 (The minimal structure {\tt CM} contains four members: {\tt  
 CM.recomp}, {\tt CM.stabilize}, {\tt CM.make}, and {\tt CM.autoload}.)  
456    
457  Here is a description of all members:  Here is a description of all members:
458    
459  \subsubsection*{Compiling}  \subsubsection*{Compiling}
460    
461  Two main activities when using CM is to compile ML source code and to  Two main activities when using CM are to compile ML source code and to
462  build stable libraries:  build stable libraries:
463    
464  \begin{verbatim}  \begin{verbatim}
# Line 436  Line 468 
468    
469  {\tt CM.recomp} takes the name of a program's ``root'' description  {\tt CM.recomp} takes the name of a program's ``root'' description
470  file and compiles or recompiles all ML source files that are necessary  file and compiles or recompiles all ML source files that are necessary
471  to provide definitions for the root library's export list.  to provide definitions for the root library's export list.  ({\em
472    Note:} The difference to {\tt CM.make} is that no linking takes
473    place.)
474    
475  {\tt CM.stabilize} takes a boolean flag and then the name of a library  {\tt CM.stabilize} takes a boolean flag and then the name of a library
476  and {\em stabilizes} this library.  A library is stabilized by writing  and {\em stabilizes} this library.  A library is stabilized by writing
477  all information pertaining to it (including all of its library  all information pertaining to it, including all of its library
478  components) into a single file.  Later, when the library is used in  components (i.e., subgroups), into a single file.  Sublibraries do not
479  other programs, all members of the library are guaranteed to be  become part of the stabilized library; CM records stub entries for them.
480  up-to-date; no dependency analysis work and no recompilation work will  When a stabilized library is used in other programs, all members of
481  be necessary.  If the boolean flag is {\tt false}, then all  the library are guaranteed to be up-to-date; no dependency analysis
482  sub-libraries of the library must already be stable.  If the flag is  work and no recompilation work will be necessary.  If the boolean flag
483  {\tt true}, then CM will recursively stabilize all libraries reachable  is {\tt false}, then all sublibraries of the library must already be
484  from the given root.  stable.  If the flag is {\tt true}, then CM will recursively stabilize
485    all libraries reachable from the given root.
486    
487  After a library has been stabilized it can be used even if none of its  After a library has been stabilized it can be used even if none of its
488  original sources---including the description file---are present.  original sources---including the description file---are present.
# Line 457  Line 492 
492    
493  \subsubsection*{Linking}  \subsubsection*{Linking}
494    
495  In SML/NJ, linking means executing top-level code of each compilation  In SML/NJ, linking means executing top-level code (i.e., module
496  unit.  The resulting bindings can then be registered at the interactive top  creation and initialization code) of each compilation unit.  The
497    resulting bindings can then be registered at the interactive top
498  level.  level.
499    
500  \begin{verbatim}  \begin{verbatim}
# Line 466  Line 502 
502    val autoload : string -> bool    val autoload : string -> bool
503  \end{verbatim}  \end{verbatim}
504    
505  {\tt CM.make} first acts like {\tt CM.recomp}.  If the (re-)compilation  {\tt CM.make} first acts like {\tt CM.recomp}.  If the
506  is successful, then it proceeds by linking all modules.  Provided  (re-)compilation is successful, then it proceeds by linking all
507  there are no link-time errors, it finally introduces new bindings at  modules that require linking.  Provided there are no link-time errors,
508  top level.  it finally introduces new bindings at top level.
509    
510  During the course of the same {\tt CM.make}, the code of each  During the course of the same {\tt CM.make}, the code of each
511  compilation module will be executed at most once.  Code in units that  compilation module that is reachable from the root will be executed at
512  are marked as {\it private} (see Section~\ref{sec:sharing}) will be  most once.  Code in units that are marked as {\it private} (see
513  executed exactly once.  Code in other units will be executed only if  Section~\ref{sec:sharing}) will be executed exactly once.  Code in
514  the unit has been recompiled since it was executed last time or if it  other units will be executed only if the unit has been recompiled
515  depends on another compilation unit whose code has been executed  since it was executed last time or if it depends on another
516  since.  compilation unit whose code has been executed since.
517    
518  In effect, different invocations of {\tt CM.make} (and {\tt  In effect, different invocations of {\tt CM.make} (and {\tt
519  CM.autoload}) will share dynamic state created at link time as much as  CM.autoload}) will share dynamic state created at link time as much as
# Line 496  Line 532 
532    
533  Several internal registers control the operation of CM.  A register of  Several internal registers control the operation of CM.  A register of
534  type $T$ is accessible via a variable of type $T$ {\tt controller},  type $T$ is accessible via a variable of type $T$ {\tt controller},
535  i.e., a pair of {\tt get} and {\tt set} functions.  Any invocation of  i.e., a pair of {\tt get} and {\tt set} functions.\footnote{The type
536  the corresponding {\tt get} function reads the current value of the  constructor {\tt controller} is defined as part of {\tt structure
537  register.  An invocation of the {\tt set} function replaces the  CM}.}  Any invocation of the corresponding {\tt get} function reads
538  current value with the argument given to {\tt set}.  the current value of the register.  An invocation of the {\tt set}
539    function replaces the current value with the argument given to {\tt
540    set}.
541    
542  Controllers are members of {\tt CM.Control}, a sub-structure of  Controllers are members of {\tt CM.Control}, a sub-structure of
543  structure {\tt CM}.  structure {\tt CM}.
# Line 526  Line 564 
564  the dependency graph that are not related to the error.  (This does  the dependency graph that are not related to the error.  (This does
565  not work for outright syntax errors because a correct parse is needed  not work for outright syntax errors because a correct parse is needed
566  before CM can construct the dependency graph.)  The default is {\em  before CM can construct the dependency graph.)  The default is {\em
567  false} and can be overriden at startup by the environment variable  false}, meaning ``quit on first error'', and can be overriden at
568  {\tt CM\_KEEP\_GOING}.  startup by the environment variable {\tt CM\_KEEP\_GOING}.
569    
570  {\tt CM.Control.parse\_caching} sets a limit on how many parse trees  {\tt CM.Control.parse\_caching} sets a limit on how many parse trees
571  are cached in main memory.  In certain cases CM must parse source  are cached in main memory.  In certain cases CM must parse source
# Line 546  Line 584 
584  However, for the time being it will accept most of the original  However, for the time being it will accept most of the original
585  C-inspired expressions but produces a warning for each occurrence of  C-inspired expressions but produces a warning for each occurrence of
586  an old-style operator. {\tt CM.Control.warn\_obsolete} can be used to  an old-style operator. {\tt CM.Control.warn\_obsolete} can be used to
587  turn these warnings off. The default is {\em true} and can be  turn these warnings off. The default is {\em true}, meaning ``warnings
588  overriden at startup time by the environment variable {\tt  are issued'', and can be overriden at startup time by the environment
589  CM\_WARN\_OBSOLETE}.  variable {\tt CM\_WARN\_OBSOLETE}.
590    
591  {\tt CM.Control.debug} can be used to turn on debug mode.  This  {\tt CM.Control.debug} can be used to turn on debug mode.  This
592  currently has the effect of dumping a trace of the master-slave  currently has the effect of dumping a trace of the master-slave
# Line 591  Line 629 
629  {\tt string option}; a value of {\tt NONE} means that the anchor is  {\tt string option}; a value of {\tt NONE} means that the anchor is
630  currently not bound (or, in the case of {\tt set}, that it is being  currently not bound (or, in the case of {\tt set}, that it is being
631  cancelled).  The (optional) string given to {\tt set} must be a  cancelled).  The (optional) string given to {\tt set} must be a
632  directory name in native syntax.  If it is specified as a relative  directory name in native syntax ({\em without} trailing arc separator,
633  path name, then it will be expanded by prepending the name of the  e.g., {\bf /} in Unix).  If it is specified as a relative path name,
634  current working directory.  then it will be expanded by prepending the name of the current working
635    directory.
636    
637  {\tt CM.Anchor.reset} erases the entire existing path configuration  {\tt CM.Anchor.reset} erases the entire existing path configuration
638  mapping.  mapping.
# Line 630  Line 669 
669  \subsubsection*{Library registry}  \subsubsection*{Library registry}
670  \label{sec:libreg}  \label{sec:libreg}
671    
672  To be able to share associated data structures, CM maintains an  To be able to share associated data structures such as symbol tables
673  internal registry of all stable libraries that it has encountered  and dependency graphs, CM maintains an internal registry of all stable
674  during an ongoing interactive session.  The {\tt CM.Library}  libraries that it has encountered during an ongoing interactive
675  sub-structure of structure {\tt CM} provides access to this registry.  session.  The {\tt CM.Library} sub-structure of structure {\tt CM}
676    provides access to this registry.
677    
678  \begin{verbatim}  \begin{verbatim}
679    structure Library : sig    structure Library : sig
# Line 652  Line 692 
692    
693  {\tt CM.Library.descr} extracts a string describing the location of  {\tt CM.Library.descr} extracts a string describing the location of
694  the CM description file associated with the given library.  The syntax  the CM description file associated with the given library.  The syntax
695  of this string is the same that is also being used by CM's  of this string is the same as that being used by CM's master-slave
696  master-slave protocol (see section~\ref{sec:pathencode}).  protocol (see section~\ref{sec:pathencode}).
697    
698  {\tt CM.Library.osstring} produces a string denoting the given  {\tt CM.Library.osstring} produces a string denoting the given
699  library's description file using the underlying operating system's  library's description file using the underlying operating system's
# Line 668  Line 708 
708  references to the same library.  Therefore, it is not always in the  references to the same library.  Therefore, it is not always in the
709  interest of memory-conscious users to use this feature.  interest of memory-conscious users to use this feature.
710    
711  Sharing of link-time state created by the library is {\em not}  While dependency graphs and symbol tables need to be reloaded when a
712  affected by this.  previously dismissed library is referenced again, the sharing of
713    link-time state created by this library is {\em not} affected.
714    (Link-time state is independently maintained in a separate data
715    structure.  See the discussion of {\tt CM.unshare} below.)
716    
717  {\tt CM.Library.unshare} is used to remove a stable library from CM's  {\tt CM.Library.unshare} is used to remove a stable library from CM's
718  internal registry, and---at the same time---to inhibit future sharing  internal registry, and---at the same time---to inhibit future sharing
# Line 703  Line 746 
746  \end{verbatim}  \end{verbatim}
747    
748  {\tt CM.State.pending} produces a list of strings, each string naming  {\tt CM.State.pending} produces a list of strings, each string naming
749  one of the symbols that are currently bound but not yet resolved by  one of the symbols that are currently registered (i.e., ``virtually
750  the autoloading mechanism.  bound'') but not yet resolved by the autoloading mechanism.
751    
752  {\tt CM.State.synchronize} updates tables internal to CM to reflect  {\tt CM.State.synchronize} updates tables internal to CM to reflect
753  changes in the file system.  In particular, this will be necessary  changes in the file system.  In particular, this will be necessary
# Line 758  Line 801 
801  must be the result of an earlier call to {\tt CM.Server.start}.  must be the result of an earlier call to {\tt CM.Server.start}.
802  Function {\tt CM.Server.stop} uses CM's master-slave protocol to  Function {\tt CM.Server.stop} uses CM's master-slave protocol to
803  instruct the server to shut down gracefully.  Only if this fails it  instruct the server to shut down gracefully.  Only if this fails it
804  may become necessary to use {\tt CM.Server.kill} which will send a  may become necessary to use {\tt CM.Server.kill}, which will send a
805  Unix TERM signal to destroy the server.  Unix TERM signal to destroy the server.
806    
807  Given a server handle, function {\tt CM.Server.name} returns the  Given a server handle, function {\tt CM.Server.name} returns the
# Line 818  Line 861 
861  runtime system in order to perform stand-alone linkage of the given  runtime system in order to perform stand-alone linkage of the given
862  program. Upon failure, {\tt CM.mk\_standalone} returns {\tt NONE}.  program. Upon failure, {\tt CM.mk\_standalone} returns {\tt NONE}.
863    
864    \paragraph {\bf ml-build}: The programmer should normally have no need
865    to invoke {\tt CM.mk\_standalone} directly.  Instead, SML/NJ provides
866    a command {\tt ml-build} which does all the work.  To be able to use
867    {\tt ml-build}, one must implement a library exporting a structure
868    that has some function suitable to be an argument to {\tt
869    SMLofNJ.exportFn}.  Suppose the library is called {\tt myproglib.cm}, the
870    structure is called {\tt MyProg}, and the function is called {\tt
871    MyProg.main}.  If one wishes to produce a heap image file {\tt myprog}
872    one simply has to invoke the following command:
873    
874    \begin{verbatim}
875    ml-build myproglib.cm MyProg.main myprog
876    \end{verbatim}
877    
878  \subsubsection*{Finding all sources}  \subsubsection*{Finding all sources}
879    
880  The {\tt CM.sources} function can be used to find the names of all  The {\tt CM.sources} function can be used to find the names of all
# Line 924  Line 981 
981    
982  \subsubsection*{Sharing annotations}  \subsubsection*{Sharing annotations}
983    
984  ML source files can be specified as being {\em private} or {\em  ML source files in CM description files can be specified as being {\em
985  shared}.  This is done by adding a {\em tool parameter} specification  private} or {\em shared}.  This is done by adding a {\em tool
986  for the file in the library- or group description file (see  parameter} specification for the file in the library- or group
987  Section~\ref{sec:classes}).  In other words, to mark an ML file as  description file (see Section~\ref{sec:classes}).  In other words, to
988  {\em private}, follow the file name with the word {\tt private} in  mark an ML file as {\em private}, follow the file name with the word
989  parentheses.  For {\em shared} ML files, replace {\tt private} with  {\tt private} in parentheses.  For {\em shared} ML files, replace {\tt
990  {\tt shared}.  private} with {\tt shared}.
991    
992  An ML source file that is not annotated will typically be treated as  An ML source file that is not annotated will typically be treated as
993  {\em shared} unless it statically depends on some other {\em private}  {\em shared} unless it statically depends on some other {\em private}
994  source.  It is an error for a {\em shared} source to depend on a {\em  source.  It is an error, checked by CM, for a {\em shared} source to
995  private} source.  depend on a {\em private} source.
996    
997  \subsubsection*{Sharing with the interactive system}  \subsubsection*{Sharing with the interactive system}
998    
# Line 947  Line 1004 
1004    
1005  If a module from a library is used by both the interactive system and  If a module from a library is used by both the interactive system and
1006  a user program running under control of the interactive system, then  a user program running under control of the interactive system, then
1007  CM will let them share code and dynamic state.  CM will let them share code and dynamic state.  Moreover, the affected
1008    portion of the library will never have to be ``relinked''.
1009    
1010  \section{Version numbers}  \section{Version numbers}
1011  \label{sec:versions}  \label{sec:versions}
# Line 1035  Line 1093 
1093    
1094  CM automatically classifies files with a {\tt .sml} suffix, a {\tt  CM automatically classifies files with a {\tt .sml} suffix, a {\tt
1095  .sig} suffix, or a {\tt .fun} suffix as ML-source, file names ending  .sig} suffix, or a {\tt .fun} suffix as ML-source, file names ending
1096  in {\tt .cm}] as CM descriptions.\footnote{Suffixes that are not known  in {\tt .cm} as CM descriptions.\footnote{Suffixes that are not known
1097  and for which no plugin module can be found are treated as ML source  and for which no plugin module can be found are treated as ML source
1098  code.  However, as new tools are added there is no guarantee that  code.  However, as new tools are added there is no guarantee that
1099  this behavior will be preserved in future versions of CM.}  this behavior will be preserved in future versions of CM.}
# Line 1332  Line 1390 
1390  \label{sec:preproc}  \label{sec:preproc}
1391    
1392  In its description files, CM offers a simple conditional compilation  In its description files, CM offers a simple conditional compilation
1393  facility inspired by the pre-processor for the C language~\cite{k&r2}.  facility inspired by the preprocessor for the C language~\cite{k&r2}.
1394  However, it is not really a {\it pre}-processor, and the syntax of the  However, it is not really a {\it pre}-processor, and the syntax of the
1395  controlling expressions is borrowed from SML.  controlling expressions is borrowed from SML.
1396    
# Line 1437  Line 1495 
1495  Here, the file {\tt bar-client.sml} gets included if {\tt  Here, the file {\tt bar-client.sml} gets included if {\tt
1496  SMLNJ\_VERSION} is greater than 110 and {\tt new-foo.sml} exports a  SMLNJ\_VERSION} is greater than 110 and {\tt new-foo.sml} exports a
1497  structure {\tt Bar} {\em or} if {\tt SMLNJ\_VERSION <= 110} and {\tt  structure {\tt Bar} {\em or} if {\tt SMLNJ\_VERSION <= 110} and {\tt
1498  old-foo.sml} exports structure {\tt Bar}. \\  old-foo.sml} exports structure {\tt Bar}.
1499  Otherwise {\tt no-bar-so-far.sml} gets included instead.  In addition,  Otherwise {\tt no-bar-so-far.sml} gets included instead.  In addition,
1500  the export of structure {\tt Bar} is guarded by its own existence.  the export of structure {\tt Bar} is guarded by its own existence.
1501  (Structure {\tt Bar} could also be defined by {\tt no-bar-so-far.sml}  (Structure {\tt Bar} could also be defined by {\tt no-bar-so-far.sml}
# Line 1448  Line 1506 
1506    
1507  A pseudo-member of the form {\tt \#error $\ldots$}, which---like other  A pseudo-member of the form {\tt \#error $\ldots$}, which---like other
1508  {\tt \#}-items---starts in the first column and extends to the end of  {\tt \#}-items---starts in the first column and extends to the end of
1509  the line, causes an explicit error message unless it gets excluded by  the line, causes an explicit error message to be printed unless it
1510  the conditional compilation logic.  The error message is given by the  gets excluded by the conditional compilation logic.  The error message
1511  remainder of the line after the word {\tt error}.  is given by the remainder of the line after the word {\tt error}.
   
 \subsection{EBNF for expressions}  
   
 \begin{tabular}{rcl}  
 \nt{letter} &\ar& \tl{A} \vb $\ldots$ \vb \tl{Z} \vb \tl{a} \vb $\ldots$ \vb \tl{z} \\  
 \nt{digit}  &\ar& \tl{0} \vb $\ldots$ \vb \tl{9} \\  
 \nt{ldau}   &\ar& \nt{letter} \vb \nt{digit} \vb \tl{'} \vb \tl{\_} \\  
 \\  
 \nt{number} &\ar& \nt{digit} \{\nt{digit}\} \\  
 \nt{sym}    &\ar& \nt{letter} \{\nt{ldau}\} \\  
 \\  
 \nt{aatom}  &\ar& \nt{number} \vb \nt{sym} \vb \tl{(} \nt{asum} \tl{)} \vb \tl{$\tilde{~}$} \nt{aatom} \\  
 \nt{aprod}  &\ar& \{\nt{aatom} (\tl{*} \vb \tl{div} \vb \tl{mod})\} \nt{aatom} \\  
 \nt{asum}   &\ar& \{\nt{aprod} (\tl{+} \vb \tl{-})\} \nt{aprod} \\  
 \\  
 \nt{ns}     &\ar& \tl{structure} \vb \tl{signature} \vb \tl{functor} \vb \tl{funsig} \\  
 \nt{mlsym}  &\ar& {\em a Standard ML identifier} \\  
 \nt{query}  &\ar& \tl{defined} \tl{(} \nt{sym} \tl{)} \vb \tl{defined} \tl{(} \nt{ns} \nt{mlsym} \tl{)} \\  
 \\  
 \nt{acmp}   &\ar& \nt{aexp} (\ttl{<} \vb \ttl{<=} \vb \ttl{>} \vb \ttl{>=} \vb \ttl{=} \vb \ttl{<>}) \nt{aexp} \\  
 \\  
 \nt{batom}  &\ar& \nt{query} \vb \nt{acmp} \vb \tl{not} \nt{batom} \vb \tl{(} \nt{bdisj} \tl{)} \\  
 \nt{bcmp}   &\ar& \nt{batom} [(\ttl{=} \vb \ttl{<>}) \nt{batom}] \\  
 \nt{bconj}  &\ar& \{\nt{bcmp} \tl{andalso}\} \nt{bcmp} \\  
 \nt{bdisj}  &\ar& \{\nt{bconj} \tl{orelse}\} \nt{bconj} \\  
 \\  
 \nt{expression} &\ar& \nt{bdisj}  
 \end{tabular}  
1512    
1513  \section{Access control}  \section{Access control}
1514  \label{sec:access}  \label{sec:access}
# Line 1538  Line 1568 
1568  a genuine CM library.)  a genuine CM library.)
1569    
1570  The pervasive environment is the only place where CM conveys  The pervasive environment is the only place where CM conveys
1571  non-modular bindings from one compilation unit to another.  non-modular bindings from one compilation unit to another, and its
1572    definition is fixed.
1573    
1574  \section{Files}  \section{Files}
1575  \label{sec:files}  \label{sec:files}
# Line 1558  Line 1589 
1589  source file.  source file.
1590  \item {\it Library files} (sometimes called: {\em stablefiles}) contain  \item {\it Library files} (sometimes called: {\em stablefiles}) contain
1591  dependency graph, executable code, and symbol tables for an entire CM  dependency graph, executable code, and symbol tables for an entire CM
1592  library including all of its components (groups).  library including all of its components (groups).  Other libraries
1593    used by a stable library are not included in full.  Instead,
1594    references to those libraries are recorded using their (preferably
1595    anchored) pathnames.
1596  \end{enumerate}  \end{enumerate}
1597    
1598  Normally, all these files are stored in a subdirectory of directory  Normally, all these files are stored in a subdirectory of directory
# Line 1598  Line 1632 
1632    
1633  \subsection{Time stamps}  \subsection{Time stamps}
1634    
1635  For skeleton files and binfiles, CM uses file system time stamps to  For skeleton files and binfiles, CM uses file system time stamps
1636  determine whether a file has become outdated.  The rule is that in  (i.e., modification time) to determine whether a file has become
1637  order to be considered ``up-to-date'' the time stamp on skeleton file  outdated.  The rule is that in order to be considered ``up-to-date''
1638  and binfile has to be exactly the same as the one on the ML source  the time stamp on skeleton file and binfile has to be exactly the
1639  file.  This guarantees that all changes to a source will be  same\footnote{CM explicitly sets the time stamp to be the same.} as
1640  noticed\footnote{except for the pathological case where two different  the one on the ML source file.  This guarantees that all changes to a
1641  versions of the same source file have exactly the same time stamp}.  source will be noticed\footnote{except for the pathological case where
1642    two different versions of the same source file have exactly the same
1643    time stamp}.
1644    
1645  CM also uses time stamps to decide whether tools such as ML-Yacc or  CM also uses time stamps to decide whether tools such as ML-Yacc or
1646  ML-Lex need to be run (see Section~\ref{sec:tools}).  However, the  ML-Lex need to be run (see Section~\ref{sec:tools}).  However, the
# Line 1648  Line 1684 
1684    
1685  This code can either be packaged as a CM library or entered at the  This code can either be packaged as a CM library or entered at the
1686  interactive top level after loading the {\tt \$smlnj/cm/tools.cm} library  interactive top level after loading the {\tt \$smlnj/cm/tools.cm} library
1687  (via {\tt CM.make} or {\tt CM.load\_plugin}).  via {\tt CM.make} or {\tt CM.load\_plugin}.  ({\tt CM.autoload} is not
1688    enough because of its lazy nature which prevents the required
1689    side-effects to occur.)
1690    
1691  In our example, the shell command name for our tool is {\tt  In our example, the shell command name for our tool is {\tt
1692  new-ml-yacc}.  When looking for this command in the file system, CM  new-ml-yacc}.  When looking for this command in the file system, CM
# Line 1663  Line 1701 
1701  tool for it.  The arguments must be specified as follows:  tool for it.  The arguments must be specified as follows:
1702    
1703  \begin{description}  \begin{description}
1704  \item[tool] a descriptive name of the tool (used in error messages)  \item[tool] a descriptive name of the tool (used in error messages);
1705    type: {\tt string}
1706  \item[class] the name of the class; the string must not contain  \item[class] the name of the class; the string must not contain
1707  upper-case letters  upper-case letters; type: {\tt string}
1708  \item[suffixes] a list of file name suffixes that let CM automatically  \item[suffixes] a list of file name suffixes that let CM automatically
1709  recognize files of the class  recognize files of the class; type: {\tt string list}
1710  \item[cmdStdPath] the command string from above  \item[cmdStdPath] the command string from above; type: {\tt string}
1711  \item[template] an optional string that describes how the command line  \item[template] an optional string that describes how the command line
1712  is to be constructed from pieces; \\  is to be constructed from pieces; \\
1713  The string is taken verbatim except for embedded \% format specifiers:  The string is taken verbatim except for embedded \% format specifiers:
# Line 1694  Line 1733 
1733    \end{description}    \end{description}
1734  If no template string is given, then it defaults to {\tt "\%c \%s"}.  If no template string is given, then it defaults to {\tt "\%c \%s"}.
1735  \item[extensionStyle] a specification of how the names of files  \item[extensionStyle] a specification of how the names of files
1736  generated by the tool relate to the name of the tool input file; \\  generated by the tool relate to the name of the tool input file;
1737    type: {\tt Tools.extensionStyle}. \\
1738  Currently, there are two possible cases:  Currently, there are two possible cases:
1739  \begin{enumerate}  \begin{enumerate}
1740  \item ``{\tt Tools.EXTEND} $l$'' says that if the tool source file is  \item ``{\tt Tools.EXTEND} $l$'' says that if the tool source file is
# Line 1717  Line 1757 
1757  optionally specify the member class name of the corresponding derived  optionally specify the member class name of the corresponding derived
1758  file, and the third component maps source options to target options.  file, and the third component maps source options to target options.
1759  \end{enumerate}  \end{enumerate}
1760  \item[dflopts] a list of strings which is used for  \item[dflopts] a list of tool options which is used for
1761  substituting {\bf \%$n$o} fields in {\tt template} (see above) if no  substituting {\bf \%$n$o} fields in {\tt template} (see above) if no
1762  options were specified.  (Note that the value of {\tt dflopts} is never  options were specified.  (Note that the value of {\tt dflopts} is never
1763  passed to the option mappers in {\tt Tools.EXTEND} or {\tt  passed to the option mappers in {\tt Tools.EXTEND} or {\tt
1764  Tools.REPLACE}.)  Tools.REPLACE}.)  Type: {\tt Tools.toolopts}.
1765  \end{description}  \end{description}
1766    
1767  Less common kinds of rules can also be defined using the generic  Less common kinds of rules can also be defined using the generic
# Line 1732  Line 1772 
1772  If CM comes across a member class name $c$ that it does not know  If CM comes across a member class name $c$ that it does not know
1773  about, then it tries to load a plugin module named {\tt \$}$c${\tt  about, then it tries to load a plugin module named {\tt \$}$c${\tt
1774  -tool.cm} or {\tt ./}$c${\tt -tool.cm}.  If it sees a file whose name  -tool.cm} or {\tt ./}$c${\tt -tool.cm}.  If it sees a file whose name
1775  ends in suffix $s$ for which no member class has been specified and  ends in suffix $s$ for which no explicit member class has been
1776  for which member classification fails, then it tries to load a plugin  specified in the CM description file and for which automatic
1777  module named {\tt \$}$s${\tt -ext.cm} or {\tt ./}$s${\tt -ext.cm}.  member classification fails, then it tries to load a plugin module
1778  The so-loaded module can then register the required tool which enables  named {\tt \$}$s${\tt -ext.cm} or {\tt ./}$s${\tt -ext.cm}.  The
1779  CM to successfully deal with the previously unknown member.  so-loaded module can then register the required tool which enables CM
1780    to successfully deal with the previously unknown member.
1781    
1782  This mechanism makes it possible for new tools to be added by simply  This mechanism makes it possible for new tools to be added by simply
1783  placing appropriately-named plug-in libraries in such a way that CM  placing appropriately-named plug-in libraries in such a way that CM
# Line 2009  Line 2050 
2050    
2051  For the new {\tt f.sml} to be compiled successfully it must be placed  For the new {\tt f.sml} to be compiled successfully it must be placed
2052  into a library {\tt f.cm} that mentions {\tt f-hook.cm} and {\tt  into a library {\tt f.cm} that mentions {\tt f-hook.cm} and {\tt
2053  full-cm.cm}.  As we have seen, {\tt f-hook.cm} exports {\tt F\_Hook.f}  \$smlnj/cm/full.cm}.  As we have seen, {\tt f-hook.cm} exports {\tt
2054  and {\tt \$smlnj/cm/full.cm} is needed\footnote{The reduced version of  F\_Hook.f} and {\tt \$smlnj/cm/full.cm} is needed because it exports
2055  structure {\tt CM} as exported by library {\tt \$smlnj/cm/minimal.cm} would  {\tt CM.make}:
 have been sufficient, too.}  because it exports {\tt CM.make}:  
2056    
2057  \begin{verbatim}  \begin{verbatim}
2058  Library  Library
# Line 2020  Line 2060 
2060  is  is
2061          f.sml          f.sml
2062          f-hook.cm          f-hook.cm
2063          $smlnj/cm/full.cm (* or $smlnj/cm/minimal.cm *)          $smlnj/cm.cm (* or $smlnj/cm/full.cm *)
2064  \end{verbatim}  \end{verbatim}
2065    
2066  \noindent{\bf Beware!}  This solution makes use of {\tt \$smlnj/cm/full.cm}  \noindent{\bf Beware!}  This solution makes use of {\tt \$smlnj/cm.cm}
2067  which in turn requires the SML/NJ compiler to be present.  Therefore,  which in turn requires the SML/NJ compiler to be present.  Therefore,
2068  is worthwhile only for really large program modules where the benefits  is worthwhile only for really large program modules where the benefits
2069  of their absence are not outweighed be the need for the compiler.  of their absence are not outweighed be the need for the compiler.
# Line 2035  Line 2075 
2075  and its SML/NJ implementation~\cite{appel91:sml}.  and its SML/NJ implementation~\cite{appel91:sml}.
2076    
2077  The current version is preceded by several other compilation managers,  The current version is preceded by several other compilation managers,
2078  the most recent goin by the same name ``CM''~\cite{blume95:cm}, while  the most recent going by the same name ``CM''~\cite{blume95:cm}, while
2079  earlier ones were known as IRM ({\it Incremental Recompilation  earlier ones were known as IRM ({\it Incremental Recompilation
2080  Manager})~\cite{harper94:irm} and SC (for {\it Separate  Manager})~\cite{harper94:irm} and SC (for {\it Separate
2081  Compilation})~\cite{harper-lee-pfenning-rollins-CM}.  CM owes many  Compilation})~\cite{harper-lee-pfenning-rollins-CM}.  CM owes many
# Line 2050  Line 2090 
2090    
2091  \pagebreak  \pagebreak
2092    
2093    \appendix
2094    
2095    \section{CM description file syntax}
2096    
2097    \subsection{Lexical Analysis}
2098    
2099    The CM parser employs a context-sensitive scanner.  In many cases this
2100    avoids the need for ``escape characters'' or other lexical devices
2101    that would make writing description files cumbersome.  On the other
2102    hand, it increases the complexity of both documentation and implementation.
2103    
2104    The scanner skips all nestable SML-style comments (enclosed with {\bf
2105    (*} and {\bf *)}).
2106    
2107    Lines starting with {\bf \#line} may list up to three fields separated
2108    by white space.  The first field is taken as a line number and the
2109    last field (if more than one field is present) as a file name.  The
2110    optional third (middle) field specifies a column number.  A line of
2111    this form resets the scanner's idea about the name of the file that it
2112    is currently processing and about the current position within that
2113    file.  If no file is specified, the default is the current file.  If
2114    no column is specified, the default is the first column of the
2115    (specified) line.  This feature is meant for program-generators or
2116    tools such as {\tt noweb} but is not intended for direct use by
2117    programmers.
2118    
2119    The following lexical classes are recognized:
2120    
2121    \begin{description}
2122    \item[Namespace specifiers:] {\bf structure}, {\bf signature},
2123    {\bf functor}, or {\bf funsig}.  These keywords are recognized
2124    everywhere.
2125    \item[CM keywords:] {\bf group}, {\bf Group}, {\bf GROUP}, {\bf
2126    library}, {\bf Library}, {\bf LIBRARY}, {\bf is}, {\bf IS}.  These
2127    keywords are recognized everywhere except within ``preprocessor''
2128    lines (lines starting with {\bf \#}) or following one of the SML
2129    keywords.
2130    \item[Preprocessor control keywords:] {\bf \#if}, {\bf \#elif}, {\bf
2131    \#else}, {\bf \#endif}, {\bf \#error}.  These keywords are recognized
2132    only at the beginning of the line and indicate the start of a
2133    ``preprocessor'' line.  The initial {\bf \#} character may be
2134    separated from the rest of the token by white space (but not by comments).
2135    \item[Preprocessor operator keywords:] {\bf defined}, {\bf div}, {\bf
2136    mod}, {\bf andalso}, {\bf orelse}, {\bf not}.  These keywords are
2137    recognized only when they occur within ``preprocessor'' lines.  Even
2138    within such lines, they are not recognized as keywords when they
2139    directly follow a namespace specifier---in which case they are
2140    considered SML identifiers.
2141    \item[SML identifiers (\nt{mlid}):] Recognized SML identifiers
2142    include all legal identifiers as defined by the SML language
2143    definition. (CM also recognizes some tokens as SML identifiers that
2144    are really keywords according to the SML language definiten. However,
2145    this can never cause problems in practice.)  SML identifiers are
2146    recognized only when they directly follow one of the namespace
2147    specifiers.
2148    \item[CM identifiers (\nt{cmid}):] CM identifiers have the same form
2149    as those ML identifiers that are made up solely of letters, decimal
2150    digits, apostrophes, and underscores.  CM identifiers are recognized when they
2151    occur within ``preprocessor'' lines, but not when they directly follow
2152    some namespace specifier.
2153    \item[Numbers (\nt{number}):] Numbers are non-empty sequences of
2154    decimal digits.  Numbers are recognized only within ``preprocessor''
2155    lines.
2156    \item[Preprocessor operators:] The following unary and binary operators are
2157    recognized when they occur within ``preprocessor'' lines: {\tt +},
2158    {\tt -}, {\tt *}, {\tt /}, {\tt \%}, {\tt <>}, {\tt !=}, {\tt <=},
2159    {\tt <}, {\tt >=}, {\tt >}, {\tt ==}, {\tt =}, $\tilde{~}$, {\tt
2160    \&\&}, {\tt ||}, {\tt !}.  Of these, the following (``C-style'')
2161    operators are considered obsolete and trigger a warning
2162    message\footnote{The use of {\tt -} as a unary minus also triggers
2163    this warning.} as long as {\tt CM.Control.warn\_obsolete} is set to
2164    {\tt true}: {\tt /}, {\tt \%}, {\tt !=}, {\tt ==}, {\tt \&\&}, {\tt
2165    ||}, {\tt !}.
2166    \item[Standard path names (\nt{stdpn}):] Any non-empty sequence of
2167    upper- and lower-case letters, decimal digits, and characters drawn
2168    from {\tt '\_.;,!\%\&\$+/<=>?@$\tilde{~}$|\#*-\verb|^|} that occurs
2169    outside of ``preprocessor'' lines and is neither a namespace specifier
2170    nor a CM keyword will be recognized as a stardard path name.  Strings
2171    that lexically constitute standard path names are usually---but not
2172    always---interpreted as file names. Sometimes they are simply taken as
2173    literal strings.  When they act as file names, they will be
2174    interpreted according to CM's {\em standard syntax} (see
2175    Section~\ref{sec:basicrules}).  (Member class names, names of
2176    privileges, and many tool optios are also specified as standard path
2177    names even though in these cases no actual file is being named.)
2178    \item[Native path names (\nt{ntvpn}):] A token that has the form of an
2179    SML string is considered a native path name.  The same rules as in SML
2180    regarding escape characters apply.  Like their ``standard''
2181    counterparts, native path names are not always used to actually name
2182    files, but when they are, they use the native file name syntax of the
2183    underlying operating system.
2184    \item[Punctuation:] A colon {\bf :} is recognized as a token
2185    everywhere except within ``preprocessor'' lines. Parentheses {\bf ()}
2186    are recognized everywhere.
2187    \end{description}
2188    
2189    \subsection{EBNF for preprocessor expressions}
2190    
2191    \noindent{\em Lexical conventions:}\/ Syntax definitions use {\em
2192    Extended Backus-Naur Form} (EBNF).  This means that vertical bars
2193    \vb separate two or more alternatives, curly braces \{\} indicate
2194    zero or more copies of what they enclose (``Kleene-closure''), and
2195    square brackets $[]$ specify zero or one instances of their enclosed
2196    contents.  Round parentheses () are used for grouping.  Non-terminal
2197    symbols appear in \nt{this}\/ typeface; terminal symbols are
2198    \tl{underlined}.
2199    
2200    \noindent The following set of rules defines the syntax for CM's
2201    preprocessor expressions (\nt{ppexp}):
2202    
2203    \begin{tabular}{rcl}
2204    \nt{aatom}  &\ar& \nt{number} \vb \nt{cmid} \vb \tl{(} \nt{asum} \tl{)} \vb (\ttl{$\tilde{~}$} \vb \ttl{-}) \nt{aatom} \\
2205    \nt{aprod}  &\ar& \{\nt{aatom} (\ttl{*} \vb \tl{div} \vb \tl{mod}) \vb \ttl{/} \vb \ttl{\%} \} \nt{aatom} \\
2206    \nt{asum}   &\ar& \{\nt{aprod} (\ttl{+} \vb \ttl{-})\} \nt{aprod} \\
2207    \\
2208    \nt{ns}     &\ar& \tl{structure} \vb \tl{signature} \vb \tl{functor} \vb \tl{funsig} \\
2209    \nt{mlsym}  &\ar& \nt{ns} \nt{mlid} \\
2210    \nt{query}  &\ar& \tl{defined} \tl{(} \nt{cmid} \tl{)} \vb \tl{defined} \tl{(} \nt{mlsym} \tl{)} \\
2211    \\
2212    \nt{acmp}   &\ar& \nt{asum} (\ttl{<} \vb \ttl{<=} \vb \ttl{>} \vb \ttl{>=} \vb \ttl{=} \vb \ttl{==} \vb \ttl{<>} \vb \ttl{!=}) \nt{asum} \\
2213    \\
2214    \nt{batom}  &\ar& \nt{query} \vb \nt{acmp} \vb (\tl{not} \vb \ttl{!}) \nt{batom} \vb \tl{(} \nt{bdisj} \tl{)} \\
2215    \nt{bcmp}   &\ar& \nt{batom} [(\ttl{=} \vb \ttl{==} \vb \ttl{<>} \vb \ttl{!=}) \nt{batom}] \\
2216    \nt{bconj}  &\ar& \{\nt{bcmp} (\tl{andalso} \vb \ttl{\&\&})\} \nt{bcmp} \\
2217    \nt{bdisj}  &\ar& \{\nt{bconj} (\tl{orelse} \vb \ttl{||})\} \nt{bconj} \\
2218    \\
2219    \nt{ppexp} &\ar& \nt{bdisj}
2220    \end{tabular}
2221    
2222    \subsection{EBNF for export lists}
2223    
2224    The following set of rules defines the syntax for export lists (\nt{elst}):
2225    
2226    \begin{tabular}{rcl}
2227    \nt{guardedexport} &\ar& \{ \nt{export} \} (\tl{\#endif} \vb \tl{\#else} \{ \nt{export} \} \tl{\#endif} \vb \tl{\#elif} \nt{ppexp} \nt{guardedexports}) \\
2228    \nt{export}        &\ar& \nt{mlsym} \vb \tl{\#if} \nt{ppexp} \nt{guardedexports} \vb \tl{\#error}  \\
2229    \nt{elst}       &\ar& \nt{export} \{ \nt{export} \} \\
2230    \end{tabular}
2231    
2232    \subsection{EBNF for tool options}
2233    
2234    The following set of rules defines the syntax for tool options
2235    (\nt{toolopts}):
2236    
2237    \begin{tabular}{rcl}
2238    \nt{pathname} &\ar& \nt{stdpn} \vb \nt{ntvpn} \\
2239    \nt{toolopts} &\ar& \{ \nt{pathname} [\tl{:} (\tl{(} \nt{toolopts} \tl{)} \vb \nt{pathname})] \}
2240    \end{tabular}
2241    
2242    \subsection{EBNF for member lists}
2243    
2244    The following set of rules defines the syntax for member lists (\nt{members}):
2245    
2246    \begin{tabular}{rcl}
2247    \nt{class}          &\ar& \nt{stdpn} \\
2248    \nt{member}         &\ar& \nt{pathname} [\tl{:} \nt{class}] [\tl{(} \nt{toolopts} \tl{)}] \\
2249    \nt{guardedmembers} &\ar& \nt{members} (\tl{\#endif} \vb \tl{\#else} \nt{members} \tl{\#endif} \vb \tl{\#elif} \nt{ppexp} \nt{guardedmembers}) \\
2250    \nt{members}        &\ar& \{ (\nt{member} \vb \tl{\#if} \nt{ppexp} \nt{guardedmembers} \vb \tl{\#error})\}
2251    \end{tabular}
2252    
2253    \subsection{EBNF for library descriptions}
2254    
2255    The following set of rules defines the syntax for library descriptions
2256    (\nt{library}).  Notice that although the syntax used for \nt{version}
2257    is the same as that for \nt{stdpn}, actual version strings will
2258    undergo further analysis according to the rules given in
2259    section~\ref{sec:versions}:
2260    
2261    \begin{tabular}{rcl}
2262    \nt{libkw}     &\ar& \tl{library} \vb \tl{Library} \vb \tl{LIBRARY} \\
2263    \nt{version}   &\ar& \nt{stdpn} \\
2264    \nt{privilege} &\ar& \nt{stdpn} \\
2265    \nt{lprivspec} &\ar& \{ \nt{privilege} \vb \tl{(} \{ \nt{privilege} \} \tl{)} \} \\
2266    \nt{library}   &\ar& [\nt{lprivspec}] \nt{libkw} [\tl{(} \nt{version} \tl{)}] \nt{elst} (\tl{is} \vb \tl{IS}) \nt{members}
2267    \end{tabular}
2268    
2269    \subsection{EBNF for library component descriptions (group descriptions)}
2270    
2271    The main differences between group- and library-syntax can be
2272    summarized as follows:
2273    
2274    \begin{itemize}\setlength{\itemsep}{0pt}
2275    \item Groups use keyword \tl{group} instead of \tl{library}.
2276    \item Groups may have an empty export list.
2277    \item Groups cannot wrap privileges, i.e., names of privileges (in
2278    front of the \tl{group} keyword) never appear within parentheses.
2279    \item Groups have no version.
2280    \item Groups have an optional owner.
2281    \end{itemize}
2282    
2283    \noindent The following set of rules defines the syntax for library
2284    component (group) descriptions (\nt{group}):
2285    
2286    \begin{tabular}{rcl}
2287    \nt{groupkw}   &\ar& \tl{group} \vb \tl{Group} \vb \tl{GROUP} \\
2288    \nt{owner}     &\ar& \nt{pathname} \\
2289    \nt{gprivspec} &\ar& \{ \nt{privilege} \} \\
2290    \nt{group}     &\ar& [\nt{gprivspec}] \nt{groupkw} [\tl{(} \nt{owner} \tl{)}] [\nt{elst}] (\tl{is} \vb \tl{IS}) \nt{members}
2291    \end{tabular}
2292    
2293    \section{Full signature of {\tt structure CM}}
2294    
2295    Structure {\tt CM} serves as the compilation manager's user interface
2296    and also constitutes the major part of the API.  The structure is the
2297    (only) export of library {\tt \$smlnj/cm.cm}.  The standard
2298    installation procedure of SML/NJ registers this library for
2299    autoloading at the interactive top level.
2300    
2301    \begin{verbatim}
2302    signature CM = sig
2303    
2304        val autoload : string -> bool
2305        val make : string -> bool
2306        val recomp : string -> bool
2307        val stabilize : bool -> string -> bool
2308    
2309        type 'a controller = { get : unit -> 'a, set : 'a -> unit }
2310    
2311        structure Anchor : sig
2312            val anchor : string -> string option controller
2313            val reset : unit -> unit
2314        end
2315    
2316        structure Control : sig
2317            val keep_going : bool controller
2318            val verbose : bool controller
2319            val parse_caching : int controller
2320            val warn_obsolete : bool controller
2321            val debug : bool controller
2322            val conserve_memory : bool controller
2323            val implicit_anchors : bool controller
2324        end
2325    
2326        structure Library : sig
2327            type lib
2328            val known : unit -> lib list
2329            val descr : lib -> string
2330            val osstring : lib -> string
2331            val dismiss : lib -> unit
2332            val unshare : lib -> unit
2333        end
2334    
2335        structure State : sig
2336            val synchronize : unit -> unit
2337            val reset : unit -> unit
2338            val pending : unit -> string list
2339        end
2340    
2341        structure Server : sig
2342            type server
2343            val start : { cmd : string * string list,
2344                          name : string,
2345                          pathtrans : (string -> string) option,
2346                          pref : int } -> server option
2347            val stop : server -> unit
2348            val kill : server -> unit
2349            val name : server -> string
2350        end
2351    
2352        val sources :
2353            { arch: string, os: string } option ->
2354            string -> { file: string, class: string, derived: bool } list option
2355    
2356        val symval : string -> int option controller
2357        val load_plugin : string -> bool
2358    
2359        val mk_standalone : bool option -> string -> string list option
2360    end
2361    
2362    structure CM : CM
2363    \end{verbatim}
2364    
2365    \section{Listing of all pre-defined CM identifiers}
2366    
2367    \begin{center}
2368    \begin{tabular}{l||c|c|c|c|c|c|c}
2369       & Alpha32 & HP-PA & PowerPC & PowerPC & Sparc & IA32 & IA32 \\
2370       & Unix & Unix & MACOS & Unix & Unix & Unix & Win32 \\
2371    \hline \hline
2372    {\tt ARCH\_ALPHA32}  & 1 & & & & & & \\
2373    {\tt ARCH\_HPPA}     & & 1 & & & & & \\
2374    {\tt ARCH\_PPC}      & & & 1 & 1 & & & \\
2375    {\tt ARCH\_SPARC}    & & & & & 1 & & \\
2376    {\tt ARCH\_X86}      & & & & & & 1 & 1 \\
2377    {\tt OPSYS\_UNIX}    & 1 & 1 & & 1 & 1 & 1 & \\
2378    {\tt OPSYS\_MACOS}   & & & 1 & & & & \\
2379    {\tt OPSYS\_WIN32}   & & & & & & & 1 \\
2380    {\tt BIG\_ENDIAN}    & & & & & 1 & & \\
2381    {\tt LITTLE\_ENDIAN} & 1 & 1 & 1 & 1 & & 1 & 1 \\
2382    {\tt SIZE\_32}       & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
2383    {\tt NEW\_CM}        & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\
2384    {\tt SMLNJ\_VERSION} & \smlmj & \smlmj & \smlmj & \smlmj & \smlmj & \smlmj & \smlmj \\
2385    {\tt SMLNJ\_MINOR\_VERSION} & \smlmn & \smlmn & \smlmn & \smlmn & \smlmn & \smlmn & \smlmn
2386    \end{tabular}
2387    \end{center}
2388    
2389    \section{Listing of all CM-specific environment variables}
2390    
2391    Most control parameters that affect CM's operation can be adjusted
2392    using environment variables $v_s$ at startup time, i.e,
2393    when the {\tt sml} command is invoked.  Each such parameter has a
2394    default setting.  Default settings are determined at bootstrap time,
2395    i.e., the time when the heap image for SML/NJ's interactive system is
2396    built.\footnote{Normally this is the same as installation time, but
2397    for SML/NJ compiler there is also a {\tt makeml} script for the
2398    purpose of bootstrapping.}
2399    
2400    At bootstrap time, it is possible to adjust defaults by using a
2401    different set of environment variables $v_b$.  The rule
2402    is that if parameter $x$ is adjustable using variable {\tt CM\_$X$},
2403    then the default is adjustable at bootstrap time using varibable {\tt
2404    CM\_$X$\_DEFAULT}.  If neither variable was set, a hard-wired fallback
2405    value will be used.
2406    
2407    Since the normal installation procedure for SML/NJ sets some of the
2408    {\tt CM\_$X$\_DEFAULT} variables at bootstrap time, there are two
2409    columns with default values in the following table.  The value labeled
2410    {\em fallback} is the one that would have been used had there been no
2411    environment variable at bootrap time, the one labeled {\em default} is
2412    the one the user will actually see.
2413    
2414    To save space, the table only lists the {\em stem} of each variable
2415    name.  If the stem is $X$, then $v_s$ has the form {\tt CM\_$X$} and
2416    $v_b$ has the form {\tt CM\_$X$\_DEFAULT}.  For example, CM's
2417    verbosity can be adjusted using {\tt CM\_VERBOSE} and the default can
2418    be set using {\tt CM\_VERBOSE\_DEFAULT}.
2419    
2420    \begin{center}
2421    \begin{small}
2422    \begin{tabular}{@{}l||c|c|c|c|p{1.5in}@{}}
2423    {\tt CM.Control.}$c$ & stem & type & fallback & default & default's meaning \\
2424    \hline \hline
2425    {\tt verbose} & {\tt VERBOSE} & {\tt bool} & {\tt true} & same & issue
2426    progess messages \\
2427    {\tt debug} & {\tt DEBUG} & {\tt bool} & {\tt false} & same & do not
2428    issue debug messages \\
2429    {\tt keep\_going} & {\tt KEEP\_GOING} & {\tt bool} & {\tt false} &
2430    same & quit on first error \\
2431    (none) & {\tt PATHCONFIG} & {\tt string} & see below & see below &
2432    standard library directory of SML/NJ installation \\
2433    {\tt parse\_caching} & {\tt PARSE\_CACHING} & {\tt int} & {\tt 100} &
2434    same & at most 100 parse trees will be cached in main memory \\
2435    (none) & {\tt LOCAL\_PATHCONFIG} & {\tt string} & see below & same &
2436    user-specific path configuration file \\
2437    {\tt warn\_obsolete} & {\tt WARN\_OBSOLETE} & {\tt bool} & {\tt true}
2438    & same & issue warnings about obsolete C-style operators in
2439    description files \\
2440    {\tt conserve\_memory} & {\tt CONSERVE\_MEMORY} & {\tt bool} & {\tt
2441    false} & same & avoid repeated I/O operations by keeping certain
2442    information in main memory \\
2443    {\tt implicit\_anchors} & {\tt IMPLICIT\_ANCHORS} & {\tt bool} & {\tt
2444    true} & same & recognize implicitly anchored paths
2445    \end{tabular}
2446    \end{small}
2447    \end{center}
2448    
2449    The fallback for {\tt PATHCONFIG} is {\tt /usr/lib/smlnj-pathconfig},
2450    but the standard installation overrides this and uses {\tt
2451    \$INSTALLDIR/lib/pathconfig} (where {\tt \$INSTALLDIR} is the SML/NJ
2452    installation directory) instead.
2453    
2454    The default for the ``local'' path configuration file is {\tt
2455    .smlnj-pathconfig}. This file is located in the user's home directory
2456    (given by the environment variable {\tt \$HOME}).
2457    
2458    \section{Listing of all class names and their tools}
2459    
2460    \begin{center}
2461    \begin{tabular}{c|l|c|l}
2462    class & file contents & tool & file name suffixes \\
2463    \hline\hline
2464    sml & ML source code & built-in & {\tt .sig}, {\tt .sml}, {\tt .fun} \\
2465    cm  & CM description file & built-in & {\tt .cm} \\
2466    mlyacc & ML-Yacc grammar & ml-yacc & {\tt .grm}, {\tt .y} \\
2467    mllex & ML-Lex specification & ml-lex & {\tt .lex}, {\tt .l} \\
2468    mlburg & ML-Burg specification & ml-burg & {\tt .burg} \\
2469    noweb & literate program & noweb & {\tt .nw} \\
2470    make & makefile & make & \\
2471    shell & arbitrary & shell command &
2472    \end{tabular}
2473    \end{center}
2474    
2475    \section{Available libraries}
2476    
2477    Compiler and interactive system of SML/NJ consist of several hundred
2478    individual compilation units.  Like modules of application programs,
2479    these compilation units are also organized using CM libraries.
2480    
2481    Some of the libraries that make up SML/NJ are actually the same ones
2482    that application programmers are likely to use, others exist for
2483    organizational purposes only.  There are ``plugin'' libraries---mainly
2484    for the CM ``tools'' subsystem---that will be automatically loaded on
2485    demand, and libraries such as {\tt \$smlnj/cmb.cm} can be used to
2486    obtain access to functionality that by default is not present.
2487    
2488    \subsection{Libraries for general programming}
2489    
2490    Libraries listed in the following table provide a broad palette of
2491    general-purpose programming tools\footnote{Recall that anchored paths
2492    of the form {\tt \$$/x[/\cdots]$} act as an abbreviation for {\tt
2493    \$$x/x[/\cdots]$}.}:
2494    
2495    \begin{center}
2496    \begin{tabular}{p{2.3in}||p{2.8in}|c|c}
2497    name & description & installed & autoloaded \\
2498    \hline\hline
2499    {\tt \$/basis.cm} & Standard Basis Library & always & yes \\
2500    \hline\hline
2501    {\tt \$/ml-yacc-lib.cm} & ML-Yacc library & always & no \\
2502    \hline\hline
2503    {\tt \$/smlnj-lib.cm} & SML/NJ general-purpose utility library &
2504    always & no \\
2505    \hline
2506    {\tt \$/unix-lib.cm} & SML/NJ Unix programming utility library &
2507    optional & no \\
2508    \hline
2509    {\tt \$/inet-lib.cm} & SML/NJ internet programming utility library &
2510    optional & no \\
2511    \hline
2512    {\tt \$/regexp-lib.cm} & SML/NJ regular expression library & optional
2513    & no \\
2514    \hline
2515    {\tt \$/reactive-lib.cm} & SML/NJ reactive programming library &
2516    optional & no \\
2517    \hline
2518    {\tt \$/pp-lib.cm} & SML/NJ pretty-printing library & always & no \\
2519    \hline
2520    {\tt \$/html-lib.cm} & SML/NJ HTML handling library & always & no
2521    \end{tabular}
2522    \end{center}
2523    
2524    \subsection{Libraries for controlling SML/NJ's operation}
2525    
2526    The following table lists those libraries that provide access to the
2527    so-called {\em visible compiler} infrastructure and to the compilation
2528    manager API.
2529    
2530    \begin{center}
2531    \begin{tabular}{p{2.3in}||p{2.8in}|c|c}
2532    name & description & installed & autoloaded \\
2533    \hline\hline
2534    {\tt \$smlnj/compiler.cm} \newline
2535    {\tt \$smlnj/compiler/current.cm} & visible compiler for current
2536    architecture & always & yes \\
2537    \hline\hline
2538    {\tt \$smlnj/cm.cm} \newline
2539    {\tt \$smlnj/cm/full.cm} & compilation manager & always & yes \\
2540    \hline
2541    {\tt \$smlnj/cm/tools.cm} & API for extending CM with new tools &
2542    always & no \\
2543    \hline\hline
2544    {\tt \$/mllex-tool.cm} & plugin library for class {\tt mllex} & always
2545    & no \\
2546    \hline
2547    {\tt \$/lex-ext.cm} & plugin library for extension {\tt .lex} & always
2548    & no \\
2549    \hline
2550    {\tt \$/mlyacc-tool.cm} & plugin library for class {\tt mlyacc} &
2551    always & no \\
2552    \hline
2553    {\tt \$/grm-ext.cm} & plugin library for extension {\tt .grm} & always
2554    & no \\
2555    \hline
2556    {\tt \$/mlburg-tool.cm} & plugin library for class {\tt mlburg} &
2557    always & no \\
2558    \hline
2559    {\tt \$/burg-ext.cm} & plugin library for extension {\tt .burg} &
2560    always & no \\
2561    \hline
2562    {\tt \$/noweb-tool.cm} & plugin library for class {\tt noweb} & always
2563    & no \\
2564    \hline
2565    {\tt \$/nw-ext.cm} & plugin library for extension {\tt .nw} & always &
2566    no \\
2567    \hline
2568    {\tt \$/make-tool.cm} & plugin library for class {\tt make} & always &
2569    no \\
2570    \hline
2571    {\tt \$/shell-tool.cm} & plugin library for class {\tt shell} & always
2572    & no \\
2573    \end{tabular}
2574    \end{center}
2575    
2576    \subsection{Libraries for SML/NJ compiler hackers}
2577    
2578    The following table lists libraries that provide access to the SML/NJ
2579    {\em bootstrap compiler}.  The bootstrap compiler is a derivative of
2580    the compilation manager.  In addition to being able to recompile
2581    SML/NJ for the ``host'' system there are also cross-compilers that
2582    can target all of SML/NJ's supported platforms.
2583    
2584    \begin{center}
2585    \begin{tabular}{p{2.3in}||p{2.8in}|c|c}
2586    name & description & installed & autoloaded \\
2587    \hline\hline
2588    {\tt \$smlnj/cmb.cm} \newline
2589    {\tt \$smlnj/cmb/current.cm} & bootstrap compiler for current
2590    architecture and OS & always & no \\
2591    \hline\hline
2592    {\tt \$smlnj/cmb/alpha32-unix.cm} & bootstrap compiler for Alpha/Unix
2593    systems & always & no \\
2594    \hline
2595    {\tt \$smlnj/cmb/hppa-unix.cm} & bootstrap compiler for HP-PA/Unix
2596    systems & always & no \\
2597    \hline
2598    {\tt \$smlnj/cmb/ppc-macos.cm} & bootstrap compiler for PowerPC/Unix
2599    systems & always & no \\
2600    \hline
2601    {\tt \$smlnj/cmb/ppc-unix.cm} & bootstrap compiler for PowerPC/MacOS
2602    systems & always & no \\
2603    \hline
2604    {\tt \$smlnj/cmb/sparc-unix.cm} & bootstrap compiler for Sparc/Unix
2605    systems & always & no \\
2606    \hline
2607    {\tt \$smlnj/cmb/x86-unix.cm} & bootstrap compiler for IA32/Unix
2608    systems & always & no \\
2609    \hline
2610    {\tt \$smlnj/cmb/x86-win32.cm} & bootstrap compiler for IA32/Win32
2611    systems & always & no \\
2612    \hline\hline
2613    {\tt \$smlnj/compiler/alpha32.cm} & visible compiler for
2614    Alpha-specific cross-compiler & always & no \\
2615    \hline
2616    {\tt \$smlnj/compiler/hppa.cm} & visible compiler for
2617    HP-PA-specific cross-compiler & always & no \\
2618    \hline
2619    {\tt \$smlnj/compiler/ppc.cm} & visible compiler for
2620    PowerPC-specific cross-compiler & always & no \\
2621    \hline
2622    {\tt \$smlnj/compiler/sparc.cm} & visible compiler for
2623    Sparc-specific cross-compiler & always & no \\
2624    \hline
2625    {\tt \$smlnj/compiler/x86.cm} & visible compiler for
2626    IA32-specific cross-compiler & always & no \\
2627    \hline
2628    {\tt \$smlnj/compiler/all.cm} & visible compilers for all
2629    architecture-specific cross-compilers and all cross-compilation
2630    bootstrap compilers & always & no \\
2631    \end{tabular}
2632    \end{center}
2633    
2634    \subsection{Internal libraries}
2635    
2636    For completeness, here is the list of other libraries that are part of
2637    SML/NJ's implementation:
2638    
2639    \begin{center}
2640    \begin{tabular}{p{2.8in}||p{2.3in}|c|c}
2641    name & description & installed & autoloaded \\
2642    \hline\hline
2643    {\tt \$MLRISC/Lib.cm} & utility library for MLRISC backend & always &
2644    no \\
2645    \hline
2646    {\tt \$MLRISC/Control.cm} & control facilities for MLRISC backend &
2647    always & no \\
2648    \hline
2649    {\tt \$MLRISC/MLRISC.cm} & architecture-neutral core of MLRISC backend
2650    & always & no \\
2651    \hline
2652    {\tt \$MLRISC/ALPHA.cm} & Alpha-specific MLRISC backend & always & no \\
2653    \hline
2654    {\tt \$MLRISC/HPPA.cm} & HP-PA-specific MLRISC backend & always & no \\
2655    \hline
2656    {\tt \$MLRISC/PPC.cm} & PowerPC-specific MLRISC backend & always & no \\
2657    \hline
2658    {\tt \$MLRISC/SPARC.cm} & Sparc-specific MLRISC backend & always & no \\
2659    \hline
2660    {\tt \$MLRISC/IA32.cm} & IA32-specific MLRISC backend & always & no \\
2661    \hline\hline
2662    {\tt \$/comp-lib.cm} & utility library for compiler & always & no \\
2663    \hline
2664    {\tt \$smlnj/viscomp/core.cm} & architecture-neutral core of compiler
2665    & always & no \\
2666    \hline
2667    {\tt \$smlnj/viscomp/alpha32.cm} & Alpha-specific part of compiler &
2668    always & no \\
2669    \hline
2670    {\tt \$smlnj/viscomp/hppa.cm} & HP-PA-specific part of compiler &
2671    always & no \\
2672    \hline
2673    {\tt \$smlnj/viscomp/ppc.cm} & PowerPC-specific part of compiler &
2674    always & no \\
2675    \hline
2676    {\tt \$smlnj/viscomp/sparc.cm} & Sparc-specific part of compiler &
2677    always & no \\
2678    \hline
2679    {\tt \$smlnj/viscomp/x86.cm} & IA32-specific part of compiler & always
2680    & no \\
2681    \hline \hline
2682    {\tt \$smlnj/init/init.cmi} & initial ``glue''; implementation of
2683    pervasive environment & always & no \\
2684    \hline \hline
2685    {\tt \$smlnj/internal/cm-lib.cm} & implementation of compilation
2686    manager (not yet specialized to specific backends) & always & no \\
2687    \hline
2688    {\tt \$smlnj/internal/host-compiler-0.cm} & selection of host-specific
2689    visible compiler and specialization of compilation manager & always &
2690    no \\
2691    \hline
2692    {\tt \$smlnj/internal/intsys.cm} & root library implementing the
2693    interactive system and glueing all the other parts together & always &
2694    no
2695    \end{tabular}
2696    \end{center}
2697    
2698    
2699    \pagebreak
2700    
2701  \bibliography{blume,appel,ml}  \bibliography{blume,appel,ml}
2702    
2703  \end{document}  \end{document}

Legend:
Removed from v.651  
changed lines
  Added in v.652

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0