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/HISTORY
ViewVC logotype

Diff of /sml/trunk/HISTORY

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

revision 660, Thu Jun 15 04:40:56 2000 UTC revision 690, Sat Jul 22 14:29:23 2000 UTC
# Line 12  Line 12 
12  Tag: <post-commit CVS tag>  Tag: <post-commit CVS tag>
13  Description:  Description:
14  ----------------------------------------------------------------------  ----------------------------------------------------------------------
15    Name: Matthias Blume
16    Date: 2000/07/22 23:30:00 JST
17    Tag: blume-20000722-urlupdate
18    Description:
19    
20    Changed BOOT and config/srcarchiveurl to point to BL server:
21    
22        ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.29/
23    
24    ----------------------------------------------------------------------
25    Name: Matthias Blume
26    Date: 2000/07/18 18:00:00 JST
27    Tag: blume-20000718-Version_110_29
28    Description:
29    
30    1. Updated src/compiler/TopLevel/main/version.sml to version 110.29
31    
32    2. Updated config/version to 110.29
33    
34    3. Updated config/srcarchiveurl
35    
36    3. New boot files!
37       ftp://ftp.cs.princeton.edu/pub/people/blume/sml/110.29-autofetch
38    
39    ----------------------------------------------------------------------
40    Name: Matthias Blume
41    Date: 2000/07/11 13:58:00 JST
42    Tag: blume-20000711-doctypo
43    Description:
44    
45    Fixed a few typos in CM manual.
46    
47    ----------------------------------------------------------------------
48    Name: Allen Leung
49    Date: 2000/06/15 00:38:00
50    Tag: leunga-20000704-sparc-x86
51    
52    1. x86 peephole improvement sp += k; sp -= k => nop  [from John]
53    2. fix to x86 RET bug [found by Dan Grossman]
54    3. sparc assembly bug fix for ticc instructions [found by Fermin]
55    
56       Affects c-- and moby only
57    
58    ----------------------------------------------------------------------
59    Name: Matthias Blume
60    Date: 2000/07/04 15:26:00
61    Tag: blume-20000704-trigger
62    Description:
63    
64    1. Improvements to CM manual.
65    2. SMLofNJ.Internals.BTrace.trigger reinstated as an alternative way
66       of getting a back-trace.  The function, when called, raises an
67       internal exception which explicitly carries the full back-trace history,
68       so it is unaffected by any intervening handle-raise pairs ("trivial"
69       or not).  The interactive loop will print that history once it arrives
70       at top level.
71       Short of having all exceptions implicitly carry the full history, the
72       recommended way of using this facility is:
73         - compile your program with instrumentation "on"
74         - run it, when it raises an exception, look at the history
75         - if the history is "cut off" because of some handler, go and modify
76           your program so that it explicitly calls BTrace.trigger
77         - recompile (still instrumented), and rerun; look at the full history
78    
79    ----------------------------------------------------------------------
80    Name: Matthias Blume
81    Date: 2000/07/03 15:36:00 JST
82    Tag: blume-20000702-manual
83    Description:
84    
85    Small corrections and updates to CM manual.
86    
87    ----------------------------------------------------------------------
88    Name: Matthias Blume
89    Date: 2000/06/29 16:04:00 JST
90    Tag: blume-20000629-yacctool
91    Description:
92    
93    Changes:
94    
95    1. Class "mlyacc" now takes separate arguments to pass options to
96       generated .sml- and .sig-files independently.
97    2. Corresponding CM manual updates.
98    3. BTrace module now also reports call sites.  (However, for loop clusters
99       it only shows from where the cluster was entered.)  There are associated
100       modifications to core.sml, internals.{sig,sml}, btrace.sml, and btimp.sml.
101    
102    ----------------------------------------------------------------------
103    Name: Matthias Blume
104    Date: 2000/06/27 16:51:00 JST
105    Tag: blume-20000627-noweb
106    Description:
107    
108    Changes:
109    
110     1. Implemented "subdir" and "witness" options for noweb tool.
111        This caused some slight internal changes in CM's tool implementation.
112     2. Fixed bug in "tool plugin" mechanism.  This is essentially cleaning
113        some remaining issues from earlier path anchor changes.
114     3. Updated CM manual accordingly.
115    
116     4. Changed implementation of back-tracing so that I now consider it
117        ready for prime-time.
118    
119        In particular, you don't have to explicitly trigger the back-trace
120        anymore.  Instead, if you are running BTrace-instrumented code and
121        there is an uncaught exception (regardless of whether or not it was
122        raised in instrumented code), the top-level evalloop will print
123        the back-trace.
124    
125        Features:
126    
127          - Instrumented and uninstrumented code work together seemlessly.
128            (Of course, uninstrumented code is never mentioned in actual
129             back-traces.)
130    
131          - Asymptotic time- and space-complexity of instrumented code is
132            equal to that of uninstrumented code.  (This means that
133            tail-recursion is preserved by the instrumentation phase.)
134    
135          - Modules whose code has been instrumented in different sessions
136            work together without problem.
137    
138          - There is no penalty whatsoever on uninstrumented code.
139    
140          - There is no penalty on "raise" expressions, even in
141            instrumented code.
142    
143        A potential bug (or perhaps it is a feature, too):
144    
145          A back-trace reaches no further than the outermost instrumented
146          non-trivial "raise".  Here, a "trivial" raise is one that is the
147          sole RHS of a "handle" rule.  Thus, back-traces reach trough
148    
149               <exp> handle e => raise e
150    
151          and even
152    
153               <exp> handle Foo => raise Bar
154    
155          and, of course, through
156    
157               <exp> handle Foo => ...
158    
159         if the exception was not Foo.
160    
161         Back-traces always reach right through any un-instrumented code
162         including any of its "handle" expressions, trivial or not.
163    
164       To try this out, do the following:
165    
166         - Erase all existing binfiles for your program.
167           (You may keep binfiles for those modules where you think you
168            definitely don't need back-tracing.)
169         - Turn on back-trace instrumentation:
170              SMLofNJ.Internals.BTrace.mode (SOME true);
171         - Recompile your program.  (I.e., run "CM.make" or "use".)
172         - You may now turn instrumentation off again (if you want):
173              SMLofNJ.Internals.BTrace.mode (SOME false);
174         - Run your program as usual.  If it raises an exception that
175           reaches the interactive toplevel, then a back-trace will
176           automatically be printed.  After that, the toplevel loop
177           will print the exception history as usual.
178    
179    ----------------------------------------------------------------------
180    Name: Matthias Blume
181    Date: 2000/06/26 09:56:46 JST
182    Tag: blume-20000626-setup
183    Description:
184    
185    CM: - setup-parameter to "sml" added; this can be used to run arbitrary
186          ML code before and after compiling a file (e.g., to set compiler
187          flags)
188    
189    Compiler: - improved btrace API (in core.sml, internals.{sig,sml})
190              - associated changes to btrace.sml (BTrace instrumentation pass)
191              - cleaner implementation of btimp.sml (BTrace tracing and report
192                module)
193    
194    CM manual: * new path encoding documented
195               * description of setup-parameter to "sml" added
196    
197    The biggest user-visible change to back-tracing is that it is no
198    longer necessary to compile all traced modules within the same
199    session.  (This was a real limitation.)
200    
201    ----------------------------------------------------------------------
202    Name: Matthias Blume
203    Date: 2000/06/24 12:40:00 JST
204    Tag: blume-20000624-startup
205    Description:
206    
207    Fixes startup slowdown problem.  (I was calling SrcPath.sync a _tad_
208    bit too often -- to put it mildly. :)
209    
210    ----------------------------------------------------------------------
211    Name: Matthias Blume
212    Date: 2000/06/23 18:20:00 JST
213    Tag: blume-20000623-btrace
214    Description:
215    
216    This updates adds a backtrace facility to aid programmers in debugging
217    their programs.  This involves the following changes:
218    
219    1. Module system/smlnj/init/core.sml (structure _Core) now has hooks for
220       keeping track of the current call stack.  When programs are compiled
221       in a special mode, the compiler will insert calls to these hooks
222       into the user program.
223       "Hook" means that it is possible for different implementations of
224       back-tracing to register themselves (at different times).
225    
226    2. compiler/MiscUtil/profile/btrace.sml implements the annotation phase
227       as an Absyn.dec->Absyn.dec rewrite.  Normally this phase is turned off.
228       It can be turned on using this call:
229         SMLofNJ.Internals.BTrace.mode (SOME true);
230       Turning it off again:
231         SMLofNJ.Internals.BTrace.mode (SOME false);
232       Querying the current status:
233         SMLofNJ.Internals.BTrace.mode NONE;
234       Annotated programs are about twice as big as normal ones, and they
235       run a factor of 2 to 4 slower with a dummy back-trace plugin (one
236       where all hooks do nothing).  The slowdown with a plugin that is
237       actually useful (such as the one supplied by default) is even greater,
238       but in the case of the default plugin it is still only an constant
239       factor (amortized).
240    
241    3. system/Basis/Implementation/NJ/internals.{sig,sml} have been augmented
242       with a sub-structure BTrace for controlling back-tracing.  In particular,
243       the above-mentioned function "mode" controls whether the annotation
244       phase is invoked by the compiler.  Another important function is
245       "trigger": when called it aborts the current execution and causes
246       the top-level loop to print a full back-trace.
247    
248    4. compiler/MiscUtil/profile/btimp.sml is the current default plugin
249       for back-tracing.  It keeps track of the dynamic call stack and in
250       addition to that it keeps a partial history at each "level" of that
251       stack.  For example, if a tail-calls b, b tail-calls c, and c tail-calls
252       d and b (at separate times, dynamically), then the report will show:
253    
254       GOTO   d
255             /c
256       GOTO  \b
257       CALL   a
258    
259       This shows that there was an initial non-tail call of a, then a
260       tail-call to b or c, looping behavior in a cluster of functions that
261       consist of b and c, and then a goto from that cluster (i.e., either from
262       b or from c) to d.
263    
264       Note that (depending on the user program) the amount of information
265       that the back-trace module has to keep track of at each level is bounded
266       by a constant.  Thus, the whole implementation has the same asymptotical
267       complexity as the original program (both in space and in time).
268    
269    5. compiler/TopLevel/interact/evalloop.sml has been modified to
270       handle the special exception SMLofNJ.Internals.BTrace.BTrace
271       which is raised by the "trigger" function mentioned above.
272    
273    Notes on usage:
274    
275    - Annotated code works well together with unannotated code:
276    Unannotated calls simply do not show up at all in the backtrace.
277    
278    - It is not a good idea to let modules that were annotated during
279    different sessions run at the same time.  This is because the compiler
280    chooses small integers to identify individual functions, and there
281    will be clashes if different modules were compiled in separate sessions.
282    (Nothing will crash, and you will even be told about the clashes, but
283    back-trace information will in general not be useful.)
284    
285    - Back-tracing can be confused by callcc and capture.
286    
287    - The only way of getting a back-trace right now is to explicitly
288    invoke the "trigger" function from your user program.  Eventually, we
289    should make every exception carry back-trace information (if
290    available).  But since this creates more overhead at "raise"-time
291    (similar to the current exnHistory overhead), I have not yet
292    implemented this.  (The implementation will be rather easy.)  With
293    exceptions carrying back-trace information, this facility will be even
294    more useful because users don't need to modify their programs...
295    
296    - While it is possible to compile the compiler with back-trace
297    annotations turned on (I did it to get some confidence in
298    correctness), you must make absolutely sure that core.sml and
299    btimp.sml are compiled WITHOUT annotation!  (core.sml cannot actually
300    be compiled with annotation because there is no core access yet, but
301    if you compile btimp.sml with annotation, then the system will go into
302    an infinite recursion and crash.)
303    Since CM currently does not know about BTrace, the only way to turn
304    annotations on and off for different modules of the compiler is to
305    interrupt CMB.make, change the settings, and re-invoke it.  Of course,
306    this is awkward and clumsy.
307    
308    Sample sessions:
309    
310    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
311    - SMLofNJ.Internals.BTrace.mode (SOME true);
312    [autoloading]
313    [autoloading done]
314    val it = false : bool
315    - structure X = struct
316    -     fun main n = let
317    -         fun a (x, 0) = d x
318    -           | a (x, n) = b (x, n - 1)
319    -         and b (x, n) = c (x, n)
320    -         and c (x, n) = a (x, n)
321    -         and d x = e (x, 3)
322    -         and e (x, 0) = f x
323    -           | e (x, n) = e (x, n - 1)
324    -         and f 0 = SMLofNJ.Internals.BTrace.trigger ()
325    -           | f n = n * g (n - 1)
326    -         and g n = a (n, 3)
327    -     in
328    -         f n
329    -     end
330    - end;
331    structure X : sig val main : int -> int end
332    - X.main 3;
333    *** BACK-TRACE ***
334    GOTO   stdIn:4.2-13.20: X.main[2].f
335    GOTO-( stdIn:4.2-13.20: X.main[2].e
336    GOTO   stdIn:4.2-13.20: X.main[2].d
337         / stdIn:4.2-13.20: X.main[2].a
338         | stdIn:4.2-13.20: X.main[2].b
339    GOTO-\ stdIn:4.2-13.20: X.main[2].c
340    CALL   stdIn:4.2-13.20: X.main[2].g
341    GOTO   stdIn:4.2-13.20: X.main[2].f
342    GOTO-( stdIn:4.2-13.20: X.main[2].e
343    GOTO   stdIn:4.2-13.20: X.main[2].d
344         / stdIn:4.2-13.20: X.main[2].a
345         | stdIn:4.2-13.20: X.main[2].b
346    GOTO-\ stdIn:4.2-13.20: X.main[2].c
347    CALL   stdIn:4.2-13.20: X.main[2].g
348    GOTO   stdIn:4.2-13.20: X.main[2].f
349    GOTO-( stdIn:4.2-13.20: X.main[2].e
350    GOTO   stdIn:4.2-13.20: X.main[2].d
351         / stdIn:4.2-13.20: X.main[2].a
352         | stdIn:4.2-13.20: X.main[2].b
353    GOTO-\ stdIn:4.2-13.20: X.main[2].c
354    CALL   stdIn:4.2-13.20: X.main[2].g
355    GOTO   stdIn:4.2-13.20: X.main[2].f
356    CALL   stdIn:2.15-17.4: X.main[2]
357    -
358    
359    (Note that because of a FLINt bug the above code currently does not
360    compile without BTrace turned on.)
361    
362    Here is another example, using my modified Tiger compiler:
363    
364    Standard ML of New Jersey v110.28.1 [FLINT v1.5], June 5, 2000
365    - SMLofNJ.Internals.BTrace.mode (SOME true);
366    [autoloading]
367    [autoloading done]
368    val it = false : bool
369    - CM.make "sources.cm";
370    [autoloading]
371    ...
372    [autoloading done]
373    [scanning sources.cm]
374    [parsing (sources.cm):parse.sml]
375    [creating directory CM/SKEL ...]
376    [parsing (sources.cm):tiger.lex.sml]
377    ...
378    [wrote CM/sparc-unix/semant.sml]
379    [compiling (sources.cm):main.sml]
380    [wrote CM/sparc-unix/main.sml]
381    [New bindings added.]
382    val it = true : bool
383    - Main.compile ("../testcases/merge.tig", "foo.out");
384    *** BACK-TRACE ***
385    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trvar
386    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
387    CALL   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
388    GOTO   lib/semant.sml:289.3-295.22: SemantFun[2].transExp.trexp.check[2]
389    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
390    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
391    CALL   lib/semant.sml:488.3-505.6: SemantFun[2].transDec.trdec[2].transBody[2]
392         / lib/semant.sml:411.65-543.8: SemantFun[2].transDec
393    CALL-\ lib/semant.sml:413.2-540.9: SemantFun[2].transDec.trdec[2]
394    CALL   lib/semant.sml:99.2-396.21: SemantFun[2].transExp.trexp
395    CALL   lib/semant.sml:8.52-558.4: SemantFun[2].transProg[2]
396    CALL   main.sml:1.18-118.4: Main.compile[2]
397    -
398    
399    ----------------------------------------------------------------------
400    Name: Matthias Blumen
401    Date: 2000/06/21 18:00:00 JST
402    Tag: blume-20000621-manual
403    Description:
404    
405    CM manual update: Path environments documented.
406    
407    ----------------------------------------------------------------------
408    Name: Matthias Blume
409    Date: 2000/06/19 13:40:00
410    Tag: blume-20000619-manual
411    Description:
412    
413    CM manual and system/README update.  This only covers the fact that
414    there are no more implicit anchors.  (Path environments and the "bind"
415    option to "cm" have yet to be documented.)
416    
417    ----------------------------------------------------------------------
418    Name: Matthias Blume
419    Date: 2000/06/19 11:05:00 JST
420    Tag: blume-20000619-chdir-bugfix
421    Description:
422    
423    Fixed a bug in new SrcPath module that sometimes led to a bad chDir call.
424    
425    ----------------------------------------------------------------------
426    Name: Matthias Blume
427    Date: 2000/06/18 22:00:10 JST
428    Tag: blume-20000618-implicit-anchors-really-gone
429    Description:
430    
431    I updates the previous HISTORY entry where I forgot to mention that
432    implicit anchors are no longer with us.
433    
434    The current update also gets rid of the (now useless) controller
435    CM.Control.implicit_anchors.
436    
437    ----------------------------------------------------------------------
438    Name: Matthias Blume
439    Date: 2000/06/16 17:30:00 JST
440    Tag: blume-20000616-anchorenv
441    Description:
442    
443    This patch implements the long anticipated (just kidding :) "anchor
444    environment" mechanism.  In the course of doing this, I also
445    re-implemented CM's internal "SrcPath" module from scratch.  The new
446    one should be more robust in certain boundary cases.  In any case, it
447    is a lot cleaner than its predecessor (IMHO).
448    
449    This time, although there is yet another boot file format change, I
450    kept the unpickler backward-compatible.  As a result, no new bootfiles
451    are necessary and bootstrapping is straightforward.  (You cannot read
452    new bootfiles into an old system, but the other way around is no
453    problem.)
454    
455    Visible changes:
456    
457    ** 0. Implicit path anchors (without the leading $-symbol) are no
458    longer recognized at all. This means that such path names are not
459    illegal either.  For example, the name basis.cm simply refers to a
460    local file called "basis.cm" (i.e, the name is an ordinary path
461    relative to .cm-files directory).  Or, to put it differently, only
462    names that start with $ are anchored paths.
463    
464    ** 1. The $<singlearc> abbreviation for $/<singlearc> has finally
465    vanished.
466    
467    John (Reppy) had critizised this as soon as I originally proposed and
468    implemented it, but at that time I did not really deeply believe
469    him. :) Now I came full-circle because I need the $<singlearc> syntax
470    in another place where it cannot be seen as an abbreviation for
471    $/<singlearc>.  To avoid the confusion, $<singlearc> now means what it
472    seems to mean (i.e., it "expands" into the corresponding anchor
473    value).
474    
475    However, when paths are used as members in CM description files, it
476    continues to be true that there must be at least another arc after the
477    anchor.  This is now enforced separately during semantic analysis
478    (i.e., from a lexical/syntactical point of view, the notation is ok.)
479    
480    ** 2. The "cm" class now accepts an option "bind".  The option's value
481    is a sub-option list of precisely two items -- one labeled "anchor"
482    and the other one labeled "value".  As you might expect, "anchor" is
483    used to specify an anchor name to be bound, and "value" specifies what
484    the anchor is being bound to.
485    
486    The value must be a directory name and can be given in either standard
487    syntax (including the possibility that it is itself an anchored path)
488    or native syntax.
489    
490    Examples:
491    
492       foo.cm (bind:(anchor:bar value:$mystuff/bar))
493       lib.cm (bind:(anchor:a value:"H:\\x\\y\\z"))  (* only works under windows *)
494    
495    and so on.
496    
497    The meaning of this is that the .cm-file will be processed with an
498    augmented anchor environment where the given anchor(s) is/are bound to
499    the given values(s).
500    
501    The rationale for having this feature is this: Suppose you are trying
502    to use two different (already stable) libraries a.cm and b.cm (that
503    you perhaps didn't write yourself).  Further, suppose each of these
504    two libraries internally uses its own auxiliary library $aux/lib.cm.
505    Normally you would now have a problem because the anchor "lib" can not
506    be bound to more than one value globally.  Therefore, the project that
507    uses both a.cm and b.cm must locally redirect the anchor to some other
508    place:
509    
510       a.cm (bind:(anchor:lib value:/usr/lib/smlnj/a-stuff))
511       b.cm (bind:(anchor:lib value:/usr/lib/smlnj/b-stuff))
512    
513    This hard-wires $lib/aux.cm to /usr/lib/smlnj/a-stuff/aux.cm or
514    /usr/lib/smlnj/b-stuff/aux.cm, respectively.
515    
516    Hard-wiring path names is a bit inflexible (and CM will verbosely warn
517    you when you do so at the time of CM.stabilize).  Therefore, you can
518    also use an anchored path as the value:
519    
520      a.cm (bind:(anchor:lib value:$a-lib))
521      b.cm (bind:(anchor:lib value:$b-lib))
522    
523    Now you can globally configure (using the usual CM.Anchor.anchor or
524    pathconfig machinery) bindings for "a-lib" and "b-lib".  Since "lib"
525    itself is always locally bound, setting it globally is no longer
526    meaningful or necessary (but it does not hurt either).  In fact, "lib"
527    can still be used as a global anchor for separate purposes.  As a
528    matter of fact, one can locally define "lib" in terms of a global
529    "lib":
530    
531      a.cm (bind:(anchor:lib value:$lib/a))
532      b.cm (bind:(anchor:lib value:$lib/b))
533    
534    ** 3: The encoding of path names has changed.  This affects the way
535    path names are shown in CM's progress report and also the internal
536    protocol encoding used for parallel make.
537    
538    The encoding now uses one or more ':'-separated segments.  Each
539    segments corresponds to a file that has been specified relative to the
540    file given by its preceding segment.  The first segment is either
541    relative to the CWD, absolute, or anchored.  Each segment itself is
542    basically a Unix pathname; all segments but the first are relative.
543    
544    Example:
545    
546       $foo/bar/baz.cm:a/b/c.sml
547    
548    This path denotes the file bar/a/b/c.sml relative to the directory
549    denoted by anchor "foo".  Notice that the encoding also includes
550    baz.cm which is the .cm-file that listed a/b/c.sml.  As usual, such
551    paths are resolved relative to the .cm-files directory, so baz.cm must
552    be ignored to get the "real" pathname.
553    
554    To make this fact more obvious, CM puts the names of such "virtual
555    arcs" into parentheses when they appear in progress reports. (No
556    parentheses will appear in the internal protocol encoding.)  Thus,
557    what you really see is:
558    
559      $foo/bar/(baz.cm):a/b/c.sml
560    
561    I find this notation to be much more informative than before.
562    
563    Another new feature of the encoding is that special characters
564    including parentheses, colons, (back)slashes, and white space are
565    written as \ddd (where ddd is the decimal encoding of the character).
566    
567    *** The CM manual still needs to be updated.
568    
569    ----------------------------------------------------------------------
570  Name: Allen Leung  Name: Allen Leung
571  Date: 2000/06/15 00:38:00  Date: 2000/06/15 00:38:00
572  Tag: leunga-20000615-x86-peephole  Tag: leunga-20000615-x86-peephole

Legend:
Removed from v.660  
changed lines
  Added in v.690

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