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/branches/primop-branch/src/compiler/MAP
ViewVC logotype

Diff of /sml/branches/primop-branch/src/compiler/MAP

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

revision 1474, Sun Apr 4 21:29:18 2004 UTC revision 1475, Fri Apr 9 19:05:33 2004 UTC
# Line 2  Line 2 
2  ---------  ---------
3    
4  1. Lexing and Parsing  1. Lexing and Parsing
5    ----------------------
6    
7      * syntax trees (AST) produced by parser
8      * lexical analysis (via ML-Lex spec)
9      * parsing (via ML-Yacc spec)
10    
11  Parse/  Parse/
12    lexing and parsing, producing ast (concrete syntax trees)    lexing and parsing, producing ast (concrete syntax trees)
13    
14    ast/    Parse/ast/
15      "syntax trees" (really concrete, in contrast to absyn, which is      "syntax trees" (really concrete, in contrast to absyn, which is
16      the true abstract syntax)      the true abstract syntax)
17        ast.sig/sml       -- the syntax tree types      ast.sig/sml
18        astutil.sig/sml   -- some utility functions        the syntax tree types
19          defs: AST, Ast: AST
20        astutil.sig/sml
21          some utility functions
22          defs: ASTUTIL, AstUtil: ASTUTIL
23    
24    lex/    Parse/lex/
25      lexical analysis (via ML-Lex)      lexical analysis (via ML-Lex)
26        ml.lex            -- the lexer spec      ml.lex
27        tokentable.sml    --        the lexer spec (ML-Lex source)
28        tokentable.sml
29          hash table for token recognition
30          defs: TokenTable
31    
32    parse/    Parse/parse/
33      parsing (via ML-Yacc)      parsing (via ML-Yacc)
34        ml.grm            -- grammar spec      ml.grm
35          grammar spec (ML-Yacc source)
36    
37    main/    Parse/main/
38      control flags and parser driver functions.      control flags and parser driver functions.
39      lexer/parser combination translates input stream into ast trees      lexer/parser combination translates input stream into ast trees
40        parser.sig/sml    -- parser modules initialization, driver function      parser.sig/sml
41        parsercontrol.sml -- flags controlling various syntax features        parser modules initialization, driver function
42        smlfile.sml       -- top level parsing functions        defs: MLPARSER, MLParser: MLPARSER
43        parsercontrol.sml
44          flags controlling various syntax features
45          defs: PARSER_CONTROL, ParserControl
46        smlfile.sml
47          top level parsing functions
48          defs: SMLFILE, SmlFile
49    
50    
51  2. Elaboration  2. Elaboration
52     * abstract syntax  --------------
53    
54      * abstract syntax (absyn)
55     * static environments     * static environments
56     * translation from ast to abstract syntax and static environment (elaboration)     * translation from ast to abstract syntax and static environment (elaboration)
57     * core type checking and inference, overloading resolution     * core type checking and inference, overloading resolution
58     * modules and signatures, signature matching, functor application     * modules and signatures, signature matching, functor application
59     * code found in directories Semant, ElabData, Elaborator     * code found in directories Semant, ElabData, Elaborator
60    
61  [***  Basics/
  What is the distinction between Basics and Semant?  Should these be  
  merged?  How about ElabData?  Some of these files (Semant/types) might  
  also fit there.  
   
  We have Basics/*, Semant/basics, ElabData/basics, and Elaborator/basics.  
  What is the rationale telling us what goes in each of these places?  
62    
63   This complex organization seems to be partially motivated by the goal    Basics/mlcomp/
64   of separating out any features that are SML/NJ-specific from the generic    some basic types involved in absyn and statenv and elaboration process
65   SML stuff.      symbol.sig/sml
66  ***]        symbols (should be in ElabData)
67          defs: SYMBOL, Symbol
68  Basics      fastsymbol.sig/sml
69          fast symbols (should be in ElabData)
70    mlcomp/        defs: FASTSYMBOL, FastSymbol
71      basic front-end data structures (e.g. symbols, stamps, ...)      fixity.sml
72        symbol.sig/sml      -- symbols (should be in ElabData?)        fixity properties (should be in ElabData)
73        fastsymbol.sig/sml  -- fast symbols (should be in ElabData?)        defs: FIXITY, Fixity
74        fixity.sml          -- fixity properties (should be in ElabData)      persstamps.sig/sml
75        persstamps.sig/sml  -- persistant stamps (16 byte vectors)        persistant stamps, or globally unique identifiers (16 byte vectors),
76        persmap.sml         -- finite maps over pids (persistent stamps)        aka "pids"
77        pidenv.sig/sml      -- environments using pid (persistant stamps) as keys        defs: PERSSTAMPS, PersStamps : PERSSTAMPS
78        compileexn.sml      -- Compile exception (where used?)      persmap.sml
79          finite maps over pids (persistent stamps)
80    miscutil/        defs: PersMap
81      some left-over stuff (why not in MiscUtil?  may be redundant)      pidenv.sig/sml
82        intstrmap.sig/sml   -- int/string maps for use in environments;        environments using pids (persistant stamps) as keys
83          defs: PIDENV, PidEnvFn
84        compileexn.sml
85          Compile exception (where used?)
86          defs: CompileExn
87    
88      Basics/miscutil/  (why not in MiscUtil?)
89        intstrmap.sig/sml
90          int/string maps for use in environments;
91                               appears redundant with IntStrMapV defined in                               appears redundant with IntStrMapV defined in
92                               Env (ElabData/basics/env.sml)                               Env (ElabData/basics/env.sml)
93                               used in Tuples, ElabCore, Parse/lex/tokentable.sml.                               used in Tuples, ElabCore, Parse/lex/tokentable.sml.
94    errormsg/        see: ElabData/basics/env.sml
95      error messages        defs: INTSTRMAP, IntStrMap
       errormsg.sig/sml    -- error message interface  
   
   source/  
     -- the source abstraction + file pathnames  
       pathnames.sig/sml   -- file path names  
       source.sig/sml      -- input source datastructure  
       sourcemap.sig/sml   -- map character positions in source to line no/column  
                              supporting #line "declaration"  
96    
97    print/    Basics/errormsg/
98      -- some printing support (more elsewhere?)      errormsg.sig/sml
99        pp-wrapper.sml      -- implements old PP interface using new SML/NJ Lib PP        error messages
100        printutil.sig/sml   -- some print utilities (uses Symbol)        defs: ERRORMSG, ErrorMsg
       printcontrol.sml    -- print control flags; out, say functions  
   
   stats/  
       stats.sml           -- facilities for defining timed phases  
   
   main/  
       basiccontrol.sml    -- printWarning control flag, topregistry  
                              uses ControlRegistry, Controls  
   
   
 Semant  
101    
102    basics/    Basics/source/
103      -- some "basic" stuff -- why not in Basics?    managing ML source files or streams
104        inlinfo.sig/sml     -- inlining info (?)      pathnames.sig/sml
105          file path names
106    elaborate/        defs: PATHNAMES, Pathnames
107      -- module level, top level elaboration (why not under Elaborator?)      source.sig/sml
108        elabmod.sml         -- module level elaboration        input source datastructure
109        elabtop.sml         -- top-level elaboration        defs: SOURCE, Source
110        sourcemap.sig/sml
111    modules/        map character positions in source to line no/column supporting #line "declaration"
112      -- mechanisms for module elaboration.  "Entity" is the static-phase        defs: SOURCE_MAP, SourcMap
113         computation element associated with a module (a kind of expression).  
114         entity expressions are basically a typed lambda calculus    Basics/print/
115        evalent.sml         -- evaluation of entity expressions    utilities for prettyprinting
116        instantiate.sml     -- create a free "realization" from a signature      [pp-wrapper.sml -- obsolete for mcz, where new pp is used directly]
117        instantiate-param.sml  -- like instantiate.sml, but different (how?)        implements old PP interface using new SML/NJ Lib PP
118        module-plists.sml   -- ???      pp-init.sml
119        sigmatch.sml        -- signature matching (the type-checking of modules)        extend standard prettyprinter interface to match old one
120          defs: PRETTYPRINT, PrettyPrint
121        printutil.sig/sml
122          some print utilities (uses Symbol)
123          defs: PRINTUTIL, PrintUtil
124        printcontrol.sml
125          print control flags, out, say
126          defs: PRINTCONTROL, Control_Print
127    
128      Basics/stats/
129        stats.sml
130          facilities for defining timed phases
131          defs: STATS, Stats
132    
133      Basics/main/
134        basiccontrol.sml
135          printWarning control flag, topregistry
136          uses: ControlRegistry, Controls
137          defs: BASIC_CONTROL, BasicControl
138    
139    Semant/
140      Modules related to elaboration and pickling (external representation
141      of static environments)
142    
143      Semant/basics/
144        inlinfo.sig/sml
145          inlining info [FLINT]
146          defs: INL_INFO, InlInfo: INL_INFO
147    
148      Semant/elaborate/
149      apply functors defined in corresponding Elaborate/elaborate modules
150      [these could be in Elaborator]
151        elabmod.sml
152          module level elaboration (why not in Elaborator)
153          see: Elaborator/elaborate/elabmod.sml
154          defs: ElabMod
155        elabtop.sml
156          top-level elaboration
157          defs: ElabTop
158    
159      Semant/modules/
160      support for module elaboration
161        evalent.sml
162          entity expression evaluation;
163          applies functor EvalEntityFn from Elaborator/modules/evalent.sml
164          see: Elaborator/modules/evalent.sml
165          defs: EvalEntity
166        instantiate.sml
167          apply InstantitateFn defined in Elaborator/modules/instantiate.sml
168          see: Elaborator/modules/instantiate.sml
169          defs: Instantiate
170        instantiate-param.sml
171          defines parameter passed to InstantiateFn in ./instantiate.sml
172          see: Semant/modules/instantiate.sml  (previous file)
173          defs: InstantiateParam
174        module-plists.sml [FLINT]
175          defines PropList properties for attaching FLINT Lambda types to
176          various semantic entities
177          see: smlnj-lib/Util/plist{-sig}.sml
178          defs: ModulePropLists
179        sigmatch.sml
180          apply SigmatchFn defined in Elaborator/modules/sigmatch.sml
181          see: Elaborator/modules/sigmatch.sml
182          defs: SigMatch
183    
184    pickle/    Semant/pickle/
185      -- pickling static environments (the non-"new" variants should go away?)    pickling static environments
186        pickle-sym-pid.sml        pickle-sym-pid.sml
187        unpickle-sym-pid.sml        unpickle-sym-pid.sml
188        pickmod-new.sml        pickmod-new.sml
189        unpickmod-new-sml        unpickmod-new-sml
190        rehash.sml        rehash.sml
191    
192    statenv/    Semant/statenv/
     -- hand made primitive types, constructors, etc.  
193        prim.sml        prim.sml
194          define static env primEnv, containing primitive types (PrimTypes),
195          primops (InLine), and unrolled lists (UnrolledList)
196          defs: PRIM_ENV, PrimEnv: PRIM_ENV
197    
198    types/    Semant/types/
199      -- some types stuff [why not in ElabData/types?]    some types-related stuff
200        cproto.sml        cproto.sml
201        tp-var-info.sml        relating ML types and C types (CTypes.c_proto from MLRISC) for C call mechanism
202        types-reformat.sml        defs: CProto
203        typecheck.sml      tp-var-info.sml [FLINT]
204          packaging some FLINT info as an exception
205          defs: TVI
206        types-reformat.sml [FLINT]
207          FLINT-related "reformatting" of types, used to be in typesutil.sml
208          defs: TypesReformat
209        typecheck.sml [FLINT]
210          apply TypecheckFn defined in Elaborator/types/typecheck.sml (should eliminate)
211          see: Elaborator/types/typecheck.sml
212          defs: TypeCheck
213    
214    
215  ElabData  ElabData/
216    -- data structures and utilities used in elaboration  Basic datastructures used in elaboration (including type checking)
217    
218    basics/    ElabData/basics/
219      -- some basic data structures used in elaboration    basic representation types used in elaboration, plus coresym
220        lambdavar.sig/sml        lambdavar.sig/sml
221          lambda variables, the abstract representation of variables, used          lambda variables, the abstract representation of variables, used
222          as roots of dynamic access chains          as roots of dynamic access chains
223          defs: LAMBDA_VAR, LambdaVar
224        access.sig/sml        access.sig/sml
225          dynamic access paths          dynamic access paths
226          defs: ACCESS, Access : ACCESS
227        env.sig/sml        env.sig/sml
228          generic environments, mapping symbols to unspecified binding type          generic environments, mapping symbols to unspecified binding type
229          defs: ENV, Env: ENV, INTSTRMAPV
230        stamps.sig/sml        stamps.sig/sml
231          static identifiers, used for nominal type equivalence          static identifiers, used for nominal type equivalence
232          defs: STAMPS, Stamps:> STAMPS
233        stampmap.sml        stampmap.sml
234          generic finite mappings over stamps          generic finite mappings over stamps
235          defs: StampMap
236        sympaths.sig/sml        sympaths.sig/sml
237          SymPath and InvPath: direct and inverse symbolic paths (selecting          SymPath and InvPath: direct and inverse symbolic paths (selecting
238          module components)          module components)
239          defs: SYMPATH, INVPATH, CONVERTPATHS, SymPath, InvPath, ConvertPaths
240        ii.sml [FLINT]        ii.sml [FLINT]
241          FLINT related information for inlining (why is this in the elaborator?)        FLINT related information for inlining (why is this in elaborator?)
242        lambdavar.sig/sml        defs: II
         lambda variables, the abstract representation of variables  
243        core-ptnum.sml        core-ptnum.sml
244          core prim-type numbers (??? -- essentially the same as basic-ptnum.sml)        core prim-type numbers (essentially the same as Elaborator/basics/ptnum.sml
245          except only language-standard types are included)
246          see: Elaborator/basics/ptnum.sml
247          defs: CORE_PRIM_TYC_NUM, CorePrimTycNum
248        coresym.sml        coresym.sml
249          defines the special structure symbol "_Core" used to access certain          defines the special structure symbol "_Core" used to access certain
250          special bindings (e.g Match and Bind exceptions)          special bindings (e.g Match and Bind exceptions)
251          defs: CoreSym
252    
253    syntax/    ElabData/syntax/
254      -- (typed) abstract syntax    (typed) abstract syntax
255        absyn.sig/sml   -- the abstract syntax types      absyn.sig/sml
256        varcon.sig/sml  -- variable and data constructor representations        the abstract syntax types
257        absynutil.sml   -- utility functions for building tuple patterns and expressions        defs: ABSYN, Absyn: ABSYN
258        varcon.sig/sml
259    types/        variable and data constructor representations
260      -- representing, constructing and manipulating types        defs: VARCON, VarCon: VARCON
261        types.sig/sml      -- the representation of SML types      absynutil.sml
262        typesutil.sig/sml  -- large collection of utility functions for working with types        utility functions for building tuple patterns and expressions
263        tuples.sml         -- fns for constructing tuple and record types        defs: AbsynUtil
264        core-basictypes.sml -- building the primitive types and associated values  
265      ElabData/types/
266    statenv/    representing, constructing and manipulating types
267      -- representation and mechanism for static environments      types.sig/sml
268        bindings.sig/sml   -- the basic binding forms (values, types, signatures, etc.)        the representation of SML types
269        statenv.sig/sml    -- instantiate generic environments with ML bindings        defs: TYPES, Types: TYPES
270        lookup.sig/sml     -- accessing symbols in environments      typesutil.sig/sml
271        genmap.sml         -- rapid modmap generation based on modtrees        large collection of utility functions for working with types
272        coreacc.sml        -- access components of the _Core structure        defs: TYPESUTIL, TypesUtil: TYPESUTIL
273        browse.sml         -- "browsing" the static environment (???)      tuples.sml
274          fns for constructing tuple and record types
275    modules/        defs: TUPLES, Tuples: TUPLES
276      -- representation of modules      core-basictypes.sml
277        modules.sig/sml    -- representation of modules and signatures        building the primitive types and associated values (containing only
278        moduleutil.sig/sml -- lots of utility functions for modules        implementation independent, language-standard basic types?)
279        moduleid.sml       -- module identities used in Modmaps ???        see: Elaborator/types/basictypes.sml
280        entpath.sml        --        defs: CoreBasicTypes
281        entityenv.sig/sml  -- enity environments mapping entity variables  
282        epcontext.sml      --    ElabData/statenv/
283      static environments
284    main/      bindings.sig/sml
285      -- control flags and contex parameters        the basic binding forms (values, types, signatures, etc.)
286        compinfo.sml       -- elaboration context parameter        defs: BINDINGS, Bindings: BINDINGS
287        edcontrol.sig/sml  -- control flags for ElabData      statenv.sig/sml
288          instantiate generic environments with ML bindings
289          defs: STATICENV, StaticEnv: STATICENV
290  Elaborator      lookup.sig/sml
291    -- the actual elaboration        accessing symbols in environments
292          defs: LOOKUP, Lookup : LOOKUP
293    basics/      genmap.sml
294      elabcontrol.sml    -- Elaborator control flags        rapid modmap generation based on modtrees
295      conrep.sml         -- inferring conreps for data constructors        defs: GenModIdMap
296      debindex.sig/sml   -- [FLINT] FLINT book-keeping (move back to FLINT)      coreacc.sml
297      ptnum.sml          -- prim type numbers, augmenting ElabData/basics/core-ptnum.sml        access components of the _Core structure
298          defs: CoreAccess
299    print/      browse.sml
300      pputil.sig/sml     -- prettyprint utilities (generic)  [**MOVE**]        "browsing" the static environment (not used???)
301      pptype.sml         -- prettyprint types        defs: BrowseStatEnv
302      ppval.sml          -- prettyprint variables and dcons  
303      ppmod.sml          -- prettyprint modules and signatures    ElabData/modules/
304      ppabsyn.sml        -- prettyprint absyn (uses PPUtil(pputil.s??),    representation of modules
305        modules.sig/sml
306          representation of modules and signatures
307          defs: MODULES, Modules: MODULES
308        moduleutil.sig/sml
309          lots of utility functions for modules
310          defs: MODULEUTIL, ModuleUtil: MODULEUTIL
311        moduleid.sml
312          module identities used in Modmaps ???
313          defs: MODULE_ID, ModuleId: MODULE_ID
314        entpath.sml
315          access paths for navigating entities
316          defs: ENT_PATH, EntPath:> ENT_PATH
317        entityenv.sig/sml
318          enity environments mapping entity variables
319          defs: ENTITY_ENV, EntityEnv : ENTITY_ENV
320        epcontext.sml
321          hairy context info used during module elaboration,
322          related to nesting of modules (ep stands for
323          "entity path"?)
324          defs: ENT_PATH_CONTEXT, EntPathContext :> ENT_PATH_CONTEXT
325    
326      ElabData/main/
327        compinfo.sml
328          elaboration context parameter
329          defs: CompInfo
330        edcontrol.sig/sml
331          control flags for ElabData
332          defs: ELABDATA_CONTROL, ElabDataControl : ELABDATA_CONTROL
333    
334    
335    Elaborator/
336      The main elaborator code, plus some representation stuff in basics/,
337      plus printing modules in print/.
338    
339      Elaborator/basics/
340      some control flags, some representation types, some FLINT stuff
341        elabcontrol.sml
342          Elaborator control flags
343          defs: ElabControl
344        conrep.sml
345          inferring conreps for data constructors
346          defs: CONREP, ConRep: CONREP
347        debindex.sig/sml [FLINT]
348          FLINT book-keeping (move back to FLINT)
349          defs: DEB_INDEX, DebIndex : DEB_INDEX
350        ptnum.sml
351          prim type numbers, augmenting ElabData/basics/core-ptnum.sml with
352          implementation dependent types
353          see: ElabData/basics/core-ptnum.sml
354          defs: PRIM_TYC_NUM, PrimTycNum: PRIM_TYC_NUM
355    
356      Elaborator/print/  [should be in ElabData?]
357      print utilities and print modules for elaboration data structures
358        pputil.sig/sml
359          prettyprint utilities (generic)  [**MOVE**]
360        pptype.sml
361          prettyprint types
362        ppval.sml
363          prettyprint variables and dcons
364        ppmod.sml
365          prettyprint modules and signatures
366        ppabsyn.sml
367          prettyprint absyn (uses PPUtil(pputil.s??),
368                            PPVal(ppval.sml), PPType(pptype.sml))                            PPVal(ppval.sml), PPType(pptype.sml))
369    types/  
370      basictypes.sig/sml -- define basic (built-in) types [MOVE to ElabData?]    Elaborator/types/
371      eqtypes.sml        -- equivalence of types    building basic types + typechecking modules
372      unify.sml          -- type unification      basictypes.sig/sml
373      overloadlit.sml    -- overloaded numeric literals        define basic (built-in) types; most are just defined in terms of
374      overload.sml       -- overloading resolution        types from CoreBasicTypes [MOVE to ElabData?]
375      typecheck.sml      -- typechecking        see: ElabData/types/core-basictypes.sml
376          defs: BasicTypes
377    modules/      eqtypes.sml
378      evalent.sml        -- evaluate "entities" (module and type realizations)        equivalence of types
379      expandtycon.sml    -- interpret PATHtycs in entity environment        defs: EQTYPES, EqTypes: EQTYPES
380      instantiate.sml    -- free instantiation of signatures      unify.sml
381      sigmatch.sml       -- signature matching        type unification
382          defs: UNIFY, Unify: UNIFY
383    elaborate/      overloadlit.sml
384      tyvarset.sml       -- type var sets for keeping track of type var scopes        overloaded numeric literals
385      specialsyms.sml    -- definition of special symbols for internal use        defs: OVERLOADLIT, OverloadLit: OVERLOADLIT
386        overload.sml
387          overloading resolution
388          defs: OVERLOAD, Overload
389        typecheck.sml [FLINT]
390          defines typechecking _functor_ TypecheckFn, taking some FLINT-related
391          inlining info as parameters [should make into a structure]
392          defs: TYPECHECK, TypecheckFn: _ => TYPECHECK
393    
394      Elaborator/modules/
395      support modules for elaborating modules
396        evalent.sml
397          evaluate "entities" (module and type realizations). Defines EvalEntityFn
398          which is called to define EvalEntity structure in Semant/modules/evalent.sml
399          see: Semant/modules/evalent.sml
400          defs: EVALENTITY, EvalEntityFn : INSTANTIATE => EVALENTITY
401        expandtycon.sml
402          interpret PATHtycs in entity environments
403          defs: EXPAND_TYCON, ExpandTycon : EXPAND_TYCON
404        instantiate.sml
405          free instantiation of signatures. defines InstantiateFn which is applied
406          to define structure Instantiate in Semant/modules/instantiate.sml
407          see: Semant/modules/instantiate.sml
408          defs: INSTANTIATE_PARAM, INSTANTIATE,
409                InstantiateFn: INSTANTIATE_PARAM => INSTANTIATE
410        sigmatch.sml
411          signature matching. defines SigMatchFn, which is applied to define
412          SigMatch structure in Semant/modules/sigmatch.sml
413          see: Semant/modules/sigmatch.sml
414          defs: SIGMATCH, SigMatchFn: EVALENTITY => SIGMATCH
415    
416      Elaborator/elaborate/
417      main elaboration modules, plus some supporting modules
418        tyvarset.sml
419          type var sets for keeping track of implicit scopes of user type vars
420          defs: TYVARSET, TyvarSet :> TYVARSET
421        specialsyms.sml
422          definition of special symbols for internal use
423          defs: SpecialSymbols
424        elabutil.sig/sml
425          general utilities for elaboration
426          defs: ELABUTIL, ElabUtil : ELABUTIL
427        elabdebug.sml
428          debugging facilities for elaboration
429          defs: ELABDEBUG, ElabDebug : ELABDEBUG
430        precedence.sml
431          precedence parser for core expressions, dealing with infix operators
432          defs: PRECEDENCE, Precedence : PRECEDENCE
433        elabtype.sig/sml
434          elaboration of type expressions and declarations
435          defs: ELABTYPE, ElabType : ELABTYPE
436        elabcore.sml
437          elaborating core ML (expressions, declarations)
438          defs: ELABCORE, ElabCore: ELABCORE
439        elabmod.sml
440          main module elaboration. defines ElabModFn, which is called to
441          define ElabMod structure in Semant/elaborate/elabmod.sml
442          see: Semant/elaborate/elabmod.sml
443          defs: ELABMOD, ElabModFn: SIGMATCH # TYPECHECK => ELABMOD
444        include.sml
445          elaborate include specs in signatures (supports elabsig)
446          defs: INCLUDE, Include: INCLUDE
447        elabsig.sml
448          elaborate signatures
449          defs: ELABSIG, ElabSig : ELABSIG
450        elabtop.sml
451          top-level elaboration driver. defines ElabTopFn, which is called
452          to define ElabTop structure in Semant/elaborate/elabtop.sml
453          see: Semant/elaborate/elabtop.sml
454          defs: ELABTOP, ElabTopFn : ELABMOD => ELABTOP
455    
456    
457  3. Miscellaneous utilities  3. Miscellaneous utilities
# Line 241  Line 460 
460    Contains various kinds of utility programs    Contains various kinds of utility programs
461    
462    bignums/    bignums/
463      Bignum packages. I have no clue how stable this is.    supporting real constants (using bignums?)
464        ieeereal.sml
465          Support for IEEE floating-point constants. calls RealConst functor
466          see: MiscUtil/bignums/realconst.sml
467          defs: IEEERealConst
468        realconst.sml
469          generate ML real (i.e. ieee floating point?) constants
470          defs: PRIMREAL, REALCONST, RealConst: PRIMREAL => REALCONST
471    
472    library/    library/
473      Utility modules that are candidates for eventual      Utility modules that are candidates for eventual
474      promotion to general libraries (crc and pickling)      promotion to general libraries (crc and pickling)
475        crc.sml        crc.sml
476          crc codes
477          defs: CRC, CRC :> CRC
478        pickle-lib.cm        pickle-lib.cm
479          CM description for basic pickling/unpickling library
480        pickle-util.sml        pickle-util.sml
481          supporting pickling
482          defs: PICKLE_UTIL, PickleUtil :> PICKLE_UTIL
483        unpickle-util.sml        unpickle-util.sml
484          supporting unpickling
485          defs: UNPICKLE_UTIL, UnpickleUtil :> UNPICKLE_UTIL
486    
487    print/    print/
488      Pretty printing    Pretty printing for absyn declarations, values
489        ppdec.sml      -- printing top-level declarations      ppdec.sml
490                          (move to Elaborator/print/ ?)        printing results of top-level declarations, including values and types
491        ppobj.sml      -- print top-level values        defs: PPDEC, PPDec : PPDEC
492        pptable.sml    -- register for user-defined prettyprinters for      ppobj.sml
493                          particular types        print top-level values
494          defs: PPOBJ, PPObj : PPOBJ
495        pptable.sml
496          register for user-defined prettyprinters for datatypes
497          defs: PPTABLE, PPTable : PPTABLE
498    
499    util/    util/
500      A couple of miscellaneous leftovers.      A couple of miscellaneous leftovers.
501        feedback.sml  -- should be part of a graph library (move to ../library?)      feedback.sml
502          Compute minimum feedback vertex set of a given directed graph.
503          should be part of a graph library (move to ../library?)
504          defs: Feedback
505        literal-to-num.sml        literal-to-num.sml
506          Conversions from integer/word literals (which are represented as
507          arbitrary precision ints) to fixed size. a hack that should be
508          replaced by a parameterized numeric types.
509          size numbers
510          defs: LITERAL_TO_NUM, LiteralToNum : LITERAL_TO_NUM
511    
512    
513    3. Middle End
514    -------------
515    
516  Middle End  FLINT/
 ----------  
   
 FLINT  
517    intermediate representation (a form of typed lambda calculus)    intermediate representation (a form of typed lambda calculus)
518    
519      [see FLINT/MAP]
520    
 Back End  
 --------  
521    
522  MLRISC  4. Back End
523    -----------
524    
525    MLRISC/
526    MLRISC based code generators    MLRISC based code generators
527    
528    
529  Execution Model  5. Execution Model
530  ---------------  -----------------
531    
532    Execution/
533    
534      dynenv/
535        dynenv.sig,sml
536          dynamic environments, and instance of PidEnvFn
537          see: Basics/mlcomp/pidenv.sml
538          defs: DYNAMICENV, DynamicEnv : DYNAMICENV
539      codeobj/
540        code-obj.sig,sml
541          an interface for manipulating code objects
542          defs: CODE_OBJ, CodeObj :> CODE_OBJ
543      binfile/
544        binfile.sig,sml
545          file format for bin files (machine-independent)
546          defs: BINFILE, Binfile :> BINFILE
547      main/
548        importtree.sml
549          defs: ImportTree
550        isolate.sml
551          isolate the continuation context to the top-level (a prompt?)
552          defs: Isolate
553        execute.sml
554          execution of top-level executables in a dynamic environment
555          defs: Execute
556    
557    
558    6. Interactive Top Level
559    ------------------------
560    
561    TopLevel/
562    
563      environ/
564      combined static and dynamic environments
565        environ.sig,sml
566          defs: ENVIRONMENT, Environment: ENVIRONMENT
567        symenv.sig,sml
568          defines SYMENV as a specialization of PIDENV, and SymbolicEnv as
569          an instance of PidEnvFn.
570          see: Basics/mlcomp/pidenv.sig, Basics/mlcomp/pidenv.sml
571          defs: SYMENV, SymbolicEnv: SYMENV
572    
573      backend/
574        backend.sig
575          defs: BACKEND
576        backend-fn.sml
577          defs: BackendFn : CODEGENERATOR # {val cproto_conv : string} => BACKEND
578        alpha32.sml
579          defs: Alpha32Backend
580        hppa.sml
581          defs: HppaBackend
582        ppc.sml
583          defs: PPCBackend
584        sparc.sml
585          defs: SparcBackend
586        x86-ccall.sml
587          defs: X86CCallBackend
588        x86-stdcall.sml
589          defs: X86StdCallBackend
590    
591      interact/
592        envref.sml
593          supports top-level environment management
594          defs: ENVREF, EnvRef : ENVREF
595        evalloop.sig,sml
596          top-level read-eval-print loop
597          defs: EVALLOOP, EvalLoopF: TOP_COMPILE => EVALLOOP
598        interact.sig,sml
599          creating top-level loops
600          defs: INTERACT, Interact: EVALLOOP => INTERACT
601    
602      main/
603        control.sig
604          defs: MCCONTROL, FLINTCONTROL, CGCONTROL, CONTROL
605        control.sml
606          defs: Control_MC, Control_CG, Control
607        version.sml
608          defs: CompilerVersion
609        printhooks.sml
610          defs: PrintHooks
611        pptable.sml
612          defs: CompilerPPTable
613        code-generator.sig
614          defs: CODEGENERATOR
615        compile.sig
616          defs: COMPILE0, COMPILE0, TOP_COMPILE
617        compile.sml
618          defs: CompileF: CODEGENERATOR # CCONFIG # {cproto_conv : string} => COMPILE0
619    
 Interactive Top Level  
 ---------------------  
620    
621    
622  ======================================================================  ============================================================================
623    
624  Catalog of basic structures  Catalog of basic structures (Front End)
625  ---------------------------  ---------------------------------------
626    
627  symbols  symbols
628    Symbol - "Basics/mlcomp/symbol.s??"    Symbol         (Basics/mlcomp/symbol.sig,sml)
629      FastSymbol     (Basics/mlcomp/fastsymbol.sig,sml)
630    
631    symbolic paths
632      SymPath        (ElabData/basics/sympaths.sml)
633      InvPath        (ElabData/basics/sympaths.sml)
634      ConvertPaths   (ElabData/basics/sympaths.sml)
635    
636  ast (syntax trees)  ast (syntax trees)
637    Ast - Parse/ast/ast.s??    Ast            (Parse/ast/ast.sig,sml)
638      AstUtil        (Parse/ast/astutil.sig,sml)
639    
640  absyn (abstract syntax)  absyn (abstract syntax)
641    Absyn     - ElabData/syntax/absyn.s??    Absyn          (ElabData/syntax/absyn.sig,sml)
642    VarCon    - ElabData/syntax/varcon.s??      abstract syntax datatypes for expressions, declarations, etc.
643    AbsynUtil - ElabData/syntax/absynutil.sml    VarCon         (ElabData/syntax/varcon.sig,sml)
644    PPAbsyn   - Elaborator/print/ppabsyn.sml      variables and constructors
645      AbsynUtil      (ElabData/syntax/absynutil.sml)
646  types      utility module for working with absyn
647    Types          - ElabData/types/types.s??    PPAbsyn        (Elaborator/print/ppabsyn.sml)
648    TypesUtil      - ElabData/types/typesutil.s??      prettyprinting absyn
649    Tuples         - ElabData/types/tuples.sml  
650    PPType         - Elaborator/print/pptype.sml  types (internal representation of types)
651    CoreBasicTypes - ElabData/types/core-basictypes.sml   representations
652    BasicTypes     - Elaborator/types/basictypes.s??    Types          (ElabData/types/types.sig,sml)
653    EqTypes        - Elaborator/types/eqtypes.sml    ConRep         (Elaborator/basics/conrep.sml)
654    
655     utilities, manipulating and comparing types
656      TypesUtil      (ElabData/types/typesutil.sig,sml)
657      Tuples         (ElabData/types/tuples.sml)
658      EqTypes        (Elaborator/types/eqtypes.sml)
659      Unify          (Elaborator/types/unify.sml)
660    
661     primitive types
662      CorePrimTycNum (ElabData/basics/core-ptnum.sml)
663      PrimTycNum     (Elaborator/basics/ptnum.sml)
664      CoreBasicTypes (ElabData/types/core-basictypes.sml)
665      BasicTypes     (Elaborator/types/basictypes.sig,sml)
666      PrimEnv        (Semant/statenv/prim.sml)
667    
668     printing types
669      PPType         (Elaborator/print/pptype.sml)
670    
671    dynamic access info
672      LambdaVar      (ElabData/basics/lambdavar.sig,sml)
673        lambda variables (dynamic access roots for variables)
674      Access         (ElabData/basics/access.sml)
675        dynamic access modes
676    
677  environment  (generic environment: 'b env)  environment  (generic environment: 'b env)
678      Env            (ElabData/basics/env.sml)
679    
680  static environment  static environment
681      Bindings       (ElabData/statenv/bindings.sig,sml)
682      StaticEnv      (ElabData/statenv/statenv.sml)
683      Lookup         (ElabData/statenv/lookup.sml)
684      BrowseStatEnv  (ElabData/statenv/browse.sml)
685    
686  modules (signatures, structures, functors)  modules (signatures, structures, functors)
687      Modules          (ElabData/modules/modules.sig,sml)
688      ModuleUtil       (ElabData/modules/moduleutil.sig,sml)
689      ModuleId         (ElabData/modules/moduleid.sml)
690      EntPath          (ElabData/modules/entpath.sml)
691      EntityEnv        (ElabData/modules/entityenv.sml)
692      ModulePropLists  (Semant/modules/module-plists.sml) [FLINT]
693    
694    primop
695      PrimOp           (FLINT/kernel/primop.sml)
696      PrimEnv          (Semant/statenv/prim.sml)
697    
698  control  control
699      BasicControl     (Basics/main/basiccontrol.sml)
700      ParserControl    (Parse/main/parsercontrol.sml)
701      ElabDataControl  (ElabData/main/edcontrol.sml)
702      ElabControl      (Elaborator/basics/elabcontrol.sml)
703      Control_Print    (Basics/print/printcontrol.sml)
704    
705      Control          (TopLevel/main/control.sml)
706      Control_CG       (TopLevel/main/control.sml)
707      Control_MC       (TopLevel/main/control.sml)
708    
709    
710    ==========================================================================
711    
712    Notes
713    =====
714    
715    1. CoreBasicTypes/BasicTypes and CorePrimTycNum/PrimTycNum splits are
716    part of an attempt to have a subset of the front end modules that
717    can be used as a generic, implementation dependent SML front-end.  That
718    is, CoreBasicTypes defines only those types that must be provided in
719    any SML implementation.  BasicTypes adds those types that are specific
720    to SML/NJ.
721    
722    
723    2. What is the distinction between Basics and Semant?  Should these be
724    merged?  How about ElabData?  Some of these files (Semant/types) might
725    also fit there.
726    
727    We have Basics/*, Semant/basics, ElabData/basics, and Elaborator/basics.
728    What is the rationale telling us what goes in each of these places?
729    
730    This complex organization seems to be partially motivated by the goal
731    of separating out any features that are SML/NJ-specific from the generic
732    SML stuff.

Legend:
Removed from v.1474  
changed lines
  Added in v.1475

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