el(alpha)(ID:2000/ela001)


for Essential Language + alpha = first

originally a "Reduced Expression Set Language"

Aims to be a high-level language that knows about real hardware, for systems programming.


References:
  • Watanabe, Tan et al, "Essential Language el(alpha) A Reduced Expression Set Language for Systems Programming" view details Extract: EL(Alpha)
    Essential Language el(α) is developed as a "Reduced Expression Set Language" which is simple and yet satisfies conditions for efficient programming and efficient execution. The grammar of el(α) is determined by unifying a machine model applicable to almost all computers and a language model with features essential for system programming. Much efforts are exerted to make the language machine independent and to eliminate execution-time overhead. Its simple syntax drawn in 2 diagrams covers from the module interface specifications to low level operations required for embedded software. Descriptive power of the language and object code efficiency of the compiler are certified by its applications for production programming. Extract: Introduction
    Introduction
    Programming language is an interface between humans and computing machines. Many language designers are making the interface more user friendly. This trend has increased the burden on compilers and decreased runtime efficiency. Thus, assembly languages are still used in several fields where hardware capability should be exploited to its maximum or runtime efficiency pursued to its extreme. Software development for embedded computers is one such field, especially when the microprocessor in use is a special purpose computer having some special features. The number of users for one special purpose computer is not large enough and its user group can not afford to retain many specialists for developing good compilers and software tools for the computer.
    There is a strong demand for a language that is suitable for controlling hardware and software by using some control features specific to them, which can be easily used, and whose compiler can be quickly developed. Ada [11 is a language having strong descriptive power and a high level interface between humans and computers, but it is rather difficult to provide an efficient compiler quickly with a small number of engineers. C [21 is a language having a medium level interface to the machine, and is available on many computers. C has many builtin functions that use features of the operating system. For embedded computers having no operating system support, most of these features can not be used. In C, of course, we can write a program having high readability and maintainability; users are liable to write programs that are not easy to read and maintain because the language does not have enough features to force the users to increase readability. Modula-2 TM is another language used for system programming. Embedded softwares usually do not require such facilities for file I/O, screen I/O and the concurrent process provided by Modula-2. Many embedded softwares control concurrent execution in some way specific to them and SEND/WAIT facilities provided in Modula-2 might be extraneous in these cases. Ada, C and Modula-2 have real numbers, which are not used in many embedded computers. It is desirable to develop a language that is suited for writing embedded softwares with high reliability and maintainability.
    Statistics concerning the usage of language elements tell us that programs are mostly composed of simple statements and simple expressions [4'51. S. Zeigler and R. Weicker [61 said that in an operating system written in Ada, 37.12% of the statements were assignment, 26.86% were call, 15.44% were code, 9.76% were if, 6.68% were return and 2.13% were loop. Other statements were only about 2%. J. Elshoff [7] also said that in 120 PL/I programs, 98% of the expressions had none or one operator, and 75.3% of the operators were either plus, minus, equal or not-equal operators. These results show that the usage ratios of complex statements and complex expressions are very low in high level languages.
    Complex expressional features are difficult to implement and burden other simple features with extraneous control operations. It is :important to consider what language concepts are essential for practical programming, and to develop a simple language for enabling efficient programming and producing efficient object codes. Motivations for designing such "Reduced Expression Set Language" is similar to those of Reduced Instruction Set Computers 18l.
    The authors have developed a language named el(a) (pronounced el alpha), which is an abbreviation of Essential Language alpha. The design principle of el(c0 was to develop a reduced expression set language, thereby creating a new interface between humans and computers in order to
    (1) describe system programs that control operations of hardware and software on any desirable level in machine independent form,
    (2) make it easy to develop, read and maintain programs,
    (3) make it easy tO develop its compiler producing highly optimized object codes.
    In designing the language, firstly, studies were made from two sides; one was to build an abstract machine model representing most computing machines currently used, and the other was to clarify basic language notions for representing operations to be performed. Secondly, correspondence between the machine model and the language notions were taken into consideration to develop the basic idea of the language el(alpha). Thirdly, consistent syntax and semantics of the language were defined. Then, its compilers were developed to make the language available for practical use.
    This paper describes the design concepts and general specifications of the language, implementation of its compilers and its applications to practical programming Extract: Outline Of The EL(Alpha) Language Specifications
    Outline Of The EL(Alpha) Language Specifications
    5.1 Unification of The Machine Model and The Language Model
    The language specifications of el(alpha) were determined by unifying the machine model and the language model with some syntax sugar so that the language is suitable to machines for efficient execution and suitable to humans for efficient programming. Each operation of el(c0 is defined as the one corresponding to the abstract operation shown in Fig. 1 or the one composed from them. Several features such as the interface specifications have been included to make it easy to develop programs divided into separate parts. Much care was taken to ensure the language has no unexpected side effects, and to make programs readable and maintainable. The syntax of el(a) is shown in the Appendix. It is an LL(1) type grammar except for the label definition part.
    5.2 Program Structure
    A program is composed of one or more modules named units which are classified into either an interface unit or a processing unit as shown in Fig. 2. The processing unit has a close relationship with the common machine model and describes the operations to be performed. The interface unit describes interface information between units or between a program and a machine, such as declarations of common variables, specifications of common subprograms, and so on. Symbols declared in an interface unit can be used by a processing unit or another interface unit which connects the interface unit by a connect statement. If interface unit A is connected to interface unit B by "connect A;" in B, and B is connected to unit C by "connect B;" in C, then the declarations in A and B are inherited to C; hence all symbols declared either in A or B are available in C. Some interface units may have a "physical" option. Machine dependent specifications such as bit field configuration of record or address specification of a variable can be described only in the physical interface unit (an interface unit with the "physical" option) so as to isolate machine dependent parts.
    The processing unit has a declaration part for local symbols and an execution part. Subprogram nesting is not permitted so that access operations to variables are made simple and efficient.
    A subprogram specification in an interface unit has a corresponding subprogram declaration in a processing unit having the same unit name except when the subprogram has an inline option. Declaration of an inline subprogram common between units is written in an interface unit connected to these units. An interface unit having no corresponding processing unit of the same name declares symbols, such as types and variables, commonly used between units. A short example of the el(alpha) program is shown in Fig. 3.
    5.3 Declarations
    The declaration part of el(alpha) includes declarations of name replacement, type, option, variable, access class, subprogram specification, and macro specification. Predefined basic types are confined to integcr, character, boolean and pointer. The pointer declaration specifies the type name of pointed objects in addition to the name of the pointer.
    Compound type specifications define aggregates that are either one-dimensional array, record or area. The subscript bound of an array is fixed but it may not be specified for an array as a formal parameter, in which case the bound of the corresponding actual parameter is adopted as that of the formal parameter, An area represents overlaid components while record represents a sequence of components as previously explained. The compound type specifications may have a "dense" option in which case, components are left justified and arranged without leaving gaps.
    Integer and boolean may have bit length indication so that bit field mapping of objects can be specified as is shown in Fig. 3. The bit length indication also defines a value range specified by powers of 2, and it is a precise means in distinguishing the kind of numbers such as half integer, integer and long integer.
    The variable declaration may optionally have an "initial", "external" or "at" indication. The "external" indication shows that the storage allocated to the variable is declared in some other language. The address specification "at" is used in such cases when doing memory-mapped I/O, allocating a specific register to the variable and using control information placed in some special address.
    The indications of "bit", "dense" and "at" should be specified in physical interface units so that the machine dependent part of a program can be clearly identified. Symbols declared in physical interface units can be used in processing units and interface units without the indication of "physical" if these units are connected to the physical interface units. The above-mentioned "bit", "dense", "at" and "external" options are considered to be a minimum set of indications required to specify interfaces between an el(o0 program and hardware, or between el((x) and other languages.
    The access class 1 declaration specifies the highest level of access frequency so that the declared variable may be allocated a register if it is available. Access class "update"/"refer" specifies whether the variable is updated or not in the processing unit or subprogram containing the access class declaration.
    The name-replacement declaration specifies an identifier to be replaced by a constant, subprogram name or variable name. The unrestricted replacement of source text is not permitted because such language features make error detection difficult for both users and compilers.
    Multiple declarations are permitted for the same subprogram name provided that they can be distinguished by the difference in the number or type of its parameters. For example, define a procedure named SWAP which may have either a pair of scalars or a pair of arrays as parameters, and if actual parameters are scalar then the first definition is selected, and if they are arrays then the second definition is selected. This facility and the inheritance capability of the interface unit will be useful in object oriented programming.
    A subprogram with an "inline" indication is inline-expanded for each reference. A procedure with an "inlinable" indication is inline-expanded only for references with an "inline" indication. These indications are useful for performance tuning trading time for space.
    In some cases, such as physical input/output and interruption handling, some special sequence of machine instructions should inevitably be specified. To make such operations describable, el(c~) permits sequence of machine instructions to be specified if it takes the form of a subprogram with a "machine" indication.
    5.4 Executable Statements and Expressions
    Executable statements are assignment, if, case, loop, exit, goto, procedure reference, return, none and block statements. Aggregate operations are performed by a built-in procedures SET, EQUAL, GREATER and LESSER. An indexed loop with optional indication "auto" such as
    loop (0 <= i <= n) auto do; if A(i) < 0 then exit; end;
    certifies that, after the execution of the loop statement, the index variable i holds the value of the variable at the time of exit. If "auto" is not specified, the value of the index variable is undefined at the termination of the loop to make the execution of the loop faster.
    Allowable operations for pointers are confined to equal and unequal comparison, but pointer variables can be incremented or decremented by using the built-in functions
    INCR(v,a,i), DECR(v,a,i);
    where v is a pointer variable, a is an array whose element is pointed by v and optional parameter i is the count of increment/decrement as the number of array elements. Arithmetic operations on pointer variables are not permitted so as to guard programs from unexpected side effects.
    DOI
          in SIGPLAN Notices 26(01) January 1991 view details