Archive-name: computer-lang/Modula2-faq/part2
Version: 2.6
Last-modified: 1996 10 23
Posting-frequency: Monthly

***************************************************


4. WHERE CAN I GET SOURCE CODE, OTHER INFO?

4.1.1 Is there source or other info available on the net?
A. Here are some net sites I have accessed at one time or another. I am not sure if all are still available or what is in them.
  ftp://ee.newcastle.edu.au/pub/modula2/
  ftp://ftp.psg.com/pub/modula-2/
  ftp://FTP.twu.ca/pub/modula2/m2faq.html ( Home of this FAQ)
  ftp://ftp.inf.ethz.ch/pub/
  ftp://NIC.SWITCH.CH
  ftp://sageftp.inel.gov/ftp/pub/sage/
  ftp://ftp.mathematik.uni-ulm.de/pub/soft/modula/
  http://www.yahoo.com/Computers/Languages/Modula_2/

http://www.jumbo.com/prog/dos/modula2/

WWW sites
http://www.stfx.ca/people/jandrea/m2/  http://www.info.apple.com/dev/devinfo/languages.html (sparse M2 compiler info)
http://i44www.info.uni-karlsruhe.de/~vollmer/mocka.html
http://www.dct.com/~johnm/M2info.html

http://www.ualberta.ca/~pkobly/

http://www.pitt.edu/~jesst63/modula2.html

4.2 What other FAQs or lists of pages are available.
A. Try  http://www.ee.newcastle.edu.au/users/staff/peter/m2/Modula2.html
A2. http://www.stfx.ca/people/jandrea/m2/
A3. (commercial) http://www.dct.com/~johnm/M2info.html
A4. http://www.ualberta.ca/~foka/Computer.html#Modula-2

A5. http://www.pitt.edu/~jesst63/modula2.html

A6. http://www.ualberta.ca/~foka/Computer.html#Modula-2

4.3  Where can I find graphics libraries, etc?
A1. Try the PMOS library at
  <A HREF="http://www.ee.newcastle.edu.au/users/staff/peter/m2/PMOS/PMOS.html
">http://www.ee.newcastle.edu.au/users/staff/peter/m2/PMOS/PMOS.html
 (Australia)
   or, at one of the following sites:
  ftp://ftp.psg.com/pub/modula-2/code  (North America)
  ftp://cs.ru.ac.za/pub/languages   (South Africa)
  ftp://dutiba.twi.tudelft.nl/pub/modula2   (Western Europe)
  ftp://ftp.cnit.nsk.su/pub/msdos/programm.ing/modula2   (Eastern Europe).

A2. there is a graphics library MultiGraph available through the MultiGraph home page at
http://www.ccas.ru/~iak/mg2.htm
  It supports nearly all the Super-VGA graphics modes on VESA-compatible
graphics boards, including high-color and true-color modes.
You may also contact
   Databiten AB
   P O Box 115
   811 22 Sandviken
   SWEDEN
   phone: +46 26 256493
   fax:   +46 26 253641
OR
   Department of Applied Acoustics
   Chalmers University of Technology
   Gothenburg, SWEDEN
   e-mail: bid@ta.chalmers.se
   fax : +46 31 145154
OR
   Alex Iakovlev
   Computing Center of the Russian Academy of Sciences
   40, Vavilov Street, Moscow, GSP-1, 117967, Russia
   mailto:iak@ccas.ru


4.4 Are there any mathematical libraries available?
A1. See Numerical Procedures in Modula-2 -- authorized translation of Numerical recipes in Pascal from PolyWare 1992 420 Ruston Rd Toronto, Ontario Canada

A2. A numerical analysis package (as Modula-2 source files) is now available.  Information can be found at: http://www.ee.newcastle.edu.au/users/staff/peter/m2/NumAnal.html
From this point one can download a classical (PIM) version or a standard (ISO) version.

The modules in this package are:
    Complex arithmetic: most of the usual operations, including the
         recently-requested SIN and COS.
    Matrices: operations on matrices of any size (up to a maximum
         size limit, of course) - things like addition, multiplication,
         inverse, solving linear equations, eigenvalues.
    Polynomials: including root-finding.
    Fast Fourier Transform.
    Solving ordinary differential equations.


4.5  Where can I get a Modula-2 to C converter?
A: The program mtc is available by anonymous ftp from
  file://ftp.psg.com/pub/modula-2/grosch/mtc.tar.Z
  file://ftp.ira.uka.de/pub/programming/cocktail/mtc.tar.Z
  file://rs1.rrz.uni-koeln.de/usenet/comp.archives/languages/modula-2/mtc
    An already ported version for DOS+DJGPP can be found at at
  file://ftp.uni-stuttgart.de/pub/unix/programming/compilerbau/dos/mtc/
    Apparently there is an already ported Linux version too.  I could not find the correct file reference myself, but try looking at a Linux mirror site such as sunsite.unc.edu.
    Several of the compilers available work by producing C code and can also serve this purpose. See p1 and XDS listings.


4.6  Where can I get a Modula-2 to Modula-3 converter?
A. m2tom3 is available under the terms of the GNU Library General Public
License from
ftp://ftp-i3.informatik.rwth-aachen.de/pub/Modula-3-Contrib/m2tom3/
   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.
  contact: Peter Klein
  office:  Ahornstrasse 55, 52074 Aachen, Germany
  e-mail:  pk@i3.informatik.rwth-aachen.de.
  Tel.: +49/241/80-21316
  Fax.: +49/241/8888-218


4.7 Are there any Modula-2 applications around?
A. The Idaho National Engineering Laboratory (INEL) develops and maintains a now ~350,000 line public domain MODULA-2 reusable component library called SAGE. For more information on SAGE send E-Mail to hotline@sage.inel.gov and see the FTP server at ftp://sageftp.inel.gov/ftp/pub/sage/


4.8 Is there a Modula-2 version available for parallel processing?
A. IPD Modula-2* team has released version 9401 of the new Modula-2* programming environment for several architectures.
You can get the IPD Modula-2* distributions for all supported architectures by anonymous ftp from ftp://ftp.ira.uka.de/pub/programming/modula2star/ 
Please do not forget to use binary mode when retrieving any of them! Register your copy with the registration secretary: ipdm2s@ira.uka.de For further information and bug reports please contact the IPD Modula-2* team at msc@ira.uka.de


4.9 Are there any compiler construction tools available?
A1. Some old ones appear in ftp://ftp.gmd.de/GMD/cocktail/

AA2. Coco/R generates recursive descent parsers and their associated scanners from attribute grammars.  Full source code, and a variety of simple example applications are supplied in the distribution kits.  The Modula versions (1.39 is the latest) are available from
ftp://ftp.inf.ethz.ch:/pub/software/Coco
ftp://ftp.psg.com:/pub/modula-2/coco
ftp://cs.ru.ac.za:/pub/coco
ftp://ftp.fit.qut.edu.au:/pub/coco
There are versions for the MS-DOS compilers (JPI, FST, Logitech, StonyBrook, Gardens Point), for the Mocka compiler for Linux and FreeBSD, as well as for the Gardens Point Unix compilers, including Linux and FreeBSD.  There is also a version that produces TurboPascal units very similar to the Modula modules. A port for the P1 compiler on the Mac should be available soon.  A port by Rolf Schrader for TDI Atari Modula-2 is now available from
ftp://cs.ru.ac.za:/pub/coco/ATARI136.EXE  in the form of an MS-DOS self-extracting file.  This may also be unpacked by using the LHA decompressor on other systems.

A2. A copy of the EBNF for ISO Modula-2 can be found in
http://www.twu.ca/faculty/fnas/math/rsbook/Appendices/Ap3.nisus.html


4.10 Does anyone know of a lexical analysis tool that is written in Modula-2 and for Modula-2 code?
A.You want rex, part of Cocktail (also ll and lalr parser generators, abstract syntax trees, attribute grammar evaluators, tree  Free version:

ftp://ftp.ira.uka.de:/pub/programming/cocktail/

  ftp://ftp.uni-stuttgart.de/pub/unix/programming/compilerbau/  (includes a dos version using DJGPP)

 Commercial version and support:
  Dr.-Ing. Josef Grosch        Tel.  : 0721-697061
  CoCoLab                      Fax   : 0721-661966
  Hagsfelder Allee 16          EMail : grosch@cocolab.sub.com
  D-76131 Karlsruhe


4.11 What can you tell me about debuggers?
A. For gnu, try http://www.cis.ohio-state.edu/htbin/info/info/gdb.info,Modula-2

4.12 Is there an applications framework for Windows programming?
A. Try looking at 
ftp://ftp.ifi.uio.no/pub/sjr/m2afx.zip orftp://ftp.leo.org/pub/comp/platforms/pc/windows/programming/modula/m2afx.zip

This software is an application framework that implements a number of classes that encapsulate the weirdness of the Windows C API and attempts to present it in a cleaner way to the Modula-2 programmer.

4.13 Does there exist something to convert a C header file to a Modula-2 DEFINITION MODULE file for me?
A. Try looking at the xTech Ltd site for the H2D freeware product on some platforms
<A
4.14 Is there any Benchmark code out there?
A. Try looking at the xTech Ltd site for their benchmark suite.
ftp://ftp.iis.nsk.su/pub/xds/bench.zip

ftp://ftp.dct.com/pub/pmi/bench.zip



4.15 Can you help me with my assignments?
A. Some people may give you hints, but please do not subvert your professor and your education by submitting work other people do for you.

***************************************************

5. SPECIFIC QUESTIONS ON CODE AND ALGORITHMS

5.1 Where can I get an algorithm for an efficient random number generator?
A1. Pierre L'Ecuyer: Efficient and Portable Combined Random Number Generators, Communications of the ACM, vol. 31, no. 6, pp. 742-749. The RNG has a period of approximately 2.3E+18. Generating 1 000 000 numbers per second, that means that it would take over 73 000 years before it repeated a sequence.

A2.Have a look at
http://www.pitt.edu/~jesst63/modula2.html

***************************************************

6. WHAT ARE SOME REFERENCE MATERIALS ON MODULA-2?

A1. A shareware text I have written is available as html in
http://www.twu.ca/faculty/fnas/math/rsbook/Welcome.html
mirrors: http://eiunix.tuwien.ac.at/Modula-2/rsbook/
and as postscript in ftp://FTP.twu.ca/pub/modula2/Modula-2Text/Chapters.ps/

A2. A tutorial is available at the Jumbo site in
http://www.jumbo.com/prog/dos/modula2
A3.The manuals for some of the commercial products such as TopSpeed contain much useful information.

A4. The Gardens Point sites have documentation available (see their listing above.)

A5. A document called Modula-2 for Pascal programmers (Postscript,10 pages) may be fetched by anonymous ftp at  ftp://ee.newcastle.edu.au/pub/modula2/Modula2.ps.Z
The author has not updated the contents for a couple of years, so there may be minor inaccuracies in terms of the current language standard.

A6. A variety of ETH papers are stored at ftp.ftp.ethz.ch in /doc/diss, /doc/tech-reports and /pub/oberon/docu

A7. What follows is a BIBLIOGRAPHY of some published materials in a table delimited by two spaces between fields:

Author  Title  City  Publisher  Year  Subject

	Adams, J. Mack Gabrini, Philippe J & Kurtz, Barry L.  An Introduction to Computer Science with Modula-2  Lexington, MA  D.C. Heath & Co  1988
	Backhurst, Nigel G.  Mastering Modula 2  Wilmslow  Sigma  1988
	Beidler, John & Jackowitz, Paul  Modula-2  Boston  Prindle Weber & Schmidt  1985
	Blaschek, G. & Pomberger, G.  Introduction To Programming With Modula-2   Springer-Verlag  1990
	Budgen, David  Software Development with Modula-2  Reading, MA  Addison-Wesley  1989
	Carmony, Lowell A. & Holliday, Robert L.  A First Course In Modula-2  New York  Computer Science Press  c1990
	Carroll, D. W.  Advanced Modula-2 Programming for the IBM PC  XT and AT  Elsevier  1986
	Chirlian, Paul M.  Introduction to Modula-2  Beaverton, Or.  Matrix Publishers
	Christian, Kaare  A guide to Modula-2  New York  Springer-Verlag  1986
	Cooling, J.E.  Modula-2 for Microcomputer Systems    Van Nostrand Reinhold  1988
	Cooper, Doug  Oh My!  Modula-2!  New York  Norton  1990
	Cornelius, Barry  Programming with TopSpeed Modula-2  Reading, MA  Addison Wesley  1991
	Eisenbach, Susan & Sadler, Cristopher  Program Design with Modula-2  Reading, MA  Addison-Wesley  1989
	Elder, Jim   Compiler Construction: A Recursive Descent model  Hemel Hempstead  England:  Prentice-Hall  1994
	Etling, Don  Modula-2 Programmer's Resource Book  Blue Ridge Summit, PA  Tab Books  1988
	Feldman, Michael B.  Data Structures with Modula-2  Englewood Cliffs, NJ  Prentice Hall  1988
	Ford, Gary & Wiener, Richard.  Modula-2: A Software Development Approach  New York  Wiley  1985
	Gabrini, Philippe J. & Kurtz, Barry L.  Data Structures And Algorithms With Modula-2  Lexington, MA  DC Heath  c1992
	Gleaves, Richard  Modula-2 for Pascal Programmers  New York  Springer-Verlag  1984
	Gough, K. John & Mohay, George M.  Modula-2: A Second Course In Programming  Englewood Cliffs, NJ  Prentice Hall  1988
	Greenfield, Stuart B.  Invitation to Modula-2    Petrocelli Books  1985
	Harrison, Rachael  Abstract Data Types in Modula-2  New York  Wiley  1989 Wiley
	Harter, Edward D.  Modula-2 Programming.  A First Course  Englewood Cliffs, NJ  Prentice-Hall  1990
	Helman, Paul & Veroff, Robert  Walls and Mirrors: Intermediate Problem Solving and Data. Modula-2  Menlo Park, CA  Benjamin Cummings  1988
	Hewitt, Jill A. & Frak, Raymond J.  Software Engineering in Modula-2:  an object-oriented approach   London  Macmillan  1989.
Hille, R.F.  Data Abstraction and Program Development Using Modula-2  Sydney  Prentice Hall  1989
	Hopper, Keith.  The Magic of Modula-2  Melbourne  Prentice Hall  1991
	Johnston, Chris  Applying Modula-2   Academic Press  1991 
	Jones, William C. Jr.  Data Structures Using Modula-2  New York  Wiley  1988
	Jones, William C. Jr.  Modula-2 Problem Solving and Programming with Style  New York  Harper & Row  1987
	Joyce, Edward J.  Modula-2: A Seafarer's Manual & Shipyard Guide  Reading, MA  Addison-Wesley   1985
	Kaplan, Ian & Miller, Mike  Modula-2 Programming  Rochelle Park, NJ  Hayden Book Co.  1986
	Kelly-Bootle, Stan  Modula-2 Primer    Howard W. Sams & Co.  1987
	King, K.N.  Modula-2: A Complete Guide  Lexington, MA  D.C. Heath & Co  1988
	Knepley, Ed & Platt, Robert  Modula-2 Programming  Reston, VA  Reston Pub. Co.  1985
	Koffman, Elliot B.  Problem Solving and Structured Programming in Modula-2  Reading, MA  Addison-Wesley  1988
	Kruse, Robert L.  Programming With Data Structures Modula-2 Version   Englewood Cliffs, NJ  Prentice-Hall  1988
	Lawrence, Mike  Modula-2 And The Amiga  Avant-Garde Software  1990?
	Leestma, Sanford & Nyhoff, Larry  Programming & Problem-Solving in Modula-2  New York  Macmillan  1989
	Lins, C. (Charles)  The Modula-2 Software Component Library Volumes I-IV  New York  Springer-Verlag  1989-
	Mayer, Herbert G.  Programming in Modula-2.  the Art & the Craft  New York  Macmillan  1988
	McCracken, Daniel D. & W. Salmon  A Second Course in Computer Science with Modula-2  New York  Wiley  1987
	Messer, P. A. & I. Marshall  Modula-2 Constructive Program Development  Oxford  Blackwell Scientific Publications  1986
	Metrowerks, Inc. Staff  Metrowerks Modula-2 Start Pak  New York  Macmillan  1990
	Mitchell, R. J.  Modula-2 Applied   London  Macmillan  1991
	Mitchell, Richard  Abstract Data Types And Modula-2  A Worked Example Of Design Using Data Abstraction   Englewood Cliffs, NJ  Prentice Hall  1992
	Moore, John B. & McKay, Kenneth N.  Modula-2 Text and Reference  Englewood Cliffs, NJ  Prentice-Hall  1987
	Novak, M.M.  Modula-2 in Science & Engineering  London  McGraw  1990
	Nyhoff, Larry & Leestma ,Sanford  Data Structures & Advanced Programming in Modula-2  New York  Macmillan  1990
	Ogilvie, John W. L.  Modula-2 Programming  New York  McGraw-Hill  1985
	Pinson, Lewis Sincovec, Richard & Weiner, Richard  A First Course in Computer Science with Modula-2  New York  Wiley  1987
	Pittman, Thomas & Peters, James  The Art Of Compiler Design Theory And Practice  Englewood Cliffs, NJ  Prentice-Hall  1992
	Pomberger, Gustav.   Software Engineering and Modula-2  Englewood Cliffs, NJ  Prentice Hall  1984
	Rechenberg, P. & Mssenbck, H. (tr. O'Meara, John)  A Compiler Generator for Microcomputers  Englewood Cliffs, NJ  Prentice Hall / Carl Hanser Verlag  1989
	Riley, David D.  Data Abstraction and Structures: An Introduction To Computer Science II  Boston  Boyd & Fraser Pub. Co.  1987
	Riley, David D.  Using Modula-2: An Introduction To Computer Science I  Boston  Boyd & Fraser Pub. Co.  1987
	Sale, Arthur H. J.  Modula-2: Discipline & Design  Sydney  Addison-Wesley  1986
	Sawyer, Brian & Foster, Dennis.   Programming Expert Systems in Modula-2  New York  Wiley  1986
	Schildt, Herbert  Advanced Modula-2  Berkeley, CA  Osborne McGraw-Hill  1987
	Schildt, Herbert  Modula-2 Made Easy  Berkeley, CA  Osborne McGraw-Hill  1986
	Schiper, Andre; (tr. Howlett, Jack)  Concurrent programming: Illustrated With Examples in Portal, Ada, and Modula-2    Halsted Press  1989
	Schnapp, Russell L.  Macintosh Graphics in Modula-2  Englewood Cliffs, NJ  Prentice-Hall  1986
	Sincovec, Richard F. & Richard S. Wiener.   Data Structures Using Modula-2  New York  Wiley  1986
	Sincovec, Richard F. & Wiener, Richard S.  Modula-2 Software Components  New York  Wiley  1987
	Stubbs, Daniel F. & Webre, Neil W.  Data Structures With Abstract Data Types and Modula-2  Monterey, CA  Brooks/Cole Pub. Co.  1987
	Sutcliffe, Richard J.  Introduction to Programming Using Modula-2  Columbus, OH  Merrill  1987
	Sutherland, Robert J.  The Professional Programmer's Guide to Modula-2  London  Pitman  1988
	Terry, Patrick D.  An Introduction To Programming with Modula-2  Reading, MA  Addison-Wesley  1987
	Thalmann, Daniel  Modula-2: An Introduction  New York  Springer-Verlag  1985
	Tremblay, Jean-Paul DeDourek, John M. & Daoust, David A.  Programming in Modula-2  New York  McGraw-Hill  1989
	Tucker, Allen B. Jr.  Computer science: A Second Course Using Modula-2  New York   McGraw-Hill  1988
	Ullmann, Jeffrey  Compiling in Modula-2 - A First Introduction To Classical Recursive Descent Compiling   Hemel Hempstead  England: Prentice-Hall  1994
	Ural, Saim & Ural, Suzan  Introduction to Programming with Modula-2  New York  Harper & Row  1987
	Walker, Billy K  Modula-2 Programming With Data Structures  Belmont, CA  Wadsworth Pub. Co.  1986
	Walker, Robert D.  Modula-2 Library Modules: A Programmer's Reference  Blue Ridge Summit, PA  Tab Books  1988
	Ward, Terry A.  Advanced Programming Techniques in Modula-2  Glenview, IL  Scott Foresman  1987
	Welsh, Jim & Elder, John  Introduction to Modula-2  Englewood Cliffs, NJ  Prentice-Hall  1987
	Wiatrowski, Claude A. & Wiener, Richard S.  From C to Modula-2--and Back - Bridging The Language Gap  New York  Wiley
	Wiener, Richard  Modula-2 Wizard's Programming Reference  New York  Wiley  1986
	Wiener, Richard & Ford, G.  Modula-2 A Software Development Approach  New York  Wiley  1985
	Wiener, Richard & Sincovec, R. F.  Software Engineering with Modula-2 and Ada  New York  Wiley  1984
	Willis, Claire & Paddon, Derek  Abstraction And Specification With Modula-2  London  Pitman  1992
	Wirth, Niklaus  Programming in Modula-2 (3rd corrected ed.)  New York  Springer-Verlag  1985
	Wirth, Niklaus  Algorithms and Data Structures (1986 edition)  Englewood Cliffs, NJ  Prentice-Hall  1986
	Wirth, Niklaus  Programming in Modula-2 (4th ed.)   New York  Springer-Verlag  1990
	Woodman, Mark et al  Portable Modula-2 Programming  Maidenhead, Berkshire UK  McGraw-Hill  1989

7. REVIEWS OF MODULA-2 PRODUCTS.

Note: The reviews have been contributed by others and I take no responsibility for their accuracy or for any opinions expressed therein. I have updated some of the facts.

p1 Modula-2 v5.2 for Macintosh, by Marc Martin, Dec 1994.This is an excellent Modula-2 compiler, implemented as an MPW Tool. Highlights include ISO language extensions & library, a full set of Macintosh toolbox definitions, language extensions to simplify toolbox programming, object-oriented extensions and support for MacApp, greater than 32k code and globals, code generation comparable to Apple's official compilers, several FPU code options, multi-window debugger, linkable with other MPW languages, detail
ed documentation, and superb technical support via e-mail. Downsides include high cost (US$400), dependency on MPW, lack of SADE support, and no native PowerPC version. Version 5.3 is in alpha testing, and adds ANSI C output for creating PowerPC programs under MPW or CodeWarrier.  (Now at 5.4 and still no native PC back end -RS) 

GPM, MOD32, TopSpeed and XDS are reviewed at http://www.eng.newcastle.edu.au/ee/Moylan/os2/os2m2.html

Appendix: AUTHOR INFORMATION AND DISCLAIMERS

Personal: I have used, written about, and taught Modula-2 (since 1983) and have maintained some of the information in this list for over six years. I have used at least a dozen different compiler/environments in that time on five different platforms, and have written numerous articles and reviews for publication. I have been a member of the ISO committee WG13 (Modula-2 standardization) since its inception and have participated in all the debates and meetings of WG13 except for meeting #9 at Lake Wanaka. I 
have written a text on Modula-2 (now shareware), made numerous submissions to WG13 and directed an experimental implementation of the ISO I/O library in order to verify its concepts. I am the author and project editor of Standard Generic Modula-2.

Disclaimers:
(i) I take no responsibility for anyone's use or misuse of this information.
(ii) Apart from having been a beta tester, textbook writer, programmer and a long time user of Modula-2, I have no financial connection with any manufacturer or distributor of software. I am the author of some Modula-2 materials (some of which are shareware) as noted herein.
(iii) In producing this material, I am NOT acting in an official capacity for TWU, WG13, comp.lang.modula2, or any other organization.
(iv) Mention of a book or product is NOT an endorsement unless specifically noted.
(v) Inclusion of materials on this list is based on relevance to Modula-2 and factual content and is otherwise entirely without prejudice. I edit all submissions for brevity, clarity, and usage.

To remain authoritative, this and all versions of this FAQ are copyright 1991-1996 by Rick Sutcliffe. This document may be copied and distributed provided it is not altered and no fee is charged with the exception of normal downloading costs.

Compiled by:
Rick Sutcliffe (aka The Northern Spy in the old days)
Trinity Western University
7600 Glover Rd.,
Langley, B.C. Canada V2Y 1Y1
(604) 888-7511 Fax 888-1225 mailto:rsutc@twu.ca



Rick Sutcliffe Math/Cmpt Trinity Western University <http://www.twu.ca/>
CDN Chair WG13, FAQ maintainer comp.lang.modula-2
<http://www.twu.ca/faculty/fnas/rsutcliffe.html> <Not speaking officially>


