Jump Over Left Menu
The Kent Software Tools
M A Broom, M T Russell, M C Wheadon
18 December 1985
Common Base Programme: PERQ User Note 3
The University of Kent has developed a range of software tools for the PERQ. These tools are generally aimed at exploiting the mouse and graphics facilities of the PERQ to provide a better user interface, though a few tools are simply designed to plug gaps in the repertoire of Unix commands provided in PNX.
The Kent Software Tools are now being released to the Common Base Community. For this purpose the tools are divided into two categories:
- general-release tools: these will be issued as part of the general release of PNX 5 and PNX SR. They will be on Floppy 21 - which may, in fact, consist of several physical floppies.
on-request tools: these are available on request and are
outlined in this document. If you want any of them you should write to
The University Canterbury
Kent, CT2 7NF
The list of tools follows.
a graphical debugger for C and Fortran. Ups is both a run-time and a postmortem debugger. It has no typed commands; all interaction with ups is done by selecting menu options or by editing fields displayed on the screen.
If the target process is run from the debugger it will run independently, in its own window, until it reaches a break point or receives a signal when it will be suspended. The debugger can then be used to examine the program's data areas or set new break points before the process is restarted.
ups can display the full range of FORTRAN and 'c' data types including 'C' structures, unions, enumeration types, multidimensional arrays, and pointers. 'C' structure elements are viewed by expanding the structure variable. If an element is itself a structure (or pointer to a structure etc.) then it can be expanded in turn. Indentation is used to display the depth of nesting. FORTRAN arrays are viewed in separate windows.
ups also interacts with a modified version of the spy editor to show the position of breakpoints etc. in the program source.
Ctab is supplied with the ups debugger. This tool can be used to supply the information that is not provided by the Perq 'c' compiler. This enables ups to expand 'c' structures, unions, and multidimensional arrays.
a UNIX tree copying program like cptree(1) but tailored for a site where there are a number of Perqs and software needs to be regularly transferred between them. Ut has two modes. In the first mode, used for copying from floppy disc to hard disc, the source directory is copied to the destination but a file will not be copied if there already exists a file in the destination directory with the same name and a later modification date. In the other mode, used for copying from hard to floppy, the destination directory is used as the model and a file will only be copied if it already exists in the destination directory and has a later modification date in the source directory.
This may sound complicated but once the directory structure has been set up on the floppy disc it makes for efficient transfer of files from one Perq to another.
At Kent, users are not tied to a particular Perq but use whichever one is free. This manner of working depends on the use of ut to copy files to and from floppy disc. Users can then be sure that they have up-to-date files on the Perq they are using.
a tool for examining files. View attempts to work out a file's type and display the contents in an intelligent way. It can be used to look at font files, cursor files, directories, etc. as well as text. View copes with growing files and can therefore show the output of, for example, man thing > file &.
a visual implementation of the diff utility. Vdiff is an interactive tool that presents the differences between two files in a graphical format. As the user scrolls through the files, vdiff indicates the differences with a system of lines, boxes, and highlighted text.
A window manager alternative to winit(1). All of the standard winit features are provided: window creation, deletion, size change, movement, plotting and wiping.
Minit takes a different approach to user command entry. All sh( 1) commands are entered through the window manager window and directed to the appropriate windows, which are automatically selected and de-selected for input. This provides a single focus for command submission and so allows a selectable history of commands to be maintained along with the valuable feature of command line editing, both of which features make use of the puck for indication of intent.
A file system editor which allows the user to interactively edit file names, permissions and ownerships. In addition files can be copied, moved or deleted and directories can be moved or created using a menu driven interface. Fs is designed to provide the sort of file system interface that is suited to use on screen- based, graphics workstations, where indicating intent through pointing is much more natural than the use of keyboard syntax.
A package for providing user programs with menus. The menus are created using a menu editor (med itself) and there is a library of routines which allow a user's program to display the menus and obtain the field selected. The menus can be created so that fields conceal further subfields and the effective surface area of a single menu is unlimited. Interface libraries exist for C, Pascal and Fortran.
a tool to display documentation. The reader simply points at buttons on the screen to expand the parts of the document he/she wants to see. A cut-down version of guide is released as the help system for software such as ups.
In addition to the above, a substantial suite of FORTRAN tools have been ported to the Perq. Most of these tools stand alone, but a few are supplied in groups. The main constituents of the suite are as follows (see Appedix A for more details):-
- Basic Linear Algebra Subroutines. A widely used set of routines for performing elementary operations on matrices / vectors.
- FORTRAN subroutines which analyse and solve various systems of simultaneous linear algebraic equations.
- a set of subroutines for the solutions of large sparse positive definite linear systems.
- a pair of subroutines to compare the solution of large sparse eigenproblems, using the Block Lanczos algorithm with selective orthogonalisation.
- a set of subroutines for the in-core solution of large sparse symmetric and non-symmetric systems of linear equations.
- a comprehensive set of facilities for the production, testing, and maintenance of FORTRAN software. Some of these tools have been written at the University of Kent.
- Brents multiple precision arithmetic package.
- a FORTRAN precompiler. Enables extensions to be incorporated into FORTRAN 66.
- ACM algorithms.
- NAG MK11 help
- an on-line help system.
- a tool for the study of numerical methods for solving elliptic partial differential equations.
- collection of FORTRAN subroutines that compute the eigenvalues and eigenvectors of nine classes of matrices.
- an interactive program for performing scientific and engineering numerical calculations.
Matlab is an interactive program for performing scientific and engineering numerical calculations. Short for Matrix Laboratory, MATLAB allows for the simple definition and manipulation of matrices and vectors.
With the provision of user defined functions MATLAB is a powerful general purpose tool for the numerical computation of, for example, eigenvalues, solution of partial differential equations, etc.
APPENDIX A - FORTRAN tools
BLAS - Basic Linear Algebra Subroutines
These are a widely used set of routines for performing elementary operations on matrices/vectors. The operations the BLAS perform include:
- index of the largest component
- vector norms
- vector copy and swap
- dot product
- scalar times plus vector
- Givens transformations.
The BLAS were developed by Lawson, Hanson, Kincaid, and Krogh (1979). We have produced two versions of these routines, one in FORTRAN 77 (to enhance the readability of the routines) and one in C (to improve the efficiency).
Linpack is a set of FORTRAN subroutines which analyse and solve various systems of simultaneous linear algebraic equations. We have only implemented, so far, the real (double precision) part of the package.
The subroutines deal not only with square coefficient matrices, but also over and underdeterminated systems which are frequently encountered in the least squares problems and other statistical calculations.
A set of subroutines for the solution of large sparse positive definite linear systems.
Sparspack offers a collection of methods for solving sparse systems of linear equations Ax = b where A is an N by N non singular matrix, and x and b are vectors of length N.
The package also includes a user interface which assists the user in setting up the coefficient matrices in the required form. That is:
- Step 1: The user supplies the non zero structure for A.
- Step 2: The package reorders the original problem (finds a permutation of P), and allocates storage for the triangular factorisation of P A PT = LV.
- Step 3: The user supplies the numerical values for the matrix A.
- Step 4: The package computes the triangular factors L and V of PAPT.
- Step 5: The user supplies the numerical values for b.
- Step 6: The package computes the solution x.
A pair of subroutines to compare the solution of large sparse eigenproblems, using the Block Lanczos algorithm with selective orthogonalisation.
One subroutine computes a few eigenvalues and eigenvectors at one end of the spectrum whilst the other subroutine computes all the eigenvalues and eigenvectors of a large symmetric matrix, A, outside a user defined excluded interval.
A set of subroutines for the in-core solution of large sparse symmetric and non-symmetric systems of linear equations. One routine for reordering the matrix, four routines for solving a possibly reordered system of linear equations.
The systems may be symmetric or non-symmetric and provision is made to solve multiple right hand sides efficiently.
Toolpack provides a comprehensive set of facilities for the production, testing, and maintenance of FORTRAN software. The present release includes:-
- a lexer and parser.
- a FORTRAN source formatter (similar to the old FORTRAN 66 POLISH program from Bouldes).
- a precision transformer (changes program units from single to double precision and vice versa).
- a declaration standardiser (inserts explicit type declarations for all variables used).
- a version of the NBS FORTRAN 77 analyser.
- a FORTRAN aware file differencer (diff plus a knowledge of FORTRAN).
- a data file comparison tool (dill plus some idea of numbers).
- a symbolic differentiator for FORTRAN 66 (great for providing the derivative function definitions for the NAG E04 routines!).
- a tool to turn intrinsic function references into their generic forms.
- a macro processor.
- a text formatter.
- a tool to set the many options for the FORTRAN source formatter.
- a line based editor.
Plus other general tools.
We have written a fast C interface for Toolpack which gives a 15 - 30 times improvement in execution speed compared to the portable FORTRAN interface.
Plus the extra tools:
- tool to transform all array parameters declared to be of length 1 into assumed size array declarations.
- tool to transform HOLLERITH formatted strings into quoted formatted strings.
- screen based tools:-
- The options tool has been turned into a menu driven graphical tool using the graphic facilities of the Perq.
- Output from the NBS FORTRAN 77 has been turned into a graphical tool summarising the important output points.
MP - Brent's multiple precision arithmetic package.
This package allows for the definition and manipulation of real numbers of user defined accuracy. As well as the obvious arithmetic operations it includes routines for the evaluation of a wide range of mathematical functions.
AUGMENT - A FORTRAN precompiler.
This system enables extensions to be incorporated into FORTRAN 66, e.g. the definition of newtypes. For example it is possible to use AUGMENT to provide a nice user interface to Brent's MP package which allows the definition of a new type, MULTIPLE, and the ability to write straight forward arithmetic expressions using MULTIPLE variables.
A selection of ACM algorithms are now working on the Perq.
NAG MKll help system
An on-line NAG help system using P.J. Brown's GUIDE system.
GUIDE User Manual: P J Brown, Computing Lab, The University, Canterbury, Kent, CT2 7NF.
Ellpack is a tool for the study of numerical methods for solving elliptic partial differential equations. It is a software system for solving elliptic boundary value problems which includes both a very high-level problem statement language and an extensible library of problem solving modules.
The ELLPACK language is an extension of FORTRAN that allows users to declare boundary value problems. Powerful executable statements are available which invoke predefined modules for each stage of the solution process. Since a variety of modules representing different methods are available at each stage, ELLP ACK has become a flexible tool for both experimenting with numerical methods and solving applications problems.
Eispack is a collection of FORTRAN subroutines that compute the eigenvalues and eigenvectors of nine classes of matrices. The package can determine the eigensystem of the following matrices:
- complex general
- complex Hermitian
- real general
- real symmetric
- real symmetric banded
- real symmetric tridiagonal
- special real tridiagonal
- generalised real
- generalised real symmetric.
In addition, there are two routines which use the singular value decomposition to solve certain least squares problems.