Website van Eke van Batenburg

Various APL applications

After learning that APL is a programming language, one of the most frequent questions to me is "where is it used?". This page will give an answer to that question by short summaries of various APL projects.

APL is used over a wide spectrum of applications, varying from prototyping, administration, to science in a great variety of applications, varying from record keeping to mathematical applications such as actuarial use. Some examples are...

  • manufacturing resource planning by Bristol-Myers (AP86).
  • socio-economical models at the Academy of Sciences in Moskow (AP91).
  • checkout of the space shuttle at NASA (CA91).
  • prototyping at Dept of Defence (who eventually requires ADA code); for example algorithms for missile detection and for SDI's Boost Surveillance & Tracking System (AP93).
  • CAM (Computer Aided Manufacture) of various products for example golf clubs at Boston university (AP91).
  • statistical analysis by everyone who uses Statgraphics, one of the best statistical packages.
  • expert-systems, genetic algorithms and neural networks at IBM softechlab in Madrid (AL91).
  • computation of recipes (Kit-a-Kat), product planning and many other things at Rowntree (AP91).
  • actuarial computations all over in Holland, but particularly at Leuven actuaries.
  • design and production of audio equipment at Bang & Olufsen.
  • expert systems for chemical analysis by Institut Quimic de Sarria Barcelona (AP89).
  • animation of "the Bit" in the movie Tron (CA91).
  • ray-tracing in CAT scans at the German Center of Cancer Research (AP89).
  • computation of daily produce of beer at Heineken.
  • research and development in biotechnology at Novo Nordisk Denmark (AP89).
  • modern compositions programming Midi ports by Stanley Jordan (AP89, AP91).
  • operation Desert Storm; the whole logistics of supplying 2.5M ton military equipment, 5.7M ton fuel, 0.75M ton food, clothing tents and 485000 persons was planned, simulated and orchestrated by APL, calling Cobol & Fortran subroutines (IE91).

Some years ago Quote Quad, the journal of the APL Special Interest Group of ACM (SIGAPL of ACM) started a column "WhatsWhere" with succinct descriptions of APL projects. Upto now the following projects were published.

  1. J for exploration of speciation
  2. APL for description of Computer Architecture
  3. Employee Benefit Statement
  4. Mortgage Cash Flow Analysis
  5. Energy balance in arctic mammals
  6. Prediction of RNA secondary structure
  7. Portfolio Optimization Using Simulated Annealing Techniques
  8. CAFCA (a Collection of APL Functions for Cladistic Analysis)
  9. Studying behavioural tendencies with the Cox proportional hazards model
  10. Why snails are right
  11. Determining Adequacy of Reserves
  12. Time-Critical Administration
  13. Budget Management for Healthcare
  14. Sheet metal estimating for the HVAC contractor & Piping/Plumbing estimating for the mechanical contractor
  15. Boeing Capital Corporation Financial Model
  16. Computing Human Life Value
  17. Keeping hospitals healthy
  18. Covering the Windows API
  19. D2CELL: DB2 to Excel Data Mover
  20. APL in Granular Signal Processing
  21. Implementing an APL OLAP system: The Loan Information System (LIS)
  22. APL code conversion to C
  23. A list-server program in APL
  24. AIS - "Annuity Illustration System"
  25. Circuit Analysis and Electronic Design
  26. Primerica Financial Services
  27. APL based medical image analysis
  28. FTP Client as an APL+Win ActiveX Server Object
  29. GERVA: Secure Electronic Legal Communication with Attributes
  30. When "Cool" applies to Actuarial Software
  31. OpenHere site
  32. Genetic algorithms and cellular automata
The following paragraphs will give a little more details about each of these projects. In each header we give a tentative description of the field for which the application was made.

Pictures 1 t/m 21 © J.McGrew.

Evolutionary research:
J for exploration of speciation
by: Eke van Batenburg, research scientist of Institute Theoretical Biology, Leiden, Holland

Taxonomists agree about 2 mechanisms that cause divergence in traits of a former homogeneous population, leading to different species eventually. One, the environment is similar, but one part of the population focuses on another characteristic than another (sympatric speciation), say eating seeds that requires a heavy bill rather than honey that requires a long light bill. Or the environment changes locally and the organisms there adapt and gradually grow apart from those in the other environment (allopatric speciation).

We developed a simulation program in J to illustrate another mechanism. This alternative is not so commonly accepted among taxonomists. Now the environment changes, but identical for both portions of an homogeneous population. Our program showed that -given a natural barrier that temporarily prevents mixing- one portion adapt differently. Say the trees increases in size and one portion develops long necks and another long legs. Fluctuation of environmental characteristics is essential in this alternative, but the pressure is homogeneous.

This simulation program is now used to investigate what factors determine the permanence of such divergence once the barrier is removed. Knowledge of these factors will provide insight in forming of different species, rather than forming trait-divergence.

More information: ekevanbatenburg@live.com.

QuoteQuad 28(2)13 (©Copyright 1997 by ACM, Inc.)

Computerscience:
APL for description of Computer Architecture
by: Eke van Batenburg, Institute Theoretical Biology, Leiden, Holland

Addison Wesley recently published "Computer architecture. Concepts and Evolution" written by G.A. Blaauw and F.P. Brooks jr. (ISBN 0-201-10557-8). This book describes the computer architecture of some 30 important machines. Descriptions are in "human" language as well as in A Programming Language. These APL descriptions are useful first of all to formulate more concise how each machine works, but even more interesting is that it enables one to simulate each of the computers on a PC (later this year a CD will be produced with all APL programs).

Blaauw and Brooks first develop a conceptual framework for understanding computer architecture. Then they describe not only what present architectural practice is, but how it came to be so. A major theme is the early divergence and the later reconvergence of computer architecture. They examine both innovations that survived and became parts of the standard computer, and the many ideas that were explored in real machines but did not survive (and why not). The goal is to analyse and systematise familiar design alternatives, but the book is heavily illustrated with detailed executable APL descriptions of both early and more recent computers.

More information:

  • Addison-Wesley, 1 Jacob Way, Reading, MA 01867-39999
  • Prof.Dr. G.A. Blaauw, Mozartlaan 124, 7522 HP Enschede, The Netherlands
  • Prof.Dr.Frederick P.Brooks, Dept.Computer Science, Sitterson Hall UNC NC27510-3175

QuoteQuad 28(2)14 (©Copyright 1997 by ACM, Inc.)

Insurance/Human Resources:
Employee Benefit Statement
by: J. Karman, Pensionfund Netherlands Broadcasting, Holland

Last year we (Pensionfund Netherlands Broadcasting (PNO)) were asked by one of our major clients to provide an individual Employee Benefits Statement for their 1800 people. From the employee's point of view it is a survey of all his primary and secundary labour conditons. This includes personal data, salary, social security, pensionfund, health insurance and other fringe benefits like training programs, company car, telephone costs and so on.

These data are processed by different institutions and thus most probably by different information systems.

The first problem therefore was: how to collect and streamline the data? The examples we had available from other companies were more or less moderate looking booklets, and far from the DTP-quality we had in mind.

Thus, the second problem was: how to produce 1800 really neat looking 16 page booklets with individual, sensitive data? Once an executive comes with an idea most of the time it has already been simmering for some time, and the very moment he asks you, he preferably wants it yesterday.

The third problem was therefore: how to get it done in time?

To start with the latter: our GM usually thinks of APL when things have to be done fast and reliable. For me it was just a "programmer's delight" opportunity.

The second problem was solved by means of Causeway's DTP-product Newleaf , which is 100% APL. (See also my article in Vector)[1].

Building the "funnel" for the data was a bit of organizing and APL programming. The common format of the fields became ASCII, delimited by the horizontal tab. An APL workspace was created and functions were created for collecting, assembling, converting and re-distributing the data. The results were set on four component files and processed by a domestic APL db-system.
A cover was designed with our logo and with a cut-out little window, giving view to our client-company's logo on the first inner page. The final product looked smart.
We made it as flexible as possible, so that it could be used by other clients as well.
A new standard was set and a new product could be announced.

Reference: Karman, J., Bookbinder's fun, Vector, Vol.13 No.4, April 1997

More information: Jan Karman, email karman@knoware.nl.

QuoteQuad 28(2)14 (©Copyright 1997 by ACM, Inc.)

Finance:
Mortgage Cash Flow Analysis
by: Stephen M. Mansour, Carlisle Group, Scranton.

The Carlisle Group in Scranton, PA develops software which is used in the mortgage industry to analyze collateral data and generate reports. The software known as CAS (Collateral Analysis System) is written in Dyalog APL and is used by several large mortgage companies in the U.S.

Many of these companies need to generate monthly cash flows of large pools of commercial and residential mortgages. These include standard fixed-rate mortgages, adjustable rate mortgages (ARMs), balloon mortgages and interest-only mortgages. These companies often need to project prepayments and defaults on these mortgages using complex mathematical models.

Much of this analysis had previously been done on spreadsheets from data retrieved from a mainframe database. CAS was designed as an analytic database--it handles both standard database functions, e.g. queries and reports, and complex analytics e.g. mortgage cash flow analysis. APL was a natural choice to program both the database and the analysis. The database operations were easy to implement from APL's array-handling capabilities, and the complex cash flow models followed naturally from APL's rich set of mathematical functions.

More information: Steve Mansour, email steve@carlislegroup.com.

QuoteQuad 28(3)3 (©Copyright 1998 by ACM, Inc.)

Physiology:
Energy balance in arctic mammals
by: Nils A Øritsland, Research Scientist, Norwegian Polar Institute Oslo, Norway

One of the directions in ecological physiology of mammals is to study how the physiological constraints of individuals may affect population development. I am using APL as the tool for working on theory and developing models concerned with the energy balance of individuals making up populations of arctic mammals. One of the pertinent set of processes concerns starvation and weight loss that may become lethal.

I developed a model in APL2 for simulating starvation survival and body composition in mammals, and included humans for obvious reasons. The model is expressed by simple difference equations. It showed how the decrement of the speed of combustion of body mass (metabolic depression) increase the survival time dramatically. Both body mass and fat content also affect survival time. Used in analysis of soldiers the model has yielded interesting results.

Reference: Øritsland, Nils A., 1990: Starvation survival and body composition in mammals with particular reference to homo sapiens. Bulletin of Mathematical Biology 52, No. 5, 643-655.

More information: Nils Are Øritsland, email nilsare@npolar.no.

QuoteQuad 28(3)4 (©Copyright 1998 by ACM, Inc.)

Molecular biology research:
Prediction of RNA secondary structure
by: Eke van Batenburg, Institute Theoretical Biology, Leiden, Holland

At Theoretical Biology of Leiden University APL is used to predict the secondary structure of RNA. RNA molecules are chains of nucleic acids (the primary structure). Some parts glue to other parts forming "hairpins" resulting in a secondary structure. This secondary structure is essential for understanding if/where synthesis starts and ends, why some (industrial induced) mutations are viable and others are not, or why some mutations are only viable when accompanied with a particular other mutation.

The most used -classical- computer program to predict this secondary structure computes all possible combinations of noncontradicting hairpins and chooses the one with the lowest energy as the right solution. We assumed the glueing was a stepwise process in nature such that each formed hairpin immediately excludes other possible solutions. This resulted in a APL program that was not only more often correct than the classical program, but was much faster and needed a PC for hours or days instead of days on big powerful workstations.

Reference: Batenburg,FHD; Gultyayev,AP, Pley,CWA: An APL programmed G.A. for the prediction of RNA secondary structure, J.Theor.Biology (1995)174:269-280.

More information: ekevanbatenburg@live.com.