% revised for version 0.60, 21.2.91 
% title and preface

\title{MAS \\ Modula--2 Algebra System\\
       {Interactive Usage}}

\author{%Heinz Kredel \\
        Computer Algebra Group \\
        University of Passau 
        }

\date{MAS Version 0.6\footnote{Document revision \today}
      }


\maketitle

\section*{Abstract}

MAS is an experimental computer algebra system
combining imperative programming facilities with 
algebraic specification capabilities 
for design and study of algebraic algorithms.   
This document describes the interactive usage of MAS, 
the MAS language, the specification component, 
basic arithmetic and polynomial system libraries.

\vfill

\section*{Copyrights}

The MAS system was developed using several 
public domain programs. 
So permission is granted for unrestricted use of MAS 
as long as the copyrights are preserved.
The copyrights are:
\begin{quote}
MAS: \copyright 1989, 1990, 1991, by H. Kredel, University Passau. \\
ALDES / SAC--2: \copyright 1982, by G.E.Collins and R.Loos.
\end{quote}
Remember:
{\em 
We make no warranty and disclaim any usefulness. 
Use this program at your own risk. 
}


\chapter*{Preface}

MAS (Modula--2 Algebra System) is an 
experimental computer algebra system
combining imperative programming facilities with 
algebraic specification capabilities 
for design and study of algebraic algorithms.   
MAS views mathematics in the 
sense of universal algebra and model theory and is 
in some parts influenced by category theory.

MAS combines Modula--2 program development, 
a LISP interpreter with a Modula--2 like language and 
an algebraic specification component.
MAS can be used interactively, but includes access to
to the comprehensive ALDES/SAC--2 and DIP 
algebraic algorithm libraries. 
MAS can also be used as ordinary Modula--2 program library.
Despite of its design it can directly access 
numerical Modula--2 libraries. 

The current implementations run on an 
Atari 1040ST / GEM\index{GEM}--TOS\index{TOS} and 
IBM--PC / MS--DOS\index{DOS} (or compatible),
further implementations\index{implementation} are planned on  
Commodore Amiga / Amiga--DOS\index{AmigaDOS},
IBM--370 / VM--CMS, Sun / Unix, and VAX / VMS.
\index{IBM--370}\index{VM/CMS}
\index{Sun}\index{Unix}
\index{VAX}\index{VMS} 
It is completely written in the programming language 
Modula--2 \cite{Wirth 85a}.

Major changes of the current version 0.6 of MAS are:
\begin{itemize}
\item added language extensions for specification capabilities,
\item added a parser for the ALDES language and 
      possibility for interpretation of ALDES programs,
\item added a linear algebra package,
\item added an interface between the MAS language 
      and the distributive polynomial system,
\item improved symbol handling by hash tables 
      combined with balanced trees,
\item EMS support for IBM PC implementations.
\end{itemize}


\section*{Organization}

This document is a description of the front--end part of the system:
the interpreter. It is intended as a manual for 
the MAS interactive part. The syntax of the 
MAS language together with informal semantics 
and examples is discussed. 
Further basic arithmetic and polynomial system 
data structures and libraries are discussed. 
A document for implementors is already available 
under the title `MAS Library description'. 
The definition modules and indexes are contained 
in a seperate document 
`MAS Specifications, Definition Modules, Indexes'.

Some discussions are currently rather short but 
will be improved in later revisions of the document.
The first two chapters are already self contained
and can serve as a tutorial introduction into MAS.
The later chapters are complete, but very condensed 
so you may need some knowledge of LISP, the ALDES / SAC--2
computer algebra system and Modula--2 
in the more advanced chapters.

The plan of this document is as follows:

Chapter 1 
gives a short introduction of MAS
and shows how to use MAS for the first time.

Chapter 2 
gives an tutorial overview of MAS,
and discusses several important aspects of MAS,
such as arithmetic, help facilities, 
specifications and function overloading,
talking LISP and handling errors.

Chapter 3 
describes the MAS language and chapter 4 describes the 
MAS specification component.

Chapter 5 
gives an introduction into list processing and 
algorithm complexity.

In chapter 6 the basic arithmetic algorithms 
and in chapter 7 the polynomial systems 
are described. 

In Chapter 8 
the parser for the ALDES language and the syntax of the 
ALDES language are presented. 

Chapter 9
summarizes system commands: display commands, pragmas
and command line parameters.

Chapter 10 
provides some background information 
on the underlying LISP.

Chapter 11 
gives some information on the system components, 
on the internal structure, on implementation issues 
and on the configuration of MAS.  

The appendices 
contain notes on the distribution and the 
current release of MAS and an index of this document.

\section*{Acknowledgements}

Many thanks to all who made contributions or influenced this project:
R. Loos, G. E. Collins and co--workers for the 
ALDES / SAC--2 system;
I. Giese, W. Kynast and H. Czytrek for discussions in the
early stages of the MAS project;
M. Pesch, B. Haible,
V. Weispfenning and T. Becker  
for feedback during 
the later stages of the development of MAS. 
In the current version also contributions from students 
are incorporated:
\begin{itemize}
\item port to IBM PC, M2SDS by B. Deyle, 
\item port to IBM PC, Topspeed Modula--2 by H. Friebel, 
\item port to Atari ST, SPC by E. Reisinger, 
\item port to Amiga, M2Amiga by M. Rothmeier, 
\item an ALDES parser by K. Rieger, 
\item a hash table symbol handling by T. Wollersberger,
\item a linear algebra library by J. M\"uller. 
\end{itemize}

The MAS system was first developed using the 
following hard-- and software: 
Computer: Atari 1040 ST, (1 MB) 1986.  
Compiler: TDI: Modula--2/ST, Clifton, Bristol, UK, 1986.  
Editor: micro EMACS, by Daniel Lawrence, 1988.  
Shell: Gul\"am by Prabhaker Mateti at Case, 1988.  

If you find a bug in MAS, please let me know. 
Also any suggestions will be welcome. 
Most of the MAS system is available via anonymous ftp 
from internet address \verb/132.231.10.1/ = 
\verb/alice.fmi.uni-passau.de/.

\begin{center}
Passau, \today. \hfill H. Kredel\footnote{University of Passau, 
                                 Innstra\ss e 33, D-8390 Passau, FRG,
                                 Tel: (49,0) 851/ 509-315,
                                 E-mail: kredel @ 
                                 unipas.fmi.uni-passau.de}
\end{center}

