
		OVERVIEW OF SYMBOL MANIPULATION

		Stanly Steinberg
		stanly@crunch.unm.edu
		Department of Mathematics and Statistics
		University of New Mexico
		Albuquerque, New Mexico 87131
		505-277-4733
		January, 1987

No doubt the idea of using a computer to manipulate symbols has been
around as long as the idea of using computers to manipulate numbers.
Currently there are many areas in which computers are used to
manipulate symbols rather than numbers; for example, text processing,
artificial intelligence and symbolic mathematics.  The interest here is
in programs that do symbolic mathematics; that is, programs that do
many of the nonnumeric calculations from high school algebra,
university calculus, ordinary differential equations and many other
calculations usually thought of as being within the exclusive domain of
humans. The programs that perform such calculations are frequently
called symbol manipulators. Symbol manipulators were certainly capable
of doing interesting problems in the early 1960's.  Even though symbol
manipulators are used extensively, they have not gained general
acceptance by the computing public. It appears that improvements in
software and hardware will encourage more extensive use of the symbol
manipulation technology. For a far more detailed discussion of symbol
manipulation and symbol manipulators see the text by Buchberger (the
references are listed below).

Symbol manipulation programs can be conveniently divided into two
categories, special purpose and general purpose. The interest here is
in general purpose symbol manipulators, but it is important to realize
that special purpose symbol manipulators have played a crucial role in
certain scientific areas. An idea of the importance of such programs
can be obtained by looking at the article by Broucke which describes
the use of symbol manipulators in celestial mechanics. General purpose
symbol manipulation programs have made significant contributions to a
wide range of problems as a brief look at the conference proceedings
listed below will show. The articles by Elvey, Ogilvie, Pavelle, et.
al., Steinberg, and Stoutemyer provide a more detailed overview of
general purpose symbol manipulators than will be given here.

Some of the general purpose symbol manipulators are MACSYMA, Maple,
MuMath, REDUCE and SMP (addresses are given below). The program REDUCE
has been available to the public for many years and MuMath has been
available for several years. Unfortunately MACSYMA and SMP were not
available to the general public until the fall of 1983, apparently due
to organizational and legal problems.  Maple was released in 1984.
Until recently MACSYMA, the most powerful of the symbol manipulators,
was available on computers at MIT to which many users around the
country had access using the ARPAnet.  This program has been modified
to run on VAX computers; that version of the program was called
VAXIMA.  MACSYMA is being sold (at modest cost to universities) by
Symbolics.  The descriptions of SMP indicate that it will have
substantially more facilities than any other symbol manipulator except
possibly MACSYMA. However, some experience with the program is required
before any judgments can be made. There are probably more users of
REDUCE than all of other symbol manipulation programs. The facilities
in REDUCE are modest when compared with those of MACSYMA and SMP. One
the other hand, the program is well documented, easy to use, and
powerful, so if a problem falls within its domain, it is perhaps the
best program to use. A well documented user library would make this
program much more useful. The Maple program appears to be of about the
same size as REDUCE. The MuMath program is designed to run on small
micro-computers and seems not to be powerful enough to do any large
scientific computing. This program could be used in high school and
college to interest students and faculty in symbol manipulation. High
school students are probably prepared to do nontrivial symbolic
problems before they can do nontrivial numerical problems. In early
1987, Hewlett-Packard introduce a hand-held calculator (model 28C for
approximately two hundred dollars) that is capable of doing nontrivial
symbolic calculations.

It is a common experience for a person who is first using a symbol
manipulator to feel that the program is incredibly powerful. In fact
these programs are very powerful but they also have their limitations.
Symbol manipulation programs are capable of doing infinite precision
rational arithmetic, algebraic simplification, expanding and factoring,
finding greatest common denominators and other operations of the type
found in high school algebra courses. The programs are also programming
languages and this adds much to their power. Some of the programs are
capable of handling expressions that contain millions of characters and
perform, in seconds, calculations that would require humans many
tedious hours. The programs also know how to differentiate and
integrate. Although it is not well known, there are algorithms for
integrating certain large classes of functions. When an integration
problem falls in one of the known classes, the programs are capable of
doing integrations where the answer may fill several printed pages and
appear impossible to do by hand. It is experience with these types of
problems that leads to optimism about symbol manipulation. It is also
not difficult to find examples that humans can do easily and the
programs are incapable of doing.

As users of symbol manipulation programs become more experienced they
soon discover there are many limitations to the symbol manipulation
program they are using. The programs may run out of memory, may take
too much time, may not contain a needed algorithm or may be set up in
such a way as to make some problems unreasonably difficult to solve.
Not unlike the notion of stability in numerical calculations, the
concept of intermediate expression swell plays an important role in
symbolic calculations. Intermediate expression swell refers to a
situation where the statement and results of some calculation are
rather small but some intermediate steps in the calculation produce
very large expressions. Intermediate expression swell can be reduced by
careful analysis and programming of problems (see Steinberg and
Roache), but some form of the difficulty is inherent in many
interesting problems. Consequently many problems require large amounts
of memory and time to be completed.

Perhaps the most important problem with symbol manipulation programs is
the limited amount of mathematics that they know (see Steinberg). With
certain noteworthy exceptions, the programs know relatively little
about junior and senior college level applied mathematics. The MACSYMA
packages for solving ordinary differential equations and tensor
manipulations are two of the exceptions as is some of the material
listed in the SMP manual. Although there are many symbol manipulation
users who are creating programs using advanced level mathematics, there
is too little effort being expended on incorporating this mathematics
into the main body of the programs. There are libraries of
user-contributed programs but this seems to be a rather ineffective way
of making a wide range of facilities available to the user community.
Some workers have made some inroads into this problem in certain
mathematical areas: for instance, see the thesis of M. Wirth. An
example of mathematics being set up in a symbol manipulation program in
a way that limits the usefulness of the program is given by the
dependencies idea used in the MACSYMA differentiation programs. This
idea works well in simple problems but causes considerable grief for
problems involving complicated coordinate changes (see Wester and
Steinberg). These problems and many others are now under serious attack
by the symbol manipulation community as a brief perusal of the
conference proceedings listed below shows.

The most promising news for the symbol manipulation community is that a
group, under the direction of Prof. R. Fateman, in the EECS department
at the University of California at Berkeley is creating a new symbol
manipulation system (see the articles by Fateman and Williamson).  The
system will no longer be based on LISP or other standard languages but
instead will be based on a new language that will attempt to merge the
underlying mathematics and mathematical objects with the algorithms and
data types and the hardware to provide a substantial gain in speed and
reduce memory requirements over the existing systems.  Because much
care is being exercised to embody good mathematics in the underlying
language, there seems little doubt that many problems that are now
tedious or impossible to do with the current systems will be able to be
done nicely with the new system.  Considerable effort is being directed
toward developing user interfaces that are appropriate for both the
experienced user and the novice user.  Another component of the project
will bring together experienced users of symbol manipulation systems
who have a strong applied mathematics background in order to
incorporate higher levels of mathematics in the the new system. A
similar effort is being made by IBM (see Jenks); they have a new
manipulator called Scratchpad available.

Symbol manipulation programs are large and need to be able to handle
large expressions. As the size of the expressions grows so does the use
of computer time; it is not uncommon to hear experienced users talk
about problems that run many hours on a large computer. Thus symbol
manipulators place a considerable strain on the computing resources.
Because of this demand on computing resources, many symbol manipulators
used to run in batch mode or on special machines as MACSYMA did at
MIT.  Batch mode symbolic computing turns out to be unsatisfactory
because of another problem inherent in symbolic computing; the powerful
symbol manipulation programs are not predictable enough to be easily
programmed without first testing various ideas interactively. All of
the symbol manipulation programs mentioned above are now interactive.

An important hardware development for the symbol manipulation community
was the appearance of the VAX computer. The ability of these machines
to automatically page information on the disk to the main memory allows
the machine to easily run large interactive jobs. Maple, REDUCE, SMP
and MACSYMA now all run on these machines. If a VAX computer has 3 or
more megabytes of main memory and is lightly loaded, then MACSYMA will
run very nicely. However, if the machine is heavily loaded or has a
small main memory, then the performance of MACSYMA and the machine is
seriously degraded. Consequently, users of symbol manipulation programs
are frequently required to run in low priority or late at night.

Another hardware related problem with the current symbol manipulators
is their input and output. The input is typed in a linear FORTRAN like
format. Programs that can understand written formulas are feasible but
expensive and inconvenient. However, once some information is typed
into a symbol manipulator and displayed on a graphics screen, then a
``mouse'' or light pen can be used to manipulate the information or
direct the program to manipulate the information. The output of current
programs is usually a relatively klutzy two dimensional format.
However, some programs are capable of producing text-book quality
output by using a laser printer, and similar results can be obtained by
using a high resolution graphics screen. Since human vision plays an
important role in understanding formulas, high quality output will
greatly enhance the usefulness of symbol manipulation programs. Such
technology will allow symbol manipulators to mimic pencil and paper
calculations which will make the use of the programs more intuitive.
The system being developed by the Fateman group will take advantage of
graphics screens and the ``mouse'' technology. Some prototype systems
were discussed at the Waterloo conference.

An optimal environment for symbol manipulation work is the new
workstations.  A machine with 4 megabytes of main memory, large hard
disk drive, 16 megabytes of virtual address space, high resolution
graphics screen, and a ``mouse'' are now available and provide better
service for a single user than a time shared VAX. A network of such
machines with a common disk drive would be ideal for a community of
users. All of the symbol manipulators mentioned above now run on
workstations.  Symbolics has MACSYMA running on their LISP machine; a
LISP machine is a large workstation and seems ideal for doing symbolic
calculations.

The currently available software and hardware has made symbol
manipulation a more fruitful and productive activity than just a few
years ago. The combination of the new inexpensive hardware and software
will certainly cause a substantial growth in the user community.

		JOURNALS

SIGSAM Bulletin, Special Interest Group on Symbolic & Algebraic
       Manipulation of the ACM (Association for Computing Machinery).
       11 West 42nd Street, New York, NY 10036.

Journal of Symbolic Computation, 
       B. Buchberger, Editor, Johannes Kepler University,
       A4040 Linz, Austria.

		PAPERS

R.A. Broucke, A Fortran-4 system for the manipulation of symbolic
       Poisson series with applications to celestial mechanics,
       Preprint, Institute for Advanced Study in Orbital Mechanics,
       University of Texas at Austin, 1981.

R.D. Drinkard, Jr. N.K. Sulinski, MACSYMA: A program for computer
       algebraic manipulation (demonstrations and analysis).
       New London Laboratory, Naval Underwater Systems Center,
       New London, Connecticut 06320.

J.S.N. Elvey, Symbolic Computation and Constructive Mathematics,
       Research Report, Dept. of Computer Science, Univ. of Waterloo,
       Waterloo, Ontario, Canada, 1983.

R.J. Fateman, My view of the future of symbolic and algebraic
       computation, SIGSAM Bulletin, 18, 1984, 10-11.

M.A. Hussain, B. Noble, Applications of MACSYMA to calculations
       in applied mathematics. General Electric Co.

R.D. Jenks, 11 keys to new scratchpad, Proceeding of EUROSAM 84,
       Edited by J. Fitch, Springer-Verlag, New York, 1984.

J.F. Ogilvie, Applications of computer algebra in physical chemistry,
       Computers and Chemistry, 6, 1982, 169-172.

R. Pavelle, M. Rothstein, J. Fitch, Computer algebra,
       Scientific American, Dec. 1981.

S. Steinberg, Mathematics and symbol manipulation,
       ACM SIGSAM Bulletin, 16, 1982, 11-15.

S. Steinberg, P. Roach, Symbolic manipulation and computational
       fluid dynamics, Journal of Computational Physics, 57(1985),
       pages 251-284.
       
D.R. Stoutemyer, Symbolic computation comes of age,
       SIAM News, 12, 1979.

M. Wester, S. Steinberg
       An extension to MACSYMA's concept of functional differentiation,
       SIGSAM Bulletin, 17, 1983, 25-30
       A survey of symbolic differentiation implementations,
       1984 MACSYMA User's conference.

C. Williamson, Jr., Taylor Series solutions of explicit ODE's in
       a strongly typed algebra system, SIGSAM Bulletin, 18(69), 
       1984, 25-29.

M.C. Wirth, On the automation of computational physics,
       Lawrence Livermore Laboratory, 1980.

		TEXTS

B. Buchberger, G.E. Collins, R. Loos, R. Albrecht (Editors)
       Computer Algebra, Symbolic and Algebraic Computation,
       Springer-Verlag, New York, 1982.

R.E. Zippel, Algebraic Manipulation
       (Course Notes) Dept. of Computer Science, MIT, 1982.

K.O. Geddes, Algebraic Algorithms for Symbolic Computation
       (Course Notes) Dept. of Computer Science, University
       of Waterloo.

R.H. Rand, Computer Algebra in Applied Mathematics:
       An introduction to MACSYMA, Pittman, Marshfield, 1984.


		CONFERENCES AND PROCEEDINGS

R. Fateman (Chairman), Proceedings of the 1977 MACSYMA User's
       Conference, NASA, Berkeley, 1977.

E. Lewis (Editor), Proceedings of the 1979 MACSYMA User's
       Conference, Washington, D.C., 1979.

P.S. Wang (Editor), SYMSAC '81, Proceedings of the 1981 ACM
       Symposium on Symbolic and Algebraic Computation, Utah, 1981,
       Published by ACM.

J. Calmet (Editor), EUROCAM 82, European Computer Algebra
       Conference, Marseille, France, April, 1982, Lecture Notes
       in Computer Science, 144, Springer-Verlag, New York, 1982.
       See SIGSAM Bulletin, 16-1, Jan. 1982, for a program of the meeting.

M. Mignotte (Chairman), EUROCAL '83, European Computer Algebra
       Conference, London, March 1983, To be published.

J. Fitch (Editor), EUROSAM 84, International Symposium on Symbolic
       and Algebraic Computation, Cambridge, England, July 1984,
       Lecture Notes in Computer Science, 174, Springer-Verlag,
       New York, 1984.

V. E. Golden (Editor), Proceedings of the 1984 MACSYMA User's
       Conference, Schenectady, New York, July, 1984.
       For copies send $30.00 to M. McGinn, General Electric Co,.
       Corporate Research and Development Center,
       P.O. Box 8, Bldg. K-1, Room 3A15, Schenectady, NY, 12301.

B. Buchberger (Editor), EUROCAL '85, Linz, Austria, April, 1985.

Bruce Char (Editor), SYMSAC `86, Proceedings of the 1986 Symposium
       on Symbolic and Algebraic Computing, ACM, 1986.

W. Lassner (Chairman), EUROCAL `87, Leipzig, GDR,  June 1987.

A. Miola, (Chairman), FIJC-88, Roma, Italy.

		SYMBOL MANIPULATION PROGRAMS

MACSYMA
       Computer Aided Mathematics Group, Symbolics Inc.,
       11 Cambridge Center, Cambridge, MA 02142.
       

DOE MACSYMA
       Jan Mockler, National Energy Software Center,
       Argonne National Laboratory, 9700 S. Cass. Ave.,
       Chicago, Illinois 60439.
       Leo Harten, Paradigm Associates, Inc.,
       29 Putnam Avenue, Suite 6, Cambridge, MA 021329.

Maple
       WATCOM Products Inc., 415 Phillip St., 
       Waterloo, Ontario, Canada N2L 3X2.

MuMath
       The Soft Warehouse, 3615 Harding Ave., Suite 505,
       Honolulu, Hawaii 96816.

REDUCE
       A.C. Hearn, The Rand Corporation, 1700 Main St.,
       P.O. Box 2138, Santa Monica, CA 90406

SMP
       Inference Corporation, Computer Mathematics Group, Suite 501,
       5300 West Century Blvd.,  Los Angles, CA 90045

Scratchpad
       Richard Jenks, Computer Algebra Group,
       IBM  T.J. Watson Research Center, P.O. Box 218,
       Yorktown Heights, NY 10598.
				Professor Stanly Steinberg
				Department of Mathematics and Statistics
				University of New Mexico
				Albuquerque, NM 87121
				505 277 4733
				stanly@crunch.unm.edu
				hi!crunch!stanly@hc.dspo.gov
