Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rochester.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!ken From: ken@rochester.UUCP (and Vicki Herrieschopper) Newsgroups: net.lang.mod2 Subject: Re: Modula-2 under BSD 4.2 (long) Message-ID: <12515@rochester.UUCP> Date: Mon, 21-Oct-85 11:12:43 EDT Article-I.D.: rocheste.12515 Posted: Mon Oct 21 11:12:43 1985 Date-Received: Wed, 23-Oct-85 04:48:46 EDT References: <606@lasspvax.UUCP> Reply-To: ken@rochester.UUCP (and Vicki Herrieschopper) Organization: Home for the terminally enabled Lines: 55 Keywords: it (may still) exist We too have had some experience with Powell's compiler. If I appear to be critical, it is because I am leaving out the praises. With a some (more than a little, certainly) work it could be a production quality compiler. In article <606@lasspvax.UUCP> andy@lasspvax.UUCP (Andy Pfiffer) writes: >The first phase of the compiler parses an individual Modula-2 module and >compiles it into P-code. It consists of about 17,000 lines of Pascal >program and 1,000 lines of YACC grammar. It includes an optimizer that >eliminates common subexpressions, moves invariants out of loops, allocates >registers, and performs other optimizations. > > [this is good clean code...] Nested modules are not done correctly. It bombs out on some programs. Also the error messages are not the most informative, i.e. syntax error at line ..., a la C. >The second phase of the compiler translates P-code into VAX instructions. >It consists of about 6,000 lines of Pascal program. It folds constants >and selects instructions in order to reduce execution time. > > [this part was a real memory hog and generated bad code for...] > [...some constant expressions.] Complicated expressions can cause this to barf. >A program to help convert Pascal programs into Modula-2 is provided. >It consists of about 1,800 lines of Pascal and 1,000 lines of YACC grammar. > > [this works okay...but...] The Pascal grammar provided is wrong and it objects to some legal Pascal programs in particular case statements. It is only an hours work to fix it though. I am trying to send my changes back to Powell (are you there?). >SELECTED FEATURES OF THE COMPILER >Compiles comparable programs faster than the Berkeley Pascal compiler. >Benchmarks indicate code is comparable to the fastest VAX compilers. > > [True. The final code was the fastest stuff on the machine!] The procedure call mechanism is very efficient for "internal" procedures. This compiler was mentioned as an example of software RISCiness in a recent CACM article on RISC architectures. A good deal if you can still get it. I hear Digital is considering using Modula-2 as their systems language. However the ETH compiler may give it a run for the money, see a previous announcement. Ken -- UUCP: ..!{allegra,decvax,seismo}!rochester!ken ARPA: ken@rochester.arpa USnail: Dept. of Comp. Sci., U. of Rochester, NY 14627. Voice: Ken!