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)
From Version 11
Changes: (tyj)

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.

Renaming: start_timing -> start_timer, check_time -> check_timer

Closed Byte_array in the initial environment.

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.

Added use_stream and open_string.

input and output are improved.

IO and Byte_array have been abstracted.

Coerced length to String.length because bytearray was opened.

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.

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.

Renamed export1 to exportFn.

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.

Rearrangement of standard functions and various cleanup.
All export and use functions now reside in ExtendedIO.

Got rid of the obsolete NOTDEF flag.

Got rid of readfile.

Got rid of KNOWNFUNC and the knownfunc flag.
Got rid of the primapp flag--primapp is always true.

Moved saveLvarNames to the Control structure.

Added object code for Andrew's reopening closures: getval, followpath.
Added some timer functions.

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.

Added execute.  Seems buggy.

Changed debugmsg and flaggedmsg to return a bool--whether or not the message
was printed.

Added code to time phases of compilation.

Fixed a bug in can_input--it always returned 0.

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.

Improved closure printing slightly.

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

Got rid of applyknown, which was used for knownfuncs.

reduce was copying strings and reals; I fixed this by modifying simple.

Changes (dbm):

Added "withtype" declaration.  This envolved changing the type of the
DATATYPEdec constructor.  Declaration itself is handled in Parse.ldec.

Added infix specifications to signatures.

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.

Saved signatureVars for pervasive signatures and rebound them after reset
in functions bootEnv and bootEnv1.

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).

Fixed bug in implementation of abstraction within functor body.  Wasn't
being instantiated properly on functor application.

Changed name of structure SymbolTable to Symbols.  Signature is called SYMBOLS.

Notfound_Table was not being handled in qualified ids in signatures and 
expressions.  Fixed by changing tyconQid in sign and qid.

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.

Changed primitives for managing input sources to a push/pop discipline.
These primitives are no longer responsible for closing files or streams.

Implemented alternate "spread" functor syntax, including null parameter
as special case.

Implemented functors without result signatures.  Main function is buildFctTable
defined in envaccess.sml.

Improved type error messages slightly.

Known bugs: (tyj)

There is a bug in the typechecker involving flexible records and as.  For
	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))
  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;"


* 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


* 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.

ViewVC Help
Powered by ViewVC 1.0.0