Aspen language specifications

Abstract
ASPEN is a "toy" language that has been designed for use in the teaching of compiler construction and is therefore a curious amalgam of highly refined language features that manage to barely cover the full spectrum of algorithmic languages. One selection statement is made to do the work of IF-THEN-ELSE and CASE, but with certain severe restrictions on the conditions that may be written. on the other hand, iterations must be written as a primitive infinite loop with explicit conditional exits.Only floating point (REAL) arithmetic is supported, and although strings are present, their only practical use is restricted to the labeling of output. Both array and record aggregates are defined, but both are reduced to n-tuples of fixed-length words that are referenced through pointers: each word contains either a REAL value or a pointer to another n-tuple or string. All pointers are strongly typed.The user is permitted to define his own types, but no coercions between types are predefined. Type definitions are implemented in the same manner as functions and procedures with all parameter passing being done by value. The uniformity of data structuring permits efficient implementation of simple parametric types and polymorphic procedures.Using two stacks at runtime, instead of one, a degree of dynamic storage allocation is possible, but without the need for a heap and garbage collection. The "dangling reference" problem is not avoided, however. Finally, an encapsulation mechanism that allows controlled permeation of names through a program is provided to support data abstraction and information hiding, although separate compilation is not supported.