======================================================================= 1 === Date: Thu, 2 Dec 93 11:40:23 +0100 From: tck@id.dth.dk (Thomas Chris Kjaer (940301#HB)) Subject: Converting real numbers? Hi, this question has probably been raised before, but here it is: How do you convert a REAL to a LONGREAL in Modula-3? In the language definition that I have -- 'Modula-3 Report (revised), SRC Report #52, November 1 1989' -- there is mentioned an operation LONGFLOAT(x: FLOAT): LONGFLOAT or LONGFLOAT(x: INTEGER): LONGFLOAT However, it is not defined in version 2.11? Would anyone be kind enough to help me out? Regard, Chris tck@id.dth.dk Graduate Student, Dept. of Computer Science, Techical Univ. of Denmark ======================================================================= 2 === Date: Thu, 2 Dec 1993 14:13:50 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Converting real numbers? How do you convert a REAL to a LONGREAL in Modula-3? LONGFLOAT(x: FLOAT): LONGFLOAT ? Try FLOAT(x,LONGREAL), page 81 in Sam Harbison's Modula-3 book. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 3 === Date: 3 Dec 93 11:42:08 GMT From: toref@dcs.glasgow.ac.uk (Tor Erlend Fagri) Subject: Threads receiving messages I'm using the SRC Modula-3 compiler for a project involving concurreny and distribution. My questions are: Can a object be used as the executing code in a thread? If so, will the active object receive method calls? - Tor E. Fagri, toref@dcs.gla.ac.uk -- Tor, God of Thunder (e-mail: toref@dcs.gla.ac.uk) ======================================================================= 4 === Date: Fri, 3 Dec 93 16:07:44 EST From: Sam.Kendall@East.Sun.COM (Sam Kendall - Sun Microsystems Labs BOS) Subject: Question on simultaneous importing and local naming I'm looking at the M3 language definition in Sigplan Notices Aug 92. I'm confused about how importing and local naming work. 5.1 says: All imports of both forms are interpreted simultaneously; their order doesn't matter.... A local binding for I takes precedence over a global binding. If both these statements are true, how can IMPORT I AS J, J AS I; not result in infinite regress? I at first thought that local names took effect only after the import statements; this would mean that the collection of import statements was like the bindings in a single Lisp "let". But it's not true. We see that IMPORT I AS J, J AS I; FROM I IMPORT N; imports N from the global J, not from the global I as it would if we were using single-"let" model. Next, I thought that perhaps the imports within a SINGLE import statement were interpreted simultaneously, but that each import statement was evaluated in the lexical environment created by the previous import statements. But that's not true either. FROM I IMPORT N; IMPORT I AS J, J AS I; also imports N from the global J, at least in the SRC 2.11 compiler. I'm out of theories. Can someone explain this to me? ---- Sam Kendall Sun Microsystems Labs BOS ======================================================================= 5 === Date: 3 Dec 1993 01:21:07 -0600 From: johnh@wheaton (John C. Hayward) Subject: Problems in installing alpha3.0 on DS3100 I am attempting to install alpha 3.0 on DS3100. A partial list of problems: - the install procedure needed gnumake - found a version - the basic.h include file for quake had no reference for DS3100 - I added one - the install options were different for ultrix 4.3 - I changed the templates - Still after changeing this when attempting to do the do_install the directory quake attempts to pick up the source is .././m3build/DS3100 which should be without the first ../ as far as I can see. Can someone give some pointers on how to do this with more success than I have had? Thanks in advance. johnh... Note: I think our news postings do not give the correct e-mail address e-mail to: johnh@wheaton.edu. ======================================================================= 6 === Date: Mon, 6 Dec 1993 10:44:38 GMT From: sjb34@cus.cam.ac.uk (S.J. Bignell) Subject: Travelling salesman algorithm I am currently working on a project involving approximation algorithms to the Travelling Salesman problem. Lin & Kernighan published a paper in 1972 in Operations Research containing "the best algorithm yet" - I have a copy of the paper but I can't get my head around the algorithm given. Does anyone have some source code for the algorithm, or can anyone supply me with a further explanation? Thanks Spencer Bignell sjb34@cus.cam.ac.uk ======================================================================= 7 === Date: Mon, 6 Dec 1993 15:11:35 GMT From: fn00@gte.com (Farshad Nayeri) Subject: Re: Threads receiving messages In article toref@dcs.glasgow.ac.uk (Tor Erlend F agri) writes: I'm using the SRC Modula-3 compiler for a project involving concurreny and distribution. My questions are: Can a object be used as the executing code in a thread? Modula-3 objects are designed to be participating in mutiple threads of execution. Chapter 4 of SPwM3 provides a good introduction for doing concurrent programming with Modula-3. (I am not sure if I understand your first question completely, but I think the above answers it.) If so, will the active object receive method calls? Yes, but the programmer is responsible to make sure that critical sections of the code inside the body of the object are protected. Modula-3 will let as many threads to run through the body of an object as the programmer requests, unlike other concurrent languages where only one thread is allowed to run through the body of an object. You can also coordinate "alerting" of active objects, which is intended to be used in cases when a thread wants to "interrupt a particular task, causing it to back out of some long-term wait or computation." [SPwM3, Chapter 4] By the way, I think Andrew Birrell's introductory thread chapter in SPwM3 (together with Modula-3 & its thread implementation) is an excellent introduction to programming with threads! I recommend it to anyone that is interested in learning about concurrent programming. --farshad -- /// | {@,@} | "He's so unhip that when you (...) Farshad Nayeri | say Dylan, he thinks you're " " nayeri@gte.com | talking about Dylan Thomas." ======================================================================= 8 === Date: Mon, 6 Dec 1993 14:50:13 GMT From: fn00@gte.com (Farshad Nayeri) Subject: Re: Question on simultaneous importing and local naming In article <9312032107.AA02339@pot.East.Sun.COM> Sam.Kendall@East.Sun.COM (Sam Kendall - Sun Microsystems Labs BOS) writes: Hi Sam. Nice to see new people using/playing with Modula-3. > I'm looking at the M3 language definition in Sigplan Notices Aug 92. I am not sure if a lot has changed about the description of IMPORT, but I think the "official" language definition is in SPwM3. So, I will quote the next paragraph: > The definition in SPwM3 goes on to say that: > > IMPORT I AS J, J AS I; FROM I IMPORT N > > simultaneously introduces local names J, I and N for the entities > whose global names are I, J, and J.N, respectively. So, this should settle the issue for the example. Now, back to _why_ this makes sense: > I'm confused about how importing and local naming work. > > 5.1 says: > > All imports of both forms are interpreted simultaneously; their > order doesn't matter.... > > A local binding for I takes precedence over a global binding. > > If both these statements are true, how can > > IMPORT I AS J, J AS I; > > not result in infinite regress? There are two IMPORT statements, "IMPORT I AS J;" and "IMPORT J AS I;", which take effect simultaneously. So, effectively, I and J are swapped. > I at first thought that local names took effect only after the import > statements; this would mean that the collection of import statements was > like the bindings in a single Lisp "let". But it's not true. We see > that > > IMPORT I AS J, J AS I; > FROM I IMPORT N; > > imports N from the global J, not from the global I as it would if we > were using single-"let" model. Using the first rule, we know all IMPORTs take affect at the same time, so we will have the non-1-to-1 mapping: LOCAL GLOBAL ----- ------ I <- J J <- I N <- J.N or I.N Using the second rule, we know that local imports take precedence over global ones. This means, that for our choice between I.N or J.N, we will pick the one that is local, namely I. So, we have a one-to-one mapping: LOCAL GLOBAL ----- ------ I <- J J <- I N <- I.N Perhaps the confusion is with the term "precedence", which may have an operational meaning at times. Do they mean "precedence at IMPORT time", that is order of name bindings, or "precedence at lookup time"? I think they meant the lookup precedence, as I used in resolving the above ambiguity. So, I think a modified "single-let" theory is probably the correct one. You can apply the same mapping, no matter what order the IMPORT or FROM statements are typed in. I think the main difference with the Lisp LET statement is that LET is more operational than IMPORT mainly due to the fact that design of Lisp is meant for an interpreter whereas design of Modula-3 is meant for a compiler, I think. (Note also the way variable initialization works in the top-level of a Module.) This doesn't mean that either language could not be interpreted/compiled, but it does mean that the designs may be slightly different based on the bias of the designers toward one model or the other. In practice, I haven't been using FROM I IMPORT N in writing my own code a lot because it makes reading code harder (IMHO). It is useful for debugging statements or things that you use a lot in your program, but not much more. I think the time that they are very useful is when you are trying to make two independently developed pieces of code that may use the same name. Hope this helps, --farshad -- /// | {@,@} | "He's so unhip that when you (...) Farshad Nayeri | say Dylan, he thinks you're " " nayeri@gte.com | talking about Dylan Thomas." ======================================================================= 9 === Date: Mon, 6 Dec 1993 19:34:00 GMT From: barton@chopin.eche.ualberta.ca (Bob Barton) Subject: Problem with formsVBT I am using an IBM RS-6000 winder AIX 3.2.3. I have installed Modula-3 version 2.11 with trestle, trestletutorial, vbtkit and formsvbt. I have done some of the trestle tutorial without problems but when I tried the Hello program in the formsVBT tutorial the following is produced when I run the compiled program : ********************** EXCEPTION STACK HANDLER ******************************* 0x2ff7f930 TRY_FINALLY proc=0x201429f8 frame=0x2ff7f91c 0x2ff7f948 TRY_EXCEPT {Filename.Error} ****************************************************************************** as far as I can tell I have set everything up correctly. I have the Hello.fv file prepared in the local directory and the compilation seems OK. Any suggestions welcomed. -- --,,,, | D | R.L. Barton Department of Chemical Engineering | A | Tel (403) 492-5160 University of Alberta | C | Fax (403) 492-2881 Edmonton, Alberta, Canada T6G 2G6 | S | Internet barton@chopin.eche.ualberta.ca --'''' ======================================================================= 10 === Date: Tue, 7 Dec 1993 14:23:42 GMT From: sjb34@cus.cam.ac.uk (S.J. Bignell) Subject: Travelling Salesman I am currently working on a project involving approximation algorithms to the T ravelling Salesman problem. Apparently Lin & Kernighan's one from Operations Research 21 in 1973 is very good - problem is I can't understand it. Does anyone have any source code for the alg, or can anyone explain it? Spencer Bignell sjb34@cus.cam.ac.uk ======================================================================= 11 === Date: Tue, 07 Dec 93 18:05:53 -0800 From: heydon@src.dec.com Subject: Re: Question on simultaneous importing and local naming Sam.Kendall@East.Sun.COM writes: > 5.1 says: > > All imports of both forms are interpreted simultaneously; their > order doesn't matter.... > > A local binding for I takes precedence over a global binding. > > If both these statements are true, how can > > IMPORT I AS J, J AS I; > > not result in infinite regress? The first statement only makes sense because the description of the IMPORT statement makes a distinction between local and global names. As stated previously, there are two forms of IMPORT statements: 1) IMPORT [ AS ] 2) FROM IMPORT I think your mistake is in thinking that the second statement above --- namely, that local bindings take precedence over global bindings --- applies to both IMPORT forms, when in fact it applies only to the second form. (This should probably be stated somewhat more explicitly in SPwM3.) The first name in the second form may be either a global or a local name 'I'; but if 'I' appears as the (optional) of a type-(1) import, then that local name is used. Hence, in the imports: IMPORT I AS J, J AS I; FROM I IMPORT N; the local entity 'N' refers to the global entity 'J.N', not 'I.N'. In the imports: IMPORT I AS J; FROM I IMPORT N; the local entity 'N' now refers to the global entity 'I.N'. - Allan ------------------------------------------------------------------------------- Allan Heydon heydon@src.dec.com DEC Systems Research Center (415) 853-2142 130 Lytton Ave. (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 12 === Date: 13 Dec 1993 17:54:50 GMT From: Eric Muller Subject: Modula-3 Frequently Asked Questions (FAQ) Archive-name: Modula-3-faq Last-modified: Sep 9 1993 Modula-3 Frequently Asked Questions =================================== 1. The language 1.1 What is Modula-3? 1.2 Is Modula-3 a superset of Modula-2? 2. The documentation 2.1 Where can I get a description of Modula-3? 2.2 Where can I get other information on Modula-3? 3. The implementations 3.1 Where can I get an implementation? 3.2 What is SRC Modula-3? 3.3 What is m3pc? 3.4 What is GNU Modula-3? 4. Some specific questions 4.1 Why is "Hello World" so large? 4.2 Why objects and interfaces? 4.3 What is the story with Trestle and OpenWindows? 4.4 When is the next release of SRC Modula-3 ? 5. FTP 5.1 What if I don't have ftp access? 6. Contributing 6.1 Can I contribute Modula-3 software? 1.1. 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, we studied the features of the Modula family of languages that have proven themselves in practice and tried to simplify them into a harmonious language. We 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. 1.2. 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. 2.1. Where can I get a description of Modula-3? 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 errata sheet is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/errata. 2.2. 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. There are a couple high-level overview articles available: "Modula-3", Sam Harbison, Byte, Vol. 15, No. 12, November 1990, pp 385+. "Safe Programming with Modula-3", Sam Harbison, Dr. Dobb's Journal, Vol. 17, No. 10, October 1992, pp 88+. A description of the Modula-3 type system is in "The Modula-3 Type System", Luca Cardelli, Jim Donahue, Mick Jordan, Bill Kalsow, Greg Nelson, Conference Record of the Sixteenth Annual ACM Symposium on Principles of Programming Languages (POPL), Austin Texas, January 11-13 1989, pp 202-212. The 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. (soon 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. "The FormsVBT Reference Manual", Marc H. Brown and James R. Meehan, (soon 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. "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. "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. "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. 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. 3.1. Where can I get an implementation? Two implementations are available, SRC Modula-3 and a PC version of it (m3pc). Work is also progressing on GNU Modula-3. As far as we know, implementations are not available for VMS, Macintosh, or Alpha AXP/OSF. 3.2. What is SRC Modula-3? SRC Modula-3 was built by the DEC Systems Reseach Center and is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/release. The current version, 2.11, implements the language defined in SPwM3. There are versions for the following machines: AIX386 IBM PC running AIX/PS2, 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 700/800 running HP-UX 8.0 IBMR2 IBM R6000 running AIX 3.1, IBMRT IBM RT running IBM/4.3, NEXT NeXT running ?? OKI Okidata 7300 (i860) running AT&T SVR4.0 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 SRC Modula-3 includes a user manual, compiler, runtime library, some libraries and a few other goodies (see below). The compiler generates C as an intermediate language 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. 3.3. What is m3pc? m3pc is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/m3pc. From: laszlo@post.ifi.uni-klu.ac.at (Prof.Dr.Laszlo BOESZOERMENYI) Subject: M3 pn PC Date: 8 Mar 1993 13:13:52 GMT The Modula-3 system ported by us on the PC and available on the gatekeeper, runs with MSDOS, gnu c compiler and djgpp memory manager (detailed description in the read me file). You may compile, link and run Modula-3 programs, without threads. From the library modules only those are tested which are used by the compiler. In the course of a student project a "student-friendly" environment is in development. It will be available at end of June (hopefully). 3.4. What is GNU Modula-3? From: moss@cs.cmu.edu (Eliot Moss) Subject: GNU Modula-3 alpha release status Date: 25 Mar 93 17:53:12 GMT We said we'd try to get the initial (alpha) release of GNU Modula-3 out some time this month (March), and we're in the process of figuring out what to release and how to package it up. We expect to have something in roughly two weeks (watch this space for a notice). What would this be? First, it is a compiler for the VAX (only) under Ultrix (only), definitely without threads, and probably still failing a small number of the tests in the SRC test suite (which implies that not all of libm3 is likely to work either). The actual release information will detail more about what's working and what's not at that time. We DO currently pass all the compiler tests that the SRC compiler did when it was first released (i.e., the ones we fail are more obscure things that users uncovered over time). Second, the release itself will be a compressed tar file including sources and executables. The executables will probably work only if you put libraries, etc., in the expected places (otherwise, you'll need to rebuild from sources).The compiler is written in C and should be compiled with a recent version of gcc (so you'll need gcc installed). The system also uses gld (the GNU linker). This release should be most useful to people undertaking ports to other machines and operating systems, since it will give them a head start on understanding the compiler and getting the full system ready. It may be of some use for ordinary programming, but it really depends on whether you tend to use features that tickle the remaining bugs. We are indeed interested in alpha test reports, but only if they tell us something new (i.e., we'll provide a list of known deficiencies). When the release is made, we'll also start email discussions with the various parties who have indicated they might undertake ports, to help sort out who will do what. Regards, and thanks for your continued interest and encouragement -- EM From: moss@cs.cmu.edu (Eliot Moss) Subject: GNU Modula-3 pre-release Date: Wed, 5 May 1993 23:49:33 GMT At long last, the GNU Modula-3 project has a pre-release ready, for the VAX/Ultrix platform ONLY. Various folks had notified us of their interest in doing ports or alpha testing, and they have already been sent email with particulars on how to obtain the tar file, etc. There are a number of known bugs; I'll see about making a list available by ftp or something, for interested parties. It is our opinion that the prerelease is not mature enough for general use, but we wished to give a head start to those folks attempting ports, and we will make periodic patches available. If you want to use this compiler for serious program development or need something solid with debugging support for classroom use, you should wait until we've fixed more of the problems. (But to give a sense of what we HAVE accomplished, as I recall, all but 3 of the SRC compiler tests compile (there are 137 of them).) We hope to do a more general release, and support more platforms, in the summer. If you're interested in helping and have not previously contacted us, please send email to me and/or Rick Hudson (hudson@cs.umass.edu). Thanks to Digital and SRC for supporting us, and to Rick Hudson, Amer Diwan, and Norm Walsh, the guys who do all the hard work! 4.1. 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 better compiler. The current compiler is only a research prototype. 3) The compiler generates C code as its intermediate language consequently the final machine code suffers. For example, the compiler is constantly storing single-precision floating point values into memory to get around C's predisposition for double precision. 4.2. 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. 4.3. 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. 4.4 When is the next release of SRC Modula-3 ? The next release will be 3.0. Here are some of the new things you will find in it: 1. the compiler has a new internal interface between the front-end and the back-end, M3CG. This interface is supposed to be easy to implement. 2. the front-end can compute in the target arithmetic system; in particular it is possible to cross-compile to machines with larger integers than the host. 3. one back-end has been implemented on top of gcc. The implementation of M3CG interface generates the tree representation used internally in gcc. From the gcc point of view, this back-end looks like a new front-end. Using this back-end, we have cross-compiled solitaire for mips, alpha and 386 processors; there is no reason to believe that there would be a problem for the other architectures supported by gcc. 4. Dave Hanson wrote another implementation of the M3CG that is self-contained. He is currently working on the 386 code generation (he has done the mips code generation already). 5. gdb has been modified to understand Modula-3 debugging information produced by the back-ends. gdb can now parse Modula-3 expressions, print Modula-3 values and evaluate some of the Modula-3 built-in operations. There is also a little bit of support for multi-threaded programs (you can look at the stacks of other threads). 6. there is a replacement for m3make, m3build, that does not rely on cpp/awk/sed/make and what not, and removes some of the limitations of m3make. m3makefiles are very similar. 7. libm3 has been significantly changed by the Interface Police, mostly in the area of OS interfaces and data structures. 8. for the OS interfaces, we still have the U* interfaces, but applications are not supposed to use those. Instead they should use a new set of interfaces that are os-independent; for example, there is a Pathname interface that manipulates file names; there is a Process interface that manipulate child processes. These interfaces enabled a prototype port of the C based version to Windows NT machines. 9. for the data structures, generics have been introduced and the various data structures are more consistent. 10. because of 6 and 8, we can think about going to different os than Unix. In particular a Windows NT port will be available at some point (may not be in 3.0). 11. the runtime has been improved quite a bit. 12. new platforms: Alpha running OSF/1, 386 running Linux. We will pay more attention to the porting instructions and support. 13. I am not sure about all the changes in the libraries other than libm3. I suspect that there will be few changes in trestle, but that mentor changed quite a bit. 14. The Windows NT port uses native threads. This should be a good model for other implementations of Thread using native threads. The current status is: . the front-end is very stable . the gcc-based back-end has been stable for 4 months . the gdb extensions are brand new and need some test . the interface police work is very stable . we are working on bringing the system up on the machines we have in the building, and building the export machinery. We don't have a date for the 3.0 release. Given the amount of changes introduced by 3.0, I suspect that the first few releases will not work out of the box for any machine but the ones for which we can test (decstations [mips and alpha], linux). Consequently, I expect a high rate of releases for a while. We will try to post accurate information about the status of each machine, but we can only rely what you tell us. At this point, I would not encourage anybody to start a new port. If you have a new port, or are close to complete one, you can send us your bits, we will try to put them in 3.0. 5.1. What if I don't have ftp access? Unfortunately, we 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 6.1. Can I contribute Modula-3 software? Certainly. Send us what you are willing to share, be it programs, libraries or other things. We'll put them in the distribution. Right now, the pub/DEC/Modula-3/contrib directory contains: m3rpc an rpc system from Xerox Parc M2toM3 a translator from Modula-2 to Modula-3 m3pc an implementation of Modula-3 for PCs. ---- Eric. ======================================================================= 13 === Date: Tue, 14 Dec 1993 05:21:16 GMT From: Bob Hathaway Subject: Comp.Object FAQ Version 1.0.5 (12-13) Announcement This announces the December version 1.0.5 of the Comp.Object FAQ! It has many updates and corrections and has several very up-to-date appendices on object- oriented methodologies and systems. While a new section on miscellaneous commercial systems and libraries is still in the works for completeness, this document may very well comprise the latest and most up-to-date collection of object-oriented systems and terms in the world today! There is also a potential upcoming merge with the new C++ Libraries FAQ. New noteworthy additions are the OO methodologies and OOA/OOD sections and ever expanding appendices. Future FAQs will contain a diff file. The FAQ is updated and posted monthly. Comments, suggestions, additions, updates, and new systems and site entries should be sent to rjh@geodesic.com. The FAQ is posted to the comp.object, comp.answers and news.answers newsgroups and is available via anonymous ftp from zaphod.uchicago.edu and rtfm.mit.edu, although new versions may take a short period of time to be installed. Anonymous FTP Sites and Hypertext Server: anonymous@zaphod.uchicago.edu:/pub/comp.object-faq.1.0.5(.Z) (128.135.72.61) anonymous@rtfm.mit.edu:/pub/usenet/comp.object/*_Part_* http://cui_www.unige.ch/OSG/FAQ/OO-FAQ/index.html Mail Server: (See also section 1.24) mail mail-server@rtfm.mit.edu Subject: send usenet/comp.object/* Zaphod is preferred over rtfm for anonymous ftp retrieval, as it provides a single file. Rtfm contains the FAQ as posted. To use the hypertext system, see APPENDIX E, entries 27. Again, a short period of time may be required to retrieve the latest version, allowing the posted version to propagate and get out as quickly as possible. Thank you to the many people who have contributed their time and effort into helping this document spread the word about object-oriented technology and available systems! It is hoped it will be most useful in that endeavor. Best Regards! bob ======================================================================= 14 === Date: 16 Dec 1993 18:55:02 GMT From: sims@gehrig.world (david sims) Subject: Seeking online copy of "Modula-3 Report (revised)" I'm looking for an online copy, postscript preferred, of "Modula-3 Report (revised)" by Cardelli et al. I have a hardcopy but I need an online copy too. Can someone send it to me or tell me where I can get it? It's not on gatekeeper. Thanks in advance. -- David L. Sims Department of Computer Science sims@cs.ucr.edu University of California +1 (909) 787-6437 Riverside CA 92521-0304 PGP encryption key available on request. USA -- David L. Sims Department of Computer Science sims@cs.ucr.edu University of California +1 (909) 787-6437 Riverside CA 92521-0304 PGP encryption key available on request. USA ======================================================================= 15 === Date: Thu, 16 Dec 93 18:32:07 MST From: shawnmac@vapsys.ersys.edmonton.ab.ca (Shawn MacIntyre) Subject: M# for OS/2 ? Is there any where I can get modual 3 for OS/2? or for DOS? Shawn -------------------------------------------------------------------------- | Shawn Douglas MacIntyre | Voice +1-403-349-6620| | Internet shawnmac@vapsys.ersys.edmonton.ab.ca | BBS +1-403-349-????| | SpiderNet 222:1003/0 |------------------------| Mail: | | IMEx 89:704/103 | "How Big Is Life?" | P.O. Box 1323 | | WorldNet 62:3200/667 | "Can It Ride Like The | Westlock, AB, Canada | | RPGNet 100/1403/7 | Butterfly?" | T0G 2L0 | -------------------------------------------------------------------------- ======================================================================= 16 === Date: Mon, 20 Dec 93 14:24:35 EST From: Geoff.Wyant@East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) Subject: Question on disk file writers If I have a file stream open on a disk file and I have specified no buffering, does the underlying disk file writer set the 'O_SYNC' flag to ensure that each write does not complete until the file contents have been updated ? Put another way, if I want that behavior, is there a way that I can achieve it ? thanks ! --geoff Geoff Wyant Geoff.Wyant@east.sun.com Sun Microsystems Laboratories, Inc. 2 Elizabeth Drive Chelmsford, Ma. 01824 ======================================================================= 17 === Date: Mon, 20 Dec 93 17:14:35 EST From: Geoff.Wyant@East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) Subject: Question on Pkl implementation In trying to track down a bug in using Pkl, I came across this suspicious looking code in Pkl.Write: Wr.PutString (s.wr, LOOPHOLE(Version, Integer)); Where version is defined as a constant with the value 1. Pkl.Read does the following when reading back the pickle header: version := GetInt (s); Where GetInt is defined as: len := Rd.GetSub (s.rd, val); <* ASSERT len = BYTESIZE (INTEGER) *> RETURN LOOPHOLE (val, INTEGER); The particular bug I am trying to track down is version mismatch when reading back a pickle created microseconds before. Is looking at these particular pieces of code with suspicion just a red-herring on my part ? Thanks ! --geoff ======================================================================= 18 === Date: 21 Dec 1993 19:22:06 GMT From: sims@gehrig.ucr.edu (david sims) Subject: Shared libraries for Sun-Sparc M3 compiler? I've installed DEC SRC Modula-3 on our collection of Sun SPARC's. I know there's a patch out there that allows the SPARC shared libraries to be used, thereby greatly reducing executable program size. Would someone send me that file, or whatever it is, to let me use Sun shared libraries? I'm using M3 in a class starting in January and there will be problems with students' disk quotas otherwise. Thanks for the help. -- David L. Sims Department of Computer Science sims@cs.ucr.edu University of California +1 (909) 787-6437 Riverside CA 92521-0304 PGP encryption key available on request. USA ======================================================================= 19 === Date: Wed, 22 Dec 1993 10:01:07 GMT From: pr@cl.cam.ac.uk (Peter Robinson) Subject: Re: Shared libraries for Sun-Sparc M3 compiler? We provide shared libraries by adding the following to our local.tmpl file which is #include'ed at the end of toplevel.tmpl for m3make: /*------- Local Definitions -------*/ M3VERSION = 2.11 /*------ Shared Library Stuff ------*/ #ifdef TARGET_SPARC #define sharedLibrary(name) @@\ all:: lib##name.a @@\ clean:: ; rm -f lib##name.a lib##name.ax lib##name.so.$(M3VERSION) @@\ lib##name.a: FRC; $(DO_M3) -X1@-PIC@ -Y3@$(LIB_USE)/ld-so@$(M3VERSION)@ \ -Y4@touch@ -a lib##name.a $(PGM_SOURCES) $(IMPORT_LIBS) #define SharedLibrary(name) @@\ install:: @@\ INSTALL (lib##name.so.$(M3VERSION), $(LIB_INSTALL), 775) @@\ INSTALL (lib##name.ax, $(LIB_INSTALL), 664) @@\ touch $(LIB_INSTALL)/lib##name.a @@\ sharedLibrary(name) #else #define sharedLibrary(name) library(name) #define SharedLibrary(name) Library(name) #endif The ld-so script is just: #!/bin/csh -f set argv[2]=$2:r.so.$1 # change .a to .so.M3VERSION set argv[1]=-o /bin/ld -assert pure-text $* exit $status You then have to plough through all the m3makefiles replacing Library by SharedLibrary and rebuild. You can almost hear the disc drives sigh with relief as Hello World shrinks to a tenth of its former size. Acknowledgements to David Goldberg at PARC for the original mechanism and to Olly Stephens here for gift wrapping it. - Peter Robinson. University of Cambridge Telephone: +44 223 33 4637 Computer Laboratory Facsimile: +44 223 33 4678 New Museums Site Telex: via 81240 CAMSPL-G Pembroke Street Cambridge CB2 3QG England E-mail: pr@cl.cam.ac.uk ======================================================================= 20 === Date: Wed, 22 Dec 1993 13:46:44 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Shared libraries for Sun-Sparc M3 compiler? In ftp.vlsi.polymtl.ca:/lude/modula3-2.11 (which goes into our /usr/local/modula3-2.11) you will find the original distribution under src/orig, the local modifications to obtain shared library in src/poly and all the binaries in run/poly/sun4.1_sparc/bin, lib, include... The compiler has been compiled with optimization while the libraries are available: dynamic with all debugging info, static optimized, and static with profiling information. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 21 === Date: 22 Dec 1993 14:16:05 GMT From: mead@bucknell.edu (Jerry Mead) Subject: Re: Shared libraries for Sun-Sparc M3 compiler? In article 93Dec21112207@gehrig.ucr.edu, sims@gehrig.ucr.edu (david sims) write s: >..... >..... I'm using M3 in a class starting in January and >there will be problems with students' disk quotas otherwise. > >-- >David L. Sims Department of Computer Science >sims@cs.ucr.edu University of California >+1 (909) 787-6437 Riverside CA 92521-0304 >PGP encryption key available on request. USA I would be interested in how Modula3 is being used in undergraduate courses. In particular, a short description of the course and what, if any, texts or supporting materials are being used. I will summarize replies I receive. jerry PS - In "forwarding" a couple of postings to our system administrator I think I inadvertantly selected "post followup" rather than "forward". Appologies for the clutter. --------------------- Jerry Mead Dept of Computer Science Bucknell University Lewisburg, PA 17837 mead@bucknell.edu ======================================================================= 22 === Date: 22 Dec 1993 14:04:18 GMT From: mead@bucknell.edu (Jerry Mead) Subject: Re: Shared libraries for Sun-Sparc M3 compiler? Mike I saw the following message on the Modula3 news list. Can the patch in the second message be applied to our system or does it need the more recent version of Modula3? Whatever, the patch sounds like a good idea - it should be saved unti l the new version of Modula3 is obtained. jerry ------------------------------ In article 93Dec21112207@gehrig.ucr.edu, sims@gehrig.ucr.edu (david sims) write s: >I've installed DEC SRC Modula-3 on our collection of Sun SPARC's. I >know there's a patch out there that allows the SPARC shared libraries >to be used, thereby greatly reducing executable program size. > >Would someone send me that file, or whatever it is, to let me use Sun >shared libraries? I'm using M3 in a class starting in January and >there will be problems with students' disk quotas otherwise. > >Thanks for the help. >-- >David L. Sims Department of Computer Science >sims@cs.ucr.edu University of California >+1 (909) 787-6437 Riverside CA 92521-0304 >PGP encryption key available on request. USA In article 13119@infodev.cam.ac.uk, pr@cl.cam.ac.uk (Peter Robinson) writes: >We provide shared libraries by adding the following to our local.tmpl file >which is #include'ed at the end of toplevel.tmpl for m3make: > >/*------- Local Definitions -------*/ > >M3VERSION = 2.11 > >/*------ Shared Library Stuff ------*/ > >#ifdef TARGET_SPARC > >#define sharedLibrary(name) @@\ >all:: lib##name.a @@\ >clean:: ; rm -f lib##name.a lib##name.ax lib##name.so.$(M3VERSION) @@\ >lib##name.a: FRC; $(DO_M3) -X1@-PIC@ -Y3@$(LIB_USE)/ld-so@$(M3VERSION)@ \ >-Y4@touch@ -a lib##name.a $(PGM_SOURCES) $(IMPORT_LIBS) > >#define SharedLibrary(name) @@\ >install:: @@\ > INSTALL (lib##name.so.$(M3VERSION), $(LIB_INSTALL), 775) @@\ > INSTALL (lib##name.ax, $(LIB_INSTALL), 664) @@\ > touch $(LIB_INSTALL)/lib##name.a @@\ >sharedLibrary(name) > >#else > >#define sharedLibrary(name) library(name) >#define SharedLibrary(name) Library(name) > >#endif > >The ld-so script is just: > >#!/bin/csh -f > >set argv[2]=$2:r.so.$1 # change .a to .so.M3VERSION >set argv[1]=-o > >/bin/ld -assert pure-text $* >exit $status > >You then have to plough through all the m3makefiles replacing Library by >SharedLibrary and rebuild. You can almost hear the disc drives sigh with >relief as Hello World shrinks to a tenth of its former size. > >Acknowledgements to David Goldberg at PARC for the original mechanism and >to Olly Stephens here for gift wrapping it. > >- Peter Robinson. > > University of Cambridge Telephone: +44 223 33 4637 > Computer Laboratory Facsimile: +44 223 33 4678 > New Museums Site Telex: via 81240 CAMSPL-G > Pembroke Street > Cambridge CB2 3QG > England E-mail: pr@cl.cam.ac.uk --- --------------------- Jerry Mead Dept of Computer Science Bucknell University Lewisburg, PA 17837 mead@bucknell.edu ======================================================================= 23 === Date: 22 Dec 1993 10:16:08 -0800 From: omalley@porte-de-st-ouen.ics.uci.edu (T. Owen O'Malley) Subject: Re: Shared libraries for Sun-Sparc M3 compiler? In <2f9kr5$2le@coral.bucknell.edu> mead@bucknell.edu (Jerry Mead) writes: >I would be interested in how Modula3 is being used in undergraduate courses. >In particular, a short description of the course and what, if any, texts or >supporting materials are being used. I will summarize replies I receive. Here at University of California, Irvine, we have used Modula-3 for the undergratuate software engineering project class. Overall it went pretty well, but the lack of a reasonable debugger was one of the bigger problems. One of the teams had some problems getting Motif to work well with a threaded application, but generally they liked it. The class is traditionally taught with Ada and the students did not mind the change. (On a side note, it did drastically increase my flow of email for a few weeks! *Smile*) Owen Department of ICS | omalley@ics.uci.edu (ARPA) UC Irvine | {ucbvax|sdcsvax}!ucivax!omalley (UUCP) Irvine, CA 92717 | oomalley@uci (BITNET)