SIGAPL

APL98 Logo Abstracts from APL98
International Conference on APL
New gems from old roots
July 27-31, 1998 Rome


EGREGION: A Branch Coverage Tool for APL

by Robert Bernecky

This article describes our experience with test suites and automated branch coverage tools for APL software maintenance, based on our use of them to verify Y2K compliance of an APL-based database system. We introduce egregion, a simple, easy-to-use tool that assesses branch coverage in APL functions. The tool comprises a pair of APL functions that report detailed and summary function-level information about code coverage of test suites. The egregion tool provides a line-by-line analysis of statement coverage, labels not branched to, branches never taken, branches always taken, transfer of control via nonbranches, and branches to non-labeled lines. Although we do not consider this groundbreaking work, we do believe that the coverage tool will be valuable to APL programmers who are engaged in the creation of large, reliable applications.

[Full Text in PDF Format, 888 KB]


Writing Optimization Software in APL, J, and MATLAB: A Comparison

by Richard L.W. Brown

Since the appearance of [Karmarkar 1984] "A new polynomial-time algorithm for linear programming", interior point methods for linear programming have developed sufficiently to challange the traditional simplex method, especially on large problems. Moreover, interior point methods generalize to certain types of nonlinear problems that cannot be handled by the simples method. MATLAB is a software package that implements interior point methods for linear and nonlinear programming. This paper compares interior point method code written in MATLAB to code written in APL and J.

[Full Text in PDF Format, 490 KB]


Using APL Expressions in Database Operations

by Paul S. Mansour and Stephen M. Mansour

The Collateral Analysis System (CAS) is an analytic database written in Dyalog APL which combines the flexibility of a database with the power of a sophisticated analysis package. Much of the power and flexibility of CAS comes from the ability of users to create their own selection statements, calculations, and summary expressions.

An expression is a combination of constants,fields and user functions which can form a selection statement, new field calculation, or frequency report specification.

Users can generate tailor-made reports without programming. They simply enter expressions and format data and save the information with the database. Then, with the touch of a button, they can generate reports quickly and easily. CAS Expressions are merely APL expressions in disguise.

[Full Text in PDF Format, 745 KB]


The comparison of C++ and Mathematica in the generation of pseudo random numbers for financial and actuarial applications

by Marco Micocci, Angelo Manna, Alvaro Tomassetti

The paper considers the role of pseudo random number generators in the financial and actuarial numerical applications. Some generators are compared and some considerations are made about the distortion coming from their use. A general approach for the calculation of risk in financial and actuarial problems is presented.

[Full Text in PDF Format, 330 KB]


On Defining Application-Specific High-Level Array Operations by Means of Shape-Invariant Programming Facilities

by Sven-Bodo Scholz

Most of the existing high-level array-processing languages support a fixed set of pre-defined array operations and a few higher-order functions for constructing new array operations from existing ones. In this paper, we discuss a more general approach made feasible by SAC (for Single Assignment C), a functional variant of C.

SAC provides a meta-level language construct called WITH-loop which may be considered a sophisticated variant of the FORALL-loops in HPF or of array comprehensions in functional languages. It allows for the element-wise specification of high-level operations on arrays of any dimensionality: any set of high-level array operations can be specified by means of WITH-loops and be made available in a library. This not only improves the flexibility of specifications, but also simpifies the compilation process.

By means of a few examples it is shown that the high-level operations that are tipically available in array processing languages such as APL or FORTRAN90 can be easily specified as WITH-loops in SAC. Furthermore, we briefly outilne the mose important optimization techniques used in the current SAC compiler for achieving efficiently executable code.

The paper finally presents a performance comparison between a high-level specification for the multigrid relaxation kernal of the NAS benchmarks in SAC on the one hand and the low-level specifications in SISAL and in FORTRAN77 on the other hand. It shows that the SAC implementation, despite its higher level of abstraction, is competitive with the other two both in terms of program runtimes and memory consumption.

[Full Text in PDF Format, 534 KB]


Reducing Computational Complexity with Array Predicates

by Robert Bernecky

This article describes how array predicates were used to reduce the computational complexity of four APL primitive functions when one of their arguments is a permutation vector. The search primitives, indexof and set membership, and the sorting primitives, upgrade and downgrade, execute in linear time on such arguments. Our contribution, a method for static determination of array properties, lets us generate code that is optimized for special cases of primitives. Our approach eliminates runtime checks which would otherwise slow down the execution of all cases of the effected primitives. We use the same analysis technique to reduce the type complexity of certain array primitives.

[Full Text in PDF Format, 463 KB]


Turtle graphics: hidden features in APL2

by Hendrik Rama

Twenty-five years ago Martin Gardner wrote an article in "Mathematical Games" of the Scientific American with the title Fantastic patterns traced by programmed "worms". Later on these worms were called "turtles". These trutle graphics are well known from the LOGO-system.

These graphics are also vector graphics not made by setting absolute coordinates but by setting relative increments of distances and angles. With tiny APL2 idioms I have developed many 2D-graphics. It has happened in a short time in a normal manner and as a dilogue form. My top is "one-liner as eye liner"

[Full Text in PDF Format, 698 KB]


All Searches are Divided into Three Parts (String Searches using Ternary Trees)

by David Siegel

This paper considers the problem of searching for strings in a dictionary or symbol table. It presents a data structure which can be used for this purpose--the Ternary Tree. It considers the theoretical properties of this structure, compared with other possible structures for the same purpose. It presents an implemenatation of this structure in APL, including code to do a variety of operations on it.

[Full Text in PDF Format, 693 KB]


Writing a Compilers Compiler in APL

by Enrique Alfonseca

This paper describes the special capabilities of APL2 for the construction of compilers and translator writing systems (TWS). To that purpose, a TWS has been written in APL2, which takes as input a complete description of a language including an attribute grammar, in extended Backus normal form, and the semantic function associated to each rule of the grammar, written in APL2. The output of the TWS is a compiler, generated directly inside the workspace and ready to compile source code written in the provided language.

[Full Text in PDF Format, 781 KB]


An Epistemology of APL

by J. Phillip Benkard

Epistemology is the study of what we know and how we know it. In everyday life this usually means trying to understand how we build a mental model which seems to correspond to the reality of the world around us. From the dot matrix of our retina, with their million or so pixels, our brains recognize as units such objects as straight lines, curves, and human faces. From vibrations of nearby air molecules we hear conversations and C major triads. Ordinary people simply consider what we know about our surroundings as interpreted by our senses, to be what we can know about the world.

[Full Text in PDF Format, 1088 KB]


Simplifying Array Processing Languages

by Neville Holmes

A language like APL was a masterpiece of simplification when seen through the eyes of a computer user of the seventies. The virtues of simplicity are usually held to be many.

This paper firstly discusses simplicity in general, reviews some of the writing on simplicity coming from the computing world, and briefly construes the development of APL, and the later J, as being essentially efforts in siplification. Possiblities for further simpification are then canvassed.

Firstly, simplification of the usually accepted but unfortunate naming conventions adopted by array processing languages is proposed. Secondly, simplification of the arithmetic is very briefly outlined, more detailed treatment of this topic being available elsewhere. Thirdly, syntactic means for having all functions and operations dyadic are treated, and the advantages of adopting such means evaluated. Fourthly, the possibilities for a newly distinctive kind of function (called extractions) are described. These are considered as a kind of systematic renaming to supply arguments to functions. Fifthly, and in the context of J's simplifications, the need for hyperoperators is asserted. Finally, the nature of interpreters for array processing languages is reviewed, and suggestions made for facilities to be provided by such interpreters to aid the process of developing array processing code.

[Full Text in PDF Format, 471 KB]


Japanese Language Handling in APL environments

by Kyosuke Saigusa

While Japan is amongst the first countries to use APL back in the early 1970's and enjoyed at one time as high as 40% of IBM main-frame customers using APL, the lack of Japanese language support of APL in popular computing environments today such as UNIX/AIX, OS/2 and Windows seem to be driving APL out of the scene.

This paper tries to bring up this subject more officially than I have done in the past for more public discussion not only for Japan, but also for those countries, where the characters required by national languages cannot be contained in the ASCII tables of 256 codes.

[Full Text in PDF Format, 575 KB]


Compiling a simulation language in APL

by Manuel Alfonseca, Enrique Alfonseca, Juan de Lara

This paper describes the procedure used to build several compilers, written in APL and APL2, to translate two continuous simulation languages into APL and C++. The advantages and disadvantages of using APL to write a compiler are discussed. A compromise had to be found between performance (the model execution speed) and flexibility (the ease to modify parameters and test "what if" situations). The resulting compiler (an APL2 packaged workspace) has been used successfully to generate educational applications and in medical research.

[Full Text in PDF Format, 325 KB]


Crosstab, OLAP, and APL N-dimensional Data Analysis with Sparse Cubes

by Marin Barghoorn

OLAP is the process of creating and Online-managing multidimensional data, but what is the difference between CROSSTAB and OLAP? It is difficult to answer this question in a few words. Let us not waste time trying to find precise definitions, let us rather agree on the fact that compared with CROSSTAB OLAP is the technically more advanced method.

[Full Text in PDF Format, 208 KB]


BABAPL A Software Prototype of a Programmable Pocket APL Calculator

by Roger Busi

An APL pocket calculator is discussed that could offer powerful computing power in a small size. Such an APL programmable calculator should have the following advantages:

  • We could have the power of APL in a calculator that will take place in one hand, easy to use, and with a quick boot.
  • It should be powerful, but easy to master, and its documentation could be small.
  • Its price could be cheap.
  • At least, we could hope that this calculator also could make the promotion for array-oriented languages (like APL, J, and others) towards industry, education and the general public.

[Full Text in PDF Format, 976 KB]


Object Oriented Spatial Positioning Systems

by István Kádár and Erik Papp

The domains of a structured spatial positioning systems are extended to a single 2D or 3D boundary rectangle (MBR - Minimal axes-parallel Boundary Rectangle) domain. We try to encapsulate the domains strictly for the inside and/or the boundary (surface) of the object during our attempts. In case of such domains it is impossible to use traditional coordinateds because of boundary irregularity. Therefore we applied 2D and 3D versions of subrange type data structure for spatial indexing, which are well known in dynamic program languages. The two important methods of combinatorics namely enumeration and ranking were also applide to the spatial index used by us, derived from rank which should not be confused with concept of 'rank' used in the APL and J programming languages. During development we had to partly modify and extend the traditional concepts of circumfernec and area, as well as surface and volume. With the creation of nested superclasses andsublassees, it is possible for positioning systems belonging to different classes to inherit transformation parameters (translation, orientation, etc.) Polymorphism allows development of hidden virtual system which may perform transformations between any kind of coordinates and linear indices. Thus our positioning systems can be rightly called object oriented including every advantage and disadvantage of it.

[Full Text in PDF Format, 991 KB]


Axe: A Transportation Network Analysis Package

by Francesco Pedullà and Giorgio Salerno

This paper presents AxE, a package designed to help transport networks analysis and design.

Axe was born in 1995. It stems from the experience of Prof. G. Salerno in both teaching transportation theory at an Italian University and consulting with large institutions and companies on transportation modeling and planning. In his work Prof. Salerno has been extensively using APL for years. He regularly teaches his students an introduction to APL (using IBM's TryAPL2) and uses APL to code the major algorithms related to transportation theory. He also uses APL for his professional work as a consultant and to perform management tasks. First, the article briefly presents the package and its features. The body of the article is devoted to a discussion of the advantages (and, sometimes, limitations) that the use of APL in general and APL.68000 in particular has provided in the following areas during the design and implementation phases of AxE:

  1. algorithm coding;
  2. user interface generation;
  3. management of a relatively large and comples application.
AxE is currently available from Prof. G. Salerno.

[Full Text in PDF Format, 386 KB]


APL and Demographic Modeling

by U. Piasentin and D. Lanari and E. Migliorini

Since the seventies the negative demographic growth in the western courntries, and especially in Italy has led to a continuous population decrease and an increas in the number of aged people.

This trend must be controlled for its inevitable negative effects on socio-economical relations and must be counteracted by new policies. The aim of this paper will be to suggest a way of handling demographic data which could be of easy access to a large number of users at various territorial levels (national, regional, subregional, municipal).

In order to achieve this goal a method to implement the mathematical model for short and long term population projection will be provided. The software used will be Excel and APL2.

Excel provides the variables and the input parameters of the model written in APL2, the projection results go back to the Excel environment in order to be processed and interpreted.

[Full Text in PDF Format, 436 KB]


Large-Scale Space Object Tracking using APL2

by Jack G. Rudd and Richard A. Marsh and Marcus L. Munger

The number of space objects in earth orbit has increase steadily from the launch of the first space object (Sputnik) to the current level of approximately 10,000. The North American Defense Cheyenne Mountain Operations Center (CMOC), operated by the United States and Canada, provides continuous tracking of this growing constellation of space objects, including active and inactive satellites and space debris. This mission is accomplished for the most part using radar stations and ground-based optical tracking stations, with centralized orbit determination and satellite catalog maintenance performed at CMOC. The United States plans to augment this capability with satellite-based optical tracking. In this paper we discuss aspects of an extensive APL2 prototyping capability that we have developed to evaluate concepts for satellite-base tracking of space objects.

[Full Text in PDF Format, 702 KB]


Pattern Recognition in APL with Application to Reactor Diagnostics

by Alexander O. Skomorokhov and Michail T. Slepov

The paper describe implementation in APL of some methods of pattern recognition. These general-purpose techniques of data analysis are illustrated by application to Nuclear Power Plant Diagnostics. In particular we consider vibration spectra analysis, including simple descriptive statistics, smoothing and peak extraction, multidimensional scaling for data visualization, inormative features selection, cluster analysis and classification.

Implementation of algorithms used in the paper has been done in Dyalog APL. The paper discusses benefits of using APL for the problem area.

Application is based on analysis of real vibration characteristics measured at the Nuclear Power Plant in Novovoronehz. The paper discusses the technology of the analysis, the discovered data structure, and malfunction diagnostics.

The paper also mentions using the implemented techniques in the training of engineers for Nuclear Power plant and other applications.

[Full Text in PDF Format, 546 KB]


Using APL to build science tutors for the high school level

by Manuel Alfonseca

This paper describes the procedure used to build several courses on the sciences for the high school level. An APL2 program has been written that accepts problem models, including explanation models, and uses them to generate many different problems. Each course is provided with about one hundred problem models, from which the student is invited to solve many thousands of different actual problems. The unique features of APL2 have made it very simple to develop the program that supports the courses. Version exist for both DOS and Windows.

[Full Text in PDF Format, 1142 KB]


Teaching clasical calculation methods: APL challenge

by Andrei Buzin

An academic course, "Calculation Methods", is an obligatory one for students in applied mathematics. The purpose of ths course is to introduce the principles of numerical solutions for different mathematical models. This article is base on the experience of teaching calculating methods in the Russian University of Friendship (Moscow) for students in applied mathematics.

[Full Text in PDF Format, 2111 KB]


First Flight: Automated Tutorials for Fledgling APLers

by Steven J. Halasz

This paper discusses a proposed beginner-level APL tutorial program that can be delivered as an APL program or as an internet web site. The need for developing automated APL learning is presented, and cognitive as well as constructivist instructional design issues are reviewed. Implementation issues are discussed for APL-only and for combined APL and HTML approaches.

[Full Text in PDF Format, 2322 KB]


A Web-interfaced Array-based Mathematics Course

by Walter Spunde and Peter de Voil

The fasinating, often complex, often contextsensitive, classical mathematical notation presents a host of problems for machine interpretation. For those who forsee and educational environment in which interactive course material is delivered world-wide across the Web, the demand of universities (the accrediting agencies) for mastery of the calssical notation is somewhat frustrating. Computer-base notations, on the other hand, can also sometimes be clumsy, confusing, inelegant and aesthetically depleasing. A solution to this impasse might seem to be yet some way off. Nevertheless, as students, rather than instructors, increasingly come to determine the choice of purchase in educational products, it might prove to be possible to acquire mastery of classical notation by routes other than the traditional ones.

The USQ web-interfaced arrary-based first course in mathematics provides a rather different approach to the introduction of calculus. Because it is numerically based, the course largely avoids classical notation and lends itself well to distribution over the Internet. Linking the computations done in the course activities with classical notation is left to printed materials.

We will briefly outline the numerical approach to the teaching of calculus, and describe how the program is delivered over the Web.

[Full Text in PDF Format, 1431 KB]


APL Design of Graphic Displays for Motivation in Distance Education

by Alvin j. Surkan

APL is used in the experimental design of graphic displays to be applied in real-time, on-line education. These graphic displays are to be integrated in instructional dialogs. Our aim is to discover displays that will motivate students while they take computer-mediated and distance learning courses. During the learning process, it is especially important for a student to receive feedback about his/her progress, continually and within a few tens of seconds of the most recent interaction. This feedback may indicate student performance relative to the recent past and also relative to their peers who have interacted with the same learning items. Compact and easy-to-interpret graphical or quantitative (partly numeric) displays of student progress are designed as character arrays. The rules for constructing these arrays are described convenientlyin APL functions. Such functions specify a template for each display and establish design correctness. The functions also allow flexible testing that reveals how easy it is to understand each display.

[Full Text in PDF Format, 608 KB]


Highly Parallel Computing in Simulation on Dynamic Bond Portfolio Management

by Vittorio Moriggia and Marida Bertocchi and Jitka Dupaková

The bond portfolio management problem is formulated as a stochastic program based on interest rate scenarios. It has been proved in Dupaková (1998) that small error in constructing scenarios will not destroy the optimal solution. The aim of the contribution is to quantify, through carefully planned simulation studies, the magnitude of the above-mentioned errors and to give bounds, at a specified confidence level, for the optimal gap of the unperturbed problem and the "true" optimal value. Parallel computer numerical results are presented.

[Full Text in PDF Format, 535 KB]


Optimization with Dynamic Functions

by Stephen M. Mansour

Many optimiztion methods are iterative in nature and require users to specify constraints and objectives. The normal way to handle this typeof problem would be to create a loop with an execute statement inside the body of the loop. The loop is necessary because of the iterative nature of the algorithm and the execute statement is necessary because the object function is user-defined.

"Execute" can be costly inside a loop. While there are existing ways to remove "execute" from the loop, they are awkward. However, dynamic functions can be built ahead of time and called inside the loop. Defined operators allow an arbitrary optimization function to be passed to the looping function.

The method of simulated annealing can deal with large-scale optimization problems without getting trapped in local minima. Constraints can be treated as objectives with a high penalty for violations. Hence we can eliminate constraints and deal only with objectives. A series of objectives is combined into a single objective function. Since the objectives are defined by the user, a dynamic function is created. The goal is to reduce the result ofthe dynamic function to zero (negative values are not permitted). The function is called iteratively until a specific tolerance is reached.

This paper will use an example from the mortgage industry to demonstrate the use of dynamic functions in iterative optimization methods.

[Full Text in PDF Format, 317 KB]


The use of Markov discontinuous processes in the pricing of derivative securities: the application of APL

by Marco Micocci

The paper deals with one of the most important fields of research in modern financial theory: the valuation of derivatives. The aim of the work is the use of a discontinuous. Markov process to model the dynamics of stock prices and consequently to discover the right price of the derivative instruments, in place of the traditional binomial multiplicative process used frequentlyin many discrete models. At the end of the work various applications are presented. In them the stochastic process of the stock prices is modelled with the use of a simple and powerful APL program. In the applications APL shows all its capacity of calculation and matrix manipulation for mathematical uses.

[Full Text in PDF Format, 290 KB]


Corporate Analysis by APL

by Arto Juvonen and Unto Niemi

This paper describes how APL has been used in Finland in the field of corporate analysis. The concept of corporate analysis is shortly introduced. A corporate analysis package, Trennus, is introduced. However, the emphasis of this paper is practical. It describes the concepts used in programming large Windows based software. The tools and ideas are universal and can be applied in any large software.

[Full Text in PDF Format, 555 KB]


Neural Network for Partitionable Variational Inequalities

by Giulia Rotondo

Often in recent times industries have asked mathematicians to determine their "true" utility functions directly from the available data about used resources and about the corresponding profits in order to optimize the latter with respect to the former. The possiblity of determining the utility function directly from the data is very important because in this way the exact situation of the company is described. Moreover, the biggest companies divide their investments into several activities. The optimization of their utility function can lead to problems that involve separable or partitionable functions. Two-layered feed-forward neural networks are able to approximate any separable function while fitting the data mantaining the separable structure with the desired approximation error. Thus the theory of partitionable variational inequalities can be use in order to find the optimum of the utility function, subject to some constraints. The presence of the partitionable structure is important because it simplifies the resolution algorithms and makes them more efficient. Moreover, with stronger assumptions about the function, the above results can be generalized to a larger class of utility functions: one problem of dimension n can be split into n problems of dimension one.

[Full Text in PDF Format, 364 KB]


SIGAPL

Last Update: January 09, 2001
For questions, problems, or comments regarding this website, please send email to:infodir_sigapl@acm.org