You are here

WIMS: An Interactive Mathematics Server - Interfaces with Background Programs

Author(s): 
Xiao Gang

In principle, WIMS can interface with any program allowing batch mode execution. The main restriction is that software with restrictive licenses should not be freely accessible on the Internet, so modules that must call restrictive software should put access restrictions on them. Partly due to the distribution policy of WIMS, we do not have interfaces to such restrictive software yet, although many of such programs are easily interfaceable.

Software interfaces in WIMS are independent from the kernel and independent from each other, so they can be added, removed, or modified without affecting the global functioning of the system. One of the basic functions of the interfaces is to serve as a security barrier. For this reason, only interfaced programs can be executed by WIMS.

The following interfaces are currently available.

  1. PARI/GP is an excellent arbitrary-precision package for computations not involving transcendental functions.

    The header of PARI/GP output is automatically stripped off by the interface. For the rest, each line of the output corresponds to a line in the calling parameter. Although this output can be directly inserted into the html page sent to the user, it is usually processed and formatted so that the user sees beautified mathematical expressions.

  2. Maxima is now the basic symbolic algebra system upon which WIMS relies. Its greatest advantage is being completely free (GNU). However, it is not as strong as many other symbolic algebra packages when difficult integration is involved.

    The functioning of the interface is similar to that of PARI/GP.

  3. MuPAD is a symbolic algebra package whose copyright holder allows use on the Internet with interfaces that do not give direct access to the full power of the software.

    The functioning of the interface is similar to that of PARI/GP.

  4. GAP is a powerful package for manipulation of algebraic structures. For the time being, there are two WIMS applications (Permgroup and Smallgroup) that make use of this package. These compute, respectively, finite permutation groups and finite groups of orders up to 255.

  5. Octave. A preliminary interface for this numerical package exists, but no module makes use of it yet.

  6. Gnuplot, a popular plotting program, is accessed by WIMS with a special interface, part of which is directly incorporated in the kernel.

    Several incompatibilities concerning mathematical expressions are fixed by the interface: for example, "^" is translated to "**", and integer fractions such as "1/2" are translated to "1/2.0" (to avoid having the result of an integer division be 0).

    The interface includes an adaptation for plotting animated sequences by adding a few extra parameters. This is done by asking Gnuplot to plot images, then putting these images together into an animated gif file. Performance is reasonably good, as animations with acceptable quality can be generated in a few seconds.

    This program is included in standard Linux distributions.

  7. Povray, a popular ray tracing package with direct support for animation.

    The application Polyray makes use of this package. It appears that there is no danger in allowing direct user-supplied source for Povray, so Polyray has a text field for user input.

  8. TEX. The interface to TEX is transparent to application writers, as WIMS has commands that can selectively use html or TEX rendering of mathematical expressions according to the context.

  9. PostgreSQL is an SQL database engine that used to be the standard database manager for WIMS. In the current version, it is used only to manage the applications database, and it is planned that, at some future date, WIMS will no longer depend on it. A basic reason for this change is that WIMS is now developing search mechanisms which are more versatile than the standard commands of SQL.

  10. COQ is a proof assistant package built upon CAML and designed for interactive use. At each proof step, a status is printed, including new goals to prove and hypotheses for the principal goal.

    A WIMS module using this package should support step by step operations. It should store the whole command history in a variable, and at each step, the last command is appended to the command history, then the latter is fed to the interface for Coq. The interface captures the last status printed by Coq, and splits this status into two return data, one for the goals remaining to be proven, and the other for the hypotheses for the principal goal.

Another function of the interfaces is to improve inter-software communication. Each software package comes with its own language syntax, which differs from one package to another. Even common mathematical functions have different names, so, when necessary, alias definitions and expression translations are built into the interfaces.

For example, Gnuplot uses x**3 to denote x3, which is not recognized either by PARI/GP or by MuPAD. To make mathematical expressions directly chainable from program to program, routines have been inserted in the respective filters to translate syntax used unambiguously by other programs into the syntax proper to the interfaced program. Similarly, function names or constant names that are commonly used but not recognized by the interfaced programs, such as sh instead of sinh, are defined in the interfaces.

JOMA

Journal of Online Mathematics and its Applications

Dummy View - NOT TO BE DELETED