Re: Seeking info on LM3 and Modula-3 compiler(s)
To: John J Rood <firstname.lastname@example.org>
Subject: Re: Seeking info on LM3 and Modula-3 compiler(s)
Date: Tue, 27 Sep 94 12:45:33 -0700
Cc: kalsow, horning
Delivery-Date: Tue, 27 Sep 94 12:45:41 -0700
I append excerpts from the Larch README (node larch.lcs.mit.edu, file
/pub/Larch/README) and the MODULA-3 FAQ, which should answer a number of
your questions. Other good sources are:
for general Larch information, the mailing list email@example.com;
for specific information on planned Larch tools, Steve Garland
for general Modula-3 information, the usenet group comp.lang.modula3, and
for Modula-3 compiler information, Bill Kalsow <firstname.lastname@example.org>.
Bill has been working on a Modula-3 "lite," a fast-turn-around Modula-3
programming environment for PCs.
1) What compilers are available for Modula-3? What platforms do
they run on? Is it possible to find a compiler which runs on a
PC? More than one? Under what operating system(s)?
Quite a few, see the FAQ.
2) Do I need to run under Unix to use the Larch system? What about
"Linux"? What language is LM3 written in? If it doesn't run on a
PC, could it be ported? What about other Larch tools?
I'm not aware of any port of the Larch tools to Linux. The first step
would be porting the Portable CLU compiler runtime to Linux; I have no idea
how hard that would be.
I should also warn you that LM3 was never fully implemented, and no LM3
tools are available. Lack of resources, and more interest in C among
potential users. :-(
The Larch Tool Set
MIT/LCS Distribution Site
March 26, 1993
(updated Apr 10, 1994)
The Larch family of specification languages supports a two-tiered,
definitional style of specification for program module interfaces. Each
specification has components written in two languages: one language that is
designed for a specific programming language and another language that is
independent of any programming language. The former kind are called Larch
interface languages, and the latter is the Larch Shared Language (LSL).
The Larch Tool Set contains tools that can be used to analyze and reason
about Larch specifications. The following tools are available by anonymous ftp
from the directory pub/Larch on larch.lcs.mit.edu. For each tool, <platform>
is one of the following supported system architectures:
alpha DEC Alpha AXP running OSF/1
decmips DECstation running Ultrix
solaris Sparcstation running Solaris
sparc, sunos Sparcstation running SunOS 4.1
vax DEC VAX running Ultrix or Berkeley Unix 4.3 with NFS
lsl: Larch Shared Language Checker.
Checks syntax and sorts in LSL specifications.
Release 2.4 fixes several bugs in the previous release.
Run-time library: lsl2.4.lib.tar.Z
lcl: Larch/C Interface Language Checker. (superceded by lclint)
Checks syntax and types in LCL specifications.
Release 2.4 completed supersedes all prior releases.
Run-time library: Old/lcl2.4.lib.tar.Z
Uses LCL specifications to perform static checks on
Includes all functionality of LCL, plus checks involving
Look at lclint/README for more information.
Installation package: lclint/lclint<version>.<platform>.tar.Z
Includes lclint, lsl, standard libraries and documentation.
See INSTALL (after un'taring) for details.
Build package: lclint/lclint<version>.src.tar.Z
Source code (including test suite)
lp: The Larch Prover.
Assists with proofs in a subset of first-order logic with equality.
Release 2.4 fixes several bugs in Release 2.2.
Run-time library: lp2.4.lib.tar.Z
For documentation about Larch, and for descriptions of the Larch tools and
their use, see
 ``Larch: Languages and Tools for Formal Specification,''
John V. Guttag and James J. Horning (editors), with
Stephen J. Garland, Kevin D. Jones, Andres Modet and Jeannette M. Wing,
Springer-Verlag, Texts and Monographs in Computer Science, 1993.
 Stephen J. Garland and John V. Guttag,
``A Guide to LP, The Larch Prover,'' Research Report 82,
DEC Systems Research Center, 130 Lytton Avenue, Palo Alto, CA 94301.
A hardcopy can be ordered by sending e-mail to email@example.com.
PostScript files containing an addendum to, and an updated version of,
this report are part of the LP distribution.
The distribution also contains man pages for the Larch tools, grammars for
the Larch languages, on-line help for the Larch Prover, and a file
larchDocs.tar.Z that contains a constantly updated version of the bibliography
in , a list of errata for , and a LaTeX style for displaying Larch
How to get the Larch tools
1. Type the following commands to initiate an anonymous ftp session:
csh> ftp larch.lcs.mit.edu
ftp> cd pub/Larch
2. Retrieve a compressed executable for each tool you desire by typing
3. Retrieve the run-time library for each tool you will be using by typing
How to install the Larch tools
1. Create a directory to hold the tools and their run-time libraries, e.g.,
/u/Larch. Create a subdirectory to hold the tools, e.g., /u/Larch/bin.
2. Move the files you retrieved to /u/Larch and uncompress them (by typing
3. Install the executables in /u/Larch/bin, removing the version number and
platform as you do this (e.g., by typing "mv lsl2.4.sparc bin/lsl"). Type
"chmod +x bin/*" to make the tools executable.
4. Enable the tools to be invoked by Unix shell commands, either by putting
/u/Larch/bin on your search path or by putting symbolic links to the tools
in some directory (e.g., /usr/local) that is on your search path.
5. Install the run-time libraries by using tar to extract their contents,
e.g., by typing "tar xf lsl2.4.lib.tar". This will create subdirectories
named LSL, LCL, and LP of the Larch directory. The subdirectory for each
tool has the following subdirectories:
docs/ Contains a man page and a grammar.
lib/ Contains run-time support.
samples/ Contains sample specifications or proofs.
6. If you will be using both the LCL and the LSL checkers, issue the following
shell command (or put the following line in your .login file):
setenv LARCH_PATH .:/u/Larch/LCL/lib:/u/Larch/LSL/lib
If you will be using only the LSL checker, use the following instead:
setenv LARCH_PATH .:/u/Larch/LSL/lib
7. If you will be using LP, make /usr/local/lib/lp a symbolic link to
/u/Larch/LP/lib. If you cannot do this, alias the command "lp" to
"lp -d /u/Larch/LP/lib".
8. Copy the man pages (/u/Larch/LSL/docs/lsl.l, /u/Larch/LCL/docs/lcl.l, and
/u/Larch/LP/docs/lp.l) to /usr/man/manl. To see the man page for LP, users
need to type "man l lp".
Using the Larch tools
Type: "lsl xxx" to check the LSL trait named xxx in the file named xxx.lsl.
"lcl xxx" to check the LCL specification in the file named xxx.lcl.
"lp" to initiate an interactive session with LP.
See the man pages for more details...
------- Forwarded Message
From: Michel Dagenais <firstname.lastname@example.org>
Date: Tue, 30 Aug 1994 18:55:46 GMT
Subject: Modula-3 Frequently Asked Questions (FAQ)
Sender: email@example.com (Michel Dagenais)
Michel Dagenais, firstname.lastname@example.org
v2.2, 30 August 1994
* What is new?
* The language
+ What is Modula-3?
+ Is Modula-3 a superset of Modula-2?
* The documentation
+ Where can I get a description of Modula-3?
+ Where can I get other information on Modula-3?
* The implementations
+ Where can I get an implementation?
+ What is SRC Modula-3?
+ What is m3pc?
* Some specific questions
+ Why is "Hello World" so large?
+ Why objects and interfaces?
+ Comparisons between Modula-3 and other languages?
+ What is the story with Trestle and OpenWindows?
+ Linking with C++ code
+ Flushing writers to see the output immediately
+ How To Obtain Pre-Compiled Binaries
+ What if I don't have ftp access?
+ Can I contribute Modula-3 software?
+ ILU, an object-oriented multi-lingual RPC-capable module
* Modula-3 for teaching
* Modula-3 In Industry
* Work In Progress
+ The SRC Compiler
+ Modula-2 To Modula-3 Converter
+ Integrated Development Environment
+ Windowing And User Interfaces
o Rotated Text
o Postscript VBTs
+ Persistent Objects
+ Abstract Syntax Tree Tools (M3 Parser)
+ Computer Assisted Learning Tools (Algorithm Animation)
+ Presentations, Tutorials And Teaching Material
+ Reports And Books
+ Parallel Programming
* Wish List
+ Coverage And Performance Analysis
+ More VBTs
+ Distributed Computing (Network Objects)
+ Interfaces To Other Libraries And Programs (Tcl, Dps...)
* Who's Who
This document contains references to most of the material available
on the Modula-3 language, compiler, tools and libraries. It should
answer all the most frequently asked questions about Modula-3. The
FAQ was originally written by Eric Muller. Send corrections,
suggestions, additions to the current maintainer, Michel Dagenais
The postscript version is available on
An hypertext WWW version is found on
WHAT IS NEW?
Release 3.3 from DEC SRC recently came out. Its content is listed in
the FAQ. A list of known problems and patches is now available and
referenced in the FAQ.
The language definition and documentation for most of the libraries is
now available on the World Wide Web (thus accessible through Mosaic)
What is Modula-3?
Modula-3 is a systems programming language that descends from Mesa,
Modula-2, Cedar, and Modula-2+. It also resembles its cousins Object
Pascal, Oberon, and Euclid.
The goal of Modula-3 is to be as simple and safe as it can be while
meeting the needs of modern systems programmers. Instead of exploring
new features, they studied the features of the Modula family of
languages that have proven themselves in practice and tried to
simplify them into a harmonious language. They found that most of the
successful features were aimed at one of two main goals: greater
robustness, and a simpler, more systematic type system.
Modula-3 retains one of Modula-2's most successful features, the
provision for explicit interfaces between modules. It adds objects and
classes, exception handling, garbage collection, lightweight processes
(or threads), and the isolation of unsafe features.
Is Modula-3 a superset of Modula-2?
No; valid Modula-2 programs are not valid Modula-3 programs. However,
there is a tool to help convert Modula-2 programs to Modula-3.
Where can I get a description of Modula-3?
The language definition and most electronically available Modula-3
information can be accessed on:
The definition of Modula-3 is contained in:
* System Programming with Modula-3 Edited by Greg Nelson Prentice
Hall Series in Innovative Technology ISBN 0-13-590464-1 L.C.
also known as SPwM3. Here is the table of contents:
2. Language Definition
3. Standard Interfaces
4. An Introduction to Programming with Threads
5. Thread Synchronization: A Formal Specification
6. I/O Streams: Abstract Types, Real Programs
7. Trestle Window System Tutorial
8. How the Language Got its Spots
Chapters 2 and 3 have been reprinted in Sigplan Notices, Volume 27,
Number 8, August 1992, pp 15-42.
Sam Harbison has written a more tutorial book about Modula3:
* Modula-3 Samuel P. Harbison Prentice Hall, 1992 ISBN 0-13-596396-6
The table of contents is as follows:
4. Basic Types
5. Structured Types
8. Interfaces and Modules
10. Dynamic Programming
13. Low-Level Programming
14. Programming Conventions
15. SRC Modula-3
16. Modula-3 Syntax
17. Answers to Selected Exercises
The errata sheet is available via anonymous ftp from
gatekeeper.dec.com in pub/DEC/Modula-3/errata.
If you cannot find these books at your favorite bookstore, here are
bookstores connected to the net known to carry them:
UCI carries both books:
While Roswell is known to at least carry the language definition
Roswell Electronic Computer Bookstore (email@example.com)
Where can I get other information on Modula-3?
There is a Usenet newsgroup, comp.lang.modula3. The archives of that
group are available via anonymous ftp from gatekeeper.dec.com in
pub/DEC/Modula-3/comp.lang.modula3. If you do not have access to
Usenet, there is a relay mailing list; send a message to
firstname.lastname@example.org to be added to it.
There are a couple high-level overview articles available:
* ``Modula-3'', Sam Harbison, Byte, Vol. 15, No. 12, November 1990,
* ``Safe Programming with Modula-3'', Sam Harbison, Dr. Dobb's
Journal, Vol. 17, No. 10, October 1992, pp 88+.
A description of the Modula-3 type system is in
* ``The Modula-3 Type System'', Luca Cardelli, Jim Donahue, Mick
Jordan, Bill Kalsow, Greg Nelson, Conference Record of the
Sixteenth Annual ACM Symposium on Principles of Programming
Languages (POPL), Austin Texas, January 11-13 1989, pp 202-212.
The Modula-3 treatment of floating-point values is described in
* ``The Design of Floating-Point Data Types'', David Goldberg, ACM
Letters on Programming Languages and Systems (LOPLAS), June 1992,
Vol 1, no.2, pp 138-151
The core library interfaces are described and indexed in
* ``Some Useful Modula-3 Interfaces'', Jim Horning, Bill Kalsow,
Paul McJones, Greg Nelson, SRC Research Report 113. Available via
anonymous FTP from gatekeeper.dec.com in
* ``Pickles: a system for automatic serialization of typed values'',
Andrew Birrell, Greg Nelson, Susan Owicki, Edward Wobber, Systems
Research Center, Digital Equipment Corp., in preparation.
The Trestle window system toolkit, higher-level FormsVBT toolkit, and
Zeus animation system available with Modula-3, are documented in the
* ``Trestle Reference Manual'', Mark S. Manasse and Greg Nelson, SRC
Research Report 68, December 1991.
* ``Trestle Tutorial'', Mark S. Manasse and Greg Nelson, SRC
Research Report 69, May 1, 1992.
* ``VBTkit Reference Manual: A toolkit for Trestle'', edited by Marc
H. Brown and James R. Meehan. (to be a SRC Research Report) A
draft version is available via anonymous FTP from
* ``The FormsVBT Reference Manual'', Marc H. Brown and James R.
Meehan, (to be a SRC Research Report). A draft version is
available via anonymous FTP from gatekeeper.dec.com in
* ``Zeus: A System for Algorithm Animation and Multi-View Editing'',
Marc H. Brown, SRC Research Report 75, February 28, 1992.
Available via anonymous FTP from gatekeeper.dec.com in
* ``Color and Sound in Algorithm Animation'', Marc H. Brown and John
Hershberger, SRC Research Report 76a, August 30, 1991. Available
via anonymous FTP from gatekeeper.dec.com in
Color and Sound
* ``The 1992 SRC Algorithm Animation Festival'', Marc H. Brown, SRC
Research Report 98, March 27, 1993. Available via anonymous ftp
from gatekeeper.dec.com in
Network objects are described in the following reports:
* ``Network Objects'', Andrew Birrell, Greg Nelson, Susan Owicki,
and Edward Wobber, SRC Research Report 115, February 28, 1994.
Available via anonymous FTP from gatekeeper.dec.com in
* ``Distributed garbage collection for Network Objects'', Andrew
Birrell, David Evers, Greg Nelson, Susan Owicki, and Edward
Wobber, SRC Research Report 116, December 1993. Available via
anonymous FTP from gatekeeper.dec.com in
While the Obliq embeddable interpreter is documented in:
* ``Obliq: A lightweight language for network objects'', Luca
Cardelli, User's Manual, Systems Research Center, Digital
Equipment Corp., 1994. Available via anonymous FTP from
gatekeeper.dec.com in pub/DEC/Modula-3/contrib/Obliq.ps.
Hardcopy versions of these reports can be ordered by e-mail; send your
request including a postal mail address to email@example.com.
SRC research reports
Sedgewick's classic text on computer algorithms is presented in
* Algorithms in Modula-3 Robert Sedgewick Addison-Wesley, 1993 ISBN
Where can I get an implementation?
Two implementations are available, SRC Modula-3 and a PC version of it
As far as we know, implementations are not available for VMS,
What is SRC Modula-3?
SRC Modula-3 was built by the DEC Systems Research Center and is
available via anonymous ftp from gatekeeper.dec.com in
pub/DEC/Modula-3. The most recent version is release 3.3. The previous
release, 3.1, was a major new release intended mostly for porting to
architectures other than DEC. A list of known problems and patches is
This release is known to work on at least on the DS3100, HPPA, SPARC
and LINUX architectures. The SPARC release notes may be found on
ftp.gte.com:pub/m3 while the LINUX ones are available on
ftp.vlsi.polymtl.ca:pub/m3/linux/README and the HPPA notes are in
SPARC release notes
LINUX release notes
HPPA release notes
The compiler implements the language defined in SPwM3. There are
versions for the architectures listed below. While SRC can test on
DS3100, ALPHA/OSF and LINUX, it can only rely on what users on other
platforms tell them to integrate all the platform specific code.
Because of the improved portability of the 3.* release, ports to non
Unix platforms are easier. A port to Windows NT and/or Windows 3.1 may
be available in the future. The Windows NT port, in progress, uses
native threads. This should be a good model for other implementations
of Thread using native threads.
* AIX386 IBM PC running AIX/PS2,
* AOSF DEC Alpha AXP running OSF/1
* AP3000 Apollo DN4500 running Domain/OS
* ARM Acorn R260 running RISC iX 1.21
* DS3100 DECstation 3100 and 5000 running Ultrix 4.0 and 4.2
* HP300 HP 9000/300 running HP-UX 8.0
* HPPA HP 9000/700, 9000/800 running HP-UX 8.0
* IBMR2 IBM R6000 running AIX 3.1,
* IBMRT IBM RT running IBM/4.3,
* LINUX Intel 386 running LINUX
* NEXT NeXT running ??
* NT386 Intel 386 running Windows NT
* OKI Okidata 7300 (i860) running UNIX SVR4.0
* SEQUENT Sequent computers running ??
* SOL2 Sparc running Solaris 2.x
* SPARC SPARCstation running SunOS 4.1.x
* SUN3 SUN3 running SunOS
* SUN386 Sun 386i running SunOS 4.0.1
* UMAX Encore Multimax running UMAX 4.3 (R4.1.1)
* VAX VAX running Ultrix 3.1
The new native compiler is based on GCC and should be fairly easy to
port. Except for the very lowest levels of the thread implementation,
the entire system is written in Modula-3.
The DEC SRC Modula-3 release 3.3 contains the following:
* A native code compiler: uses the GCC backend; on
machines/operating systems that have self-describing stacks, an
optimized exception handling mechanism is provided, on other
architectures, setjmp/longjmp is used.
The compilation system provides for minimal recompilation. Only
those units that depend on the modified interface item will be
* m3utils/m3build: tool that performs dependency analysis and builds
the Modula-3 programs and libraries.
* A large standard library (libm3) providing
+ A multithread, incremental, generational, conservative
+ Text manipulation.
+ Generic Containers: Lists, Sequences, Tables, SortedLists,
+ Atoms and Symbolic expressions (Lisp like lists)
+ An extensible stream IO system
+ Typesafe binary object transcription (persistent objects)
+ Operating system interfaces
+ Portable interfaces to the language runtime
All standard libraries are thread-friendly. Modula-3 can readily
link with existing C libraries; many libraries including X11R4 and
various UNIX libraries are available as part of libm3.
* m3gdb: a Modula-3 aware version of GDB.
* trestle: a multi-threaded window system interface that sits on top
of X windows. It is not unlike InterViews and comes with several
* trestle/tcp: a library for simplified access to TCP/IP.
* vbtkit: a higher level toolkit on top of Trestle. It offers
buttons, menus, editors, file choosers... and has a Motif-like
look and feel.
* formsvbt: an interactive user interface builder. A symbolic
expression representing the user interface is edited and the
graphical view is immediately produced.
* tools/coverage: tool to determine the number of times each
statement is executed.
* tools/pp: pretty printer for Modula-3 programs.
* tools/gnuemacs: emacs lisp files to help editing and debugging
Modula-3 programs in emacs.
* tools/m3bundle: tool to bundle data files into an executable to
produce standalone programs.
* tools/m3totex: extract TeX documentation from Modula-3 programs
for a form of literate programming.
* tools/showheap: tool to graphically see the behavior of the
* tools/shownew: tool to graphically see the allocation behavior of
a running program.
* tools/showthread: tool to see the activation of threads in a
* zeus: framework to develop graphical animations of algorithms
(heapsort, quicksort, LRU cache replacement, network protocols...)
for visualization and teaching purposes.
* mentor: a dozen of animations developed using Zeus.
* netobj: network objects that allow the transparent execution of
methods across process and machine boundaries. A simple yet very
effective way to build distributed applications.
* obliq: simple, interpreted, lexically scoped, object oriented,
distributed programming language that can be embedded in Modula-3
programs and call/be-called by Modula-3 procedures. The Obliq
object model is based on prototypes and delegation.
* A framework for parsing and analyzing Modula-3 programs. This is a
complete AST toolkit for Modula-3. This can parse arbitrary
Modula-3 sources (input isn't required to be a complete unit) and
produce detailed ASTs representing the input. The ASTs can be used
to do a variety of semantic analysis tasks, or program generation
tasks similar to Lisp environments. (m3tk).
* pkgtools/smalldb: library to store objects on disk with logging
and recovery capabilities.
* pkgtools: distribution tool that insures that several copies of a
package (software, document...) are updated simultaneously.
* postcard: mail and news reading environment.
* visualobliq: a graphical user interface builder coupled with a
simple yet powerful interpreted language, Obliq, for rapid
development of interactive distributed applications.
* This is a rather new component and is undergoing a fair amount of
evolution; however, it is still very useful and exciting. Visual
Obliq provides an application builder similiar in nature to Visual
Basic. However, it uses Obliq as its scripting language. This
makes it easy to build and prototype interesting distributed and
groupware applications. It can be used for building
non-distributed applications as well.
* misc/tcl: interface to access the Tcl language from Modula-3.
* misc/dps: interface to access Display Postscript from Modula-3.
* games: more sample Trestle applications.
What is m3pc?
A newer version of m3pc, code named EX32 in the README file, is
available via anonymous ftp from gatekeeper.dec.com in
From the README, written by Klaus Preschern:
EX32 ("A 32-bit Extension of DOS") is a environment for the
developement and execution of 32-bit applications with DOS.
EX32 is a collection of DOS programs (drivers + kernel). It provides
services for applications executed in protected mode. It does process
management, virtual memory management, interprocess communication via
pipes and it offers a file system with 32 character filenames.
EX32 runs on MS-DOS 5.00, 6.00 and 6.02. You need a i386/i387
(coprocessor required) or upward (i486, Pentium). EX32 supports DOS
XMS memory (but not EMS, VCPI or DPMI). No support for the i286. You
should have at least 4 MB memory (8 MB or more recommended). The whole
package occupies unzipped and untared approximately 44 MB of disk
EX32 comes with GNU C++ (version 2.4.5), SRC Modula-3 (version 3.1,
including threads), two C libraries, a graphics library for VGA and a
number of commands (i.e. ls, cp, rm, mkdir, make, ...).
Note: This is a system for experienced programmers! They should be
familiar with Unix and DOS.
Michel Dagenais, firstname.lastname@example.org, Tue Aug 30 14:10:56 GMT
Prof. Michel Dagenais email@example.com
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal tel: (514) 340-4029
------- End of Forwarded Message