Version 1.01, March 1998
cag.fmi.uni-passau.de (went offline in 2009)
If you pick the source code we recommend to pick also the definition module and indexes document along with it. To compile the source code you will also need the Modula-2 to C translator "mtc", the "reuse" library, gnumake, and a C-compiler (preferably gcc). Further we recommend the GNU readline library and the kpathsea library.
The following files are available
mas-hppa1.1-hp-hpux9.03-1.00.tar.gz HP 9000, running HP-UX mas-i386-unknown-os2-1.00.tar.gz Intel PC, running OS/2 mas-i486-unknown-linux-1.00.tar.gz Intel PC, running LINUX mas-mab-next-nextstep3-1.00.tar.gz NextStep mas-rs6000-ibm-aix3.2.5-1.00.tar.gz RS/6000, running AIX 3 mas-sparc-sun-sunos4.1.3C-1.00.tar.gz Sun Sparc, running SunOS- documentation:
mastut.tar.gz MAS tutorial and interactive users guide in LaTeX. mastut.ps.gz as PostScript masdef.tar.gz MAS Modula-2 definition modules, 3 indexes and specifications in LaTeX. masdef.ps.gz as PostScript- examples and test files:
masexam.tar.gz examples, help files, test files.- Modula-2 source code:
gnutar xfvz masexam.tar.gzor
gzip -d -c masexam.tar.gz | tar -cvf -
mas/doc /mastut Tutorial and Users Guide. /masdef Definitions and indexes document. /massys System document. /<machine> Executables in respective machine directory mas Unix executable. mas.exe OS2 executable, requires /dll. emx.exe mas.out DOS extender and executable. /exam Examples *.in Copying information .masrc initialization file. mas.ini initialization file. helpup.mas Help initialization file. testall.mas Driver file for /test directory. /help Comments and module information. /spec Example specifications. /test Test files. /dll emx dyn. link libs for OS2. /src Modula-2 source code /maskern System dependent files, memory, IO, ... /maslisp LISP interpreter, parsers, ... /masmain Main program, interfaces, ... /masarith Basic Arithmetic, integer, rational, ... /maspoly Polynomial systems, recursive, distributive, ... /masring Ideals, Groebner bases, algeb. geometry, ... /masmodul Linear algebra, diophantine equations, syzygies, ... /masnc Non-commutative solvable polynomial rings, ... /sacring Polynomial factorization, real roots, gcd, res, ... /masroot Real root counting, ... /maslog Logic formuals, Real Quantifier Elimination, ... /masdom Domain coefficients, comprehensive G bases, ... /masib Involutive bases, ...
*.md Modula-2 definition modules. *.mi Modula-2 implementation modules. *.mip Modula-2 implementation modules with cpp-statements. *.h C header files. *.c C code files. *.o object code files. *.a library archives. *.ini MAS initialization files (obsolete). *.hlp MAS help information. *.in MAS input files (obsolete). *.mas MAS input files. *.out MAS output files.
[path]mas -m 4000 -E -e -o test-all
- start 'mas' or 'mas.exe' or 'emx mas.out' - banner 'This is MAS the Modula-2 Algebra System, Version 1.xxx.' - system prompt 'MAS: ' - system answer 'ANS: ' - input (e.g.) 'a:=2*3.' A statement is terminated by period '.' - help with 'help.' or 'help(name).' or 'help(name,Loaded).' - interupt ^C CNTRL-C - leave with 'EXIT.' or 'exit.' or 'quit.'
On OS2 systems also add the mas/dll directory to the LIBPATH and reboot or use your existing emx dlls.
To compile MAS unpack the source code and create a directory "<machine>" for your machine type. From the directory mas/<machine> execute ../configure to generate the Makefile, then execute gnumake to compile a mas executable.
Further details can be found in the readme file accompanying the source code.
-m number-of-KB -f data-set-name
The resulting view of the software has many similarities with the model theoretic view of algebra. The abstract specification capabilities are realized in a way that an interpretation in an example structure (a model) can be denoted. This means that is is not only possible to compute in term models modulo some congruence relation, but it is moreover possible to exploit an fast interpretation in some optimized (or just existing) piece of software.
MAS replaces the ALDES language [Loos 76] and the FORTRAN implementation system of SAC-2 by the Modula-2 language [Wirth 85]. Modula-2 is well suited for the development of large program libraries; the language is powerful enough to implement all parts of a computer algebra system and the Modula-2 compilers have easy to use program development environments.
To provide an interactive calculation system a LISP interpreter is implemented in Modula-2 with full access to the library modules. For better usability a Modula-2 like imperative (interaction) language was defined, including a type system and function overloading capabilities. To increase expressiveness high-level specification language constructs have been included together with conditional term rewriting capabilities. They resemble facitilies known from algebraic specification languages like ASL [Wirsing 86].
Further design issues are:
MAS views mathematics in the sense of universal algebra and model theory and is in some parts influenced by category theory. In contrast to other computer algebra systems (like Scratchpad II [Jenks 85]), the MAS concept provides a clean seperation of computer science and mathematical concepts. The MAS language and its interpreter has no knowledge of mathematics and mathematical objects; however it is capable to describe (specify) and implement mathematical objects and to use libraries of implemented mathematical methods. Further the imperative programming, the conditional rewriting and function overloading concepts are seperated in a clean way.
MAS includes the capability to join specifications and to rename sorts and operations during import of specifications. This allows both the specification of abstract objects (rings, fields), concrete objects (integers, rational numbers) and concrete objects in terms of abstract objects (integers as a model of rings). Specifications can be parameterized in the sense of lambda-abstraction.
The semantics of a specification can be described either by implementations, axioms or models. The implementation part describes (imperative) procedures and data representations.
The axioms part describes conditional rewrite rules which define a reduction relation on the term algebra generated by the sorts and operations of the specification. The semantics is therefor the class of models of the term algebra modulo the (congruence) relation. Currently there are no facilities to solve conditional equations.
The model part describes the association between abstract specifications (like rings) and concrete specifications (like integers). The semantics is the interpretation of the (abstract) function in the model. Operations in models can be compiled functions, user defined imperative functions or term rewrite rules. The function overloading capabilities are realized by this concept. Dynamic abstract objects like finite fields can be handled by a descriptor concept.
Evaluation of functional terms is as follows: If there is a model in which the function has an interpretation and a condition on the parameters is fulfilled, then the interpretation of the function in this model is applied to the interpretation (values) of the arguments. If there is an imperative procedure, then the procedure body is evaluated in the procedure context. If the unification with the left hand side of a rewrite rule is possible and the associated condition evaluates to true, then the right hand side of the rewrite rule is evaluated. Otherwise the functional term is left unchanged.
In contrast to functional programming languages (like SML [Appel 88]) which implement typed lambda calculus the types of operations are not deduced from the program text but must be explicitly defined in the specification of an operation, in a variable declaration or in a typed string expression.
A weak point in the current MAS design is that the language is only interpreted. This is actualy not a handicap in execution speed since compiled libraries can be used, but in a too weak semantic analysis of the specifications. This means that certain errors in the specifications are only detected during actual evaluation of an expression.
Versions of the MAS system are running on Atari ST (TDI and SPC Modula-2 compilers), IBM PC/AT (M2SDS and Topspeed Modula-2 compilers) and Commodore Amiga (M2AMIGA compiler). The actual implementations run on UN*X workstations (e.g. IBM RS6000/AIX, HP 9000/HP-UX, NextStep, Sun Sparc with a Modula-2 to C translator) and PCs 386, 486, 586 (DOS, OS2 and Linux).
The ALDES/SAC-2 libraries have been implemented including the Polynomial Factorization System and the Real Root Isolation System. From the DIP system the Buchberger Algorithm System and the Ideal Decomposition and Ideal Real Root System have been implemented. Groebner Bases are also available for non-commutative polynomial rings of solvable type. The combination of the MAS programs with numerical Modula-2 libraries has been tested. The mathematical libraries have been enlarged by a package for linear algebra. Further new developments are syzygies, module Groebner bases, comprehensive Groebner bases, (parametric) real root counting, real quantifier elimination, involutive bases and invariant polynomials.
Some logic programming facilities have been incorporated by means of the conditional rewriting capabilities of the algebraic specification component. Further there is a parser for the ALDES language and the MAS interpreter is now able to evaluate ALDES statements (although with low performance). In the symbol table system the unbalanced symbol tree has been repaced by a hash table with balanced symbol tree entries.
The current development concentrates on filling some gaps in the ALDES / SAC-2 and DIP libraries, the design of suitable specifications for relevant algebraic structures and completing the system documentation.
ftp://alice.fmi.uni-passau.de/pub/ComputerAlgebraSystems/mas(went offline in 2009) or from Mannheim mirror
You can get more information about MAS from:
http://alice.fmi.uni-passau.de/mas.html (went offline in 2009)
or from Mannheim mirror
Send bug-reports, questions, remarks to:
mailto:firstname.lastname@example.org (offline since 2009)
MAS: (c) 1989-1998, by H. Kredel, University Mannheim, M. Pesch, University Passau. ALDES/SAC-2: (c) 1982, by G.E.Collins, R.Loos.
All Rights Reserved. Permission is granted for unrestricted noncommercial use and noncommercial redistribution if the copyright notice is retained when a copy is made. There are no known bugs, however we disclaim any usefulness and make no warranty on the correctness of the Modula-2 Algebra System. For certain machines and/or operating systems further copying restrictions apply, e.g. see the files
copying.mas, copying.reuse, copying.mtc, copying.emx, copying, copying.lib and copying.bsdin the exam directory. The C code has been generated from the Modula-2 sources of MAS with the 'mtc' 'Modula-2 to C' translator by GMD Karlsruhe. Although it is not required, you should get a copy of it from some ftp site to have the sources of the used libraries. The executables for PC have been compiled using the GNU gcc compiler with the emx runtime system by Ernst Mattes. The latest versions and documentation of emx can also be found on ftp servers.
University of Mannheim,
L 15, 16, D-68131 Mannheim, Germany.