The ModulaTor logo 7KB

The ModulaTor

Oberon-2 and Modula-2 Technical Publication

The ModulaTor
Erlangen's First Independent Modula-2 Journal! Nr. 0/Jul-1990 

Random Modula-2 News 

by Guenter Dotzel, ModulaWare 

1. A colored Modula-2 Syntax Poster (size 120cm * 60cm) designed by the 
ACM-Student-Chapter of the Computer Science Dept., San Francisco State University, 
SF, CA 94132 can be ordered directly from SFSU for US$14.- each or US$30.- for three. 
Pricing includes shipping cost. 

2. A new international journal: Structured Programming, ISSN 0935-1183, Title No. 
378, Managing Editor: Gustav Pomberger, editorial board: William B. Ackermann, 
Gerhard Goos, David Gries, Juerg Gutknecht, Robert Hood, Donald E. Knuth, Charles A. 
Lins, Steve S. Muchnick, Hausi Mueller, Richard Ohran, Niklaus Wirth. Four issues per 
year: US$ 55.- (incl. p&p) or DM 86.- plus p&p outside North Amerika (Springer-Verlag, 
Heidelberger Platz 3, D-1000 Berlin 33, FRG). Several issues have been published 
already and every issue contained an interessting article about Modula-2. 

3. Modula-2 book: There is a new book entitled "Portable Modula-2 
Programming", by M Woodman, R Griffiths, J Souter and M Davies, McGraw-Hill 
International, ISBN 007 707201 4, 512pp, price about DM 50.-. Order through your local 

Report from the First International Modula-2 Conference in Oct. 11-13., 1989 in 
Bled, Yugoslavia:

110 participants attended the conference and 30 papers on Modula-2 were presented in 
two streams. In the pre-conference workshop on "Sharing Experiences in the Use of 
Modula-2" six presentations on VRTX integration into M2 environment, M2 compiler 
design, M2 in telemetry were given. At the exhibition two Modula-2 development 
systems for Transputers were demonstrated.

In my personal view, the two most important talk was given by Niklaus Wirth, 
ETH-Zuerich, entitled "Modula-2 and Object-Oriented Programming" that included a 
comparison with his new language Oberon (B1).

The second interesting talk was by Roger Henry, University of Nottingham, about the 
"State of the ISO/IEC/BSI-Modula-2 Standard" (B2): 

The Modula-2 standardization group is active since 1984 and have had 50 meetings. 
The goal is to have an identical BSI and ISO Standard of Modula-2 by the end of 1990. 
Modula-2 will be the first language with their semantics defined in a mathematically 
rigorous manner, the VDM specification method. Compiler validation services will be 
offered by BSI. 

 The major changes in Standard Modula-2 are

 (2a) declaration of recursive procedure types (as with pointer types), where type 
 T is used in the declaration itself. Example: 


 PROCEDURE x (ch: CHAR; VAR cont: T);

 BEGIN (* . . . *) END x 

 (2b): procedure constansts: CONST WriteLn = IO.WriteLn;

 (2c): opaque types may be declared identical to another (possibly imported) 
 obaque type.

 (2d): the system dependent type transfer functions without conversion of 
 representation such as CHAR(i), where for example i is of type INTEGER can 
 now be expressed using the function procedure CAST from module 

 (2e): number conversion: VAL (REAL, i) achieves the same result as FLOAT 

 VAL (INTEGER, r) is INT (r),


 VAL (CARDINAL, r) is TRUNC (r),

 where in all cases r and i may be of signed, unsigned, real or longreal type.

 (2f): the type BITSET was moved to module SYSTEM. The qualified identifier 
 before the set constructor is no longer optional. Set constructors are allowed 
 to be a general expressions.

 (2g): structured value constructurs are introduced including a repetition count 
 reserved word "BY". Examples: 

      TYPE R = RECORD name: ARRAY[0..19] OF CHAR; score: INTEGER; END;
      CONST C = R{"James", 15};

      TYPE A = ARRAY [1..3] OF INTEGER;
        B = ARRAY [0..99] OF A;
      VAR x: INTEGER; y: A; z: B;
        y:=A{x BY 3};
        z := B{y BY 30, {0 BY 3} BY 70};
 Additionally, record designators in a WITH statement may now designate a 
 record constant.

 (2h): New instrinsic function LENGTH for strings. Furthermore literal 
 representation of control characters in strings.

 (2i): multi-dimensional open arrays with function HIGH (a), HIGH(a[0]), 
 HIGH(a[0,0]) to get the upper bound index value.

 (2j): (dynamically) protected modules: new standard identifiers (procedures) 
 PROTECTION and standard function PROT.

 (2k): Coroutine related items are moved from SYSTEM to another pseudo 
 module COROUTINES. New identifiers in SYSTEM: BITNUM, the bit number 
 type for declaration of set types with BITSET properties and LOC as a name 
 for the smallest addressable storage unit.

 (2l): Standard separate modules: Storage, Exceptions, LowReal, 
 LowLong. Separate modules: RealMath, LongMath, the I/O-Library, 
 Processes, Semaphores, Strings, Termination and possibly in the 
 future access to system clock and BCD arithmetics. 

John Souter, BSI Quality Assurance, talked about the "Position of Modula-2 among 
Programming Languages" (B3). He illustrated the current position and speculated 
about the future. The only competitors to Modula-2 are in his opinion Ada, C and Pascal. 
John compares the languages concerning safety critical aspects, standardization, and 
compiler validation.

An interesting application written in Modula-2 was presented by Brian Kirk, Robinson 
Associates: "Zen and the Art of Modular Engineering" (B4). Brian described the 
development phases of a real software product in the CNC/CAD-area that consists of 
three large programs with in total 150 modules, two Mbytes of executable code and 
unbelievable 30 Mbytes of source code. This should be a topic for the famous Guiness 
Book of Records. 

Other papers presented at the M2 Conference included

B5. object-based real-time programming (University of Calabria/Italy),

B6. M2 language extension for save object-oriented programming (ETH-Zuerich/Switzer- 

B7. multiple inheritance in M2 (ETH-Zuerich/Switzerland), 

B8. definition of objects in M2 (University of Bologna/Italy),

B9. permanent modules in M2 (University Genova/Italy), 

B10. polymorphic functions in M2 (J. Stefan Insitute, Ljubljana/Yugoslavia),

B11. re-useability in M2 (SISMAT, Genova/Italy), 

B12. M2 in distributed environment (LSI-IRIT Toulose/France), 

B13. parallel programming in M2 (GMD-Karlsruhe/FRG),

B14. parallel programming in M2 (ITC/SAS, Bratislava/Czechoslovakia),

B15. proposed M2 Standard I/O libraries (University of Nottingham/GB), 

B16. M2 and software engineering (University of Linz/Austria),

B17. presentation manager document object handler in M2 (IBM ASD Nordic Lab, 

B18. abstract data types in M2 (University Tuebingen/FRG),

B19. user interface toolkit in M2 (Modula-2 CASE Systems A/S, Oslo/Norway),

B20. M2 multi-processor environment (University of Loughborough/GB),

B21. real-time operating system in M2 (University Dresden/GDR), 

B22. access of a ISDN-Card in M2 (University of Augsburg/FRG),

B23. application of M2 in urban transportation vital control system (Matra Transport, 

B24. teaching M2 (Polytechnica di Milano/Italy), 

B25. light-weight processes in M2 (Ecole National Superieure EEHI, Toulouse/France),

B26. experiences with M2 in concurrency and fault tolerance (University of 

B27. real-time environment in M2 (Polytechnic of Wales/GB),

B28. object-oriented database programming (University of Sarajevo/Yugoslavia), 

If you are interested in obtaining the proceedings, see Chap. 6 below. 

Modula-2 for Transputers:

Here I'd like to give more details on one of the Modula-2 Transputer system from the 
Modula-2 Conference exhibition. The system consists of compiler, symbolic network 
debugger, library modules and utility programs, optional multi-window/multi-file editor 
with mouse and menu support. It reproduces the complete workstation programming 
environment for Modula-2 software development as implemented at ETH-Zuerich on the 
Lilith. All programs are invoked from a host (i.e. any MicroVAX, PC or VME system with a 
single DMA Transputer link adapter card, a serial link with 20 Mbit/s) and run on the 
Transputer(s). The compiler directly generates code for the Transputer. Source files are 
kept on the host system. File-transfer is accomplished by a server running on the host. 
Standard Modula-2 (Wirth's 3rd edition) is used for parallel programming. Parallelism is 
provided through Modula-2 library modules (e.g.: module System allows to boot a 
Transputer from a program file on the host). The main features of the system are

(a) run-time network configuration and program loading,

(b) load-linking with preemptive binding to resident modules for programs and overlays,

(c) true dynamic process spawning,

(d) server functions accessible to all processes in all processors,

(e) simultaneous execution of separate unrelated programs with optional switcher- 
 controlled program connection to keyboard, mouse and display,

(f) fully featured symbolic network debugger.

The M2 Transputer system was developed by csa/U.S.A. together with Wirth's Institut fuer 
Computersysteme at ETH-Zuerich/Switzerland. The software with all elements described 
is now available for less than US$ 1000.-. I've seen a Modula-2 program running on 33 
Transputers, that calculated and displayed in real-time the Mandelbrot set for 1024*768 
pixels with 256 iterations/colors in about two seconds. Of course the same program 
runs slower on a single transputer, but without re-compilation. 

6. The Proceedings of the First Int'l Modula-2 Conference can be obtained by sending a 
check (GB \243 20.- each) to Modula-2 (E-4), J. Stefan Institute, Jamova 39 YU-61111 
Ljubljana, Yugoslavia. The papers presented during the conference showed clearly the 
maturity and applicability of the language Modula-2 in all aspects. Modula-2 is now firmly 
established in the academic community as both a teaching and a research language. Its 
industrial use is spreading rapidly, proving suitable for both small and large systems, 
applications ranging from personal computer's screen management functions through to 
embedded real-time applications. 

7. The Department of Electrical & Electronic Engineering of the Polytechnic South West 
invites all Modula-2 users to the Modula-2 Conference at Plymouth/GB in December 
12-13., 1989. The invitation reads as follows:

The Modula-2 programming language has assumed a growing prominence in education, 
training and commercial and industrial applications. This is the third annual conference in 
Plymouth intended to disseminate ideas and practices. The principal objectives of this 
year's conference are to promote A. teaching methods, B. development/availability of 
self-study and tutorial packages, C. forming the link between language and programming 
profiency and its application to, for example, solving control and communication 
problems in engineering, D. Review papers prefacing further developments, 
comparisons with other languages, etc. Intended audience: all persons teaching, training 
in software, engineering, programming and practicing.

If you are interested in the Conference Proceedings please contact Dr. M Al-Akaidi, 
Department of Electrical & Electronic Engeneering, Polytechnic South West, Drake 
Circus, Plymouth PL4 8AA/GB. Phone number in GB: 0752 232583. 

8. On the Right Way to Oberon

Oberon has one very attractive feature: The Oberon language definition as published by 
N. Wirth in Software - Practice and Experience, Vol 18(7), John Wiley & Sons (July 1988) 
has only 19 pages. If you look close enough to an Oberon program that doesn't make 
use of the type extension feature, you can see almost no difference to Modula-2. 

LECTOR/PS Textprocessing, file [dw2]m2upda.dw2, \251 27-Apr-1990, 01-Oct-1991 


IMPRESSUM: The ModulaTor is an unrefereed journal. Technical papers are to be taken as working papers and personal rather than organizational statements. Items are printed at the discretion of the Editor based upon his judgement on the interest and relevancy to the readership. Letters, announcements, and other items of professional interest are selected on the same basis. Office of publication: The Editor of The ModulaTor is Guenter Dotzel; he can be reached by tel/fax: [removed due to abuse] or by mailto:[email deleted due to spam]
  ModulaWare home page   The ModulaTor download    [Any browser]

Webdesign by, 14-Jul-1998