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

SCM Repository

[smlnj] View of /archive/mlprof.1/doc/VERSION.12
ViewVC logotype

View of /archive/mlprof.1/doc/VERSION.12

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4054 - (download) (annotate)
Wed Feb 4 20:42:42 2015 UTC (4 years, 5 months ago) by dbm
File size: 11478 byte(s)
Initial import of archive (of early versions of sml/nj)
==============================================================================
Standard ML of New Jersey, Version 12  (Beta 2)
11/25/87
From Version 11
==============================================================================
Changes: (tyj)

{boot/{perv.{sig,sml},{prim,assembly,overloads}.sml},build/invoke.sml,link}
Renaming: DataTypes -> PrimTypes, InLinePrim -> InLine
Signature renaming, split stuff into more files, changed invoke and prim
to accommodate.  Files added: boot/{builtin,assembly,system,initial}.sig.
Added fixities to signatures.

{boot/perv.sml,boot/initial.sig}
Renaming: start_timing -> start_timer, check_time -> check_timer

{boot/perv.sml}
Closed Byte_array in the initial environment.

{{lex/scan,boot/perv}.sml,boot/{initial,perv}.sig}
Changed can_input so that it returns the number of characters which
can be read without blocking, rather than make you guess.  If you open
a file and can_input the stream, you will get the file length.

{boot/{perv.{sml,sig},initial.sig}}
Added use_stream and open_string.

{boot/perv.sml}
input and output are improved.

{boot/perv.sml}
IO and Byte_array have been abstracted.

{lex/symtab.sml}
Coerced length to String.length because bytearray was opened.

{{util/printutil,boot/perv,print/printdec}.sml,boot/system.sig}
Added a Print structure to Control, moved printDepth from printdec to
the new Print, added a stringDepth which is checked in pr_mlstr in printutil.

{{boot/perv,boot/initial}.sig,{boot/perv,lex/scan}.sml}
Added set_term_in and set_term_out.  The significance of terminal streams is:
outstreams are flushed on newlines; if the instream happens to be the input
to the compiler, prompts will be printed and error messages will not be
preceded by the name of the file (for instance "std_in").  set_term_in is
not enough by itself to change this behavior; one must reset the stream,
for instance by 'use'ing another file.

{boot/{perv.{sml,sig},initial.sig},runtime/{VAX,M68}.prim.s}
Renamed export1 to exportFn.

{boot/{perv,loader}.sml,boot/system.sig,runtime/*}
Added a cleanup function which flushes std_out and closes all streams;
needed by the loader (if the batch system exits properly) and the runtime
system (if there is an uncaught exception) on exit.
Modified exportFn, which now sets std_in and std_out properly on startup,
and passes both commandline args and the shell environment to its argument.
Untested on vaxbsd.

{boot/{perv.sml,{system,initial,perv}.sig}
Rearrangement of standard functions and various cleanup.
All export and use functions now reside in ExtendedIO.

{runtime/{makefile*,callgc.c}}
Got rid of the obsolete NOTDEF flag.

{runtime/run.c,boot/{{loader,perv}.sml,{perv,system}.sig},build/invoke.sml}
Got rid of readfile.

{boot/{perv.sml,system.sig},build/compile.sml,codegen/{codenv,codegen}.sml}
Got rid of KNOWNFUNC and the knownfunc flag.
Got rid of the primapp flag--primapp is always true.

{boot/{perv.sml,system.sig},basics/access.sml}
Moved saveLvarNames to the Control structure.

{boot/{perv.sml,system.sig}}
Added object code for Andrew's reopening closures: getval, followpath.
Added some timer functions.

{boot/{perv,math}.sml,link}
Hooked up math functions.  The current implementation is mostly in ML and
is temporary--eventually a math functor should be hand-coded in assembly
for each machine.

{boot/perv.sml,runtime/{VAX,M68}.prim.s}
Added execute.  Seems buggy.

{util/errormsg.sml}
Changed debugmsg and flaggedmsg to return a bool--whether or not the message
was printed.

{build/{invoke,compile}.sml,boot/{perv.sml,system.sig}}
Added code to time phases of compilation.

{runtime/M68.prim.s}
Fixed a bug in can_input--it always returned 0.

{build/invoke,vax/vaxgen,m68/m68gen,codegen/{codenv,codegen}}.sml
{codegen/machine.sig}
Changed the code generator to output a tag before each function.  This
tag will be a mapping from code blocks to lvars eventually, to be used
in reopening closures.  It makes the scratch word for the garbage
collector unnecessary, so it was removed from invoke.

{codegen/{codenv,codegen}.sml}
Improved closure printing slightly.

{codegen/backpatch.sml}
Bug fix: when I changed the code generator to emit lvar tags, I forgot to
change initialoffset in backpatch.

{vax/vaxgen.sml,m68/m68gen.sml}
Got rid of applyknown, which was used for knownfuncs.

{codegen/opt.sml}
reduce was copying strings and reals; I fixed this by modifying simple.

==============================================================================
Changes (dbm):

{absyn/{bareabsyn.{sig,sml},printabsyn.sml},print/printdec.sml,parse/parse.sml}
Added "withtype" declaration.  This envolved changing the type of the
DATATYPEdec constructor.  Declaration itself is handled in Parse.ldec.

{env/envaccess.sml,parse/parse.sml}
Added infix specifications to signatures.

{env/envaccess.{sig,sml},parse/parse.sml,build/invoke.sml}
Changed handling of pervasive structures slightly.  Now the reference
EnvAccess.pervasives contains a list of structureVars rather than
(info*table) pairs.  Changed Parse.openOldStr and the initializations
in Invoke.bootEnv[1] accordingly.

{invoke.sml}
Saved signatureVars for pervasive signatures and rebound them after reset
in functions bootEnv and bootEnv1.

{absyn/*,parse/parse.sml,translate/translate.sml,build/invoke.sml}
Simultaneous structure and functor declarations.  Changed types of dec
constructors STRdec, ABSdec, FCTdec to take lists of bindings.  Added
transSTRB and transFCTB to Translate for use in invoke (replacing topdec).

{typing/sigmatch.sml}
Fixed bug in implementation of abstraction within functor body.  Wasn't
being instantiated properly on functor application.

{lex/symtab.sml,...}
Changed name of structure SymbolTable to Symbols.  Signature is called SYMBOLS.

{parse/parse.sml}
Notfound_Table was not being handled in qualified ids in signatures and 
expressions.  Fixed by changing tyconQid in sign and qid.

{absyn/printabsyn.sml,typing/typecheck.sml,translate/{mc,mcprint,translate}.sml,
 print/printdec.sml}
Improved printing of abstract syntax by adding depth limit (controlled by
System.Control.Print.printDepth, but probably should have its own limit)
and (bogus) indentation.

{lex/lex.{sig,sml},build/invoke.sml}
Changed primitives for managing input sources to a push/pop discipline.
These primitives are no longer responsible for closing files or streams.

{parse/parse.sml}
Implemented alternate "spread" functor syntax, including null parameter
as special case.

{basics/basics.{sig,sml},env/envaccess.{sig,sml},typing/sigmatch.sml,
 parse/parse.sml}
Implemented functors without result signatures.  Main function is buildFctTable
defined in envaccess.sml.

{typing/typecheck.sml}
Improved type error messages slightly.

==============================================================================
Known bugs: (tyj)

There is a bug in the typechecker involving flexible records and as.  For
example:
	type A = {a:int,b:int}
	fun f ({a=1,...}:A) = 0
	  | f (foo as {b=1,...}) = 1
 will not typecheck; an explicit typing will temporarily fix this:
	fun f ({a=1,...}:A) = 0
	  | f (foo as {b=1,...}:A) = 1

system and cd may need raise exceptions (they don't).
execute is a bit buggy.  Use with caution.

exportFn is untested on vaxbsd.

Note timers will act strangely across exports.

- 432E432;
Error: Real constant out of range
- it;
val it = uncaught exception Boxity

Poor error message on:
- fun f hd::tl = 4;
Error: expected EQUAL, found ID (::)
Error: nonfix-identifier expected
Error: unbound variable bogus
Error: type error: operator and operand don't agree
operator : ((??*?? list) -> ?? list)
operand : (??*('x1911A list -> 'x1911A list))
expression:
  bogus :: tl
- 
The "unbound variable bogus" is confusing.

The behavior of the system when it reaches limits is sometimes bizarre.
For instance, on a Sun, if the system runs out of stack space it
will die with "Illegal instruction".  Note that the stack limit can
be changed with the limit command; and hopefully this particular bug will
disappear with the next version of the code generator.

Top level bindings should not report on exhaustiveness, but they do.

-          8.69169476570297E~309;	(* inaccurate real; *)
> val it = 8.69169476570301E~309 : real
-          8.69169476570301E~309;	(* possibly a printing error? *)
> val it = 8.69169476570305E~309 : real

Exceptions do not print by name/value; only "-".  This cannot be fixed
 unless the runtime representation of exceptions is changed radically--
 it must be modified to include type information, and may not be
 worth the effort.
Also, a declaration "exception b = a" can be a bit deceiving; the runtime
 name of b will be that of a.  Fixing this would also require a significant
 change in the runtime format of exceptions.
What should the interactive system print when it catches an exception?  It
 knows about some exceptions like Float and Io_failure, so it could
 print their full values.  This would be confusing, though, since no
 other exceptions would be printed in full; a user would think there
 was something wrong with his exception when the name and not the value
 was printed.

==============================================================================
Notes: (tyj)

Printing of types needs to be cleaned up: <hidden> and paths are needed;
 attention to precedence of "->", etc., would reduce the number of parens;
 it would be nice if the compiler spit out the signature of a structure as
 it was parsed or opened.
Should the compiler force the capitalization convention for constructor names
 as well as exception names?  Should it discourage all other capitalized values?
 Right now it only complains if an exception is uncapitalized.  Maybe it
 should complain if a capitalized variable is introduced in a pattern.
The construct "val _ =" turns up all the time, so the match compiler has
 been changed so that _ counts as a variable in a pattern (the "binding
 contains no variables" message won't turn up).  It would be nice to unhack
 this by providing a "do" declaration, since "val _"  isn't very intuitive.
Maybe testcase_string should be changed.  Right now an equality function
 is generated for each case.  Perhaps inline string equality; can the
 offset be found by name?
Printing of infixes is slightly hacked because of the way infix is
 implemented; fixity is a lexical/syntactic property with scope rather than
 a property of a dataconstructor/value.

==============================================================================
Notes: (dbm)

Bad error messages

* message for circular type unification, as in "fun f x = f;"


Bugs

* no checking for duplicated specifications in signatures.  this should be done
  when building the signature symbol table

Optimizations and simplifications

* stupid expansion of simple function definitions into case form (FUNdec
  in Absyn).  E.g.

    fun f x = x  ==>
    val rec f = fn arg => case arg of x => x

* fix type abbreviations so that in simple cases the name is bound to the
  old type constructor (or a copy) rather than to type function.

* string hashing primitive in Assembly


Housekeeping

* eliminate nonexhaustive/redundant matches

* binding functions in EnvAccess are inconsistent in what they return.  Some
  return unit, others the variable that is bound.

* in envaccess.sml, iter... functions are trying to catch Notfound_Table
  exceptions raised by lookup functions, but these functions will not
  raise that exception.

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