======================================================================= 1 ===
Date:    1 Dec 1994 08:31:37 GMT
From:    Joseph Canedo <canedo@taec.enet.dec.com>
Subject: Q: Modula-3/Tk interface exists ?

Hello everyone,

Does an programming interface between Modula-3 and Tk (Tcl) 
exist ? I saw a file called m3tk.tar.gz in gatekeeper archive 
but it doesn't seem to be what I'm searching for.

Thanks in advance 

Best regards

Joseph Canedo



======================================================================= 2 ===
Date:    Thu, 1 Dec 1994 16:47:03 GMT
From:    bwbecker@dragon.uwaterloo.ca (Byron Weber Becker)
Subject: -D option on m3 (v3.3) compiler

For reasons I've previously stated in this newsgroup, I need
to use m3 in a more traditional unix fashion -- ie: NOT use
m3build.

I have written a custom wrapper that provides all the options to
the m3 compiler that are normally provided by m3build.  

The place where I'm stumped is that the compiler reports 
"unable to find interface (xxx)" and "imported object is not
an interface (xxx)".  These are not the libm3 interfaces --
I've got that figured out.  xxx is the interface to another
module that I've written.

xxx resides in the same directory as the interface/module 
being compiled.

The Web documentation to m3 says that it has no built-in search
path, so I specified "-D ." to search the current directory.
Then I get duplicate interface errors:  "xxx" and "./xxx".

I know that m3build lists every possible import for the 
compiler -- essentially -D would never be used when invoked
by m3build.  Does that mean it is a holdover from previous
versions and no longer works?

Any suggestions are welcome.


=====
Byron Weber Becker                               (519) 888-4567 x4661
Computer Science Lecturer/Advisor        bwbecker@dragon.uwaterloo.ca
University of Waterloo


======================================================================= 3 ===
Date:    Wed, 30 Nov 94 14:35:24 AST
From:    atlantic@isis.org.lc (Atlantic Internationa)
Subject: Cri de caeur

This is simply a cry of desperation, fromm deep within the heart.
This is not the appropriate forum for this posting, but I can think
of no other grouping of professionals capable of making a difference.

I, along with many others, have waited from 1981 for the publication
of Volume 4 - Art of Computer Programming.

Enough.  Enuth  :-(   this has over-taxed our collective patience.

My kids are now growing up, and I cannot postpone the onset of middle
age.  During this period, I have endured, I have kept the faith reading
"Bible Texts Illuminated", and have relaxed with a bit of math fiction -
-- "Surreal Numbers".  I have fought the good fight with the dragons TeX
and METAFONT, and got trapped in the Web (not the WWW).

I have paid my dues.   I now DEMAND Volumes 4-7.

Otherwise, since the relevant authorities lurk around Stanford, in the
proposition prone state of California. we may have to start a petition
for a new agenda - Proposition 188  ...

    That henceforth all religious activity must stop (no more
    illuminating bibles), that there shall be no more digressions
    surreal or otherwise, AND THAT a period of enforced house arrest
    be imposed until the work is finished.

....
I feel better now ... now can anyone point me to a MIX implementation
for Unix SVR4, or OS/2

Thanks ...
-------
Cletus J. Paul
atlantic@isis.org.lc








======================================================================= 4 ===
Date:    01 Dec 1994 19:52:39 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Q: Modula-3/Tk interface exists ?


In article <3bk1l9$nsd@vbohub.vbo.dec.com> Joseph Canedo <canedo@taec.enet.dec.
com> writes:

   Does an programming interface between Modula-3 and Tk (Tcl) exist ?
   I saw a file called m3tk.tar.gz in gatekeeper archive but it
   doesn't seem to be what I'm searching for.

Try browsing:
   ftp://ftp.vlsi.polymtl.ca:/lude/modula3-3.3/src/orig/misc/tcl or
just download misc.tar.gz from gatekeeper, and look in directory
"tcl". It may not be what you are looking for (as it doesn't have
interfaces for Tk and it may be a bit outdated) but it should provide
a good start. 

I imagine it would be nice if there was a Tk/Modula-3 (though I
personally don't care much for Tcl.)

Alternatively you can use FormsVBT which gives you about the same
power, but less customizability.

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 5 ===
Date:    2 Dec 1994 02:51:52 GMT
From:    pbh@cs.sunysb.edu (Peter B. Henderson)
Subject: ftp site, Modula3-v2.11

Thanks,

Peter Henderson

-- 
Peter B. Henderson
pbh@sbcs.sunysb.edu

Department of Computer Sceince


======================================================================= 6 ===
Date:    2 Dec 1994 09:22:04 GMT
From:    b37mrp@ku.ac.th (Mores Prachyabrued (Mark 37051554))
Subject: Performace of Modular 3

Hi all,

	I have heard about the great language called "Modular3", I want 
to know how good is it (compare to Pascal and C++) ? can you tell me the 
good points and bad points of it ?

						Thank you in advance.
						Mark Moris/Sapphire

					


======================================================================= 7 ===
Date:    Fri, 02 Dec 1994 13:59:53 +0900
From:    fstiffo@unive.it (Francesco Stiffoni)
Subject: Where Modula-3 for OS/2?

Where can I find Modula-3 for OS/2?

Thanks in advance to everyone

-- 
Francesco Stiffoni
University of Venice
Linguistic Department
Laboratory of Computational Linguistic


======================================================================= 8 ===
Date:    Fri, 2 Dec 94 20:46:11 -0500
From:    eskianis@csws15.ic.sunysb.edu (Evangelos N Skianis)
Subject: Re: How can I read from a file?

Thanks a lot

E.Skianis


======================================================================= 9 ===
Date:    02 Dec 1994 22:14:55 GMT
From:    iansmith@weasel.cc.gatech.edu (Ian Smith)
Subject: SOLgnu

I have spent some time trying to get the SRC modula3 distribution up
on solaris 2.3.  I have now failed (fairly) miserably two times and
was wondering if anyone could give me suggestions.... BTW: I'm using
gcc 2.6.0 on solaris 2.3, which I think is fairly stable.

1) I had trouble getting the run-time (libm3) to compile. I had to
modify RTThreadC.c to not #include <setjmp.h> since this was causing
a problem in the interaction of the gcc "fixed" headers and the
normal (/usr/include/sys) system headers. I just copied enough of
the file /usr/include/setjmp.h inline into the file to get the jmp_buf
structure defined and this seemed to be ok.

2) A more serious (apparently) problem is with the file genattrtab.c
in the m3cc section of the bootstrap.  The code generated for this
file (as seen in the binary 'genattrtab') has a bug when I used gcc.
It causes a core dump when the makefile tries to generate a machine
description with "genattrtab md > ..." I fixed (?) this problem by
using the solaris cc for genattrtab.c, and then the resulting
genattrtab ran fine and compilation continued.  (I also tried using
the genattrtab associated with gcc 2.6.0 with same (poor) results.)

3) Having done this I ended up with an m3cgc1 that looked
legit. However, any attempt to use the modula3 compiler (via
m3build) fails, and gives this:

m3build
--- building in SOLgnu ---
m3 -w1 -why -g -times -a libm3.a -F/tmp/qkAAAa0069N 
new source -> compiling ../src/runtime/common/RTHooks.i3
 
Fatal Error: program "/usr/local/modula3/SOLgnu/m3cgc1" failed, exit status = 1
34
 
 
 seconds  #times  operation
    0.01       1  inhaling library link info
    0.01       1  checking object timestamps
    2.75       1  merging new link info
   18.33       1  compiling Modula-3 -> IL
    3.88       1  compiling IL -> assembly
    0.25       3  garbage collection
    0.25          other
---------------------------------------------------
   25.47          TOTAL
 
I am trying to build libm3 from the sources, as per the instructions
on the Web site.  

Has anyone outthere gotten SOLgnu to work ? Does anyone know enough
about the m3cgc1 internals to know what "exit status = 134" is a
symptom of?

thanks
ian
-- 
The frequency is 91.1 MHz and my name's not 'Kenneth.'
iansmith@cc.gatech.edu







======================================================================= 10 ===
Date:    Fri, 02 Dec 94 15:46:49 -0800
From:    mcjones@pa.dec.com
Subject: Re: How can I read from a file?

Evangelos,

See the FileRd interface for a way to create a reader that will deliver 
the characters of a file; see the Rd interface for the procedures 
to read from, and close, the reader.  See the Lex interface for procedures 
to read strings, booleans, integers, and floating-point numbers from 
a reader.

These interfaces are included in "Some Useful Modula-3 Interfaces", 
SRC Report 113, which is available in hardcopy format by sending 
a request (with your full postal address) to src-report@src.dec.com 
or in PostScript format by anonymous ftp from:

    ftp://gatekeeper.dec.com/pub/DEC/SRC/research-reports/SRC-113.ps.Z


Paul McJones
mcjones@pa.dec.com




======================================================================= 11 ===
Date:    Sat, 3 DEC 94 01:41:59 -0500
From:    donfi@delphi.com
Subject: Re: AI programming language advice?

I highly recommend SCM Scheme for the PC.  Scheme is a dialect of Lisp but is
cleaner and more consistent.  Check altdorf.ai.mit.edu for the source.  There
is also a commercial product, EdScheme, from Schemers, Inc. in Florida.
Good luck!


======================================================================= 12 ===
Date:    Sat, 3 Dec 1994 17:01:54 GMT
From:    n8243274@henson.cc.wwu.edu (S. Lee ODEGARD)
Subject: M3 by example #2


The following Modula-3 example program illustrates the object type, as well
as the REF ARRAY OF <type>.  It most likely belongs as one of the last
programs of the example suite.

(* A polytope is an n-dimensional figure featuring vertices, edges, faces,
|* cells, and so on.  For example, a polygon, a polyhedron, and so on.  
|* See _Regular Polytopes_ by H.S.M. Coxeter.  To model or illustrate this
|* it first is necessary to construct relations between the above features.  
|* Here we focus on relationships between vertices.

|* This program will generate the edges between vertices for any of the three 
|* regular polytopes in _n_ dimensions.  *)
MODULE Vertex EXPORTS Main ;
IMPORT Word ;
IMPORT Thread, Wr, Rd, Stdio ;
IMPORT Fmt, Convert, Text ;

TYPE catalog = { Simplex, Cross, Measure } ;

VAR id : CARDINAL := 1000 ;
PROCEDURE genid() : INTEGER =
BEGIN INC( id ) ;  RETURN id END genid ;

(* faillib holds any of the construction errors we may encounter. *)
TYPE failib = { Empty, Ok, Fig_too_complicated, Undefined, Unsupported } ;
EXCEPTION fail( failib ) ;

(* Each vertex of a polytope can be seen to radiate or connect, via edges,
|* another adjacent vertex.  A polytope in this model is thus a graph of these 
|* vertices.  _edges_ references each of the other adjacent vertices. *)
TYPE connections = REF ARRAY OF T ;
  T = OBJECT
    id : INTEGER := 0 ;
    status := failib.Empty ;
    edges : connections := NIL ;
  METHODS
    gen( k : catalog ;  dimension : CARDINAL ) RAISES { fail } := gen ;
    diag() := diag ;  (* diagnoise: provide for interactive integrity tests. *)
  END ;

(* Activating _gen_ destroys all of the edges of T and reconstructs a new T
|* according to the figure and dimension desired. *)
PROCEDURE gen( to : T ;  k : catalog ;  dimension : CARDINAL ) 
			RAISES { fail } =
BEGIN
  CASE k OF
    catalog.Simplex => genSimplex( to, dimension )
  | catalog.Cross => genCross( to, dimension )
  | catalog.Measure => genMeasure( to, dimension )
  END ;
END gen ;

(* A simplex in _n_ dimensions has edges radiating from each of _n+1_ vertices 
|* to each of the other _n_ vertices. *)
PROCEDURE genSimplex( to : T ;  dim : CARDINAL ) RAISES { fail } =
VAR net := NEW( connections, dim+1 ) ; 
  (* hold all of the edges of the new simplex, until they are connected *)
BEGIN
(* allocate all of the edges leaving each vertex of the simplex *)  
  WITH z = FIRST( net^ ) DO
    net[ z ] := to ;
    net[ z ].edges := NEW( connections, dim ) ;
    net[ z ].id := genid() ;
  END ;
  FOR i := FIRST( net^ )+1 TO LAST( net^ ) DO 
    net[ i ] := NEW( T ) ;
    net[ i ].edges := NEW( connections, dim ) ;
    net[ i ].id := genid() ;
  END ;

(* connect each of these to each other *)  
  FOR i := FIRST( net^ ) TO LAST( net^ ) DO
    FOR j := FIRST( net^ ) TO LAST( net^ ) DO
      IF j<i THEN net[ i ].edges[ j ] := net[ j ]
      ELSIF j>i THEN net[ i ].edges[ j-1 ] := net[ j ]
      END ;
    END ;
    net[ i ].status := failib.Ok ;
  END ;
END genSimplex ;

(* Diagnoise the edge relationships of the generated polytope by allowing 
|* interactive queries *)
PROCEDURE diag( v : T ) =
TYPE number = ARRAY[ 0 .. 3 ] OF CHAR ;
CONST blanknum = number{ ' ', .. } ;
VAR ln : TEXT ;  num : number := blanknum ;  used : INTEGER ;
<* FATAL Wr.Failure, Rd.Failure, Rd.EndOfFile, Thread.Alerted *> BEGIN LOOP
  Wr.PutText( Stdio.stdout, " >" ) ;  Wr.Flush( Stdio.stdout ) ;
  ln := Rd.GetLine( Stdio.stdin ) ;
  IF Text.GetChar( ln, 0 ) = '?' THEN
    Wr.PutText( Stdio.stdout, "i d - assign an id number d to this vertex\n"
			& "p - print available vertices\n"
			& "t n - traverse edge n to another veriex.\n"
			& "E - exit routine\n" ) ;
  ELSIF Text.GetChar( ln, 0 ) = 'i' AND Text.Length( ln ) >= 3 THEN 
    num := blanknum ;
    Text.SetChars( num, Text.Sub( ln, 2, Text.Length( ln ) - 2 )) ;
    v.id := Convert.ToInt( num, used ) ;
  ELSIF Text.GetChar( ln, 0 ) = 'p' THEN
    IF v.edges = NIL THEN Wr.PutText( Stdio.stdout, "NIL edges, id="
      & Fmt.Int( v.id ) & " " ) ;
    ELSE Wr.PutText( Stdio.stdout, Fmt.Int( NUMBER( v.edges^ )) & " edges, id="
	& Fmt.Int( v.id ) & "\n " ) ;
      FOR i := FIRST( v.edges^ ) TO LAST( v.edges^ ) DO
	Wr.PutText( Stdio.stdout, "edge " & Fmt.Int( i ) & " to id# " &
	  Fmt.Int( v.edges[ i ].id ) & "\n " ) ;
      END (* OF FOR *) ;
    END ;
    CASE v.status OF
      failib.Empty => Wr.PutText( Stdio.stdout, "Empty" ) ;
    | failib.Ok => Wr.PutText( Stdio.stdout, "Ok" ) 
      ELSE Wr.PutText( Stdio.stdout, "Other" ) END ;
    Wr.PutText( Stdio.stdout, "\n" ) ;
  ELSIF Text.GetChar( ln, 0 ) = 't' AND Text.Length( ln ) >= 3 THEN
    num := blanknum ;
    Text.SetChars( num, Text.Sub( ln, 2, Text.Length( ln ) - 2 )) ;
    VAR to : INTEGER ;  BEGIN    
      to := Convert.ToInt( num, used ) ;  
      IF to >= 0 AND to < NUMBER( v.edges^ )
	THEN v := v.edges[ to ] END ;  
      Wr.PutText( Stdio.stdout, " along edge " & Fmt.Int( to ) 
	& " to vertex id=" & Fmt.Int( v.id ) & "\n" ) ;
    END ;
  ELSIF Text.GetChar( ln, 0 ) = 'E' THEN RETURN
  END ;
END END diag ;

(* A cross polytope of _n_>2 dimensions has _2*n_ vertices each radiating
|* 2*(n-1) edges.  Each vertex has an opposite by drawing a line from it
|* thru the center, and that vertex pair forms a dipyramid connecting
|* to each vertex of an _n-1_ dimensionsal cross polytope equator.  A 
|* regular cross polytope of 2 dimensions is a square. *)
PROCEDURE genCross( to : T ;  dim : CARDINAL ;  redges := 0 ) 
					RAISES { fail } =
VAR handle : T ;  (* handle sits in raised from the equator *)

PROCEDURE node( radiates : CARDINAL ;  from : T := NIL ) : T =
VAR res : T := from ;
BEGIN
  IF res = NIL THEN res := NEW( T ) END ;
  res.id := genid() ;    
  res.edges := NEW( connections, radiates ) ;
  RETURN res
END node ;

BEGIN
  IF dim < 2 THEN genMeasure( to, dim ) ;  RETURN
  ELSIF dim = 2 THEN to := node( MAX( redges, 2 ), to ) ;
    to.edges[ 0 ] := node( MAX( redges, 2 )) ;  to.edges[ 0 ].edges[ 0 ] := to 
;
    to.edges[ 1 ] := node( MAX( redges, 2 )) ;  to.edges[ 1 ].edges[ 1 ] := to 
;
    handle := node( MAX( redges, 2 )) ;
    handle.edges[ 0 ] := to.edges[ 1 ] ;  handle.edges[ 1 ] := to.edges[ 0 ] ;
    to.edges[ 1 ].edges[ 0 ] := handle ;  to.edges[ 0 ].edges[ 1 ] := handle ;
    to.status := failib.Ok ;  handle.status := failib.Ok ;
    to.edges[ 0 ].status := failib.Ok ;  to.edges[ 1 ].status := failib.Ok ;
  ELSE (* dim >= 2 *) to := node( MAX( redges, 2*dim-2 ), to ) ;
    handle := node( MAX( redges, 2*dim-2 )) ;
    to.edges[ 0 ] := NEW( T ) ;  
    genCross( to.edges[ 0 ], dim-1, MAX( redges, 2*dim-2 )) ;    
    to.edges[ 0 ].edges[ 2*dim-3 ] := handle ;
    to.edges[ 0 ].edges[ 2*dim-4 ] := to ; (* completes to.edges[ 0 ] *)
    WITH oppequator = to.edges[ 0 ].edges[ 0 ].edges[ 2*dim-5 ] DO
      to.edges[ 1 ] := oppequator ;
      handle.edges[ 0 ] := oppequator ;
      oppequator.edges[ 2*dim-3 ] := to ;
      oppequator.edges[ 2*dim-4 ] := handle ; (* completes oppequator *)
    END (* OF WITH *) ;
    handle.edges[ 1 ] := to.edges[ 0 ] ;
    FOR i := 0 TO 2*dim-5 DO
      to.edges[ 2+i ] := to.edges[ 0 ].edges[ i ] ;
	to.edges[ 0 ].edges[ i ].edges[ 2*dim-3 ] := to ;
      handle.edges[ 2+i ] := to.edges[ 0 ].edges[ i ] ;
	to.edges[ 0 ].edges[ i ].edges[ 2*dim-4 ] := handle ;
    END (* OF FOR *) ;  handle.status := failib.Ok ;  to.status := failib.Ok ;
    FOR i := 0 TO 2*dim-3 DO to.edges[ i ].status := failib.Ok END ;
  END (* OF ELSE (* dim >= 2 *) *) ;
END genCross ;

(* A measure polytope is a parallelatope in _n_ dimensions.  A _n_
|* dimensionsal measure polytope is two _n-1_ dimensional measure polytopes
|* connected orthagonally with parallel lines.  These relationships are
|* constructed by placing each vertex on a coordinate grid ( 0or1, 0or1, ... )
|* The procedure _next_ perterbs one of the coordinates, giving the next
|* vertex to connect to. *)
PROCEDURE genMeasure( to : T ;  dim : CARDINAL ) RAISES { fail } =

PROCEDURE two_to_the( n : CARDINAL ) : CARDINAL RAISES { fail } =
BEGIN IF n < 15 THEN RETURN Word.Shift( 1, n ) 
  ELSE RAISE fail( failib.Fig_too_complicated ) END ;
END two_to_the ;

PROCEDURE next( i : CARDINAL ; (* 0 .. 2**dim - 1 *) 
		j : CARDINAL (* 0 .. dim-1 *) 
	      ) : CARDINAL (* 0 .. 2**dim - 1 *) =
VAR bin : REF ARRAY OF BOOLEAN := NEW( REF ARRAY OF BOOLEAN, dim ) ;
  x := i ;
BEGIN
  FOR k := 0 TO dim-1 DO  
    bin[ k ] := x MOD 2 = 1 ;  x := x DIV 2
  END ;
  bin[ j ] := NOT bin[ j ] ;
  x := 0 ;
  FOR k := 0 TO dim-1 DO
    x := 2*x + ORD( bin[ k ] )
  END ;  RETURN x
END next ;

VAR net : REF ARRAY OF T := NEW( REF ARRAY OF T, two_to_the( dim ) ) ;
BEGIN
  net[ 0 ] := to ;  
  net[ 0 ].id := genid() ;  
  net[ 0 ].edges := NEW( connections, dim ) ;
  FOR i := 1 TO LAST( net^ ) DO
    net[ i ] := NEW( T ) ;
    net[ i ].id := genid() ;
    net[ i ].edges := NEW( connections, dim ) ;
  END ;
  FOR i := 0 TO LAST( net^ ) DO
    FOR j := 0 TO dim-1 DO
      net[ i ].edges[ j ] := net[ next( i, j ) ] ;
  END END ;
  FOR i := 0 TO LAST( net^ ) DO
    net[ i ].status := failib.Ok
  END
END genMeasure ;


VAR V : T := NEW( T ) ;
<* FATAL fail *> BEGIN
  V.gen( catalog.Measure, 4 ) ;
  V.diag() ;
  V.gen( catalog.Measure, 2 ) ;
  V.diag() ;
  V.gen( catalog.Cross, 2 ) ;
  V.diag() ;
END Vertex.


======================================================================= 13 ===
Date:    03 Dec 1994 21:21:13 GMT
From:    iansmith@weasel.cc.gatech.edu (Ian Smith)
Subject: SOLsun (fixes included)

After my failure yesterday to get SOLgnu to work, I have successfully 
installed SOLsun and I thought I would let other would-be solaris
users know how to get it done. Setup: Solaris 2.3, Sun C 3.0,
and SRC-Modula 3 v3.3 from gatekeeper.dec.com (boot-SOLsun.tar.gz). 

1) In two places, the make.boot files of the boot-SOLsun distribution
don't have the line 
boot_import ("-lsunmath")
where they should. These are the compiler directory (compiler/SOLsun)
and the driver directory (driver/SOLsun). Just add this line right
before the boot_import("-lm") and everything will go ok for them.

2) You *have* to build the m3cc directory with the sun compiler
(/opt/SUNWspro/bin/cc) to get it work. m3cc out of the box tries to
use gcc and you have to thwart this effort. I was able to this by
modifying the build script and invoking the it (m3cc/build) by hand to
get a working m3cgc1.  I was unclear as to why the m3cc was using gcc,
when it appears that the higher level install procedure was trying to
get it to use the sun compiler....

hope this helps,
ian
-- 
The frequency is 91.1 MHz and my name's not 'Kenneth.'
iansmith@cc.gatech.edu







======================================================================= 14 ===
Date:    Sun, 4 Dec 1994 23:42:30 GMT
From:    wagner@luthien.in-berlin.de (Olaf Wagner)
Subject: Modula 3 for FreeBSD


Just for those interested: a short status report of the SRC M3 port
to FreeBSD:

On FreeBSD 1.1.5 everythings seems to be stable and running,
including threads and incremental and generational garbage
collection. I even managed to get shared libraries working,
but this seems not fit to be recommended for everyone as it is.
The main problem with shared libraries is that the tools
(as, ld, ar, ranlib) integrated in FreeBSD are not the
latest versions and don't cooperate as smoothly as expected
with the newer versions on which M3 3.3 is based.

I had planned to wait for the release of FreeBSD 2.0 in order
to test everything on the new system and then put some binaries
on a ftp site, since some people offered me this opportunity.
This weekend at last I managed to install 2.0 release, but - alas! -
there are quite a lot of differences to 1.1.5, and I haven't been
able even to bootstrap the compiler to the new system yet.

So it seems it will take another couple of weeks until there is
anything working. Since I don't think this will be within this year,
as I can only spent some hours at the weekend and am somewhat occupied
with moving to a new flat, I thought it worth asking if somebody
would be interested in a M3 distribution for FreeBSD 1.1.5
(that will not run on 2.0!).

So if I get, let's say, more than 10 replies asking for a binary
distribution, I will do one. If you are interested, just send me a short
mail to wagner@luthien.in-berlin.de or olaf@logware.de.

If not, everyone will have to wait for M3 3.4 for a FreeBSD 1.1.5
version.

Thanks to all those who offered their help (and space on ftp servers :-).
I really appreciated that (even if I was too lazy to reply to everybody).

-- 
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 
|| Olaf Wagner           | wagner@luthien.in-berlin.de (private) | 
|| Hobrechtstrasse 80    | olaf@logware.de (work)                |
|| 12043 Berlin 44       | phone: 49 30  624 99 48               |
|| Germany / Deutschland | please don't call before 9 o'clock    |
\/////////////////////////////////////////////////////////////////


======================================================================= 15 ===
Date:    5 Dec 1994 13:34:20 GMT
From:    Quentin Stafford-Fraser <qs101@cus.cam.ac.uk>
Subject: Re: Q: Modula-3/Tk interface exists ?

Joseph Canedo <canedo@taec.enet.dec.com> wrote:
>
> Does an programming interface between Modula-3 and Tk (Tcl) 
> exist ? 

I started playing with this a while back, but gave up because I 
needed to use Trestle as well.  If you have two different kits 
each of which wants to have a 'main loop', then you need to sort
out who gets which events, and that was more than I had the 
stamina for.

It should be easy if you don't need to use Trestle at all. I have 
a version of the m3tcl stuff which works with Tcl 7.x - the version
on gatekeeper may only work with Tcl 6.7. 

It would be nice if somebody did a more complete Trestle interface
for Obliq...

Quentin



======================================================================= 16 ===
Date:    5 Dec 94 08:56:41
From:    dagenais@notung.vlsi.polymtl.ca (Michel Dagenais)
Subject: m3gdb


Many thanks to Peter Klein and his team for his latest m3gdb work.
I finally found the time to download and compile it. Everything went fine
with gcc on SPARC/SunOS-4.1.3. Printing types, object members,
REFs all worked well. My LINUX system is missing a few .h files to
compile this newer m3gdb. I need to upgrade but am waiting for a
distribution which includes the new ELF based shared libs.
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 17 ===
Date:    Tue, 6 Dec 1994 21:26:49 GMT
From:    bwbecker@dragon.uwaterloo.ca (Byron Weber Becker)
Subject: Modula-3 mode in emacs

I've been attempting to use the Modula-3 mode in 
Gnu Emacs.  It completes abbreviations for me,
so parts of it are working.  However, I almost always get
a "Symbol's functioin definition is void: block"
message when I use the TAB key.

What is this telling me?  How can I correct it?

=====
Byron Weber Becker                               (519) 888-4567 x4661
Computer Science Lecturer/Advisor        bwbecker@dragon.uwaterloo.ca
University of Waterloo


======================================================================= 18 ===
Date:    06 Dec 1994 22:14:36 GMT
From:    jackg@downhaul.crc.ricoh.com (Jack Greenbaum)
Subject: Accessor methods


When programming with CLOS or C++, one can define "acessor macros", or
"inline functions" which look like methods but are inline code that
merely read or write an instance variable. This hides from the user the
fact that a particular side effect is achieved through a variable as
opposed to some other more complicated means, while still being as
efficient as a naked instance variable.

>From reading Harbison's book "Modula-3" it appears that Modula-3 has no
such facility. In fact is seems that if you use "acessor methods" that
one would incur a standard method call run-time penalty (i.e. a lookup
then function call) to merely set or read an instance variable.

Is this truly the case? Can or does the SRC implementation use GCC's
inlining features to eliminate calls to trivial methods?

--
Jack Greenbaum       | Ricoh California Research Center
jackg@crc.ricoh.com  | 2882 Sand Hill Rd. Suite 115
(415) 496-5711 voice | Menlo Park, CA 94025-7002
(415) 854-8740 fax   | 
-- 
Jack Greenbaum       | Ricoh California Research Center
jackg@crc.ricoh.com  | 2882 Sand Hill Rd. Suite 115
(415) 496-5711 voice | Menlo Park, CA 94025-7002
(415) 854-8740 fax   | 


======================================================================= 19 ===
Date:    8 Dec 1994 02:21:08 GMT
From:    mastchen@des1 (Mastchenko Cyrille)
Subject: Modula-3.3 and Sun SPARC

I just start to install modula 3 release 3.3 (from gatekeeper.dec.com) on
our sun SPARC system, but all work correctly except X applications.
All applications based on VBFrom make a big crash on my X server (and 
crash my X server too) and some game like Cube or eyefish make that too.
- Can you help me to correct this ?
We use :
	Sun 4
	OpenWin 3
	
I have some others questions :
- what is compiler package ?
- where can i find a good documentation about all library functions
  and objects ?
- where can i find a good documentation on MODULA-3 language ?
 (in postscript or text file and/or a good book)
 (i know MODULA-2 but i look there is lots of news in MODULA-3).
- i want to get some idea about the book 'systems programming with
MODULA-3', about what it says really ? just make a call on system (like
C library) or how to make a total new system on modula-3 ? (like rewrite unix ?
)


		Friendly MASTCHENKO Cyrille.

       ,    ,
      ("\''/").___..--''"`-._
      `9_ 9  )   `-.  (     ).`-.__.`)          MASTCHENKO Cyrille
      (_Y_.)'  ._   )  `._ `. ``-..-'        mastchen@des8.u-strasbg.fr
    _..`--'_..-_/  /--'_.' .'
   (il).-''  ((i).'  ((!.-'                       "Go Cats!"




======================================================================= 20 ===
Date:    Thu, 8 Dec 1994 10:03:08 GMT
From:    ljp@my21.sm.luth.se (Johan Persson)
Subject: Formal specifications <*PRAGMA SPEC*> ?

I've seen that some of the interfaces in the standard
library has some formal specifications, for example
the "Text" interface. The documentation I've read
doesn't seem to mention this. In fact,
SPEC isn't listed as a supported pragma at all.

Is this just a way of documenting the interfaces or
are there in fact some automatic program verification
tools that makes use of these specifications ?

/Johan

---
Johan Persson			E-mail: ljp@sm.luth.se
Univ. of Lulea
Dept. of CS
971 87 Lulea, Sweden


======================================================================= 21 ===
Date:    8 Dec 1994 15:41:34 GMT
From:    detlefs@src.dec.com (Dave Detlefs)
Subject: re: Formal specifications <*PRAGMA SPEC*> ?

Johan Persson writes --

> I've seen that some of the interfaces in the standard
> library has some formal specifications, for example
> the "Text" interface. The documentation I've read
> doesn't seem to mention this. In fact,
> SPEC isn't listed as a supported pragma at all.
> 
> Is this just a way of documenting the interfaces or
> are there in fact some automatic program verification
> tools that makes use of these specifications ?

There is fact an automatic program verification tool that makes use of
these specifications.  It's called "ESC", for "Extended Static
Checking", and is quite experimental; Greg Nelson and I are the main
project members.  ESC can verify the "Text" module; the generic module
"Sequence" is another one we do pretty well on.  On the other hand, I
was running ESC on a small part of itself last night, and the prover
took 9 hours to report an error, so we're still a ways from practical
everyday use.  We should be publishing some stuff about ESC in the
near future; I'll announce it on this newsgroup when we do.

Dave

-- 
======================================================================
Dave Detlefs
DEC Systems Research Center
Palo Alto, CA


======================================================================= 22 ===
Date:    08 Dec 1994 20:05:27 GMT
From:    bm@shadow.cs.columbia.edu (Blair MacIntyre)
Subject: Re: Accessor methods

>>>>> On 06 Dec 1994 22:14:36 GMT, jackg@downhaul.crc.ricoh.com (Jack
>>>>> Greenbaum) said:

Jack> When programming with CLOS or C++, one can define "acessor macros", or
Jack> "inline functions" which look like methods but are inline code that
Jack> merely read or write an instance variable. This hides from the user the
Jack> fact that a particular side effect is achieved through a variable as
Jack> opposed to some other more complicated means, while still being as
Jack> efficient as a naked instance variable.

Jack> From reading Harbison's book "Modula-3" it appears that Modula-3 has no
Jack> such facility. In fact is seems that if you use "acessor methods" that
Jack> one would incur a standard method call run-time penalty (i.e. a lookup
Jack> then function call) to merely set or read an instance variable.

I hope it doesn't, since it would result in programs which are no
longer truely object oriented (I couldn't override the methods in a
subclass).  That's one of the reasons I like modula 3's objects:  I
don't have to worry that some bozo who wrote a class I need decided
that, "for efficiency" a particular function is not virtual.  

Jack> Is this truly the case? Can or does the SRC implementation use GCC's
Jack> inlining features to eliminate calls to trivial methods?

I don't see how they could and remain true to Modula 3's model of
objects (short of doing the sort of things Self does, with run-time
compilation and optimization).
--
Blair MacIntyre -- bm@cs.columbia.edu -- Graduate Student (Graphics and UI Lab)

smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 St.,
       Columbia University, New York, NY 10027


======================================================================= 23 ===
Date:    Thu, 08 Dec 1994 16:41:23 -0500
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Modula-3.3 and Sun SPARC

In article <3c5qik$fet@thot.u-strasbg.fr>, mastchen@des1 (Mastchenko
Cyrille) wrote:

> I just start to install modula 3 release 3.3 (from gatekeeper.dec.com) on
> our sun SPARC system, but all work correctly except X applications.
> All applications based on VBFrom make a big crash on my X server (and 
> crash my X server too) and some game like Cube or eyefish make that too.
> - Can you help me to correct this ?
> We use :
>         Sun 4
>         OpenWin 3
>

There is a bug in OpenWin 3.0 that causes Trestle to crash. Trestle is the
Modula-3 window system. You need to fix your source for Trestle. See bugs and
patches under SPARC from Modula-3 Mosaic Home Page at
http://www.research.digital.com/SRC/modula-3/html/home.html 
then following "SRC Modula-3" and then "bugs & patches".

If you browse through the FAQ residing at the home page, you will see that
there are also binaries available which, I think, already have patches
installed in them. 
         
> I have some others questions :
> - what is compiler package ?

See http://www.research.digital.com/SRC/modula-3/html/packages.html
Here is some of the text:

SRC Modula-3 is distributed as a set of packages. Each package is
contained in a single directory which conforms to a standard structure.
The top level directory should contain a README file, a COPYRIGHT file,
and a src subdirectory containing Modula-3 source files, and a derived
directory for each platform on which the package has been built. 

Public packages are located in a fixed location in the file system that is
determined at configuration time (e.g. /proj/m3/pkg or
/usr/local/lib/m3/pkg). The public packages include the shared interfaces,
libraries and programs available at your site. 

There are three primary types of packages: source, program, and library. A
source package contains a collection of Modula-3 sources; it builds
nothing. Consequently it will contain no derived sub-directories. A
program package constructs a single executable program by compiling and
linking the contents of a set of source packages. Similarly, a library
package constructs a single library from a set of source packages. 


> - where can i find a good documentation about all library functions
>   and objects ?

Try "Some Useful Modula-3 Libraries" available as an SRC report (also from
FAQ). Most interfaces (.i3 files) are well-documented. Try browsing some
at http://www.research.digital.com/SRC/m3sources/html/INDEX.html

> - where can i find a good documentation on MODULA-3 language ?
>  (in postscript or text file and/or a good book)
>  (i know MODULA-2 but i look there is lots of news in MODULA-3).

You can find the language specification from Modula-3 home page. It is
also chapter 2 of SPwM3, Systems Programming with Modula-3.

> - i want to get some idea about the book 'systems programming with
> MODULA-3', about what it says really ? just make a call on system (like
> C library) or how to make a total new system on modula-3 ? (like rewrite
unix ?)

SPwM3 talks about how one can go about building large systems. It doesn't
talk about building operating system necessarily (there is already enough
texts about that, I think), but I think the techniques can be applied to
OSs to some extent. It describes an I/O file system, (Trestle) window
system, from abstractions to details and contains an excellent
introduction of programming with threads. It also has a good language
reference and some (less than I would like) motivations for its design. If
you are going to buy one book on Modula-3, that should be it. Actually, it
is good reading even if you are not planning to use M3.

Sam Harbison also has a book titled "Modula-3". It is tutorial-like,
and a bit more introductory, if that's what you are interested.

-- Farshad


======================================================================= 24 ===
Date:    10 Dec 1994 19:54:02 GMT
From:    adiwan@cs.cmu.edu (Amer Diwan)
Subject: Re: Accessor methods

Blair MacIntyre said:
   >>>>> On 06 Dec 1994 22:14:36 GMT, jackg@downhaul.crc.ricoh.com (Jack
   >>>>> Greenbaum) said:
   Jack> Is this truly the case? Can or does the SRC implementation use GCC's
   Jack> inlining features to eliminate calls to trivial methods?

   I don't see how they could and remain true to Modula 3's model of
   objects (short of doing the sort of things Self does, with run-time
   compilation and optimization).

I don't see how that follows.  A compiler that does the appropriate analysis
will be able to convert many method invocations to direct calls that can be
inlined etc.  It doesn't require run-time techniques but does require some
form of whole program analysis.  For instance, in the simplest case, consider
the method invocation:
  self.m ()

If the "whole program analyzer" could determine that "m" is not overridden in
any of TYPEOF (self)'s subtypes, then it can replace the above by a direct
call.  I am currently implementing such analysis and optimizations as an
whole program optimization extension.  From some recent, preliminary
experiments (I ran them yesterday), I found that for 4 M3 programs (including
the m2tom3 program that was advertised recently), more than (statically) half
of the method invocations can be trivially bound to direct calls.  I haven't
yet run the experiments to see how many method invocations are eliminated at
run-time.  People in the Cecil group are also doing similar stuff at compile
time.

There are many other cases when the compiler can convert method invocations to
direct call even without having the freedom to do any transformation.  An
example is invoking a method in a newly allocated object;  the compiler knows
exactly what its type is and thus the method can be replaced by a direct call.

[ps: My normal email address is diwan@cs.umass.edu and url is
http://www.cs.umass.edu/~diwan/home.html. For some reason I can't post
from UMass.  ]
    Amer


======================================================================= 25 ===
Date:    Thu, 01 Dec 94 20:16:55 GMT
From:    dmc@ukc.ac.uk (Rock Lobster)
Subject: How do I use Ctypes.char????

< Second time lucky? Something went very wrong with my first attempt :( >

Hi, 
  I have a program that uses the Udir interface to call the opendir
and readdir functions. I can open the directory ok, but readdir
returns (amongst other things) an ARRAY [0..MAXNAMLEN] OF Ctypes.char
How do I use this? I don`t seem to be able to convert it into anything
that my mod3 program can use. I assume it must be possible (why would
it be there otherwise).

Any help??

Cheers

Rock

PS. M3toC interface doesn't seem to be any use as it take Ctypes.char_star
    instead od Ctypes.char :^(

--
+----------------------------------------------------------------------------+
| I can get a job, I can pay the phone bill, I can cut the lawn, cut my hair,|
|     cut out my cholesterol. I can work overtime, I can work in a mine,     |
+---           I can do it all for you - but I don't want to.             ---+


======================================================================= 26 ===
Date:    Mon, 12 Dec 1994 13:40:36 -0500
From:    gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS)
Subject: Q: Unknown cause for warning

   From: egustafs@vlsia (Eric G. Gustafson)
   Newsgroups: comp.lang.modula3
   Date: 10 Dec 1994 22:14:05 GMT
   Organization: University of Colorado at Colorado Springs

   When the following program is compiled with the SRC m3 compiler:

   MODULE Main;
   VAR I,J : INTEGER;
   BEGIN
     FOR I := 1 TO 10 DO J := I END;
   END Main.

   I get the following response:

   play-doh> m3build
   --- building in LINUX ---
   m3 -w1 -why -g -o fortest -F/usr/tmp/qk09412aaa 
   new source -> compiling ../src/Test.m3
   "../src/Test.m3", line 3: warning: not used (I)
   1 warning encountered
   new "Test.mo" -> linking fortest

   My question is:  Why do I get the warning telling me that I have not
   used 'I'?  Clearly I have.  Is there some other prefered way of
   declaring and using loop control var's?

   Thanks,
   --
   Eric Gustafson                                      egustafs@vlsia.uccs.edu
   Electrical & Computer Engineering                    egustafs@cpe.valpo.edu
   University of Colorado -- UCCS                        Phone: (719) 637-8022
   ** Warning ** Planet is 97% full please remove unneeded inhabitants !!

You have actually defined two variables name 'I', one of which
is a loop control variable that hides the outer declaration.
You can omit the outer one entirely.

--geoff


======================================================================= 27 ===
Date:    10 Dec 1994 23:20:25 GMT
From:    bm@shadow.cs.columbia.edu (Blair MacIntyre)
Subject: Re: Accessor methods

>>>>> On 10 Dec 1994 19:54:02 GMT, adiwan@cs.cmu.edu (Amer Diwan)
>>>>> said:

Amer> Blair MacIntyre said:
>>>>>> On 06 Dec 1994 22:14:36 GMT, jackg@downhaul.crc.ricoh.com (Jack
>>>>>> Greenbaum) said:
Jack> Is this truly the case? Can or does the SRC implementation use GCC's
Jack> inlining features to eliminate calls to trivial methods?

me>    I don't see how they could and remain true to Modula 3's model of
me>    objects (short of doing the sort of things Self does, with run-time
me>    compilation and optimization).

Amer> I don't see how that follows.  A compiler that does the
Amer> appropriate analysis will be able to convert many method
Amer> invocations to direct calls that can be inlined etc.  It doesn't
Amer> require run-time techniques but does require some form of whole
Amer> program analysis.  For instance, in the simplest case, consider
Amer> the method invocation: self.m ()

I should clarify what I was thinking when I said the above.  I was
considering the case where Object A is used in a module and that
module is compiled and placed in a library for later linking.  If the
anaysis is done there (which is what I was assuming), there would be
no way for the compiler to know that a subtype of A, say A1, might
override a trivial method of A (which had been inlined in the
precompiled module).  Passing these subtypes of A into the precompiled
module would result in incorrect program execution, since the original
(not overriden) methods would be called.

Amer> If the "whole program analyzer" could determine that "m" is not
Amer> overridden in any of TYPEOF (self)'s subtypes, then it can
Amer> replace the above by a direct call.  I am currently implementing
Amer> such analysis and optimizations as an whole program optimization
Amer> extension.  

All I can say to that is ... cool!  It didn't occur to me that enough
information was retained in the object files to allow such a thing to
be done.  That's what I get for being an armchair programming
languages person.  :-)

--
Blair MacIntyre -- bm@cs.columbia.edu -- Graduate Student (Graphics and UI Lab)

smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 St.,
       Columbia University, New York, NY 10027


======================================================================= 28 ===
Date:    Fri, 9 Dec 1994 11:16:24 -0500
From:    gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS)
Subject: Re: Accessor methods

	<BM.94Dec8150527@shadow.cs.columbia.edu>Cc: m3@src.dec.com
In-Reply-To: <BM.94Dec8150527@shadow.cs.columbia.edu>
Distribution: world
X-Received: from suneast.East.Sun.COM by East.Sun.COM (4.1/SMI-4.1)
X-Received: by src-mail.pa.dec.com; id AA24276; Fri, 9 Dec 94 08:22:23 -0800
X-Newsgroups: comp.lang.modula3
X-Content-Length: 2595
X-Received: from cloyd.East.Sun.COM by suneast.East.Sun.COM (5.0/SMI-4.1-900117
)
X-Received: from Sun.COM by inet-gw-2.pa.dec.com (5.65/10Aug94)
X-Received: by cloyd.East.Sun.COM (5.x/SMI-SVR4)
X-Received: from East.Sun.COM (east.East.Sun.COM) by Sun.COM (sun-barr.Sun.COM)
X-Received: by src-news.pa.dec.com; id AA22816; Fri, 9 Dec 94 06:30:42 -0800

Blair MacIntyre writes:
 > >>>>> On 06 Dec 1994 22:14:36 GMT, jackg@downhaul.crc.ricoh.com (Jack
 > >>>>> Greenbaum) said:
 > 
 > Jack> When programming with CLOS or C++, one can define "acessor macros", or
 > Jack> "inline functions" which look like methods but are inline code that
 > Jack> merely read or write an instance variable. This hides from the user th
e
 > Jack> fact that a particular side effect is achieved through a variable as
 > Jack> opposed to some other more complicated means, while still being as
 > Jack> efficient as a naked instance variable.
 > 
 > Jack> From reading Harbison's book "Modula-3" it appears that Modula-3 has n
o
 > Jack> such facility. In fact is seems that if you use "acessor methods" that
 > Jack> one would incur a standard method call run-time penalty (i.e. a lookup
 > Jack> then function call) to merely set or read an instance variable.
 > 
 > I hope it doesn't, since it would result in programs which are no
 > longer truely object oriented (I couldn't override the methods in a
 > subclass).  That's one of the reasons I like modula 3's objects:  I
 > don't have to worry that some bozo who wrote a class I need decided
 > that, "for efficiency" a particular function is not virtual.  
 > 
 > Jack> Is this truly the case? Can or does the SRC implementation use GCC's
 > Jack> inlining features to eliminate calls to trivial methods?
 > 
 > I don't see how they could and remain true to Modula 3's model of
 > objects (short of doing the sort of things Self does, with run-time
 > compilation and optimization).
 > --
 > Blair MacIntyre -- bm@cs.columbia.edu -- Graduate Student (Graphics and UI L
ab)
 > 
 > smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 S
t.,
 >        Columbia University, New York, NY 10027

Modula-3 does have the 'inline' prgama which is currently unimplemented. I beli
eve
that Mick Jordan at one time had a whole-program optimizer which would in-fact
in-line such methods if it determined that they were in-fact not overriden. The
 main
problem with his approach (and he can correct if I'm wrong) was taht it was don
e on a
source-level basis using the M3 AST Toolkit and wound up using enormous amounts
 of memory. 
Another way to accomplish the same thing is to do it at link time. I believe th
at Mary Fernandez
of Princeton University (mff@cs.princeton.edu) is working on such a linker for 
M3, but 
before you flood her with mail, it's based on M3 2.11 and needs the LCC compile
r. But she
 can send her technical  report describing the kinds of optimizations that she 
is looking at.

--geoff



======================================================================= 29 ===
Date:    9 Dec 94 14:11:28
From:    dagenais@gutrune.vlsi.polymtl.ca (Michel Dagenais)
Subject: m3gdb and LINUX

Linux binaries for m3gdb, based on Peter Klein's updates, are now
available from ftp.vlsi.polymtl.ca:pub/m3/linux/m3gdb.tar.gz

It prints types, object members, follows refs...
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 30 ===
Date:    Mon, 12 Dec 94 21:08:57 EST
From:    BERGINF@PACEVM.DAC.PACE.EDU (Joseph Bergin)
Subject: Trestle problem

I'm trying to get trestle and the vbt stuff working.  I use a DS3100 with
Ultrix 4.3.  When I try to build the Hello program (either with the
sources/makefile in the trestle tutorial or the stuff packaged with the
software) I get a link error that the Xaw library can't be found.
 -> linking Hello
ld:
Can't locate file for: -lXaw
That's right, Xaw is not in my system. Should it be? If so, how do I get
it? If not, how do I keep M3 from looking for it.
Thanks. Joe Bergin


======================================================================= 31 ===
Date:    Fri, 9 Dec 1994 15:31:33 GMT
From:    David Mallarme <dmallarm@cs.ruu.nl>
Subject: calculation of a matrix in parallel in Modulaiii

Hello,

I have a problem to implement in Modulaiii with the use of channel (home 
mades...) the calculation of a multiplication of 2 matrix n*n with the 
method of network. Here is the incomplete program :

MODULE MatrixMul;
FROM Ppc IMPORT Process, StartProcess, WriteText, WaitFor, WriteInt,
                ReadAndWrite;
FROM Chan IMPORT Channel, InitChan, ReadFromChan, SendToChan;
TYPE 
        MatrixRow = ARRAY [1..size] OF INTEGER;
        Matrix = ARRAY [1..size] OF MatrixRow;
        ChanMatrix = ARRAY [0..size] OF ARRAY [0..(2*size)] OF Channel;
        
CONST size = 3
        A = Matrix;
        B = Matrix;

VAR Source, Sink, Zero, Result, Element : Process;
        AllChannels : ChanMatrix;

PROCEDURE SourceProc()=
VAR South:Channel;

BEGIN


        FOR counter := 1 TO size DO
                SendToChan(South, B[..][counter])
        END
END SourceProc;

PROCEDURE SinkProc()=
VAR North :Channel;

BEGIN


        LOOP
                dummy := ReadFromChan(North)
        END
END SinkProc;

PROCEDURE ZeroProc()=
VAR East: Channel;

BEGIN



        FOR counter :=1 TO size DO 
                SendToChan(East, 0)
        END
END ZeroProc;

PROCEDURE ResultProc()=
VAR West: Channel;

BEGIN



        FOR counter :=1 TO size DO 
                C[..][counter] := ReadFromChan(West)
        END;
        LOCK ReadAndWrite DO 
                FOR counter :=1 TO size DO
                        WriteInt(C[..][counter]);
                        WriteText(" ")
                END;
        WriteText("\n")
        END;
END ResultProc;

PROCEDURE ElementProc()=
VAR North, South, East, West : Channel;

BEGIN
        a:= A[..][..];
       
        
        
        LOOP
                b:=ReadFromChan(North);
                SendToChan(South, b);
                sum:=sum+a*b;
                SendToChan(East, sum)
        END
END ElementProc;

BEGIN
        WriteText("Matrix Multiplication\n");
        
        WriteText("Please, Enter the contents of the matrix ");
        WriteText("Matrix A");
        FOR y:= 1 TO size DO
                FOR x:= 1 TO size DO
                        ReadInt(A[x][y]);WriteText(" ");
                END;
                WriteText("\n");
        END;
        WriteText("Matrix B");
        FOR y:= 1 TO size DO
                FOR x:= 1 TO size DO
                        ReadInt(B[x][y]);WriteText(" ");
                END;


 WriteText("\n");
        END;

        FOR x:= 1 TO size DO
                FOR y:=1 TO 2*size DO
                        InitChan(AllChannels);
                END;
        END;




        WaitFor(Result)
END MatrixMul.

Thanks for all reply.

David dmallarm@cs.ruu.nl



======================================================================= 32 ===
Date:    10 Dec 1994 22:14:05 GMT
From:    egustafs@vlsia (Eric G. Gustafson)
Subject: Q: Unknown cause for warning

When the following program is compiled with the SRC m3 compiler:

MODULE Main;
VAR I,J : INTEGER;
BEGIN
  FOR I := 1 TO 10 DO J := I END;
END Main.

I get the following response:

play-doh> m3build
--- building in LINUX ---
m3 -w1 -why -g -o fortest -F/usr/tmp/qk09412aaa 
new source -> compiling ../src/Test.m3
"../src/Test.m3", line 3: warning: not used (I)
1 warning encountered
new "Test.mo" -> linking fortest

My question is:  Why do I get the warning telling me that I have not
used 'I'?  Clearly I have.  Is there some other prefered way of
declaring and using loop control var's?

Thanks,
--
Eric Gustafson                                      egustafs@vlsia.uccs.edu
Electrical & Computer Engineering                    egustafs@cpe.valpo.edu
University of Colorado -- UCCS                        Phone: (719) 637-8022
** Warning ** Planet is 97% full please remove unneeded inhabitants !!


======================================================================= 33 ===
Date:    11 Dec 1994 00:46:34 GMT
From:    bm@shadow.cs.columbia.edu (Blair MacIntyre)
Subject: Re: Q: Unknown cause for warning

>>>>> On 10 Dec 1994 22:14:05 GMT, egustafs@vlsia (Eric G. Gustafson)
>>>>> said:

Eric> When the following program is compiled with the SRC m3 compiler:
Eric> MODULE Main;
Eric> VAR I,J : INTEGER;
Eric> BEGIN
Eric>   FOR I := 1 TO 10 DO J := I END;
Eric> END Main.

Eric> I get the following response:

play-doh> m3build
Eric> --- building in LINUX ---
Eric> m3 -w1 -why -g -o fortest -F/usr/tmp/qk09412aaa 
Eric> new source -> compiling ../src/Test.m3
Eric> "../src/Test.m3", line 3: warning: not used (I)
Eric> 1 warning encountered
Eric> new "Test.mo" -> linking fortest

Eric> My question is:  Why do I get the warning telling me that I have not
Eric> used 'I'?  Clearly I have.  Is there some other prefered way of
Eric> declaring and using loop control var's?

Actually, you haven't.  The variable I in the FOR loop is a new
variable whose scope is the FOR loop and who type is READONLY INTEGER.

--
Blair MacIntyre -- bm@cs.columbia.edu -- Graduate Student (Graphics and UI Lab)

smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 St.,
       Columbia University, New York, NY 10027


======================================================================= 34 ===
Date:    Wed, 14 Dec 1994 15:58:22 -0500
From:    douglm@rpi.edu
Subject: Re: Accessor methods

>Blair MacIntyre and many others write on the subject of efficiency.

It worries me that people put so much emphasis on "efficiency" as if
executing  a few more instructions to achieve some result will make any
noticable difference.

My experience is that it makes almost no measurable difference whatsoever.
I have examples of changes which resulted in a 3 machine instruction
sequence turning into many thousands of executed instructions, executed
more than once per file access by all users of the system. The difference
in time is below the resolution of the timer.

What makes the difference are much bigger changes that affect bigger units.
For example, caching to reduce I/O.

At the source level, we shouldn't be worrying about efficiency at the
instrucyion level. The net effect is generally to make the code less easy
to understand and therefore more likely to be wrong.

Clearly somebody should consider the efficiency of the generated code, but
that is a  question for those who develop code generators and maybe
linkers.




======================================================================= 35 ===
Date:    11 Dec 1994 10:06:47 GMT
From:    sahpark@libws2.ic.sunysb.edu (SangHyun Park)
Subject: Re: How can I read from a file?

Evangelos N Skianis (eskianis@csws15.ic.sunysb.edu) wrote:
: Thanks a lot

: E.Skianis


 hmmm.. You must be taking cse114 now..
 you really should consult your TAs instead of posting a question here
 in hopes of finding easy answers.

 If you would have read you book more carefully, I think you could have
 easily found the answer you were looking for.

 SangHyun

 "Just an advice from former student of cse114...."



======================================================================= 36 ===
Date:    14 Dec 1994 17:26:32 GMT
From:    tw45024@vub.ac.be (VAN DEN WIJNGAERT TOM)
Subject: programmable algoritme for pi


Hi,

I'm looking for a good programmable algorithme to calculated pi with more
than 200000 digits. I don't need the program, just the algorithme. If it
is possible also a bit fast. e.g. don't wanne wait 3 days to have those
200000 digits.

Allready thanks in advanced

Tom

email : tw45024@is2.vub.ac.be



======================================================================= 37 ===
Date:    14 Dec 1994 15:10:51 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: electronically available description ?

In article <1994Dec14.023010.11316@news.snu.ac.kr> lsj@red.snu.ac.kr (Lee) writ
es:

   I heard that M3 is easy, safe and powerful. So I downloaded the
   Linux one. But I can't find any electronically available document.
   There is none at nearby bookstores.  Where can I get a
   electronically available description of Modula-3?

Try:

     http://www.research.digital.com/SRC/m3defn/html/m3.html

for the language definition. 

There are some introductory articles at work, for example, see Geoff
Wyant's article in the most recent issue of the Linux Journal
(December 1994; don't know about the electronic version of that yet).
You can find "Systems Programming with Modula-3", or SPwM3 as it is
called on this group, from your nearby bookstores or some on-line
ones:

   http://www.research.digital.com/SRC/modula-3/html/bookstores.html.


See Modula-3 Home Page and the Modula-3 FAQ for more information:

     http://www.research.digital.com/SRC/modula-3/html/home.html


If I may ask, how did you hear about M3 and did your source tell you
about the Modula-3 Home Page?

Anyway, it is definitely worth a try under Linux. M3 is, as you said,
simple, safe and powerful.  Please let us know how you like it.

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 38 ===
Date:    14 Dec 1994 20:12:49 GMT
From:    iansmith@weasel.cc.gatech.edu (Ian Smith)
Subject: m3tk question (UNparsing)

I was wondering if someone out there had already written an UNparser
for modula 3, via m3tk, in particular M3AST_AS.  What I would like to
do is take an ast for mod3 and output modula3 code that produces that
parse tree. Certainly you can do this by walking the parsed tree 
and outputting the correct text at each point, but this is tedious
work... If someone has already done it, I'd rather not repeat the
effort.

Also the M3ASTLX_F interface looks like it might contain enough
information to reconstruct the output... but this is not (quite?)
what I want. I may want to selectively output the text from particular
nodes in the AST... this seems like it requires a walk of the tree (+
decision making) and not just some sort of textual reconstruction (but
I'd love to hear that I am wrong)....

thanks a lot
ian


======================================================================= 39 ===
Date:    Wed, 14 Dec 1994 16:17:56 GMT
From:    schaupp@ise.ipvr.informatik.uni-stuttgart.de (Andreas Schaupp)
Subject: Compile Problems with Modula3-3.3 on a SPARC with SUNOS4.1.1

Hello,

I have a problem to compile libm3 on a SUN running SUNOS 4.1.1. I have compiled
 the bootstrap source (boot-SPARC) without any errors, but when I try to compil
e libm3
I get the following error message:

m3 -w1 -why -g -a libm3.a -F/usr/tmp/qkAAAa27070
sh: 27281 Bus error - core dumped
*** error code 138 (ignored)
missing libm3.a: not building libm3.so.1.1

On the other side, when I try to compile libm3 on a SUN with SUNOS 4.1.2 or 
SUNOS 4.1.3 all works fine.

Can anybody help me ?




======================================================================= 40 ===
Date:    Fri, 16 Dec 1994 10:55:46 -0500
From:    gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS)
Subject: trestle tutorial code: where?


   Hello,

   After reading the Modula-3 article in the Linux Journal a decided to
   download Modula-3 and play with it, and perhaps, if I like it, to do some
   serious work :-). I have installed the stripped version. 

   The problem: I want to code something using the Trestle/VBT interfaces,
   and am looking for the Trestle Tutorial source code (This is a DEC
   report). According to the abstract the code is available on the net, but
   I can't locate it, and the code is not (as far as I could find out) in the
   stripped distribution. Does anybody know where I can find it? If the Trestle
   Tutorial itself can be found somewhere on the net, I would be very happy. 

   I am considering buying the book, but it must be ordered first and that
   will take quite some time ( I haven't found it in any Dutch bookstore :-(
   )


    --
   ----------------------------------------------------------------------------
---
   Frank Visser                | Gods wegen zijn duister, en zelden aangenaam
   e-mail: fvisser@caos.kun.nl |                       Bob den Uyl(?)   
   CAOS/CAMM center            |  		         



If you FTP the trestle source distribution, you will get the tutorial
files:

   ftp://gatekeeper.dec.com/pub/DEC/Modula-3/release-3.3/trestle.tar.gz

If you need any help, feel free to drop a line either to myself or
to the M3 newsgroup !


--geoff


======================================================================= 41 ===
Date:    Thu, 15 Dec 1994 11:29:00 GMT
From:    fvisser@camms2.caos.kun.nl (Frank Visser)
Subject: trestle tutorial code: where?


Hello,

After reading the Modula-3 article in the Linux Journal a decided to
download Modula-3 and play with it, and perhaps, if I like it, to do some
serious work :-). I have installed the stripped version. 

The problem: I want to code something using the Trestle/VBT interfaces,
and am looking for the Trestle Tutorial source code (This is a DEC
report). According to the abstract the code is available on the net, but
I can't locate it, and the code is not (as far as I could find out) in the
stripped distribution. Does anybody know where I can find it? If the Trestle
Tutorial itself can be found somewhere on the net, I would be very happy. 

I am considering buying the book, but it must be ordered first and that
will take quite some time ( I haven't found it in any Dutch bookstore :-(
)


 --
-------------------------------------------------------------------------------
Frank Visser                | Gods wegen zijn duister, en zelden aangenaam
e-mail: fvisser@caos.kun.nl |                       Bob den Uyl(?)   
CAOS/CAMM center            |  		         


======================================================================= 42 ===
Date:    15 Dec 1994 16:24:59 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: trestle tutorial code: where?


In article <D0unwC.92q@sci.kun.nl> fvisser@camms2.caos.kun.nl (Frank Visser) wr
ites:

   After reading the Modula-3 article in the Linux Journal a decided
   to download Modula-3 and play with it, and perhaps, if I like it,
   to do some serious work :-). I have installed the stripped version.

Great!

   The problem: I want to code something using the Trestle/VBT
   interfaces, and am looking for the Trestle Tutorial source code
   (This is a DEC report). According to the abstract the code is
   available on the net, but I can't locate it, and the code is not
   (as far as I could find out) in the stripped distribution. Does
   anybody know where I can find it? If the Trestle Tutorial itself
   can be found somewhere on the net, I would be very happy.

Trestle Tutorial is available as part "trestle" tar file of SRC
Modula-3 distribution via anonymous ftp:
  
   ftp::gatekeeper.dec.com/pub/DEC/Modula-3/release-3.3/trestle.tar.gz

Note that, as the Linux Journal article points out, there are higher
levels of abstractions than Trestle for building most UIs. Two of them
are called VBTkit, and FormsVBT.

FormsVBT and VBTkit are not documented in the Trestle Tutorial. For
learning how to use FormsVBT and VBTkit, you may want to browse the
contrib/ subdirectory of Modula-3 FTP home on gatekeeper for
Postscript files, and the proper packages (formsvbt, vbtkit, vbtapps)
from the release-3.3/ subdirectory as well.

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 43 ===
Date:    14 Dec 1994 15:47:43 GMT
From:    bj03254@rrz.Uni-Koeln.DE (N.N.)
Subject: RE: Modula-3 Compilers


You can get Modula-3 for LINUX in the following ftp-site:
ftp.vlsi.polymtl.ca
in the directory pub/m3/linux


Good luck!   Martina



======================================================================= 44 ===
Date:    14 Dec 1994 22:46:48 GMT
From:    kirschnt@milian.mpfpi-muenchen.mpg.de (Torsten R. Kirschner)
Subject: Re: network objects

Karl-Heinz EDER (charly@samsoef.ifi.uni-klu.ac.at) wrote:
:> 	We installed the newtwork objects for Modula-3
:> 	release 3.1 under ALPHA_OSF. All tests worked
:> 	fine. Since we have release 3.3 the distributed
:> 	example in ".../netobj/tests/echorw" does no longer
:> 	run. It produces the runtime error:
:> 		... possible attempt to dereference NIL ...
[further lines deleted]

Dear K.-H.,

when I installed the 3.3 release I got different results. Just to
check, I re-ran the echorw example. The server is running on an
AXP OSF/1 (axposf) machine. The first client is a good old Ultrix 
box (file01), the second one axposf itself:

(1)
Script started on Wed Dec 14 22:17:36 1994
file01:.../echorw/DS3100 > ./echotest axposf.pa.dec.com
Located target via netobjd
Dies ist ein Test.
Dies ist ein Test.
^Cfile01:.../echorw/DS3100 > 
script done on Wed Dec 14 22:18:12 1994

(2)
Script started on Wed Dec 14 13:22:33 1994
axpof.pa.dec.com:.../echorw/ALPHA_OSF > ./echotest axposf.pa.dec.com
Located target via netobjd
Dies ist ein lokaler Test auf der Alpha.
Dies ist ein lokaler Test auf der Alpha.
axpof.pa.dec.com:.../echorw/ALPHA_OSF > exit
script done on Wed Dec 14 13:23:24 1994

However, I get an error message similar to yours if something goes
wrong. For instance, if I stop the server after the client has located
it via netobjd and is still trying to get my input echoed.

Yours
Torsten
--
------------------------------------------------------------------------
Torsten R. Kirschner | Wagm"ullerstr. 23  | Phone: +49 89 211 06 70
CIS                  | D-80538 M"unchen   | Fax:   +49 89 211 06 74
University of Munich | Germany            | kirschnt@cis.uni-muenchen.de
------------------------------------------------------------------------
 <A HREF="http://www.cis.uni-muenchen.de/~kirschnt">Torsten im WWW</A>


======================================================================= 45 ===
Date:    14 Dec 1994 15:36:05 GMT
From:    bj03254@rrz.Uni-Koeln.DE (N.N.)
Subject: Q: Unknown Errormessage

Writing my first Modula3 "Hello world" and then compiling it, I got the foll-
owing message:
Fatal Error: Process.Create ("*UNDEFINED*") failed: Errno=2

I used the following call for compiling:

m3 -o Hello Hello1.m3

Does anybody know why that happened ?
I'm using m3 on a Linux system (slackware 2.0 Kernel 1.0.9)

Thank in advance


			MARTINA

please reply mail to: isa009@advs2.gm.fh-koeln.de 



======================================================================= 46 ===
Date:    Thu, 15 Dec 1994 17:45:21 GMT
From:    fvisser@camms2.caos.kun.nl (Frank Visser)
Subject: Re: trestle tutorial code: where?

Farshad Nayeri (nayeri@gte.com) wrote:

: Trestle Tutorial is available as part "trestle" tar file of SRC
: Modula-3 distribution via anonymous ftp:
:   
:    ftp::gatekeeper.dec.com/pub/DEC/Modula-3/release-3.3/trestle.tar.gz

OK, thanks for the pointer

: Note that, as the Linux Journal article points out, there are higher
: levels of abstractions than Trestle for building most UIs. Two of them
: are called VBTkit, and FormsVBT.

I realised this, but the VBTKit ref. manual says that it assumes that you
are familiar with Trestle, and they give the Trestle tutorial/manual as a
referenc. I am just following the "link". Besides, I want to know what is
going on 'under the hood', but I just haven't enough room to put the full
SRC source tree on my disk 

 : FormsVBT and VBTkit are not documented in the Trestle Tutorial.For 
: learning how to use FormsVBT and VBTkit, you may want to browse the
: contrib/ subdirectory of Modula-3 FTP home on gatekeeper for
: Postscript files, and the proper packages (formsvbt, vbtkit, vbtapps)
: from the release-3.3/ subdirectory as well.

Been there, done that, will do it again :-)

Thanks for all the info

Greetings, Frank

--
-------------------------------------------------------------------------------
Frank Visser                | Gods wegen zijn duister, en zelden aangenaam
e-mail: fvisser@caos.kun.nl |                       Bob den Uyl(?)   
CAOS/CAMM center            |  		         


======================================================================= 47 ===
Date:    Mon, 12 Dec 94 13:30:51 GMT
From:    jpr2@ukc.ac.uk (Mad Dog)
Subject: How can I call C routines from M3 programs?


	Can anybody tell me how to call my own C routines from within a 
Modula3 program. The only reference to this that I have found is in Greg
Nelson's book which says that C programs may easily be called. I have not 
been using Modula3 for very long and wish to reuse old code before I work 
out how to rewrite it in Modula3.

Any references or simple examples will be most appreciated.

Jeff


======================================================================= 48 ===
Date:    16 Dec 1994 20:34:16 GMT
From:    jackg@downhaul.crc.ricoh.com (Jack Greenbaum)
Subject: Re: Accessor methods


   douglm@rpi.edu wrote:
   : >Blair MacIntyre and many others write on the subject of efficiency.

   : It worries me that people put so much emphasis on "efficiency" as if
   : executing  a few more instructions to achieve some result will make any
   : noticable difference.

My original question about inline accessors was about my concern for
efficiency in inner loops. In the real world this is the only place
where efficiency matters. N^2 algorithms are fine if you run them on
order "more than once", but will absolutely kill you inside of an inner
loop. Likewise a 4X difference in an innner loop instruction count will
give you a 4x runtime increase for that section of code. If this is
where you spend 90% of your time then you've got a lot to gain by being
efficient. Spending this much time in one loop is quite common in areas
like scientific programming and image processing (compression and
optical character recognition for example). Causing a cache miss in this
inner loop is another way to loose. A method lookup in an inner loop
could do this, and you'd have no way of fixing it without heavyweight
tools. Clearing the pipeline is another way to loose. That's why people
(and compilers) unroll loops because you have to wait for the pipeline
to clear and then fill again when you do a jump (or function call,
i.e. a method call).  People I work with do this type of
optimization. This stuff is real. You just can't ignore efficiency
inside of tight loops when you are building real systems. Everywhere
else, like in setup code that is run once or twice, you are right, it
doesn't matter at all.

In article <3cr50k$kdd@hermes.unt.edu> schaub@ponder.csci.unt.edu (Stephen Scha
ub) writes:

   From: schaub@ponder.csci.unt.edu (Stephen Schaub)
   Newsgroups: comp.lang.modula3
   Date: 16 Dec 1994 04:28:04 GMT
   Organization: University of North Texas
   Lines: 19
   Distribution: world
   References: <ab1500ee00021004e090@[128.113.24.157]>
   NNTP-Posting-Host: ponder.csci.unt.edu
   X-Newsreader: TIN [version 1.2 PL2]

   douglm@rpi.edu wrote:
[...]
   : At the source level, we shouldn't be worrying about efficiency at the
   : instrucyion level. The net effect is generally to make the code less easy
   : to understand and therefore more likely to be wrong.

   This is exactly the sort of thing I'm trying to teach my freshman CSCI
   students.  I'm glad to see remarks like this in a newsgroup for a 'real
   world' systems programming language like Modula-3.

   Stephen Schaub
   Teaching Fellow, University of North Texas

Let's talk about balance here. This may seem off the track of Modula-3,
but I chose M3 for my most recent project because of codability knowing
that some things are less efficient than if I'd used a language closer
to the metal (like C++). You can't ignore efficiency, but you also can't
ignore abstraction. If it takes you three weeks to get that 4x increase
in speed have you won? What about three months? What if I could
implement something in 3 days at a price of 4x runtime? This is the
balancing act. Eficiency matters when you build real systems! But so
does development time.

What we should be teaching programmers today is respect for abstraction
because it helps us build code that is easy to understand, debug and
test (please teach people how to test their code) and more likely to be
reusable. However the ability to do that while still being sensitive to
efficiency, either at the system, algorithmic or instruction level, is
the mark of a craftsman, and absolutely needs to be covered in Bachelor
degree programs. Certainly introducing this at the freshman level
without teaching bad habits is hard, and may not be possible.

I'm very happy about my choice of M3 for the current tool I'm building.
The garbage collection is saving me enourmous amounts of development
effort. The abstractions that seperate interface from implementation are
great. I'm completly please with the SRC implentation. I might have to
break abstraction though if I try to tune an inner loop. For this tool
it won't matter at all. For a different project you bet it will.





--
Jack Greenbaum -- Research Engineer, Ricoh California Research Center
---------------------------------------------------------------------
Digital: jackg@crc.ricoh.com   |  http://www.crc.ricoh.com/~jackg
---------------------------------------------------------------------
Analog:  (415) 496-5711 voice  |  2882 Sand Hill Rd. Suite 115
         (415) 854-8740 fax    |  Menlo Park, CA 94025-7002
---------------------------------------------------------------------


-- 
Jack Greenbaum -- Research Engineer, Ricoh California Research Center
---------------------------------------------------------------------
Digital: jackg@crc.ricoh.com   |  http://www.crc.ricoh.com/~jackg
---------------------------------------------------------------------


======================================================================= 49 ===
Date:    12 Dec 1994 02:35:17 GMT
From:    egustafs@vlsia (Eric G. Gustafson)
Subject: emacs compilation mode

Does anyone know of elisp code or another way to compile from with in
emacs using the SRC m3 tools?  Appearently the m3-mode elisp code has
not taken this into account.

Thanks,
--
Eric Gustafson                                      egustafs@vlsia.uccs.edu
Electrical & Computer Engineering                    egustafs@cpe.valpo.edu
University of Colorado -- UCCS                        Phone: (719) 637-8022
** Warning ** Planet is 97% full please remove unneeded inhabitants !!


======================================================================= 50 ===
Date:    17 Dec 1994 00:38:51 GMT
From:    schaub@ponder.csci.unt.edu (Stephen Schaub)
Subject: Re: Accessor methods

Jack Greenbaum (jackg@downhaul.crc.ricoh.com) wrote:

:    douglm@rpi.edu wrote:
: [...]
:    : At the source level, we shouldn't be worrying about efficiency at the
:    : instrucyion level. The net effect is generally to make the code less eas
y
:    : to understand and therefore more likely to be wrong.

:    This is exactly the sort of thing I'm trying to teach my freshman CSCI
:    students.  I'm glad to see remarks like this in a newsgroup for a 'real
:    world' systems programming language like Modula-3.

:    Stephen Schaub
:    Teaching Fellow, University of North Texas

: What we should be teaching programmers today is respect for abstraction
: because it helps us build code that is easy to understand, debug and
: test (please teach people how to test their code) and more likely to be
: reusable. However the ability to do that while still being sensitive to
: efficiency, either at the system, algorithmic or instruction level, is
: the mark of a craftsman, and absolutely needs to be covered in Bachelor
: degree programs. Certainly introducing this at the freshman level
: without teaching bad habits is hard, and may not be possible.

I agree that we can't completely ignore matters of efficiency when
discussing abstraction.  In fact, I dedicate lecture time to the topic of
"what do you do when the walls of abstraction result in an unacceptable
performance penalty," and try to demonstrate how techniques such as caching
can let you keep the abstraction and achieve acceptable efficiency.  

It's interesting that you should mention teaching people how to test their
code.  That's the one thing I felt I really didn't emphasize enough this
semester, and plan to work on next semester.  It's obvious that programmers
aren't born knowing this important skill, and yet I don't recall it ever 
being taught specifically in my own undergraduate background.  I would
appreciate any tips on practical approaches to the topic from others.

While I'm asking for input, I may as well mention that I am planning to use
Modula-3 to teach our CS2 course here in the spring.  Students are coming in
from CS1 with a Pascal background, and I want to do everything possible to
ease the transition.  They'll have to learn Unix, a new editor, AND a new
language, all in the first 3-4 weeks--I hope I'm not asking for trouble!

Stephen Schaub
schaub@cs.unt.edu


======================================================================= 51 ===
Date:    16 Dec 94 20:09:51
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Q: Unknown Errormessage


Martina,

Starting with version 3 of SRC Modula-3, the m3 command will not work
directly the way you tried it.

Instead, try creating an "m3makefile" in your "src" directory
containing:

import (libm3)
implementation (Hello1)
program (Hello)

and run the command "m3build" from the parent directory of the "src"
subdirectory. This should take care of your problem.

I don't believe that, in a standard intallation of SRC Modula-3, "m3"
should even be in your executable path. Though when I used the "m3"
command from the lib/m3/SPARC directory I got the same error message.

See the FAQ (ftp.vlsi.polymtl.ca:/pub/m3/m3-faq.ps) for more
information about this.

Good Luck! -- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 52 ===
Date:    12 Dec 1994 05:10:11 GMT
From:    rrw1000@cus.cam.ac.uk (Richard Watts)
Subject: Re: emacs compilation mode

In article <3cgct5$2pb@harpo.uccs.edu>,
Eric G. Gustafson <egustafs@vlsia> wrote:
>Does anyone know of elisp code or another way to compile from with in
>emacs using the SRC m3 tools?  Appearently the m3-mode elisp code has
>not taken this into account.

 Try compile.el, available with GNU Emacs 19.xx (certainly with xx >=
19.19).  If you're running under X and want something a little more
snazzy, try looking at http://apus.cus.cam.ac.uk:8654/~rrw1000 -
Austin <and1000@cam.ac.uk> hacked hilit19 to highlight Modula 3, and
I've improved on that and hacked compile.el to be what I consider a
little nicer, and some people consider horrible bordering on lunacy.

 Oh, and I claim no sense of subtlety. My colour scheme is uniformly
garish and tasteless.

 An appropriate compile command (with m3build in your path) is 

 m3build -d ..

 Since you'll probably be editing things in your src directory. I
didn't consider it justified to change the default.



Richard.
-- 
`Orac is a computer, like Zen. They react to information, that is all.'
The University of Cambridge can't have these opinions even if it wants them.


======================================================================= 53 ===
Date:    16 Dec 1994 17:58:32 GMT
From:    rrw1000@cus.cam.ac.uk (Richard Watts)
Subject: Re: network objects

In article <3ck47k$glb@fstgds15.tu-graz.ac.at>,
Karl-Heinz EDER <charly@samsoef.ifi.uni-klu.ac.at> wrote:
>
>I have one short comment and one question:
>
 [snip]
>
>The Question:
>	I installed Modula-3 release 3.3 and teir network
>	objects under LINUX. Everything (compiler, linker,
>	..) works fine but no demo for the network objects
>	runs. All demo programs in .../netobj/tests can be
>	compiled and linked, but execution fails with the 
>	unhandled runtime exception:
>
>		... TCP.FatalError ...
>
>	This exception is not described anywhere. Did anyone
>	solved this problem or similiar ones. I installed
>	TCP/IP under LINUX slakware 1.0.9 and use the default
>	loopback address 127.0.0.1.

 I have a similar problem with Linux network objects on 3.3, in that :

	* netobjd, when started, connects with a server, and
	  carries on doing so, creating more and more connections
	  until the kernel refuses to let it have any more.

	* My client programs do their stuff and then just hang -
	  i.e. when their Main module initialisation fails, they
	  don't exit (Ctrl-D has no effect), and if I interrupt
	  them with a SIGINT, the server refuses to honour any
	  more requests.

 The demo programs supplied with netobj exhibit these problems as well,
with or without Michael Dagenais' patches applied to libm3tcp.
 These problems don't seem to occur under Solaris 2. Does anyone have any
pointers as to where I should start looking for the fault ?


Richard.
-- 
`Orac is a computer, like Zen. They react to information, that is all.'
The University of Cambridge can't have these opinions even if it wants them.


======================================================================= 54 ===
Date:    Fri, 16 Dec 94 11:24:00 -0500
From:    tony.kong@canrem.com (Tony Kong)
Subject: test

This is a test.


======================================================================= 55 ===
Date:    12 Dec 1994 15:56:15 GMT
From:    rrw1000@cus.cam.ac.uk (Richard Watts)
Subject: Re: How can I call C routines from M3 programs?

In article <11391@gos.ukc.ac.uk>, Mad Dog <jpr2@ukc.ac.uk> wrote:
>
>	Can anybody tell me how to call my own C routines from within a 
>Modula3 program. The only reference to this that I have found is in Greg
>Nelson's book which says that C programs may easily be called. I have not 
>been using Modula3 for very long and wish to reuse old code before I work 
>out how to rewrite it in Modula3.
>
>Any references or simple examples will be most appreciated.

 Just build a dummy interface containing Modula-3 declarations for your C
functions, and link with the object file containing the functions. Have a 
look at libm3/src/unix/[systemname/*.i3 , for example.

 Here's a dummy example :

------------------- Hello.m3 --------------------
UNSAFE MODULE Hello EXPORTS Main;

IMPORT Stdio, Wr;
IMPORT M3toC, Veep;


<*INLINE*>PROCEDURE hello() = 
 BEGIN
  Wr.PutText(Stdio.stdout, "Hello World !\n");
  Wr.Flush(Stdio.stdout);
END hello;

BEGIN
Veep.hello2(M3toC.TtoS("Beep!\n"));
hello();
END Hello.
-----------------Veep.i3------------------
INTERFACE Veep;

IMPORT Ctypes;

<*EXTERNAL*>PROCEDURE hello2(a : Ctypes.char_star);

END Veep.
-----------------m3makefile---------------
% m3makefile

m3_option("-commands")

import(libm3)
interface(Veep)
implementation(Hello)
program(foo)
import_obj(hello2.o)
-----------------hello2.c-----------------
#include <stdio.h>

void hello2(char *);


void hello2(char *s)  {   
   printf(s);
}
-------------------------------------------

 (you'll have to compile hello2 separately or add some quake goo to
  do it for you - possibly calling `make' to construct the C parts of
  the program ?)

 There is a problem with this, which is that the import_obj() function 
doesn't seem to work (on my Linux box, or the University's SunOS 5.3 box
anyway). Does anyone have any solution to this ? The Bugs & Patches page
doesn't appear to list it...


Richard.
-- 
`Orac is a computer, like Zen. They react to information, that is all.'
The University of Cambridge can't have these opinions even if it wants them.


======================================================================= 56 ===
Date:    16 Dec 1994 17:32:22 GMT
From:    bm@shadow.cs.columbia.edu (Blair MacIntyre)
Subject: Re: Accessor methods

>>>>> On 16 Dec 1994 04:28:04 GMT, schaub@ponder.csci.unt.edu (Stephen
>>>>> Schaub) said:

Stephen> douglm@rpi.edu wrote:
Stephen> : >Blair MacIntyre and many others write on the subject of efficiency.

Stephen> : It worries me that people put so much emphasis on
Stephen> : "efficiency" as if executing a few more instructions to
Stephen> : achieve some result will make any noticable difference.

Stephen> This is exactly the sort of thing I'm trying to teach my
Stephen> freshman CSCI students.  I'm glad to see remarks like this in
Stephen> a newsgroup for a 'real world' systems programming language
Stephen> like Modula-3.

(slightly off topic:) The attribution up there implies that I'm one of
the people worrying needlessly about efficiency.  I only recently
switched to Modula-3, specifically because I agree with your
sentiments.  I would prefer not becoming the name synonymous with
bashing M-3 for unsupported complains of innefficiency, thanks
anyway. :-)

I like the sentence in the historical overview of Harbison's Modula-3
book, when they are comparing it to C++:

"Modula-3 makes other tradeoffs in favour of safety and clarity,
whereas C++ opts for power and flexibility."   I'll take safety and
clarity over the semi-infinite subtle complexity of C++ any day.  :-)

  

--
Blair MacIntyre -- bm@cs.columbia.edu -- Graduate Student (Graphics and UI Lab)

smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 St.,
       Columbia University, New York, NY 10027


======================================================================= 57 ===
Date:    17 Dec 1994 15:10:12 GMT
From:    rrw1000@cus.cam.ac.uk (Richard Watts)
Subject: Re: network objects

In article <JULLIARD.94Dec14094852@cornillon.grenoble.rxrc.xerox.com>,
Laurent Julliard <julliard@cornillon.grenoble.rxrc.xerox.com> wrote:
>
>
>In article <3ck47k$glb@fstgds15.tu-graz.ac.at> charly@samsoef.ifi.uni-klu.ac.a
t (Karl-Heinz EDER) writes:
>
>> From: charly@samsoef.ifi.uni-klu.ac.at (Karl-Heinz EDER)
>> Newsgroups: comp.lang.modula3
>> Date: 13 Dec 1994 12:31:48 GMT
>> Organization: Institut fuer Informatik  Universitaet KLAGENFURT
>> Reply-To: charly@samsoef.ifi.uni-klu.ac.at (Karl-Heinz EDER)
>> 
>
>[Lines deleted...]
>
>> 
>> The Question:
>> 	I installed Modula-3 release 3.3 and teir network
>> 	objects under LINUX. Everything (compiler, linker,
>> 	..) works fine but no demo for the network objects
>> 	runs. All demo programs in .../netobj/tests can be
>> 	compiled and linked, but execution fails with the 
>> 	unhandled runtime exception:
>> 
>> 		... TCP.FatalError ...
>> 
>> 	This exception is not described anywhere. Did anyone
>> 	solved this problem or similiar ones. I installed
>> 	TCP/IP under LINUX slakware 1.0.9 and use the default
>> 	loopback address 127.0.0.1.
>> 
>
>To be honest I have never used modula3 on Linux. But what I can tell
>you for sure is that Linux 1.0.9 is now an old version (although it
>has a numbering that indicates it is stable) and since then the TCP/IP
>code has undergone some major modifications. So my advice is to
>upgrade to the latest kernel (1.1.7?), we are not very far from 1.2.0
>and those kernels are now very stable.


 Further research indicates that (for my problems, at least) this is
indeed the problem - I'm running 1.1.45. It turns out that under Linux,
connect() without anyone on the other side, on a non-blocking socket returns
with errno EALREADY as opposed to EINVAL (SunOS 4.1.3 and Ultrix 4.3) or
ECONNREFUSED and a SIGPIPE (SunOS 5.3). Now, the next question is : which
is the correct behaviour ? It's over to comp.unix.*, I think...



Richard.
-- 
`Orac is a computer, like Zen. They react to information, that is all.'
The University of Cambridge can't have these opinions even if it wants them.


======================================================================= 58 ===
Date:    17 Dec 1994 16:01:58 GMT
From:    rrw1000@cus.cam.ac.uk (Richard Watts)
Subject: Re: How can I call C routines from M3 programs?

In article <DAGENAIS.94Dec13090721@froh.vlsi.polymtl.ca>,
Michel Dagenais <dagenais@froh.vlsi.polymtl.ca> wrote:
>
>    There is a problem with this, which is that the import_obj() function 
>   doesn't seem to work (on my Linux box, or the University's SunOS 5.3 box
>   anyway). Does anyone have any solution to this ? The Bugs & Patches page
>   doesn't appear to list it...
>
>The problem was first reported to me yesterday morning. Fixed LINUX
>m3build templates are now available in ftp.vlsi.polymtl.ca in
>pub/m3/linux/templatePatch.tar.gz.

 Thanks ! :-).


Richard.
-- 
`Orac is a computer, like Zen. They react to information, that is all.'
The University of Cambridge can't have these opinions even if it wants them.


======================================================================= 59 ===
Date:    16 Dec 1994 04:28:04 GMT
From:    schaub@ponder.csci.unt.edu (Stephen Schaub)
Subject: Re: Accessor methods

douglm@rpi.edu wrote:
: >Blair MacIntyre and many others write on the subject of efficiency.

: It worries me that people put so much emphasis on "efficiency" as if
: executing  a few more instructions to achieve some result will make any
: noticable difference.

: At the source level, we shouldn't be worrying about efficiency at the
: instrucyion level. The net effect is generally to make the code less easy
: to understand and therefore more likely to be wrong.

This is exactly the sort of thing I'm trying to teach my freshman CSCI
students.  I'm glad to see remarks like this in a newsgroup for a 'real
world' systems programming language like Modula-3.

Stephen Schaub
Teaching Fellow, University of North Texas




======================================================================= 60 ===
Date:    12 Dec 1994 23:33:27 -0600
From:    markso@MCS.COM (Mark Solinski)
Subject: formsvbt compiled under Linux

Has anyone compiled (successfully!) the formsvbt package under Linux?
I keep getting the following errors:

m3 -w1 -why -g -a libjvideo.a -F/tmp/qk16812aaa 
new source -> compiling ../src/JVSink.m3
"../src/JVSink.m3", line 575: warning: variable has type NULL (vec)
"../src/JVSink.m3", line 575: unknown qualification '.' (struct_sigvec)
"../src/JVSink.m3", line 575: constructor type must be array, record, or set
   type
"../src/JVSink.m3", line 576: undefined (Usignal.struct_sigvec)
"../src/JVSink.m3", line 346: warning: potentially unhandled exceptions:
   Wr.Failure, Thread.Alerted
"../src/JVSink.m3", line 579: unknown qualification '.' (sigvec)
"../src/JVSink.m3", line 579: expression doesn't have a value
"../src/JVSink.m3", line 580: unknown qualification '.' (sv_handler)
"../src/JVSink.m3", line 581: unknown qualification '.' (sv_handler)
"../src/JVSink.m3", line 582: unknown qualification '.' (sigvec)
"../src/JVSink.m3", line 582: expression doesn't have a value
"../src/JVSink.m3", line 14: warning: not used (Fmt)
"../src/JVSink.m3", line 344: warning: not used (Bpt)
9 errors and 4 warnings encountered
new source -> compiling ../src/JvsBuffer.m3
"../src/JvsBuffer.m3", line 80: warning: variable has type NULL (addr)
"../src/JvsBuffer.m3", line 80: unknown qualification '.' (shmat)
"../src/JvsBuffer.m3", line 80: types are not assignable
"../src/JvsBuffer.m3", line 82: LOOPHOLE: expression's size differs from type's
"../src/JvsBuffer.m3", line 82: warning: LOOPHOLE: expression's alignment may
   differ from type's
3 errors and 2 warnings encountered
compilation failed => not building library "libjvideo.a"
*** error code 1 (ignored)
--- building in LINUX ---

I can't seem to find Usignal.struct_sigvec anywhere under Linux.  Am I doing
something wrong?  Any help would be greatly appreciated.

Mark Solinski
GroupWorks Technologies, Inc (markso@mcs.com, markso@groupworks.com)


======================================================================= 61 ===
Date:    Sat, 17 Dec 1994 11:54:08 GMT
From:    kendall@mv.mv.com (Sam Kendall)
Subject: Re: Accessor methods

jackg@downhaul.crc.ricoh.com (Jack Greenbaum) writes:

   .... You just can't ignore efficiency inside of tight loops when
   you are building real systems. Everywhere else, like in setup code
   that is run once or twice, you are right, it doesn't matter at
   all....

   .... I might have to break abstraction though if I try to tune an
   inner loop. For this tool it won't matter at all. For a different
   project you bet it will.

I think both sides are right in this debate; yes, efficiency is
over-emphasized, but yes, it sometimes matters a great deal.

The partial revelation feature of M3 can help here, so that you can
break abstraction in a controlled way.  The usual interface to a data
type can be procedural; but you can supply a second interface that
reveals part or all of the representation, allowing certain clients
the speed advantage of direct access to the data.

(Most readers probably know this, but I think it's worth pointing out
in a public discussion.)

---
Sam Kendall
Frankel and Associates



======================================================================= 62 ===
Date:    12 Dec 94 18:55:56 CST
From:    malikam@hccompare.com
Subject: Modula-3 Compilers

Where can I get a copy of Modula-3 for Dos/Windows or OS/2 or Linux?

Any help would be greatly appreciated




======================================================================= 63 ===
Date:    Fri, 16 Dec 1994 13:22:18 GMT
From:    ljp@my21.sm.luth.se (Johan Persson)
Subject: Implementation of Objects?

I have a question regarding the implementation of objects
in M3 which came up when I was implementing some simulation
code which uses alot of objects.

Does objects share the method suite if possibly?

Assume we have the declaration

  Obj = OBJECT
          i:INTEGER;
        METHODS
          set(i:INTEGER);
        END;

Then if I allocate the objects

  a:=NEW(Obj,set:=Set_a);
  b:=NEW(Obj,set:=Set_b);

The memory layout would be something like

  -------                             -------
  |     |--->|-----|                  |     |---->|-----|
  +-----+    |Set_a|                  +-----+     |Set_b| 
  |     |    |-----|                  |     |     |-----|  
  | i   |    Method suite             | i   |     Method suite
  -------                             -------
    a                                    b


But what if the methods had been given a default value?

Obj = OBJECT
       i:INTEGER;
      METHODS
       set(i:INTEGER):=Set;
      END;

and  then allocate the objects as

  a:=NEW(Obj);
  b:=NEW(Obj);

Since the two objects now has the possibility to share
method suites will the memory layout reflect this, i.e
is the following picture true?

  |-----|
  |     |---+---->|-----|
  +-----+   |     |Set  |
  |     |   |     |-----|
  |     |   |     Method suite
  |-----|   |     (shared by the two objects?)
     a      |
            |
  |-----|   |
  |     |---+
  +-----+
  |     |
  |     |
  |-----|
     b

This would of course require the compiler to treat the calls

  a:=NEW(Obj)

and

  a:=NEW(Obj,set:=SomeProcedure)

different, which I'm not sure of is a good idea. On the other hand
you could save some memory.

Anyone care to comment?

/Johan



======================================================================= 64 ===
Date:    16 Dec 1994 14:18:07 GMT
From:    hudson@cs.umass.edu (Rick Hudson)
Subject: Re: Accessor methods

We have a saying around here.

"Premature optimization is the source of all bugs."

It clearly applies to this accessor method discussion.
- Rick
--

       Richard L. Hudson  -  Hudson@cs.umass.edu; (413) 545-1220; 
       Advanced Languages Project - University Computing Services
       Lederle Graduate Research Center
       University of Massachusetts             Amherst, MA  01003


======================================================================= 65 ===
Date:    Tue, 13 Dec 1994 07:35:16 -0500
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Modula-3 Compilers

In article <1994Dec12.185556.156@hccompare.com>, malikam@hccompare.com wrote:

> Where can I get a copy of Modula-3 for Dos/Windows or OS/2 or Linux?
> 
> Any help would be greatly appreciated

You may want to start from reading the FAQ located at
ftp.vlsi.polymtl.ca:/pub/m3/m3-faq.ps (there is also a text and html
version, I believe). There are two DOS ports available; an OS/2 port is at
works, and there is very good support for Linux. The faq gives you the
locations for LINUX binaries; though all these systems can be found in
source format from gatekeeper.dec.com:/pub/DEC/Modula-3. PC versions are
in contrib subdirectory; the LINUX version in release subdirectory.

Out of all of these, I suspect the LINUX port is the one you may have the
best luck with, but I recommend you download the binary and not try to
rebuild it, as it takes some time to build from scratch.

-- Farshad


======================================================================= 66 ===
Date:    16 Dec 1994 11:44:55 GMT
From:    Quentin Stafford-Fraser <fraser@europarc.xerox.com>
Subject: Re: How can I call C routines from M3 programs?

rrw1000@cus.cam.ac.uk (Richard Watts) wrote:

>  There is a problem with this, which is that the import_obj() function 
> doesn't seem to work (on my Linux box, or the University's SunOS 5.3 box
> anyway). Does anyone have any solution to this ? The Bugs & Patches page
> doesn't appear to list it...

No, it's broken. I had a quick browse through the templates, but decided
to opt for the easier solutions, as I was in a hurry: 

If you just need to compile a few C files, use c_source("foo")

If you need to do more complex stuff, build it elsewhere as a library
and use import_lib. 

Quentin



======================================================================= 67 ===
Date:    Fri, 16 Dec 1994 13:11:20 -0500
From:    nayeri@gte.com (Farshad Nayeri)
Subject: ANNOUNCEMENT -- Introducing Modula-3: A Linux Journal article by Geoff
 Wyant


If you are just starting to use Modula-3, you may want to check out the
article titled "Introducing Modula-3" in the most recent issue of the
Linux Journal (December 1994). I think it is a good introduction for
Modula-3 and the SRC distribution, motivating why it makes for a good
platform for building large and robust applications.

A pre-publication version of the document is available from:

      ftp://ftp.gte.com/pub/m3/linux-journal.html

Thank you Geoff for taking the time to put this article out!

-- Farshad

[Michel & Bill, you may want to add this to the FAQ and/or the M3
publication list.]

Disclaimer: I know Geoff. In fact, I just had lunch with him the other day! :-)


======================================================================= 68 ===
Date:    Fri, 16 Dec 1994 16:53:26 GMT
From:    olaf@logware.de (Olaf Wagner)
Subject: M3 for FreeBSD 1.1 binary distribution


I have put some binaries compiled for FreeBSD 1.1.5, containing the
DEC SRC Modula-3 compiler, standard libraries, tools, debugger, and
trestle library on

   ftp://ftp.vlsi.polymtl.ca/pub/m3/freebsd

Here are the contents of the README in that directory:

------------------------
SRC Modula-3 for FreeBSD
------------------------
This is the binary distribution of DEC SRC's Modula-3 system for
FreeBSD 1.1[.5].

IMPORTANT
---------
The binaries contained in these archives won't run on FreeBSD 2.0,
you really needn't try it (I did). It is not as easy as expected
to get a port to FreeBSD 2.0 working, but I hope to have something
early next year.

The system works quite fine on 1.1.5, though. It supports threads,
incremental and generational garbage collection, stack protection
and - for the brave of heart - shared libraries.

SHARED LIBRARIES
----------------
The shared libs are really a hack, and if you're using them, you 
should expect hundreds of warning messages from the assembler and
the linker. This seems to be a problem of incompatibility with the
older versions of as and ld distributed with FreeBSD. Newer versions
won't work, though. In spite of the lot of warnings, I haven't
found any malfunction when using shared libs, so I hope everything
is all right.

There is a central configuration file in 
   /usr/local/lib/m3/pkg/m3build/templates/FreeBSD

If you want to use shared libs, you should use FreeBSD.shlibs-hack
instead. There will be symbolic links for the generated shared libraries
in /usr/local/lib/m3/FreeBSD, so your LIBPATH environment variable 
should point there.

What is available
-----------------
libm3-shared.tar.gz      libm3 compiled for shared libraries
libm3.tar.gz             libm3 compiled for static linking
m3gdb.tar.gz             gnu debugger for m3 (not the newest version, sorry)
srcdiffs.tar.gz          the diffs to the compiler and library sources
                         of SRC M3 release 3.3
system.tar.gz            compiler, linker, driver, quake, m3build, ...
tools.tar.gz             m3bundle, m3tohtml, m3totex, showheap, shownew,
                         showthread
trestle.tar.gz           the trestle library (not shared)


What you need
-------------
You need the system-archive and either libm3-shared or libm3 to have
a working system. If you want to compile the compiler, get the source diffs
and apply them with patch. Using the compiler and one of the libm3-versions,
you can compile all the packages found at gatekeeper.dec.com, including
network objects and obliq.

How to install
--------------
Everything MUST be installed under /usr/local/{bin|lib}. The easiest way
is

   cd /usr/local
   tar xzf archive.tar.gz

If you want the stuff at another location, you must either edit the
compiler template files or make a symbolic link.

Problems
--------
Of course there won't be any problems ;-)
If you are really at your wits end, you can send me email to

   wagner@luthien.in-berlin.de
or
   olaf@logware.de

I will try to answer all your questions, but it may take some days.

I hope you enjoy using Modula-3 on FreeBSD!
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\ Olaf Wagner              at Logware GmbH       Schwedenstrasse 9     \
\ olaf@logware.de (work)                         13359 Berlin 65       \
\ wagner@luthien.in-berlin.de (private)          Germany / Deutschland \


======================================================================= 69 ===
Date:    Fri, 16 Dec 1994 17:10:14 GMT
From:    jscotta@cix.compulink.co.uk ("James Scott")
Subject: OS2 Support for Modula-3

Does anyone know any more about the port of M3 to OS2 - is it likely to 
be available by the new year?


======================================================================= 70 ===
Date:    13 Dec 1994 12:31:48 GMT
From:    charly@samsoef.ifi.uni-klu.ac.at (Karl-Heinz EDER)
Subject: network objects


I have one short comment and one question:

The comment:
	We installed the newtwork objects for Modula-3
	release 3.1 under ALPHA_OSF. All tests worked
	fine. Since we have release 3.3 the distributed
	example in ".../netobj/tests/echorw" does no longer
	run. It produces the runtime error:

		... possible attempt to dereference NIL ...

The Question:
	I installed Modula-3 release 3.3 and teir network
	objects under LINUX. Everything (compiler, linker,
	..) works fine but no demo for the network objects
	runs. All demo programs in .../netobj/tests can be
	compiled and linked, but execution fails with the 
	unhandled runtime exception:

		... TCP.FatalError ...

	This exception is not described anywhere. Did anyone
	solved this problem or similiar ones. I installed
	TCP/IP under LINUX slakware 1.0.9 and use the default
	loopback address 127.0.0.1.



Karl-Heinz EDER
Institute of Applied Computer Science
University of Klagenfurt / AUSTRIA
email: charly@ifi.uni-klu.ac.at


======================================================================= 71 ===
Date:    Sun, 18 Dec 1994 14:38:52 GMT
From:    henrycosh@cix.compulink.co.uk ("Henry Cosh")
Subject: PC implementation of MODULA-3

I've just joined this newsgroup. Is there a PC/Windows implementation of
MODULA-3, with the appropriate Windows libraries,etc?

Henry Cosh





======================================================================= 72 ===
Date:    13 Dec 94 09:07:21
From:    dagenais@froh.vlsi.polymtl.ca (Michel Dagenais)
Subject: Re: How can I call C routines from M3 programs?


    There is a problem with this, which is that the import_obj() function 
   doesn't seem to work (on my Linux box, or the University's SunOS 5.3 box
   anyway). Does anyone have any solution to this ? The Bugs & Patches page
   doesn't appear to list it...

The problem was first reported to me yesterday morning. Fixed LINUX
m3build templates are now available in ftp.vlsi.polymtl.ca in
pub/m3/linux/templatePatch.tar.gz.
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 73 ===
Date:    14 Dec 1994 09:07:22 GMT
From:    Peter Klein <pk@i3.informatik.rwth-aachen.de>
Subject: Re: emacs compilation mode

rrw1000@cus.cam.ac.uk (Richard Watts) wrote:
>
>  Try compile.el, available with GNU Emacs 19.xx (certainly with xx >=
> 19.19).  If you're running under X and want something a little more
> snazzy, try looking at http://apus.cus.cam.ac.uk:8654/~rrw1000 -
> Austin <and1000@cam.ac.uk> hacked hilit19 to highlight Modula 3, and
> I've improved on that and hacked compile.el to be what I consider a
> little nicer, and some people consider horrible bordering on lunacy.
> 

If you want to use font-lock instead of hilit, contact me. I've hacked
font-lock support into my modula-3-mode some time ago, because it
updates fonts directly and not on demand only (like hilit does).

>  An appropriate compile command (with m3build in your path) is 
> 
>  m3build -d ..
> 
>  Since you'll probably be editing things in your src directory. I
> didn't consider it justified to change the default.
> 

But if you want to change the default, it's done like this:
  (make-local-variable 'compile-command)
  (setq compile-command "m3build -d .. ")

Peter
---
Peter Klein                        E-Mail: pk@i3.informatik.rwth-aachen.de
Lehrstuhl fuer Informatik III      Tel.: +49/241/80-21311
Ahornstrasse 55                    Fax.: +49/241/8888-218
RWTH Aachen
52074 Aachen
Germany



======================================================================= 74 ===
Date:    Wed, 14 Dec 1994 08:48:52 GMT
From:    julliard@cornillon.grenoble.rxrc.xerox.com (Laurent Julliard)
Subject: Re: network objects



In article <3ck47k$glb@fstgds15.tu-graz.ac.at> charly@samsoef.ifi.uni-klu.ac.at
 (Karl-Heinz EDER) writes:

> From: charly@samsoef.ifi.uni-klu.ac.at (Karl-Heinz EDER)
> Newsgroups: comp.lang.modula3
> Date: 13 Dec 1994 12:31:48 GMT
> Organization: Institut fuer Informatik  Universitaet KLAGENFURT
> Reply-To: charly@samsoef.ifi.uni-klu.ac.at (Karl-Heinz EDER)
> 

[Lines deleted...]

> 
> The Question:
> 	I installed Modula-3 release 3.3 and teir network
> 	objects under LINUX. Everything (compiler, linker,
> 	..) works fine but no demo for the network objects
> 	runs. All demo programs in .../netobj/tests can be
> 	compiled and linked, but execution fails with the 
> 	unhandled runtime exception:
> 
> 		... TCP.FatalError ...
> 
> 	This exception is not described anywhere. Did anyone
> 	solved this problem or similiar ones. I installed
> 	TCP/IP under LINUX slakware 1.0.9 and use the default
> 	loopback address 127.0.0.1.
> 

To be honest I have never used modula3 on Linux. But what I can tell
you for sure is that Linux 1.0.9 is now an old version (although it
has a numbering that indicates it is stable) and since then the TCP/IP
code has undergone some major modifications. So my advice is to
upgrade to the latest kernel (1.1.7?), we are not very far from 1.2.0
and those kernels are now very stable.

Let me know if you were succesful.

Laurent


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~  Laurent JULLIARD              | email   : Laurent.Julliard@xerox.fr      ~
~  Rank Xerox Research Centre    | XNS mail: Laurent Julliard:grenoble:rxrc ~
~  Grenoble Laboratory           | Phone   : (+33) 76 61 50 48              ~
~  6, chemin de Maupertuis       | Fax     : (+33) 76 61 50 99              ~
~  38240 MEYLAN FRANCE           |                                          ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


======================================================================= 75 ===
Date:    Wed, 14 Dec 94 02:30:10 GMT
From:    lsj@red.snu.ac.kr (Lee)
Subject: electronically available description ?

Where can I get a electronically available description
of Modula-3?

I heard that M3 is easy, safe and powerful. So I downloaded
the Linux one. But I can't find any electronically available
document. There is none at nearby bookstores.
Where can I get a electronically available description
of Modula-3?

Thanks in advance ...


Lee, Seung-Jin

Email address: s_quack@cd4680.snu.ac.kr




======================================================================= 76 ===
Date:    15 Dec 1994 07:33:10 GMT
From:    reddy@reddy.cs.uiuc.edu (Uday S. Reddy)
Subject: STATE in Prog. Languages - Workshop Program

			SIPL '95  Advance Program

		       2nd ACM SIGPLAN Workshop on 
		     STATE in Programming Languages

			     San Francisco
	 		     Jan 22, 1995

		  (held in conjunction with POPL '95)


8:30 - 10:00

Tutorial -
  State in Progrmming Languages: 
  Issues in languages, 	semantics and reasoning.
     P. W. O'Hearn (Syracuse University) and 
     U. S. Reddy (University of Illinois)

Formalizing Hoare Logic
     J. E. Caplan (University of Illinois)

10:30 - 12:00

An Imperative Object Calculus
     M. Abadi and L. Cardelli (DEC Systems Research Center)

Lazy computations in an object-oriented language for reactive programming 
     J. Nordlander (Chalmers University of Technology)

Inferring effect types in an applicative language with
asynchronous concurrency
     J. Kleist, M. Hansen, B. Jensen, and H. Huttel 
    (Aalborg University)

2:00 - 3:45

Tutorial -
  State in Haskell
     S. Peyton Jones (University of Glasgow)

Terminated references and automatic parallelization for state transformers 
     P. J. Thiemann (University of Tubingen)

Mutable data structures and composable references in a pure 
functional language
     K. Kagawa (Kyoto University)

4:15 - 4:45

Applying PI: Towards a basis for concurrent imperative programming.
     M. Odersky (University of Karlsruhe)

4:45 - 5:30

Panel discussion: 
State and Functional Programming
     (Assorted panelists)

-------
Registration info is in the POPL registration packet.
Available electronically by www at 
-- 
Uday Reddy
Department of Computer Science
University of Illinois
1304 West Springfield Avenue
Urbana, IL 61801.
tel: (217) 333-3412


======================================================================= 77 ===
Date:    15 Dec 1994 14:04:44 GMT
From:    mleone+@cs.cmu.edu (Mark Leone)
Subject: Re: STATE in Prog. Languages - Workshop Program

In article <3corfm$7g9@vixen.cso.uiuc.edu>,
Uday S. Reddy <reddy@reddy.cs.uiuc.edu> wrote:
>			SIPL '95  Advance Program
...
>-------
>Registration info is in the POPL registration packet.
>Available electronically by www at 
>-- 

You left this out:  http://vesuvius.cs.uiuc.edu:8080/sipl/index.html

--
Mark Leone  <mleone@cs.cmu.edu>
School of Computer Science, Carnegie Mellon University
Pittsburgh, PA 15213  USA


======================================================================= 78 ===
Date:    15 Dec 1994 12:51:04 GMT
From:    laszlo@bornholm.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI)
Subject: Re: calculation of a matrix in parallel in Modulaiii


> I have a problem to implement in Modulaiii with the use of channel (home 
> mades...) the calculation of a multiplication of 2 matrix n*n with the 
> method of network.

Try the following one
(From our book,
"Programming in style -- An Introduction to Programming with Modula-3"
to appear next spring at Springer Verlag).

Cheers
Laszlo Boszormenyi
--------------------------------------------------------

MODULE BarMul EXPORTS Main;  (*8.10.93. LB*)
(*Uses barrier synchronize*)

IMPORT MatrixIO, Wr, Rd, Thread, Barrier;

  TYPE
    Matrix   	=	 ARRAY OF ARRAY OF INTEGER;
    Closure	=	 Thread.Closure OBJECT
			 	row, col: INTEGER;
			 OVERRIDES
			 	apply:= StartMul
			 END; (*Closure*)

  VAR
    A, B, R: REF Matrix; (*R:= A $\times$ B*)
    barrier: Barrier.T; num: CARDINAL; (*num: Anfangswert der Barriere*)
    wr: Wr.T;

  PROCEDURE InitMatrices(VAR A, B: REF Matrix) = (*Initialisiert A und B*)
  VAR
    rd: Rd.T := MatrixIO.OpenRead();
  BEGIN
    MatrixIO.ReadMatrix(A, rd);
    MatrixIO.ReadMatrix(B, rd);
  END InitMatrices;

  PROCEDURE DotProduct(row, col: INTEGER; 
    READONLY A, B: Matrix): INTEGER = (*Ein Element im Ergebnis-Matrix*)
  VAR sum: INTEGER := 0;
  BEGIN
    FOR i:= FIRST(B) TO LAST(B) DO INC(sum, A[row, i] * B[i, col]) END;
    RETURN sum
  END DotProduct;

  PROCEDURE StartMul(cl: Closure): REFANY =
  BEGIN
    R[cl.row, cl.col]:= DotProduct(cl.row, cl.col, A^, B^); (*Berechnet 1 Eleme
nt*)
    barrier.join();  (*Wartet bis alle threads soweit sind*)
    RETURN NIL  (*R|ckgabewert von apply wird nicht gebraucht*)
  END StartMul;

  PROCEDURE Fork() = (*Erzeugt f|r jedes Ergebnis-Element einen thread*)
  BEGIN
    FOR i:= FIRST(R^) TO LAST(R^) DO
      FOR j:= FIRST(R[0]) TO LAST(R[0]) DO
        EVAL Thread.Fork(NEW(Closure, row:= i, col:= j));
      END;
    END;
  END Fork;

BEGIN
  InitMatrices(A, B);  (*Lddt A und B mit Anfangswerten*)
  R:= NEW(REF Matrix, NUMBER(A^), NUMBER(B[0])); (*Alloziert R*)
  num:= NUMBER(R^) * NUMBER(R[0]) + 1; (*Anzahl der Ergebniselemente + 1*)
  barrier:= Barrier.Create(num); (*Barriere erzeugt und initialisiert*)
  Fork();  (*F|r jedes Element im Ergebnis wird ein thread erzeugt*)
  barrier.join(); (*Main thread wartet das Ergebnis ab*)
  wr:= MatrixIO.OpenWrite();
  MatrixIO.WriteMatrix(R^, wr);
  MatrixIO.CloseWrite(wr);
END BarMul.

--------------------------------------------------------------------
INTERFACE Barrier;  (*11.10.93. LB*)

(*Ein ''join'' auf einer Barriere blockiert ''num''-1 aufrufende threads.*)
(*Beim ''num''-ten Aufruf werden alle threads losgelassen,*)
(*und die Barriere reinitialisiert.*)

  TYPE
    T <: Public;
    Public = MUTEX OBJECT METHODS join() END;
    
  PROCEDURE Create(num: [1..LAST(CARDINAL)]): T;
  (*Erzeugt eine neue Barriere, die auf ''num'' initialisiert wird.*)

END Barrier.

--------------------------------------------------------------------

MODULE Barrier;  (*11.10.93. LB*)

  IMPORT Thread;

  REVEAL T = Public BRANDED OBJECT 
               n, count: INTEGER;
               cond: Thread.Condition;
             OVERRIDES
               join:= Join;
             END;

  PROCEDURE Create(num: [1..LAST(CARDINAL)]): T =
  BEGIN
    RETURN NEW(T, n:= num-1,count:= num-1,cond:= NEW(Thread.Condition));
  END Create;

  PROCEDURE Join(b: T) =
  BEGIN
    LOCK b DO
      IF b.count > 0 THEN
        DEC(b.count); 
        Thread.Wait(b, b.cond); (*Warten bis n-ter Thread ankommt*)
      ELSE   (*Alle n Threads haben sich getroffen*)
        b.count:= b.n;			(*''count'' auf ''n'' r|cksetzen*)
        Thread.Broadcast(b.cond)	(*Alle threads weiterfvrdern*)
      END; (*IF b.count*)    
    END; (*LOCK b*)
  END Join;

BEGIN
END Barrier.



======================================================================= 79 ===
Date:    Mon, 19 Dec 1994 01:10:22 GMT
From:    fvisser@camms2.caos.kun.nl (Frank Visser)
Subject: Problem linking FormsVBT programs


Hello,

I have installed Linux Modula-3, using the stripped version. I have been
compiling some sample programs. After solving some problems (mainly caused
by me not reading the docs good enough :-) ), I got some sample programs
to run (e.g. the tetris program).

However all programs using the FormsVBT libraries refuse to link, giving
these error messages:

/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00001.o):
Undefined symbol "__NEEDS_SHRLIB_libXt_3" referenced
/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00003.o):
Undefined symbol "__NEEDS_SHRLIB_libX11_3" referenced
/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00003.o):
Undefined symbol "__NEEDS_SHRLIB_libXt_3" referenced
/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00005.o):
Undefined symbol "__NEEDS_SHRLIB_libX11_3" referenced
/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00005.o):
Undefined symbol "__NEEDS_SHRLIB_libXt_3" referenced
/usr/local/soft/modula3-3.3/lib/m3/pkg/vbtkit/LINUX/libm3vbtkit.sa(__D00007.o):
Undefined symbol "__NEEDS_SHRLIB_libX11_3" referenced
  
So I assume there is something wrong with the shared libraries. What am I
doing wrong??? Could it be that I am using X11R6, and the shared libs are
compiled against X11R5? But even then it ought to work, because I have
kept the old X11R5 libraries, and they are in my shared library path.
Perhaps somebody can give me some clues on how to solve this.

I am using the Slackware 2.0.2 distribution

Greetings , Frank
 --
-------------------------------------------------------------------------------
Frank Visser                | Gods wegen zijn duister, en zelden aangenaam
e-mail: fvisser@caos.kun.nl |                             Bob den Uyl(?)   
CAOS/CAMM center            |  		         


======================================================================= 80 ===
Date:    Mon, 19 Dec 1994 10:14:07 -0500
From:    douglm@rpi.edu
Subject: Re: Accessor methods

Richard L. Hudson  says:

>We have a saying around here.
>
>"Premature optimization is the source of all bugs."
>
which, I guess sums up my thoughts. My original response was not to suggest
that a programmer should give no thought to efficiency but that, in
general, efficiency comes through changes at the algorithmic level rather
than a simple reduction in instructions executed for some particular
operation. Our primary job as programmers should be to produce correct,
maintainable programs.

Too often, people seem to be writing programs as if, once they are running,
the job is complete. I'm still maintaining code written in the '60s and our
code may still be around and being modified in 30 years time. By then, any
decisions about efficiency at that level could be hopelessly wrong and may
even make things worse.

Optimisation at the 'lowest' level should be the last thing contemplated,
after gaining exerience with the use of the system and discovering which
segments really are executed that often.

In any case, my main point was that the best place for this kind of
optimization is in the compiler/code generator/linker area.




======================================================================= 81 ===
Date:    19 Dec 1994 15:55:42 GMT
From:    Michel Dagenais <dagenais@vlsi.polymtl.ca>
Subject: Modula-3 Frequently Asked Questions (FAQ)

Archive-name: Modula-3-faq


   
   
                                 MODULA-3 FAQ
                                       
   
   
   Michel Dagenais, dagenais@vlsi.polymtl.ca
   
   
   
   v2.4, 19 December 1994
   
   
   
Contents

     * Contents
     * 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
          + Problems with threads and VTALARM
          + What is the purpose of BRANDED and REVEAL
          + Why uppercase keywords
          + M3build versus Make or why m3 does not work
          + Missing RTHooks or similar messages
          + The program receives a SEGV signal under the debugger
          + What is M3-lite, MS-Windows support
          + Global Offset Table overflow on SPARC
          + Exceptions raised by X applications (mostly on LINUX)
     * FTP
          + How To Obtain Pre-Compiled Binaries
          + What if I don't have ftp access?
     * Contributing
          + Can I contribute Modula-3 software?
          + ILU, an object-oriented multi-lingual RPC-capable module
            system
     * 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
          + M3Build
          + Coverage And Performance Analysis
          + More VBTs
          + Distributed Computing (Network Objects)
          + Interfaces To Other Libraries And Programs (Tcl, Dps...)
     * Who's Who
       
  ABSTRACT:
  
   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
   dagenais@vlsi.polymtl.ca.
   
   The postscript version is available on
   ftp.vlsi.polymtl.ca:pub/m3/m3-faq.ps.
   
   An hypertext WWW version is found on
   http://froh.vlsi.polymtl.ca/m3/m3-faq.html.
   
   
   
   
   
                                WHAT IS NEW?
                                       
   
   
   A new version of m3gdb now works much better on LINUX and SPARC
   systems. The LINUX journal published an introductory article on
   Modula-3.
   
                                THE LANGUAGE
                                       
   
   
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.
   
                              THE DOCUMENTATION
                                       
   
   
Where can I get a description of Modula-3? 

   
   
   The language definition and most electronically available Modula-3
   information can be accessed on
   http://www.research.digital.com/SRC/modula-3/html/home.html.
   
   Modula-3 Home 
   
   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.
       QA76.66.S87 1991
       
   
   
   also known as SPwM3. Here is the table of contents:
   
    1. Introduction
    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:
   
    1. Introduction
    2. Declarations
    3. Statements
    4. Basic Types
    5. Structured Types
    6. Procedures
    7. Exceptions
    8. Interfaces and Modules
    9. Generics
   10. Dynamic Programming
   11. Objects
   12. Threads
   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.
   
   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:
   
   UCI Bookstore 
   
   While Roswell is known to at least carry the language definition
   (SPwM3):
   
   Roswell Electronic Computer Bookstore (rjames@fox.nstn.ns.ca)
   
   Roswell Bookstore 
   
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
   m3-request@src.dec.com to be added to it.
   
   Comp.lang.modula3 archive 
   
   There are a couple high-level overview articles available:
   
     * ``Introducing Modula-3'', Geoff Wyant, Linux Journal, December
       1994.
       
       Paper in ftp.gte.com/pub/m3/linux-journal.html
       
     * ``Safe Programming with Modula-3'', Sam Harbison, Dr. Dobb's
       Journal, Vol. 17, No. 10, October 1992, pp 88+.
       
     * ``Modula-3'', Sam Harbison, Byte, Vol. 15, No. 12, November 1990,
       pp 385+.
       
   
   
   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
       pub/DEC/SRC/research-reports/SRC-113.ps.Z
       
       Libm3 
       
     * ``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
   following reports:
   
     * ``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
       gatekeeper.dec.com in
       pub/DEC/Modula-3/contrib/vbtkit.25Mar93.ps.Z.
       
       VBTKit 
       
     * ``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
       pub/DEC/Modula-3/contrib/formsvbt.25Mar93.ps.Z and
       pub/DEC/Modula-3/contrib/formsvbt.AppC.26Mar93.ps.Z.
       
       VBTKit library 
       
       VBTKit applications 
       
     * ``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
       pub/DEC/SRC/research-reports/SRC-075*.ps.Z.
       
       Zeus 
       
     * ``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
       pub/DEC/SRC/research-reports/SRC-076a*.ps.Z.
       
       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
       pub/DEC/SRC/research-reports/SRC-098*.ps.Z.
       
       Animation Festival 
       
   
   
   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
       pub/DEC/SRC/research-reports/SRC-115*.ps.Z.
       
       Network Objects 
       
     * ``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
       pub/DEC/SRC/research-reports/SRC-116*.ps.Z.
       
       Distributed GC 
       
   
   
   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.
       
       Obliq 
       
   
   
   Hardcopy versions of these reports can be ordered by e-mail; send your
   request including a postal mail address to src-reports@src.dec.com.
   
   SRC research reports 
   
   Sedgewick's classic text on computer algorithms is presented in
   Modula-3 in:
   
     * Algorithms in Modula-3 Robert Sedgewick Addison-Wesley, 1993 ISBN
       0-201-53351-0
       
   
   
                             THE IMPLEMENTATIONS
                                       
   
   
Where can I get an implementation?

   
   
   Two implementations are available, SRC Modula-3 and a PC version of it
   (m3pc).
   
   As far as we know, implementations are not available for VMS,
   Macintosh.
   
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. In Europe it is also available from
   ftp-i3.informatik.rwth-aachen.de in pub/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 available in:
   
   patches 
   
   This release is known to work on at least on the DS3100
   (m3-request@src.dec.com), FreeBSD (Olaf Wagner olaf@logware.de), (HPPA
   (laverman@cs.rug.nl), LINUX (dagenais@vlsi.polymtl.ca), NeXT 68000
   (tom@smart.ruhr.de), (nayeri@gte.com) SPARC architectures. Work is
   under way to port to the Macintosh (George Andre
   dat94gan@ludat.lth.se), OS/2 (Hendrik Boom hendrick@CAM.ORG and Craig
   Andrew Kingston ckingsto@undergrad.math.uwaterloo.ca), AIX 3.2.5 for
   RISC/6000 (Bob Barton barton@chopin.eche.ualberta.ca). 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, the HPPA
   notes are in ftp.vlsi.polymtl.ca:pub/m3/hppa/README, the FreeBSD notes
   are in ftp.vlsi.polymtl.ca:pub/m3/freebsd/README.
   
   SRC-Modula-3 
   
   SPARC release notes 
   
   LINUX release notes 
   
   HPPA release notes 
   
   FreeBSD 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
       recompiled.
     * 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
            garbage collector
          + Text manipulation.
          + Generic Containers: Lists, Sequences, Tables, SortedLists,
            SortedTables
          + 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
       sample programs.
     * 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
       garbage collector.
     * tools/shownew: tool to graphically see the allocation behavior of
       a running program.
     * tools/showthread: tool to see the activation of threads in a
       running program.
     * 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
   pub/DEC/Modula-3/contrib/M3forDOS.
   
   PC Modula-3 
   
   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
   space.
   
   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.
   
                           SOME SPECIFIC QUESTIONS
                                       
   
   
Why is "Hello World" so large?

   
   
   Modula-3 programs are larger than C programs for the following
   reasons:
   
    1. The fixed runtime is substantially larger. It contains a garbage
       collector, a thread runtime, and exception support. Note that
       "Hello World" is virtually all runtime. For larger programs the
       runtime is not an issue.
    2. The generated code includes runtime checks for out-of-bound array
       references and NIL pointer. Many of these checks could be removed
       by a more sophisticated compiler.
       
   
   
Why objects and interfaces?

   
   
   Allan Heydon on comp.lang.modula3, May 4th 1993:
   
   Modula-3 provides two separate mechanisms for data-hiding: one for
   hiding details about how interfaces are implemented, and the other for
   hiding details about how objects are implemented.
   
   The first data-hiding mechanism is realized by the distinction between
   interfaces and modules. Clients can only import interfaces, so the
   names declared in the modules implementing those interfaces are hidden
   from clients. Note that this mechanism has only two levels; a name is
   either declared in an interface, or it isn't. If a name is only
   declared in a module, it can't be used by a client.
   
   The second data-hiding mechanism is realized by opaque types and
   revelations. A Modula-3 interface may declare an object type to be
   opaque, in which case only a subset of the fields and methods of that
   object are revealed to clients importing the interface. Furthermore,
   the Modula-3 revelation mechanism allows a designer to reveal
   successively more fields and methods of an object in a series of
   interfaces. The fields and methods visible to a client then depends on
   which interfaces the client imports.
   
   The latter mechanism is quite flexible. As opposed to the
   interface/module data-hiding mechanism, opaque types allow you to
   define an arbitrary number of levels at which more and more
   information about the implementation of your object is revealed.
   
   See Sections 2.2.10, 2.4.6, and 2.4.7 of ``Systems Programming with
   Modula-3" for more information about opaque types and about partial
   and complete revelations.
   
Comparisons between Modula-3 and other languages?

   
   
   From: laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI)
   
   "A Comparison of Modula-3 and Oberon-2" by myself in "Structured
   Programming" 1993, 14:15-22
   
   From: nayeri@gte.com
   
   Robert Henderson, Benjamin Zorn, A Comparison of Object-Oriented
   Programming in Four Modern Languages, Department of Computer Science,
   University of Colorado, Boulder, Colorado, Technical Report
   CU-CS-641-93. Available by anonymous FTP and e-mail from
   ftp.cs.colorado.edu in the file
   pub/cs/techreports/zorn/CU-CS-641-93.ps.Z
   
   The paper evaluates Oberon, Modula-3, Sather, and Self in the context
   of object-oriented programming. While each of these programming
   languages provide support for classes with inheritance, dynamic
   dispatch, code reuse, and information hiding, they do so in very
   different ways and with varying levels of efficiency and simplicity. A
   single application was coded in each language and the experience
   gained forms the foundation on which the subjective critique is based.
   
   
What is the story with Trestle and OpenWindows?

   
   
   Mark Manasse says:
   
   I think that the OpenWindows release should be enough (no need to get
   the MIT X release), although there are a few things in Trestle that
   trigger devastating bugs in OpenWindows. But the only library we
   depend on is Xlib, R4 or later.
   
   The main thing I know that crashes OW 2.0 is the code where we call
   GrabKey specifying AnyKey. You can either loop over all of the keys,
   or you can just comment out the call; programs won't run exactly the
   same, but you probably won't notice the difference.
   
Linking with C++ code

   
   
   Apparently there is no problem to call C++ functions declared as
   extern "C".
   
   From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems
   Labs BOS)
   
   You must use your C++ compiler as the linker, rather than /bin/cc or
   /bin/ld.
   
   You need to call the function '_main'. The easiest way to do this is
   to have the following set of interfaces and implementations:
   

        INTERFACE CXXMain;
          <*EXTERN "_main"*> CxxMain;
        END CXXMain;

        MODULE CXXMain;
        BEGIN
          CxxMain();
        END;

   
   
   and then import CXXMain into your M3 main module. This will ensure
   that the C++ function "_main" gets called.
   
Flushing writers to see the output immediately

   
   
   Modula-3 Writers are buffered. Thus, you need to issue a Wr.Flush when
   the output should appear immediately, for instance to prompt the user
   for some input. Since this can become annoying, libraries in other
   languages sometimes offer the option of unbuffered writes. In
   Modula-3, an equivalent behavior is obtained with AutoFlushWr which
   gets a background thread to flush a writer at a specified interval.
   
Problems with threads and VTALARM

   
   
   The threads are implemented using the virtual timer interrupt.
   Normally, the run time environment will catch the interrupt and
   determine if thread switching is appropriate. However, if a new
   process is created with fork, it will have the virtual timer activated
   and no interrupt handler to receive it, resulting in a core dump. If
   you use the standard procedure Process.Create to fork new processes,
   this will be handled automatically for you. If you insist on using
   fork, you need to disable the timer, fork and then reenable the timer.
   
   
What is the purpose of BRANDED and REVEAL

   
   
   Allan Heydon writes:
   
   These two keywords are necessary because of two quite different
   features of the language. REVEAL is necessary because Modula-3 has
   opaque types and partial revelations. BRANDED is necessary because the
   Modula-3 type system uses structural equivalence instead of name
   equivalence.
   
   In Modula-3, the concrete structure of a type can be hidden from
   clients in an interface. A common idiom is:
   

  INTERFACE I;

  TYPE
    T <: TPublic;
    TPublic = OBJECT
      (* fields *)
    METHODS
      (* methods *)
    END;

  END I.

   
   
   The line "T <: TPublic" introduces the type "I.T" as an opaque subtype
   of the type "I.TPublic". It does not reveal any of the other details
   of the concrete structure of "I.T" to clients. Hence, "I.T" is said to
   be an opaque type. Put another way, the structure of "I.T" is only
   partially revealed to clients.
   
   In addition, it is possible to reveal more of "I.T"'s structure in
   other interfaces, like this:
   

  INTERFACE IRep;

  IMPORT I;

  TYPE
    TPrivate = I.TPublic OBJECT
      (* more fields *)
    METHODS
      (* more methods *)
    END;

  REVEAL
    I.T <: TPrivate;

  END IRep.

   
   
   This interface declares a type "IRep.TPrivate" that is a subtype of
   "I.TPublic". It also asserts that "I.T" is also a subtype of
   "IRep.TPrivate". A client that imports only the interface "I" has
   access only to the fields and methods in "I.TPublic" when accessing an
   object of type "I.T", but a client that imports both "I" and "IRep"
   also has access to the fields and methods in "IRep.TPrivate" when
   accessing an object of type "I.T".
   
   The "REVEAL" statement in this module simply asserts a subtype
   relation. Unlike type declarations, revelations introduce no new
   names. Hence, we could not have used the "TYPE" keyword in this case
   because the type "I.T" has already been declared once (albeit
   opaquely) in interface "I".
   
   Every opaque type must have a complete revelation. A complete
   revelation has the form:
   

  REVEAL
    T = TConcrete;

   
   
   The revelation specifies that "TConcrete" is the concrete type for the
   opaque type "T".
   
   The Modula-3 type system uses structural equivalence instead of name
   equivalence. This means that two types are equal iff they have the
   same structure. One consequence of this rule is that two types you
   might intend to be distinct may actually be equal. This can have
   unintended effects on the run-time behavior of your program. For
   example, if both types that you expect to be distinct are actually
   structurally equivalent and the two types guard two arms of a TYPECASE
   statement, the arm for the second type will never be taken.
   
   If you want to avoid accidental equalities between two types, you can
   brand one (or both) of them with the BRANDED keyword. A branded type
   is equivalent to no other type, even if it is structurally equivalent
   to some other type. In essence, the BRANDED keyword adds a bit of
   virtual structure to the type that guarantees it will be distinct from
   every other type.
   
   The Modula-3 syntax allows you to supply a text constant as a name for
   the brand. If you don't supply an explicit brand, the compiler will
   make one up; however, the implicit brand invented by the compiler is
   not guaranteed to be chosen deterministically. Hence, explicit brands
   are useful if you are communicating types from one process to another
   and if you want to be sure that the branded type written by one
   process matches the branded type read in by the other.
   
   Any two opaque types in a program must be distinct. Otherwise, it
   would be too easy for clients to accidentally trip over type
   collisions like the TYPECASE example mentioned above. To enforce the
   restriction that all opaque types are distinct, the language requires
   that the type "TConcrete" in the complete revelation above must be a
   branded type.
   
Why uppercase keywords

   
   
   Some people prefer uppercase keywords others hate them. Another
   possibility is to accept both forms for keywords. This topic has been
   discussed at length and there is no solution that will completely
   satisfy everyone's tastes. Fortunately this is a very minor issue and
   you can easily have lowercase keywords automatically converted for you
   using a macro package like m3su (pion.lcs.mit.edu:/pub/m3su) for
   emacs.
   
   lowercase keywords macro
   
M3build versus Make or why m3 does not work

   
   
   The Modula-3 compiler m3 does a much finer grained dependency analysis
   than possible with make. For this reason, a very flexible front end,
   m3build, reads the program description files, m3makefile, and
   generates the commands required to compile and link Modula-3 programs
   and libraries. The m3makefile content is documented in the m3build
   documentation. Calling the m3 compiler directly is difficult and thus
   not recommended.
   
Missing RTHooks or similar messages

   
   
   The standard library, libm3, is not included by default. You need in
   your m3makefiles to import(``libm3'') or to import a library which
   imports libm3. Otherwise, messages about run time procedures such as
   RTHooks not being available are produced.
   
   m3build
   
The program receives a SEGV signal under the debugger

   
   
   The garbage collector on some platforms uses the SEGV (segmentation
   violation) signal to detect modified portions of the dynamically
   allocated space. It is possible to disable this feature or to inform
   the debugger to let these signals propagate. See the tips on how to
   use the debugger.
   
   debugging
   
What is M3-lite, MS-Windows support

   
   
   M3-lite is a research project at DEC SRC to see how fast Modula-3
   programs could be compiled and linked. It uses an integrated m3build,
   m3 compiler and code generator (based on Burs) and is targeted at
   Win32 (Windows NT or Windows Chicago). Research projects, by
   definition, do not have release dates. Part of this work, when ready,
   may also serve on other platforms, especially LINUX and FreeBSD since
   they are intel based.
   
Global Offset Table overflow on SPARC

   
   
   From Sam Kendall (kendall@mv.mv.com):
   
   The problem: when I tried to m3build/m3ship netobj/stubgen I got the
   following error during the linking process:
   

  -> linking stubgen
  ld: GLOBAL_OFFSET_TABLE overflown: need to use -PIC
  Fatal Error: program "/bin/cc" failed, exit status = 1024
  *** error code 1 (ignored)

   
   
   The solution: modify boot-SPARC/m3build/templates/SPARC to change two
   occurrences of "pic" to "PIC". Also find the file
   m3utils/m3build/templates/SPARC and change the following lines to have
   "PIC" instead of "pic":
   

  "-Y1@/bin/cc@-pic@",
  "-Y6@" & LIB_USE & "/m3cgc1@-quiet@-fpic@",

   
   
Exceptions raised by X applications (mostly on LINUX)

   
   
   Graphical applications (based on Trestle/X Windows) raise the
   TrestleComm.Failure exception when the DISPLAY environment variable is
   incorrect or the X server is refusing the connection. They raise
   MachineIDPosix.Failure if the network configuration files are
   incorrectly set up; /etc/hosts must contain at least a loopback
   address (127.0.0.1) and the /etc/rc scripts an appropriate ifconfig
   command (/etc/ifconfig lo 127.0.0.1; /etc/route add 127.0.0.1).
   
                                     FTP
                                       
   
   
How To Obtain Pre-Compiled Binaries

   
   
   The following binaries are available for FTP. If you are willing to
   provide binaries for other architectures, please contact
   dagenais@vlsi.polymtl.ca; they may be put on his FTP server or links
   to your server can be included in the FAQ. The full exploded source
   code tree is available along with the SPARC binaries.
   
     * Release 3.3 SPARC binaries. Contains most of the 3.3 release and
       comes with static and shared libraries. If you have problems
       building the 3.3 release for SPARC, you may want to look at the
       lude/modula3-3.3/src/poly directory as it contains all the locally
       modified files. The original source code is available in
       lude/modula3-3.3/src/orig and may be browsed to see examples of
       m3makefiles amd Modula-3 code. Requesting a directory with .tar.Z
       added to its name will automatically generate the corresponding
       compressed tar file.
       
       It can be retrieved from
       ftp.vlsi.polymtl.ca:lude/modula3-3.3/run/poly.tar.Z and should be
       placed in /usr/local/soft/modula3-3.3/run/poly... Then,
       /usr/local/soft/modula3-3.3/run/poly/sun4.1_sparc/bin must be
       added to your path. Compiled by Michel Dagenais.
       
       SPARC Modula3-3.1 
       
     * Release 3.3 LINUX binaries. It can be retrieved from
       ftp.vlsi.polymtl.ca:pub/m3/linux/src-m3-3.3l0.tar.gz and should be
       placed in /usr/local/soft/modula3-3.3... Then,
       /usr/local/soft/modula3-3.3/run/bin must be added to your path.
       Compiled by Michel Dagenais.
       
       LINUX Modula3-3.3 
       
     * Release 3.3 HPPA binaries. It can be retrieved from
       ftp.vlsi.polymtl.ca:pub/m3/hppa. Compiled by Bert Laverman.
       
       HPPA Modula3-3.3 
       
     * Release 3.3 68000 NeXT binaries. It can be retrieved from
       ftp.vlsi.polymtl.ca:pub/m3/next. Compiled by Thomas Neumann.
       
       NeXT Modula3-3.3 
       
     * Release 3.3 68000 FreeBSD binaries. It can be retrieved from
       ftp.vlsi.polymtl.ca:pub/m3/freebsd. Compiled by Olaf Wagner.
       
       FreeBSD Modula3-3.3 
       
   
   
What if I don't have ftp access?

   
   
   Unfortunately, DEC SRC cannot deliver Modula-3 other than by anonymous
   ftp.
   
   Fortunately, Prime Time Freeware (PTF) includes Modula-3. PTF is a set
   of two ISO-9660 CDroms filled with 3GB of freeware, issued
   semi-annually. The latest issue, Volume 1, Number 2, July 1992,
   contains SRC Modula-3 2.07. PTF is distributed via bookstores and
   mail. You can reach PTF using:
   

        Email:  ptf@cfcl.com
        Fax:    [1] (408) 738 2050
        Voice:  [1] (408) 738 4832
        Mail:   Prime Time Freeware
                415-112 N. Mary Ave., Suite 50
                Sunnyvale, CA 94086
                USA

   
   
                                CONTRIBUTING
                                       
   
   
Can I contribute Modula-3 software?

   
   
   Certainly. Send to m3-request@src.dec.com what you are willing to
   share, be it programs, libraries or other things. They will be put in
   the distribution.
   
   Right now, the pub/DEC/Modula-3/contrib directory contains:
   
   Contrib 
   
     * m3rpc a Sun RPC system from Xerox Parc
     * M2toM3 a translator from Modula-2 to Modula-3
     * m3pc an implementation of Modula-3 for PCs.
       
   
   
   You will also find on ftp.vlsi.polymtl.ca in pub/m3:
   
   Modula-3 contributions 
   
     * present-src-m3 slides for presenting the Modula-3 tools and
       libraries.
     * cache-anim a zeus graphical animation of the computer memory
       hierarchy.
     * realgeometry a floating point geometry package.
     * sequences sequences allowing insertions in the middle.
       
   
   
   And on ftp-i3.informatik.rwth-aachen.de:
   
   Modula-3 contributions 
   
     * m23gdb a newer version of m3gdb with important fixes for most
       platforms. Peter Klein writes: It is based on gdb 4.13 with
       enhancements from Cygnus, the Modula-3 support from the Modula-3
       3.3 release, and several patches by Oliver Meyer. It should work
       now with EPC Modula-2 2.0x and SRC Modula-3 3.3, at least on
       SPARC/SunOS 4.1.3. The Modula-3 support still isn't perfect, but a
       big improvement over SRC's distributed version. See the
       README.m23gdb file for details.
       
     * m2tom3. Peter Klein writes: m2tom3 is a system to port Modula-2
       programs to Modula-3. It consists of two parts: A conversion
       program which tries to create a Modula-3 source text with the same
       semantics as the Modula-2 input while retaining the original look
       and feel as good as possible. A base library which tries to
       emulate the Modula-2 standard library using the Modula-3 standard
       library.
       
     * Peter Klein writes: A demo version of the development environment
       we are working on in the ADT (Analysis and Development Tool)
       project is now available on our ftp server in
       pub/Modula-3-Contrib/adt.
       
   
   
ILU, an object-oriented multi-lingual RPC-capable module system

   
   
   The following was recently announced by Xerox PARC:
   
   Version 1.6.4 of the Xerox PARC Inter-Language Unification (ILU)
   system is now available for general use.
   
   WHAT'S ILU?
   
   ILU (pronounced eye'-loo) is a system that promotes software
   interoperability via interfaces. Interfaces between what? Whatever
   units of program structure are desired; we call them by the generic
   term "modules". They could be parts of one process, all written in the
   same language; they could be parts written in different languages,
   sharing runtime support in one memory image; they could be parts
   running in different memory images on different machines (on different
   sides of the planet). A module could even be a distributed system
   implemented by many programs on many machines. Calls across ILU
   interfaces involve only as much mechanism as necessary for the calling
   and called modules to interact. In particular, when the two modules
   are in the same memory image and use the same data representations,
   the calls are direct local procedure calls - no stubs or other RPC
   mechanisms are involved.
   
   ILU modules are known by their interfaces. A module interface is
   specified once in ILU's object-oriented Interface Specification
   Language (called, simply, ISL). For each of the particular programming
   languages supported by ILU (currently Common Lisp, ANSI C, C++, and
   Modula-3; Python, Tcl, and GNU Emacs-Lisp are in the works), a version
   of the interface in that particular programming language can be
   generated. The ILU kernel library provides services which may be used
   by the language-specific interface to overcome intermodule language or
   address space differences.
   
   GETTING THE RELEASE
   
   The release is only available via FTP from the PARC ftp server.
   Perhaps the simplest way is to go through our World Wide Web home
   page,
   
   ILU 
   
   CONTRIBUTORS
   
   Antony Courtney, Doug Cutting, Bill Janssen, Denis Severson, Mike
   Spreitzer, Mark Stefik, Farrell Wymore
   
                            MODULA-3 FOR TEACHING
                                       
   
   
   Modula-3 is very well suited for teaching: simple yet powerful, and
   safe. It avoids the complexity of legacy languages. It can be used to
   demonstrate modules and interfaces, object oriented programming,
   multi-threading (concurrency issues), graphical user interfaces
   (Trestle, VBTKit, FormsVBT) and even distributed programming (Network
   Objects, Obliq). Since less time is spent by students and teaching
   assistants chasing dangling pointers and corrupted data, more time is
   available for learning the important concepts.
   
   It is used for teaching in a number of universities. This list is far
   from complete, send corrections and additions to
   dagenais@vlsi.polymtl.ca.
   
   From: Carsten Whimster (bcrwhims@undergrad.math.uwaterloo.ca)
   
   University of Waterloo:
   
   CS246 - Third introductory course in computer science. Software
   engineering and software systems. Medium size projects. Uses Modula-3
   to demonstrate proper OO programming, as well as general programming
   practices.
   
   CS241 - Fourth and final intro course to CS. Focuses mainly on
   compilers and languages. Various assignments has students create most
   of the different parts of a compiler. Also introduces Scheme (lisp).
   
   From: Peter.Robinson@cl.cam.ac.uk
   
   University of Cambridge, England.
   
   The Computer Science course at the University of Cambridge teaches ML
   as an introductory language at the beginning of the freshman year, and
   then uses Modula-3 to develop imperative programming at the end of
   that year. Further lectures on advanced features of the language are
   given early in the second year, together with separate lectures on
   other, specialised languages.
   
   The course has been given to about 70 students each year since 1990,
   and has developed with the language. It ties in with other lectures on
   data structures and algorithms, software engineering and concurrency.
   Modula-3 is used for student group projects in the second year and for
   about a quarter of individual projects in the final year (where,
   interestingly, students using Modula-3 tend to earn higher grades than
   those using C/C++).
   
   Modula-3 is also used in the Computer Laboratory at Cambridge for a
   number of research projects on distributed computing, human-computer
   interaction and electronic CAD.
   
   From: Matthew.Huntbach@dcs.qmw.ac.uk
   
   We have used it for three years here at Queen Mary and Westfield
   College, London. The main problem I find with the language is the slow
   compilation speed on our teaching machines (Macs running A/UX),
   otherwise it's a nice language to teach with.
   
   From: laszlo@ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI)
   
   University Klagenfurt
   
   Modula-3 is used at the following courses: Undergraduate:
   Softwaretechnology-1 (actually an introduction into programming) (on
   PCs) Softwaretechnology-2 (data structures and algorithms) (on PCs)
   Graduate: Computer Networks (on a network of DECs and SUNs) Parallel
   Programming (on an DEC-Alpha Farm)
   
   Modula-3 has been in use since ca. one year, with very good
   experiences.
   
   From: pk@i3.informatik.rwth-aachen.de (Peter Klein)
   
   Lehrstuhl fuer Informatik III, RWTH Aachen, Germany: Software
   Development Projects, now held for the second time using Modula-3. Aim
   of these projects is to introduce different aspects of software
   development to graduate students. This includes project planning,
   supervision, design, and cooperative implementation of small but
   usable software systems. Central ideas of software design and
   object-oriented implementation are presented and discussed with the
   concepts of Modula-3, which is also the implementation language.
   
   Future plans: Maybe Modula-3 will replace Modula-2 in some
   undergraduate programming lectures in the future.
   
   From: rro@cs.colostate.edu (Rod Oldehoeft)
   
   In the Computer Science Department at Colorado State University, M3 is
   envisioned as a vehicle for several courses.
   
   M3 is introduced in the second course (data structures) to implement
   the ADT concept, including generics. In the sophomore languages
   course, it is an example of an O-O language. In the junior software
   engineering course, additional relevant features are brought in, and
   threads are added in the junior operating systems course.
   
   From: viggo@nada.kth.se
   
   Royal Institute of Technology. Several courses at the computer science
   department use Modula-3. The courses contain programming projects, and
   many students choose to use Trestle. (Dr. Viggo Kann,
   viggo@nada.kth.se)
   
   From: "Dave Snelling" (snelling@cs.man.ac.uk)
   
   Department of Computer Science, University of Manchester, Manchester
   U.K. We have a small, interdisciplinary collection of people using
   Modula-3 for a variety of activities. Our major production code is a
   hardware architecture simulator (about 120 modules). Smaller projects
   include a Lattice Gass model and a Shallow Water model.
   
   At: University of Massachusetts at Amherst
   
   Modula-3 is used as an input language for the Computer Science course
   on Compilation techniques. The professor is Eliot Moss.
   
   From: Michel Dagenais (dagenais@vlsi.polymtl.ca)
   
   Modula-3 is used as the main example in a graduate course on
   ``Algorithmic Aspects of CAD'', which includes a large portion on OO
   programming and databases.
   
   From: pbh@cs.sunysb.edu (Peter Henderson)
   
   Modula-3 is currently used for teaching Computer Science I and
   Computer Science II at SUNY at Stony Brook. We are currently
   developing a sequence of laboratory assignments and case studies
   introducing OO techniques and software reuse in these two courses.
   
   The first course for computer science majors at Stony Brook is
   "Foundations of Computer Science" which emphasizes general problem
   solving, mathematics and the relationships between mathematics and
   computer science. There is an extensive laboratory component using
   theorem provers, Prolog and Standard ML.
   
                            MODULA-3 IN INDUSTRY
                                       
   
   
   A number of programming teams in industry selected Modula-3 for their
   project. It encourages good programming practices and comes with
   excellent libraries for distributed programming and graphical user
   interfaces.
   
   From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems
   Labs BOS)
   
   Sun Microsystems Laboratories, Inc. (East) is using Modula-3 (Network
   Objects, FormsVBT) as the basis for its research in large scale
   distributed object systems.
   
   From: Farshad Nayeri (nayeri@gte.com)
   
   Distributed Object Computing, GTE Labs, Waltham, Massachusetts USA
   Modula-3 (FormsVBT, Sx, Netobj libraries) is used to prototype
   distributed object management. (Farshad Nayeri nayeri@gte.com).
   
   Report 
   
                              WORK IN PROGRESS
                                       
   
   
   The purpose of this section is to let everyone know what is being
   worked on. This is not a commitment to a quick release or even to
   completion. However it may enable parties interested in the same
   topics to pool their efforts, avoid duplication or better integrate
   their packages.
   
   To find more information about the names mentioned, see the Who's Who
   section.
   
The SRC Compiler

   
   
   The compiler already implements the full language and runs on several
   platforms. Speed enhancements and support for some popular non-Unix
   platforms may be expected.
   
Modula-2 To Modula-3 Converter

   
   
   A better Modula-2 to Modula-3 converter (99%conversion...) is in the
   works under the supervision of Peter Klein.
   
Integrated Development Environment

   
   
   A number of groups have made experiments in this area. Tools such as
   VBTkit for the user interface, m3tk for syntax and dependency
   analysis, dynamic linking... could be used to produce such an
   environment. It is worth noting that precompiled interfaces are much
   easier to achieve in M3 than in several other popular languages.
   
   Peter Klein is working on a Modula-3 development environment and
   associated user interface. See the paper entitled ``Designing Software
   with Modula-3'', it describes a software architecture description
   language based on Modula-3.
   
   Report ftp.informatik.rwth-aachen.de/pub/reports/1994/94-16.ps.gz
   
   Klaus Preschern, Carsten Weich, Laszlo Boszormenyi have made the port
   of Modula-3 to the PC. The M3-PC environment will be enhanced,
   especially with threads and graphics, including a student-friendly
   environment.
   
   David N. Gray of Lucid Inc. has been experimenting with connecting the
   Modula-3 compiler with the Lucid Energize Programming System
   (currently sold as a development environment for C and C++ on Sun
   SPARCstations). The modified compiler is available as an unsupported
   as-is hack, to accompany the new Energize release that it works with.
   
   Energize Modula-3
   
   Geoff Wyant is experimenting with FormsVBT/VBTKit to build a simple
   friendly development environment.
   
Windowing And User Interfaces

   
   
  ROTATED TEXT
  
   
   
   Currently, there is no VBT to show non horizontal text, because of X
   windows limitations. This would be desirable and can be implemented in
   one of the following ways: a) open a pipe to the ghostscript
   Postscript interpreter and use it as a font renderer, cache and
   display the character bitmaps produced; b) have Bezier curves for the
   most popular Postscript fonts, Trestle handles Bezier curves; c) use
   the new text facilities in X11R6 that remove previous limitations. A
   prototype implementation of a) has been implemented by Alain Dube
   (contact Michel Dagenais); the performance with the cache is good but
   this remains a relatively complex solution. The b) solution would be
   relatively easy to implement but the resulting quality may not be as
   good as a real font renderer. The c) solution may not be available for
   some time since many workstation vendors take a long time before
   integrating the new X windows facilities.
   
  POSTSCRIPT VBTS
  
   
   
   It is often useful to display Postscript files in a VBT, for example
   for an included diagram in a document editor.
   
   This can be achieved by using the ghostscript Postscript interpreter
   as a rasterizer. A prototype has been programmed by Alain Dube
   (contact Michel Dagenais) but the performance is not too good when
   large color bitmaps are handled. An alternative implementation is to
   convert Postscript files into display lists (Bezier curves and text)
   as a preprocessing step. Further displaying and even editing becomes
   very simple. A prototype implementation of this has been done by
   Benoit Poirier (contact Michel Dagenais).
   
Persistent Objects

   
   
   With Pickles to store objects in files, the implementation of
   persistent objects is simplified. Furthermore, with the m3tk library
   it is not too difficult to read a type description and to write the
   needed methods to handle that type. Combined with FormsVBT, network
   objects and Obliq, all the ingredients are there to have a nice
   environment for developing graphical distributed applications with
   persistent state and querying facilities.
   
   Peter Klein has a specialized database for annotated graphs, GRAS,
   that is being re-implemented in Modula-3.
   
   Tony Hosking and Eliot Moss are working on persistent Modula-3
   objects. The main features are persistence through reachability, load
   on demand and a very low overhead for using persistent objects. The
   high performance is obtained by modifying the compiler and run-time.
   Initially a modified version of GCC, GNU M3, was being worked on.
   However, with the release of the SRC native compiler, the
   modifications are being moved to the SRC compiler instead.
   
   Persistency 
   
Abstract Syntax Tree Tools (M3 Parser)

   
   
   The m3tk library can be used to analyze Modula-3 source code in order
   to find specific constructions (use of OBSOLETE facilities, un-handled
   exceptions), build source code browser and analysis tools, stubs
   generators for network or persistent objects... Mick Jordan is
   preparing the 3.2 release of m3tk and finishing the documentation, in
   his spare time.
   
   From: hudson@yough.ucs.umass.edu (Rick Hudson)
   
   If anyone is interested we have developed a Bison grammar that parses
   the Modula-3 language input. If interested please feel free to contact
   me hudson@cs.umass.edu.
   
Computer Assisted Learning Tools (Algorithm Animation)

   
   
   The Zeus Algorithm Animation package may be used to quickly develop
   graphical and animated teaching aids. Most of the algorithms described
   in Robert Sedgewick's Algorithms book have been animated at DEC SRC
   through the work of Marc H. Brown.
   
   Animation of compilation techniques have been produced by students at
   University of Illinois with the help of Marc Najork.
   
   From: "Arnulf Mester" (mester@ls4.informatik.uni-dortmund.de)
   
   As part of a studental project advised by a college of mine and me a
   Mentor-like collection of Zeus-based animations of typical distributed
   algorithms and communication protocols (termed ZADA) has been
   compiled. Hopefully I'll get to include more information and access
   during the next weeks into our ZADA WWW home page
   
   ZADA 
   
Presentations, Tutorials And Teaching Material

   
   
   Modula 3 is used for teaching in a number of Universities. Some
   Modula-3 related teaching material may be shared between interested
   parties.
   
   Michel Dagenais has a French presentation about the Modula 3 language
   that could be distributed.
   
   Geoff Wyant is preparing a tutorial on Modula-3 for the upcoming
   OOPSLA conference.
   
Reports And Books

   
   
   Sam Harbison is preparing a revised version of his existing book on
   Modula-3. He may include more material on the new libraries.
   
   Laszlo Boszormenyi, Roland Mittermeir and Carsten Weich are working on
   a book (it will be published in German and in English) with the
   work-title:
   
   "Programming in Style - An Introduction into Programming with
   Modula-3"
   
   The book will be published at Springer (in German in October 1994, in
   English maybe or December, or January 1995). For the book, the M3-PC
   environment will be enhanced, especially with threads and graphics,
   including a student-friendly environment.
   
   From: BERGINF@PACEVM.DAC.PACE.EDU (Joseph Bergin)
   
   I am also at work on a Modula-3 college level textbook. It will cover
   the data structures course and will stress data abstraction. It will
   be similar to my current book: Data Abstraction: The Object-Oriented
   Approach using C++, published by McGraw Hill. Status: The software has
   been built and I am currently writing the text itself. Joe Bergin,
   berginf@pacevm.dac.pace.edu, Pace University
   
Parallel Programming

   
   
   From: Ernst A. Heinz, University of Karlsruhe, F.R. Germany (email:
   heinze@ira.uka.de)
   
   I would like to inform you about our ongoing Modula-3* project here at
   the University of Karlsruhe. At the moment, we are actively involved
   in adding sophisticated dependence and data flow analysis to DEC's
   Modula-3 compiler (release 3.x!). The Modula-3* compiler will be able
   to generate code for real parallel machines, for networks of
   workstations, and for standard sequential execution. (Our new IPD
   Modula-2* system available by anonymous ftp from ftp.ira.uka.de in
   "pub/programming/modula2star" may give you an initial feeling about
   it!)
   
   For all interested folks I have made my JSPP'93 paper publicly
   available by anonymous ftp. The title of the paper reads as follows:
   
   "Modula-3*: An Efficiently Compilable Extension of Modula-3 for
   Problem-Oriented Explicitly Parallel Programming".
   
   Paper 
   
   More recent work includes
   
   E.A. Heinz. Sequential and parallel exception handling in Modula-3*: A
   unifying semantics specification. In P. Schulthess (editor). Advances
   in Modular Languages: Proceedings of the Joint Modular Languages
   Conference, pages 31-49, Ulm, Germany, September 28-30, 1994.
   
   Paper 
   
                                  WISH LIST
                                       
   
   
   The Modula-3 development environment now contains a large number of
   very good tools and libraries that work nicely together. The purpose
   of this section is to help contributors determine what additions would
   be helpful to others. It may get you in contact with people that would
   like to use your contribution or with people that may provide some
   items on your wanted list or team with you for their development.
   
M3Build

   
   
   The descriptions of programs and libraries stored in m3makefiles are
   simple and efficient. It would be interesting to be able to specify
   different m3-options for some files (debugging, performance
   analysis...), and to have the dependency analysis take into account
   previously used options when determining modules to recompile (Michel
   Dagenais).
   
   Although makefiles cannot perform the same consistency checks as
   m3build and are more cumbersome to use, it may be useful to be able to
   drive the compiler through makefiles for training purposes (i.e. learn
   Modula-3 and Makefiles at the same time)
   (bwbecker@watdragon.uwaterloo.ca).
   
Coverage And Performance Analysis

   
   
   Tools already exist for coverage analysis, pretty printing,
   performance analysis, viewing the threads and the garbage collected
   heap. It would be nice to have these easily accessible through an
   integrated development environment (Michel Dagenais).
   
More VBTs

   
   
   An editor widget with multiple fonts (fixed and proportional character
   spacing) perhaps even with direct support for HTML (item lists,
   centered headings...) (Geoff Wyant, Farshad Nayeri).
   
   A diagram editor widget (Farshad Nayeri).
   
   A split VBT that positions NxM childs in aligned rows and columns
   (Geoff Wyant).
   
   A Graph VBT that displays arbitrary graphs (such as call trees, cross
   references...). This could be implemented adding a placement module
   (to determine the vertex positions) to work on the existing GraphVBT
   module (Geoff Wyant).
   
   Some of the VBTs implemented in miscellaneous libraries (such as
   GraphVBT in Mentor/Zeus) could be placed in a more visible location
   such as VBTKit (Michel Dagenais).
   
   MIME extensions to Postcard (Farshad Nayeri).
   
   Submit Trestle to a graphical designer (Farshad Nayeri).
   
Distributed Computing (Network Objects)

   
   
   Network objects are an exciting recent addition. The underlying model
   is very simple and effective. Authentication and access control will
   be required in many applications.
   
   A network object daemon that starts specific programs upon need, like
   inetd does using inetd.conf for most network services, would be very
   useful (Michel Dagenais).
   
Interfaces To Other Libraries And Programs (Tcl, Dps...)

   
   
   C functions are easily called from Modula 3. Thus, stubs have been
   produced to access John Ousterhout's Tcl and also Display Postscript
   from Modula 3.
   
   An automatic tool to produce such stubs from .h C files would be very
   useful (Geoff Wyant).
   
   Stubs to access the Motif X Windows library would be useful (Geoff
   Wyant).
   
   Similar stubs would be desirable to access databases such as Postgres
   or Exodus and access/provide World Wide Web information using the
   hypertext transfer protocol libraries (HTTP) (Geoff Wyant).
   
                                  WHO'S WHO
                                       
   
   
   Modula-3 enthusiasts, users or contributors. Please notify me for
   additions, corrections or removals.
   
     * Robert Ayers, Adobe, (ayers@Mv.Us.Adobe.Com), the Display
       Postscript to Modula-3 interface
     * Andrew Birrell, DEC SRC, (birrell@src.dec.com), Network objects.
     * Laszlo Boeszoermenyi, Universitaet Klagenfurt, Austria,
       (laszlo@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style
       book.
     * Marc H. Brown, DEC SRC, (mhb@src.dec.com), VBTKit, FormsVBT, Zeus.
     * Luca Cardelli, DEC SRC, (luca@src.dec.com), Modula-3 definition,
       Obliq.
     * Michel Dagenais, Ecole Polytechnique de Montreal,
       (dagenais@vlsi.polymtl.ca), LINUX and SPARC M3 binaries, M3 FAQ.
     * John D. DeTreville, DEC SRC, (jdd@src.dec.com), Incremental
       garbage collector.
     * David N. Gray, Lucid Inc., Menlo Park, (gray@Lucid.Com), interface
       between the Lucid environment and the M3 compiler.
     * Sam Harbison, Tartan, harbison@tartan.com, Modula-3 book.
     * Ernst A. Heinz, University of Karlsruhe, F.R. Germany
       (heinze@ira.uka.de)
     * Allan Heydon, DEC SRC, (heydon@src.dec.com), IP, Lex, Fmt, PQueue,
       DblBufferVBT modules.
     * Jim Horning, DEC SRC, (horning@src.dec.com), Useful Modula-3
       interfaces.
     * Tony Hosking, Purdue University, (hosking@cs.purdue.edu),
       Persistent Modula-3.
     * Rick Hudson, University of Massachusetts at Amherst,
       (hudson@cs.umass.edu), GNU Modula-3.
     * Mick Jordan, Sunlabs near Palo Alto, mick.jordan@eng.sun.com,
       Modula-3 definition, M3TK and related tools.
     * Bill Kalsow, DEC SRC, (kalsow@src.dec.com), Modula-3 definition,
       M3 compiler and run-time.
     * Peter Klein, Lehrstuhl fuer Informatik III,
       (pk@i3.informatik.rwth-aachen.de). Modula-2 to Modula-3 converter,
       m3gdb improvements.
     * Bert Laverman, Groningen University, (laverman@cs.rug.nl), HPPA
       support.
     * Mark S. Manasse, DEC SRC, (msm@src.dec.com), Trestle.
     * Paul McJones, DEC SRC, (mcjones@src.dec.com), Useful Modula-3
       interfaces.
     * James R. Meehan, Adobe (jmeehan@mv.us.adobe.com), VBTKit,
       FormsVBT.
     * Roland Mittermeir, Universitaet Klagenfurt, Austria,
       (mittermeir@ifi.uni-klu.ac.at), Programming in style book.
     * Eliot Moss, University Of Massachusetts At Amherst,
       (moss@Cs.Umass.Edu), GNU Modula-3.
     * Eric Muller, DEC SRC (moved?), (muller@src.dec.com), M3 compiler
       and run-time.
     * Marc Najork, DEC SRC, (najork@src.dec.com), 3D animation.
     * Greg Nelson, DEC SRC, (gnelson@src.dec.com), Modula-3 definition,
       Systems Programming with Modula-3 book editor, Trestle, Network
       objects.
     * Farshad Nayeri, GTE Labs Near Boston, (nayeri@Gte.Com), m3-sparc
       mailing list.
     * Frode Odegard, (frode@Odegard.Com), commercial Modula-3 support.
     * Susan Owicki, Stanford University, (owicki@mojave.stanford.edu),
       Network objects.
     * Klaus Preschern, Universitaet Klagenfurt, Austria,
       (preschern@ifi.uni-klu.ac.at), PC port (m3pc).
     * Robert Sedgewick, Princeton University, Algorithms in Modula-3
       book.
     * Jorge Stolfi, University of Campinas, Brazil,
       (stolfi@dcc.unicamp.br), Computational geometry procedures.
     * Carsten Weich, Universitaet Klagenfurt, Austria,
       (weich@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style
       book.
     * Edward Wobber, DEC SRC, (wobber@src.dec.com), Network objects.
     * Geoff Wyant, Sunlabs Near Boston, (gwyant@East.Sun.COM), SPARC
       port.
       
   
   
   
     _________________________________________________________________
   
   
   
    Michel Dagenais, dagenais@vlsi.polymtl.ca, Mon Dec 19 11:50:51 GMT
    1994
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 82 ===
Date:    19 Dec 94 08:39:51
From:    dagenais@notung.vlsi.polymtl.ca (Michel Dagenais)
Subject: Re: Implementation of Objects?

In article <D0wnt6.F8s@my21.sm.luth.se> ljp@my21.sm.luth.se (Johan Persson) wri
tes:

   I have a question regarding the implementation of objects
   in M3 which came up when I was implementing some simulation
   code which uses alot of objects.

   Does objects share the method suite if possibly?

   Assume we have the declaration

     Obj = OBJECT
	     i:INTEGER;
	   METHODS
	     set(i:INTEGER);
	   END;

   Then if I allocate the objects

     a:=NEW(Obj,set:=Set_a);
     b:=NEW(Obj,set:=Set_b);

Yes, a method table is shared by all objects of a given type. The above
NEW statements introduce anonymous derived types with one overridden
method. They are therefore new types with their own method table.
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 83 ===
Date:    Mon, 19 Dec 1994 16:52:03 GMT
From:    sknee@comlab.ox.ac.uk (Simon Knee)
Subject: SPARC Installation (3.3)

I am having trouble installing release 3.3 on a SPARC.  I have
downloaded boot-SPARC.tar.gz and m3cc.tar.gz and done as 
specified in the README file (I think!).  The only changes I
made to the template file for a SPARC was to installing everything
into my own userspace instead of /usr/local/...  I then run
m3boot and m3ship and it all seems to work fine.  If I then
try to compile a simple hello world program I get:

m3 -w1 -why -g -o foo -T.M3IMPTAB ../src/Main.m3 ../src/A.i3 ../src/A.m3 
sh: 10372 Abort
*** error code 134 (ignored)

It appears I am getting an IOT trap or something.

Any ideas on what I have done wrong?

Thanks,

Simon Knee,
Programming Research Group,
Oxford University.

Simon.Knee@comlab.ox.ac.uk


======================================================================= 84 ===
Date:    19 Dec 1994 16:09:00 GMT
From:    clayton@forge.cc.gatech.edu (R. Clayton)
Subject: Modula 3 v.s. SunOS 4.1.1.

I believe modula 3 3.2 and sunos 4.1.1 are incompatible.  I tried to install
m3 on my ipc under 4.1.1 and had the same problem: the libm3 build would core
dump soon after starting.  I upgraded my ipc to 4.1.3 and was able to build
everything without problems.

[Sorry for the broadcast; two messages to the original sender both bounced.]


======================================================================= 85 ===
Date:    Sun, 18 Dec 1994 00:28:03 GMT
From:    Walter Smith <wrs@apple.com>
Subject: PARC & M3 environments?

I have two questions that may be related:

1. Is there a "visual" Modula-3 environment available, or is anyone working
on one?  Switching from Metrowerks Codewarrior on my Mac back to the good
old days of Emacs and gdb-mode is a bit of a shock.  Since there's this AST
toolkit, and the language is so...tractable...compared to C++, seems like
someone might possibly have done some good browser-type tools.

2. I read in an old message that Xerox PARC was converting to Modula-3,
and I'm wondering if that's still true (or did they get sucked into the
C++ vortex), and if they plan to make any of the revised Cedar environment
available?

- W

---------------------------------------------------------------------------
Walter Smith                                        Internet: wrs@apple.com
Newton Software                                     AppleLink: WALTER.SMITH
Apple Computer, Inc.     PGP key at ftp://ftp.apple.com/pub/wrs/PGP-key.asc
+1 408 974 5892            E1 20 C3 0A DE 27 89 06  0B 35 08 65 0C FB A7 41


======================================================================= 86 ===
Date:    Sun, 18 Dec 1994 00:22:23 GMT
From:    Walter Smith <wrs@apple.com>
Subject: Re: Accessor methods

Stephen Schaub, schaub@ponder.csci.unt.edu writes:
> They'll have to learn Unix, a new editor, AND a new
> language, all in the first 3-4 weeks--I hope I'm not asking for trouble!

On the contrary, it sounds like The Real World to me!  Be sure to give them
some kind of hard deadline like a midterm exam just for verisimilitude. :-)

I'm still a total newbie here in Modula-3 land, but seems like the way to
get efficient inner loops would be to use a more concrete version of the
interface to the objects you were using.  You'd put the nastiness in a
different module, of course, so your whole program wouldn't have to know
the more concrete type.  Through the wonders of NARROW, you could pass the
opaque thing to the inner loop, which would narrow it to the partially-
concrete type and access the necessary fields directly.  (Note that you
still wouldn't have access to _all_ the fields, just the _necessary_ ones.)

Then when someone changes the implementation you were depending on, you
just have to fix that little nasty module, since you weren't tempted to
over-optimize your whole program with encapsulation-breaking direct field
accesses.

I really like this progressive-disclosure way of building interfaces, at
least on paper.  Now if I could just get some free time to write something
in M3!

- W

---------------------------------------------------------------------------
Walter Smith                                        Internet: wrs@apple.com
Newton Software                                     AppleLink: WALTER.SMITH
Apple Computer, Inc.     PGP key at ftp://ftp.apple.com/pub/wrs/PGP-key.asc
+1 408 974 5892            E1 20 C3 0A DE 27 89 06  0B 35 08 65 0C FB A7 41


======================================================================= 87 ===
Date:    20 Dec 1994 20:40:13 GMT
From:    James Scott <100417.1433@CompuServe.COM>
Subject: M3 for OS2?

Does anyone know about how this is going and when it will be 
ready?


======================================================================= 88 ===
Date:    Wed, 21 Dec 1994 00:03:23 GMT
From:    kevin@elvis.wicat.com (Kevin Vigor)
Subject: Re: Accessor methods

Jack Greenbaum (jackg@downhaul.crc.ricoh.com) wrote:
: i.e. a method call).  People I work with do this type of
: optimization. This stuff is real. You just can't ignore efficiency
: inside of tight loops when you are building real systems. Everywhere
: else, like in setup code that is run once or twice, you are right, it
: doesn't matter at all.

Since Modula-3 has a C interface, it seems to me that if you really need
to do bit-twiddling optimizations, these can be implemented in C much as
C programmers will optimize tight loops in assembler.

All high level languages require tradeoffs of this sort, so I think this
solution is quite acceptable in Modula-3.

--
    Kevin (Modula-3 novice)

At Intel, quality is job 0.999731.


======================================================================= 89 ===
Date:    21 Dec 1994 15:16:01 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: exposing implementations, partially opaque types (was Re: Accessor met
hods)


In article <1994Dec18.002223.19367@gallant.apple.com> Walter Smith <wrs@apple.c
om> writes:

   I'm still a total newbie here in Modula-3 land, but seems like the
   way to get efficient inner loops would be to use a more concrete
   version of the interface to the objects you were using.  You'd put
   the nastiness in a different module, of course, so your whole
   program wouldn't have to know the more concrete type.  Through the
   wonders of NARROW, you could pass the opaque thing to the inner
   loop, which would narrow it to the partially- concrete type and
   access the necessary fields directly.  (Note that you still
   wouldn't have access to _all_ the fields, just the _necessary_
   ones.)

You can use the REVEAL statement to do the same thing in a more
structured way, I think. 

If a part of your program needs to know more about the implementation
details of objects, you can IMPORT an "internal" interface to that
implementation that REVEALs more about the types of your interest. Of
course, if you do import this "internal" interface, then if the
internals of an abstraction changes, you will have to change your
code. You can use NARROWs as Walter points out, though I prefer using
the REVEAL statement, as it "documents" the implementation dependency
more explicitly, and enforces a coarser-grained scope change than
NARROWs would. I suspect this helps you maintain your code with less
effort in the long run.  Moreover, such an "internal" interface may
group together other pertient implementation information, such as
constants, variables, or other types and procedures that help you deal
with an abstraction at the implementation level.

For an excellent example of exposing implementation details in a
structured manner using partially-opaque types, see the chapter of
SPwM3 on I/O Streams.

   I really like this progressive-disclosure way of building
   interfaces, at least on paper.  Now if I could just get some free
   time to write something in M3!

Partially-opaque types are very nice at work as well!

Now if someone would post a precise explanation (including a good
example) of why partially-opaque types are *more* powerful than a
generalization of private, protected, public approach, I will be very
happy. Hmmm. Maybe _I_ should re-read the chapter on I/O Streams.

-- Farshad

[I took the freedom to change the "Subject:" line. Though it probably
is a mistake!]

--
Farshad Nayeri
nayeri@gte.com


======================================================================= 90 ===
Date:    21 Dec 1994 16:37:12 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Accessor methods

In article <D14w5p.DM8@orem.jlc.com> kevin@elvis.wicat.com (Kevin Vigor) writes
:

   Jack Greenbaum (jackg@downhaul.crc.ricoh.com) wrote:
   : i.e. a method call).  People I work with do this type of
   : optimization. This stuff is real. You just can't ignore efficiency
   : inside of tight loops when you are building real systems. Everywhere
   : else, like in setup code that is run once or twice, you are right, it
   : doesn't matter at all.

   Since Modula-3 has a C interface, it seems to me that if you really
   need to do bit-twiddling optimizations, these can be implemented in
   C much as C programmers will optimize tight loops in assembler.

At a practical level, I agree with you, Kevin. Ideally, however, if I
am using a language for "systems programming", I hope that the
language provides a way for adressing such implementation issues, as I
may choose to implement my code within the language itself.  Surely,
to make your code faster using current software technology, you will
have to make some trade-offs such as using unsafe features or relying
on implementation details of an abstraction. But whatever you do,
"systems programming" with a language is a lot simpler if you can do
bit-twiddling in it once in a while.

My reading of the language definition is that Modula-3 designers
specifically designed the language not to count on an external
"lower-level" language, but to allow such a provision for cases when
it is necessary.  Note that the language definition says nothing about
implementations having to support the <*EXTERNAL*> pragmas other than
recommending its support.

A subtle point in all of this is that by doing your bit-twiddling
within Modula-3, you are "documenting" important unsafe aspects of
your system in the same way you do your safe portions.

See Section 1.4.5 on "Safety" of SPwM3 for a little bit of motivation.

   All high level languages require tradeoffs of this sort, so I think
   this solution is quite acceptable in Modula-3.

I think Modula-3 *as a language* has a better chance of most other
semi-popular competitors to C today for not needing call outs to C.
Having to call libraries written in C or other languages is certainly
needed, but that is a slightly different issue, I think.

(One interesting aspect of bit-twiddling in Modula-3 is that it will
look uglier and more verbose than safe programming in Modula-3 as the
due to default assumptions of the language. I find that this
encourages me to stay in the safe subset of the language.)

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 91 ===
Date:    21 Dec 1994 15:03:07 GMT
From:    ralph@ifr19.luftfahrt.uni-stuttgart.de (Ralph Paul)
Subject: Comparing Ada9X to Modula-3 ( please no bashing )

Hi,

can anybody give me a source for literature or article on this subject

Many thanks

Ralph Paul

---------------------------------------------------
E-Mail :

	 ralph@ifr.luftfahrt.uni-stuttgart.de
or	'ralph.paul@studbox.uni-stuttgart.de'


---------------------------------------------------

University of Stuttgart		
Inst. of Flight Mechanics and Control
Forststrasse 86
70176 Stuttgart, Germany


======================================================================= 92 ===
Date:    Wed, 21 Dec 94 15:17:30 EST
From:    BERGINF@PACEVM.DAC.PACE.EDU (Joseph Bergin)
Subject: Accessor Methods

Farshad asks for a "proof" that partial revelations are more powerful
than c++ protected,public,private.  You might look at my description
of the Object Extensions to Pascal that just appeared in the Dec.
Sigplan Notices.  This language uses a mechanism slightly more powerful
than even partial revelations (which must be strictly nested).  The view
mechanism permits the tailoring of an interface to an abstraction to a
specific class of clients.  Views may overlap. C++ makes the mistake of
hard coding into the language who the clients of an interface must be:
namely implementors, heirs, the public, or friends.  Modula-3 and the
Object Extensions to Pascal let the programmer decide who the appropriate
classes of clients are. Much better. Enjoy. Joe Bergin, Pace University.


======================================================================= 93 ===
Date:    21 Dec 1994 21:58:17 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Accessor Methods

In article <9412212028.AA15451@inet-gw-1.pa.dec.com> BERGINF@PACEVM.DAC.PACE.ED
U (Joseph Bergin) writes:

   Farshad asks for a "proof" that partial revelations are more powerful
   than c++ protected,public,private.  You might look at my description
   of the Object Extensions to Pascal that just appeared in the Dec.
   Sigplan Notices.  This language uses a mechanism slightly more powerful
   than even partial revelations (which must be strictly nested).  The view
   mechanism permits the tailoring of an interface to an abstraction to a
   specific class of clients.  Views may overlap. 

   C++ makes the mistake of hard coding into the language who the
   clients of an interface must be: namely implementors, heirs, the
   public, or friends.  Modula-3 and the Object Extensions to Pascal
   let the programmer decide who the appropriate classes of clients
   are. Much better.

Certainly the generalization of access modes is a better way to go.  I
am mostly wondering about the fact that I can insert types in the
middle of the hierarchy of partial revelations of a particular type.
(In Modula-3 I will have to make sure the revelations form a linear
path, as you pointed out, but that's another issue.)

Can someone point me to a case where this capability has made a big
difference? I assume it may help in "re-coding" an existing hierarchy
of partially-revealed types, but has anyone taken advantage of this
feature? I am looking for an example that illustrates clearly why you
may want to insert into the revelation path.

I always wondered about the linear restriction. I will be sure to read
your paper, Joe.

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 94 ===
Date:    Wed, 21 Dec 94 15:01:24 AST
From:    atlantic@isis.org.lc (Atlantic Internationa)
Subject: WEB for Modula3


  Please, anyone:
  
  Is there a "modula3WEB" available.  I am currently using CWEB
  and hope eventually to switch from C to Modula3.
  And of course, I would like to continue to "weave" and "tangle"
  
  Thanks
  ------
  Cletus J. Paul
  // atlantic@isis.org.lc




======================================================================= 95 ===
Date:    Thu, 22 Dec 1994 15:38:43 +0100 (MET)
From:    thomas.tensi@fi.sdm.de (Dr. Thomas Tensi)
Subject: Re: WEB for Modula3

Hello Cletus,

you ask:

>   Is there a "modula3WEB" available.  I am currently using CWEB
>   and hope eventually to switch from C to Modula3.
>   And of course, I would like to continue to "weave" and "tangle"

I did a m3.spider grammar for Norman Ramsey's SPIDERWEB system. SPIDERWEB
generates weave and tangle from an augmented grammar.

I'm not sure if the weave and tangle produced from my grammar matches your
expectations but there are currently some persons testing the tool and I
haven't heard any bug reports from them for some. Maybe they have given up
completely?!

If you have a SPIDERWEB system available I can send you the grammar for
MODULA-3.

                   Sincerely


                        Thomas Tensi

-------------------------------------------------------------------------
Dr. Thomas Tensi    |s  |d &|m  | software design & management GmbH & Co. KG
                    |   |   |   | Thomas-Dehler-Str. 18
thomas.tensi@sdm.de |   |   |   | 81737 M"unchen, Germany.


======================================================================= 96 ===
Date:    22 Dec 1994 17:04:39 GMT
From:    schaub@ponder.csci.unt.edu (Stephen Schaub)
Subject: Binary files in M3

Is it possible to do Pascal-type binary files in a type-safe fashion in
Modula-3?  All the reader/writer routines work in terms of characters and
text.  There's the comprehensive pickles package, which seems to be
suited for storage of small to moderately sized data structures.  But
I haven't found anything that seems suited for random-access I/O to a file
of binary records, such as would be needed to manage a large database that
supports concurrent access.
  I have some ideas about designing a generic package to do this, but would
like to know if anyone else has already done it, or if there is a better
model.  I've already talked with someone who feels that binary files in
general are a bad idea because of the need to access them from computers
with different architectures and representations for floating point/integers/
etc.  But text has its drawbacks: variable-length numbers, performance
penalty in converting from text to internal numeric format, etc. 
  Record-oriented binary files seem to be useful and necessary for many
applications.  Any thoughts on the topic would be appreciated.

Stephen Schaub
schaub@cs.unt.edu


======================================================================= 97 ===
Date:    22 Dec 94 08:25:07
From:    dagenais@notung.vlsi.polymtl.ca (Michel Dagenais)
Subject: Re: Comparing Ada9X to Modula-3 ( please no bashing )


I have not seen any such comparison. Ada9X is still not finalized and
implementations such as Gnat are still incomplete (no tasks/threads
yet if I recall).

Having read the Ada9X reference manual lately i can give a few comments.
The first thing to notice is the difference in complexity, 500 pages
instead of 50 pages for Modula-3. However, Ada9X has some cool features
(albeit sometimes detrimental to code readability) such as operator overloading
and user managed storage pools (may be used to have collected and non
collected pools). My biggest deception was to see that
garbage collection is not mandated in an implementation. Therefore,
when you program for portability, you need to use the lowest common
denominator: No GC :-(.

In a university environment, Modula-3 gets the student up and running
through OO, modules, user interfaces, threads, distributed programming 
much faster than pretty much anything else.
--

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029



======================================================================= 98 ===
Date:    22 Dec 1994 22:24:48 GMT
From:    nayeri@gte.com (Farshad Nayeri)
Subject: Re: Binary files in M3

In article <3dcbj7$bt4@hermes.unt.edu> schaub@ponder.csci.unt.edu (Stephen Scha
ub) writes:

   Is it possible to do Pascal-type binary files in a type-safe fashion in
   Modula-3?  All the reader/writer routines work in terms of characters and
   text.  There's the comprehensive pickles package, which seems to be
   suited for storage of small to moderately sized data structures.  But
   I haven't found anything that seems suited for random-access I/O to a file
   of binary records, such as would be needed to manage a large database that
   supports concurrent access.

As a start, you may want to try the smalldb package. It should do what
you want. I think it is a part of postcard archive!?

>From the documentation:

|  This package will maintain a copy of a data structure on secondary
|  storage, and will update the secondary storage as updates are made
|  to the data structure. A client can use this package to ensure that
|  the current value of the data structure can be recovered after any
|  crash. This package is efficient: the cost of recording an update
|  is about one disk write.

     I have some ideas about designing a generic package to do this, but would
   like to know if anyone else has already done it, or if there is a better
   model. 

I think a generic storage package sounds like a good idea, especially
if it provides a simple abstraction over different kinds of
representations.

-- Farshad
--
Farshad Nayeri
nayeri@gte.com


======================================================================= 99 ===
Date:    23 Dec 1994 21:21:11 GMT
From:    mjj@Eng.Sun.COM (Mick Jordan)
Subject: Re: Accessor Methods



In article 94Dec21165817@bermuda.gte.com, nayeri@gte.com (Farshad Nayeri) write
s:


> I always wondered about the linear restriction. I will be sure to read
> your paper, Joe.
> 

The linear restriction is a nuisance (as is the lack of multiple inheritance).
Technically, the reason for linearisation is related to the ability for
subtypes to redeclare (not override) the same field or method name. If there
is no linearisation requirement, it is possible to construct an example
(left as a Xmas exercise) in which it cannot be determined at compile time
which of the different fields/methods with the same name are actually
being accessed with a particular set of partial revelations.

Having used partial revelations extensively in the M3TK toolkit and
also implemented the static checks in its associated compiler, I am not
so happy about them. They are undoubtedly the most complicated part
of the language to both understand and implement. Very often they are
used to work round the lack of multiple inheritance, not as a way of
simulating public/private/protected. Indeed one can argue that multiple
inheritance is the way to generalise public, private and protected,
particularly if you cleanly separate interface inheritance from
implementation inheritance

Mick Jordan




======================================================================= 100 ===
Date:    23 Dec 94 17:18:44 GMT
From:    raboczi@s1.elec.uq.oz.au (Simon Raboczi)
Subject: Re: WEB for Modula3

atlantic@isis.org.lc (Atlantic Internationa) writes:

>  Is there a "modula3WEB" available.  I am currently using CWEB
>  and hope eventually to switch from C to Modula3.
>  And of course, I would like to continue to "weave" and "tangle"

FunnelWEB is an alternative, if you're willing to trade the prettier
typesetting in CWEB for language-independence.  (Assembly code is one
place it *really* shines).

-- 
 ,-_|\  Simon Raboczi (raboczi@s1.elec.uq.oz.au)
/     * Department of Electrical & Computer Engineering
\_.--_/ University of Queensland, St Lucia, Brisbane, Australia
     v  [Sebkha says, "We live to serve."]


======================================================================= 101 ===
Date:    23 Dec 1994 22:56:27 GMT
From:    schaub@ponder.csci.unt.edu (Stephen Schaub)
Subject: Re: Binary files in M3

Farshad Nayeri (nayeri@gte.com) wrote:
: In article <3dcbj7$bt4@hermes.unt.edu> schaub@ponder.csci.unt.edu (Stephen Sc
haub) writes:

:    Is it possible to do Pascal-type binary files in a type-safe fashion in
:    Modula-3?
...
: As a start, you may want to try the smalldb package. It should do what
: you want. I think it is a part of postcard archive!?

I think it's overkill for what I'm looking for.  Something simple to grasp
and use for students is the goal here.

Stephen Schaub
schaub@cs.unt.edu


======================================================================= 102 ===
Date:    Sat, 24 Dec 1994 14:59:20 +0000
From:    wish@dumain.demon.co.uk (Bill Hay)
Subject: Re: electronically available description ?

Farshad Nayeri (nayeri@gte.com) wrote:
> In article <1994Dec14.023010.11316@news.snu.ac.kr> lsj@red.snu.ac.kr (Lee) wr
ites:


> Try:

>      http://www.research.digital.com/SRC/m3defn/html/m3.html

> for the language definition. 

Is there a version which is easily downloadable as opposed to online(I want
to be able to read it when not connected to the internet and following every
link in order to ensure I get all of the m3 definition and nothing but seems
a lot of hassle).
 
-- 
Bill Hay


======================================================================= 103 ===
Date:    Tue, 27 Dec 1994 17:19:43 -0500
From:    douglm@rpi.edu
Subject: pic V PIC revisited.

This I think is specifically a SPARC problem.

When building the m3 system for SPARCs I ran across this problem and did as
suggested in the bug fixes; that is

>Change "pic" to "PIC" throughout boot-SPARC/m3build/templates/SPARC and
>rebuild the
>system.
>

I have finally come round to wanting to build a standalone program and find
I cannot do so. The message I get is:

ld: /lib/libc.a(gethostnamadr.o): can't mixed pic and PIC .o

The problem seems to be that my m3 world is now PIC but at least some of
the libraries I am trying to link to are pic.

The program I am trying to build is composed of routines from many
libraries in my own filespace, and a number of public libraries. I want to
move a copy of it elsewhere so I can proceed with development on one
version while not affecting the 'production' version.

I have spent much time looking at various ld options and talking with
others with no apparent success. Can anybody set me on the right path?




======================================================================= 104 ===
Date:    Fri, 30 Dec 1994 02:19:56 GMT
From:    bnfb@scs.carleton.ca (Bjorn Freeman-Benson)
Subject: OOPSLA'95 Electronic Hotline

    	    OOPSLA'95 ELECTRONIC INFORMATION HOTLINE

              Tenth Annual ACM Conference on
Object-Oriented Programming Systems, Languages and Applications
 
CONFERENCE CHAIR  REBECCA WIRFS-BROCK		15-19 October 1995
PROGRAM CHAIR	  MARY LOOMIS			Austin, TX, USA

________________ WHAT INFORMATION IS AVAILABLE ____________________

The Hotline currently contains the on-line version of the Call for
Participation including the submission dates, guidelines, articles about
how to write good papers, important dates, etc.  As October approaches,
more and more information will be available including the Advanced Program,
registration forms, maps of Austin, etc.

__________ HOW TO RECEIVE MORE INFORMATION ELECTRONICALLY _________

There are three mechanisms for receiving further information electronically:
WWW, anonymous ftp, and e-mail list server.  

                            W W W

http://info.acm.org/sig_forums/sigplan/oopsla/oopsla95.html


        	    A N O N Y M O U S   F T P

Host name:     info.acm.org
Host id:       137.117.5.4
FTP directory: sig_forums/sigplan/oopsla/

The file READ.ME contains a list of the files available.


    	    	E - M A I L   L I S T   S E R V E R

	[Unfortunately, the ACM Email List Server is currently
	not functioning...  I will repost this announcement when the
    	list server recovers.]


____________________ CONTACT WITH A HUMAN ________________________

This Hotline is automatic - your e-mail has been processed by auto-answer
program.  No human has read your message.  If you are having trouble with
the Hotline, or need to communicate with an OOPSLA'95 representative about
some issue that the Hotline does not provide an answer for, you can contact
bjorn@oti.on.ca (for Hotline Problems), oopsla95@applelink.apple.com
(for OOPSLA'95 Administration).

    	    	    	>>> PLEASE <<< 

Please do not contact the administration or registration people if your
problem can be answered by files on the Hotline.  OOPSLA is a big
conference and it is staffed by unpaid volunteers - we give our time to
make it happen.  This Hotline has been set up to provide answers to
Frequently Asked Questions and to reduce the administrative load on us...
Thank you.  (Also, the Hotline is automatic and thus available 24 hours a
day, whereas the administration is a 9am-5pm West Coast time operation.)


======================================================================= 105 ===
Date:    31 Dec 1994 03:59:17 GMT
From:    norman@flaubert.bellcore.com (Norman Ramsey)
Subject: Re: WEB for Modula3

>  Is there a "modula3WEB" available.  

Consider one of the language-independent literate-programming tools
like noweb or nuweb.  m3build even has some support for noweb.

For more information, see David Thompson's excellent FAQ for
comp.programming.literate. 


