From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 18 Jun 93 13:44:25 GMT From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!wupost!wuar chive.wustl.edu!conn@ucbvax.Berkeley.EDU (Richard Conn) Subject: PAL Release: SmallAda Translator (move only) Message-ID: List-Id: Public Ada Library (PAL) Release Notice Release of: SmallAda Translator ------------------------------ 1. Taxonomy: ADA COMPILERS SMALLADA ------------------------------ 2. Author: Prof. Michael B. Feldman et al (see ABSTRACT) Dept of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 202-994-5253 (voice) 202-994-5294 (fax) ------------------------------ 3. Rights: Educational use only ------------------------------ 4. Abstract: S M A L L A d a 1 9 9 1 IBM PC-family version This is a compiler/interpreter for a part of the Ada language, namely the "Pascal subset" plus the Ada tasking support. It is not intended ever to be a full Ada compiler, rather a vehicle for teaching, learning, and experimenting with concurrent programming. The compiler is quite fast, producing P-code which is then interpreted by the interpreter. The system will run on an IBM PC (or compatible) with the following minimum configuration: 640K of memory; one disk drive. A hard disk will greatly improve the speed. The entire system runs in RAM with no disk accesses, so expect capacity to be limited. 250 statements or so can be safely accommodated. SmallAda executables and demo programs are distributed as a self- extracting archive created by LHA. To install SmallAda, just create a directory on your hard disk called, say, smallada, move to that directory, and execute the self-extracting archive sm-archv directly from your diskette. If your diskette is in drive A:, just type A:\SM-ARCHV. The current version is not particularly robust, rather it is a preliminary step toward effective window-oriented monitoring of task execution. This package may be copied and used for educational purposes but not for profit; please let us know by e-mail or regular mail how you like the idea of this package and what you are doing with it. The more users we know we have, the better our case for getting funding to continue the work. project supervised by Prof. Michael B. Feldman Department of Electrical Engineering and Computer Science The George Washington University Washington, DC 20052 202-994-5253 (voice) 202-994-5294 (fax) mfeldman@seas.gwu.edu authors: 1986 Charles Schoening DOS version of CoPascal 1987 Frederick C. Hathorn conversion of CoPascal to Ada 1988 Stuart Cramer and Jay Kurtz refinement of tasking model 1989 Arthur V. Lopes window-oriented monitoring for IBM-PC 1990 Manuel A. Perez Macintosh version 1990 Arthur V. Lopes integrated environment for IBM-PC 1991 Amr El-Kadi user-selectable task scheduling THE SmallAda SUPPORT PACKAGE (SMALL_SP.PKG) =========================================== A large number of "intrinsic" library subroutines are included in a pseudo-package called SMALL_SP.PKG. It is not necessary (or proper) to compile this package; it is included in the environment. It is necessary to begin each program with a context clause WITH SMALL_SP; USE SMALL_SP; to give the effect of writing genuine Ada. A specification for this package is included in the distribution; it includes I/O routines, math functions, and the like. This is not really good Ada-like decomposition, and we will change it in subsequent versions of the system. Meanwhile, use the package spec as a guide to all the intrinsic routines. Note especially that the formatting parameters supplied to the I/O procedures are more Pascal-like than Ada-like. This will change later to look more like standard TEXT_IO. THE DEMONSTRATION PROGRAMS ========================== We have supplied a set of what we hope will be interesting and instructive programs illustrating both the sequential aspects of the Ada subset and the tasking model. TEST1 through TEST6 can be thought of as "validation" programs testing specific features of the language; reading them can serve a useful purpose in understanding our subset. ATEST1 through ATEST4 demonstrate the differences in program behavior under different scheduling policies. Each program contains a block comment explaining its purpose in this demonstration. SHELLSORT is what its name implies: a standard implementation of Shell sort in which the state of the array is displayed on the screen as it is sorted; RACE is a tasking program which we have used with success in concurrent programming courses: three sort algorithms are activated as Ada tasks and run in parallel. 4TASKSEM shows the use of the semaphore primitives "exported" by the SMALL_SP pseudo-package. A semaphore SCREEN is declared and used to give mutual exclusion on the terminal screen. Attention: semaphores are NOT Ada primitives! SmallAda was originally constructed as a modification to the CoPascal system of Ben-Ari (as described in "Principles of Concurrent Programming", Prentice Hall 1982), and the semaphore primitives are still there from the system's last incarnation. To show how to do it in "real" Ada, we include the program 4TASKMON, in which a screen monitor task is declared. Finally, there are three versions of Dijkstra's legendary dining philosophers problem. SmallAda has a capacity limitation of around ten tasks. We are limited to four instead of the usual five philosophers, because four diners, four chopsticks, and MAIN add up to 9 tasks. EATCHAOS is very instructive: it demonstrates why it's nice to have monitors for mutual exclusion: without a monitor guarding the screen, the display becomes rather chaotic. EAT-SEM uses the SmallAda semaphore primitives; EAT-MON does the same thing but with a "genuine" Ada monitor. ------------------------------ 5. Directory Listing: languages/ada/compiler/smallada: File Name Size --------- ---- dos/ 512 mac/ 512 languages/ada/compiler/smallada/dos: File Name Size --------- ---- README 11,725 sm-archv.exe 123,139 smallada.doc 11,725 languages/ada/compiler/smallada/mac: File Name Size --------- ---- smadamac.doc 9,394 smallada.sea 225,024 Totals ============== ============== 7 Files 382,031 -- ==================================================================== Richard Conn, ASR and PAL Manager | conn@wuarchive.wustl.edu