CS457/557 Functional Languages Spring 1997
Course Information
Lecture Notes
Projects
Suggested topics (html) (postscript)
The sml-tk system, which is based on SML of NJ, is now installed as /pkgs/sml/bin/sml-tk.
Documentation is online in html or postscript.
A useful timing routine for SML/NJ.
Suggested Exercises
You should do as many exercises as you can, but the following are particularly suggested:
First Set:
- Reade 1.1, 1.3, 1.5, 1.7, 1.8, 1.12, 1.13, 1.24, 1.27, 1.28, 1.29, 1.30
- Ullman 1.2, 2.2, 4.1, 4.3, 4.4, 4.5, 5.1(b,c,f), 5.2(a,b,c)
- Suggested solutions (in addition to those in the backs of the books)
Second Set:
- Reade 2.1, 2.3, 2.6, 2.8, 2.10, 2.11, 2.14, 2.15, 2.19, 2.31, 3.1, 3.5, 3.8, 3.13, 3.14, 3.17, 3.28
- Ullman 6.1(a,b), 6.2, 6.3, 6.6, 6.10, 6.11, 6.12, 10.1, 10.3, 10.4, 11.5(a,b), 11.6(a,b,d), 11.9, 11.11, 11.12(a), 11.14
- Suggested solutions (in addition to those in the backs of the books)
Third Set:
- Reade 5.1, 5.3, 5.5, 5.7, 5.10, 5.15, 5.26
- Ullman 12.1, 12.3, 12.4, 12.5, 13.1, 13.2, 13.4, 13.7
- Suggested solutions (in addition to those in the backs of the books)
Fourth Set:
- Reade 7.3, 7.4, 7.5, 7.6, 7.11
- Ullman 9.1, 9.3, 14.1, 14.2, 14.3, 14.9, 15.4, 15.5, 16.1, 16.2, 17.1, 17.5, 17.10(a)
- Suggested solutions (in addition to those in the backs of the books)
Hints on SML
Both Reade and Ullman reflect "SML90", the original version of Standard ML.
The SML/NJ compiler, "sml", compiles this version, with some upward-compatible
extensions; Ullman may make use of some of these. All the examples in Reade and
Ullman should compile without problems using "sml".
The Moscow ML interpreter, "mosml", interprets a (subset of) a
more recent variant of SML by default.
Since this variant isn't upward-compatible, some code in Reade and Ullman will fail.
To configure mosml to make it behave as much like SML/NJ as possible, start it up
as follows: "mosml -imptypes -P NJ93".
In this configuration, it can successfully compile Reade's
noModules.ML
file, which contains all the library code Reade uses (in a format that avoids relying on
the SML module system, which mosml doesn't support).
Potentially Useful Links