Apple is a PL/I dialect programming language created by General Motors Research Laboratories for their Control Data Corporation STAR-100 supercomputer.
Apple is a subset of full PL/I, but has been extended to integrate with the Associative Programming Language (APL – not to be confused with APL (programming language) ) [1] : p.9 [2] : p.92
Data types | ||
Entity | "The ENTITY attribute specifies a variable that may be manipulated by the INSERT, REMOVE, FIND, and FOR EACH statements." [1] : p.94 | |
Set | "The SET attribute defines the name of a data aggregate that represents an ordered set of entity variables." [1] : p.107 | |
File_Set | A File_Set is a SET that is contained in an external file. |
Statements | ||
Create | Create is a synonym for Allocate. It causes storage to be allocated for a based variable. A file or set where the data is to be allocated may be specified. | |
Delete | Delete is a synonym for Free. Delete frees a based variable and optionally removes it from all sets of which it is a member. | |
Find | Locate an entity that is a member of a set or container based on specified conditions. An optional ELSE clause is executed if no entities are found. | |
For Each | Heads a group of statements to be executed for all entities or sets matching a specified condition. | |
Insert | Insert an entity into a specified set. Optionally, the placement of the new entity relative to other elements of the set may be specified. | |
Let | Set a locator variable to reference a specified set. | |
Remove | Remove an entity from a set. |
Builtin function | |
ALL | performs various operations on all members of a set, depending on the context in which it appears. |
APLESET | returns a value indicating whether or not a file-set has been created. |
APLEVAR | returns a pointer to the entity containing the set specified by its argument, or NULL if the set is a file-set. |
APLINDX | |
APLNUMB | |
APLOWNI | |
APLOWRS | |
APLSNAM | |
APLTYPE |
An OFFSET
variable identifies the relative location of a based variable in the containing file. A DESCRIPTOR
variable resembles a pointer variable, but also contains the length of the associated based variable in addition to its address.
The LOCK
statement puts a program into "locked status", where all asynchronous events will be queued. A corresponding UNLOCK
statement puts the program in "unlocked status", capable of processing asynchronous events. All queued events will be processed.
Apple uses the PL/I EVENT
data type to implement asynchronous processing.
An event variable can be associated with an external action, such as a keypress at the user's terminal, by a system call. Each event has a "delay state" and a "completion state" associated with it. When the event associated with the action occurs, the event becomes complete, and remains complete until the program accesses the information associated with the event. Events can also be marked complete with a SIGNAL
statement, rather than the PL/I standard assignment to theCOMPLETION
pseudovariable. An event can be put into a delay state by the DELAY
pseudovariable, and recognition will remain deferred until the program resets the delay state.
Events can be associated with "ON-Units", by the ON EVENT
statement, similar to PL/I standard for conditions. The REVERT
statement removes the association. When the event is recognized (complete and not delayed) the On-Unit is executed. This ON-Unit can access system information about the event using the ONPTR
builtin function, which returns the address of an "Event Completion Block", and sets the event to complete.
The REGISTER
storage class and the INLINE
builtin subroutine allow access to STAR hardware features.
A scalar arithmetic variable can be declared REGISTER [register-specification]
. register-specification
can be an unsigned integer constant 0..255 to specify one of the computer's hardware registers. If it is omitted the compiler will assign a register.[ citation needed ]
The INLINE
builtin subroutine inserts an arbitrary machine-language instruction into the compiled code. Except for the function code (operation code) and subcode of the instructions all operands can be numeric constants, variables, or arithmetic constants.
Example: [1] : p.202
CALL INLINE("F8", 5, 0, SOURCE, 0, "20", 0, TARGET);
The LITERALLY
specification allows the programmer to specify replacement text to be substituted at compile time. The syntax is:
%DECLARE <identifier> LITERALLY [ (<parameter-list> ) ] <character-constant> ;
If <parameter-list> is not specified the compiler replaces all occurrences of <identifier> throughout the program with <character-constant>.If <parameter-list> is specified, the replacement character string is formed by replacing all occurrences of the parameter name with the corresponding argument.
Example:
%DECLARE BITS LITERALLY(A1,A2) 'A1*A2*64'; I = BITS(J,B);
will generate the statement:
I=J*8*64;
Some features of standard PL/I are not included in Apple. The most significant are: [1]
CONTROLLED
and AREA
storage attributes are not supported. FILE
and FILESET
have many of the characteristics of AREA
.READ
, WRITE
, REWRITE
, LOCATE
, and DELETE
. DELETE
is used as a synonym for FREE
when deleting ENTITY
variables.PL/I is a procedural, imperative computer programming language initially developed by IBM. It is designed for scientific, engineering, business and system programming. It has been in continuous use by academic, commercial and industrial organizations since it was introduced in the 1960s.
An optimizing compiler is a compiler designed to generate code that is optimized in aspects such as minimizing program execution time, memory use, storage size, and power consumption. Optimization is generally implemented as a sequence of optimizing transformations, algorithms that transform code to produce semantically equivalent code optimized for some aspect. It is typically CPU and memory-intensive. In practice, factors such as available memory and a programmer's willingness to wait for compilation limit the optimizations a compiler might provide. Research indicates that some optimization problems are NP-complete, or even undecidable.
In computer science, control flow is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an imperative programming language from a declarative programming language.
In computing, inline expansion, or inlining, is a manual or compiler optimization that replaces a function call site with the body of the called function. Inline expansion is similar to macro expansion, but occurs during compilation, without changing the source code, while macro expansion occurs prior to compilation, and results in different text that is then processed by the compiler.
A stored procedure is a subroutine available to applications that access a relational database management system (RDBMS). Such procedures are stored in the database data dictionary.
In computer programming, a parameter or a formal argument is a special kind of variable used in a subroutine to refer to one of the pieces of data provided as input to the subroutine. These pieces of data are the values of the arguments with which the subroutine is going to be called/invoked. An ordered list of parameters is usually included in the definition of a subroutine, so that, each time the subroutine is called, its arguments for that call are evaluated, and the resulting values can be assigned to the corresponding parameters.
A+ is a high-level, interactive, interpreted array programming language designed for numerically intensive applications, especially those found in financial applications.
Loop unrolling, also known as loop unwinding, is a loop transformation technique that attempts to optimize a program's execution speed at the expense of its binary size, which is an approach known as space–time tradeoff. The transformation can be undertaken manually by the programmer or by an optimizing compiler. On modern processors, loop unrolling is often counterproductive, as the increased code size can cause more cache misses; cf. Duff's device.
In computer programming, an entry point is the place in a program where the execution of a program begins, and where the program has access to command line arguments.
In computer software, in compiler theory, an intrinsic function, also called built-in function or builtin function, is a function (subroutine) available for use in a given programming language whose implementation is handled specially by the compiler. Typically, it may substitute a sequence of automatically generated instructions for the original function call, similar to an inline function. Unlike an inline function, the compiler has an intimate knowledge of an intrinsic function and can thus better integrate and optimize it for a given situation.
In computer science, a call stack is a stack data structure that stores information about the active subroutines of a computer program. This type of stack is also known as an execution stack, program stack, control stack, run-time stack, or machine stack, and is often shortened to simply the "stack". Although maintenance of the call stack is important for the proper functioning of most software, the details are normally hidden and automatic in high-level programming languages. Many computer instruction sets provide special instructions for manipulating stacks.
In computer science, a calling convention is an implementation-level (low-level) scheme for how subroutines or functions receive parameters from their caller and how they return a result. When some code calls a function, design choices have been taken for where and how parameters are passed to that function, and where and how results are returned from that function, with these transfers typically done via certain registers or within a stack frame on the call stack. There are design choices for how the tasks of preparing for a function call and restoring the environment after the function has completed are divided between the caller and the callee. Some calling convention specifies the way every function should get called. The correct calling convention should be used for every function call, to allow the correct and reliable execution of the whole program using these functions.
Interprocedural optimization (IPO) is a collection of compiler techniques used in computer programming to improve performance in programs containing many frequently used functions of small or medium length. IPO differs from other compiler optimizations by analyzing the entire program as opposed to a single function or block of code.
This is an overview of Fortran 95 language features. Included are the additional features of TR-15581:Enhanced Data Type Facilities, which have been universally implemented. Old features that have been superseded by new ones are not described – few of those historic features are used in modern programs although most have been retained in the language to maintain backward compatibility. The additional features of subsequent standards, up to Fortran 2023, are described in the Fortran 2023 standard document, ISO/IEC 1539-1:2023. Many of its new features are still being implemented in compilers.
OpenHMPP - programming standard for heterogeneous computing. Based on a set of compiler directives, standard is a programming model designed to handle hardware accelerators without the complexity associated with GPU programming. This approach based on directives has been implemented because they enable a loose relationship between an application code and the use of a hardware accelerator (HWA).
The structure of the Perl programming language encompasses both the syntactical rules of the language and the general ways in which programs are organized. Perl's design philosophy is expressed in the commonly cited motto "there's more than one way to do it". As a multi-paradigm, dynamically typed language, Perl allows a great degree of flexibility in program design. Perl also encourages modularization; this has been attributed to the component-based design structure of its Unix roots, and is responsible for the size of the CPAN archive, a community-maintained repository of more than 100,000 modules.
In computer programming, a function is a callable unit of software logic that has a well-defined interface and behavior and can be invoked multiple times.
PL/SQL is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database, TimesTen in-memory database, and IBM Db2. Oracle Corporation usually extends PL/SQL functionality with each successive release of the Oracle Database.
The PL/I preprocessor is the preprocessor for the PL/I computer programming language. The preprocessor interprets a subset of the full PL/I language to perform source file inclusion, conditional compilation, and macro expansion.
The Associative Programming Language (APL) is a database language developed by General Motors Research Laboratories in 1966.