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

Legend:
Removed from v.666  
changed lines
  Added in v.692

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