PAL CARD CATALOG ENTRY

SHORT DESCRIPTION

'Pascal subset' Ada compiler with tasking


MOVEMENT WITHIN THE PAL CARD CATALOG
Move to top-level taxonomy
Move to keyword list

ASSET PROFILE

UNIT NAME
SMALLADA
VERSION
1994
REVIEW CODE
NR
DDN ADDRESS
mfeldman@seas.gwu.edu
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)
RIGHTS
Educational use only
COPYRIGHT
1991-1993 George Washington University/Michael Feldman
DATE CREATED
6 June 1993
DATE RELEASED
6 June 1993
DATE LAST UPDATED
31 Jan 1994
LOCATION
PAL
ENVIRONMENT
386/486 IBM PC Clone - MSDOS
MAC
LIMITATIONS
None
CERTIFICATION
Notes from PAL Certifier:
Small Ada source code can be compiled by Small Ada itself and is a
dialect of Ada.  Certification is not possible since Small Ada is not
standard Ada and violates some of the grammar rules.

FILE LISTING

Directory Display


languages/ada/compiler/smallada:
  File Name                 Size
  ---------                 ----
  dos/                       512
  mac/                       512

languages/ada/compiler/smallada/dos:
  File Name                 Size
  ---------                 ----
  README                      41
  readme.dos              11,729
  smallada.zip           119,564

languages/ada/compiler/smallada/mac:
  File Name                 Size
  ---------                 ----
  README                      45
  readme.mac               9,838
  smallada.sea.hqx
                         289,427
  source.sea.hqx         414,846


Totals
  ==============  ==============
    9 Files              846,514

ABSTRACT

S M A L L A d a   1 9 9 4
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.


REVISION HISTORY

DATE         VERSION AUTHOR                       HISTORY 
6 June 93    1991    Michael Feldman     Initial release to PAL
31 Jan 94    1994    Michael Feldman     "Last" release


RELEASE NOTICE

Restrictions on use or distribution:  Educational use


DISCLAIMER

	This courseware, software, and documentation are provided "AS IS"
without any expressed or implied warranties whatsoever.  No warranties
as to performance, merchantability, or fitness for a particular
purpose exist.
	The user is advised to test the software thoroughly before
relying on it.  The user must assume the entire risk and liability of
using this software.  In no event shall any person or organization of
people be held responsible for any direct, indirect, consequential or
inconsequential damages or lost profits.