BLISS (programming language)

from Wikipedia, the free encyclopedia
BLISS
Paradigms : structured , imperative ( procedural )
Publishing year: 1970
Designer: William Wulf
Developer: Carnegie Mellon University
Current  version : BLISS-64   ()
Typing : untyped
Dialects: Common BLISS
Influenced by: ALGOL
Operating system : Cross-platform : PDP-10 , PDP-11 , DEC Alpha , DEC PRISM , Intel IA-32 , Intel IA-64 , VAX
pdp-10.trailing-edge.com/bb-m836d-bm/

BLISS is a system programming language that was developed around 1970 at Carnegie Mellon University by WA Wulf , DB Russell and AN Habermann . It was the most popular system programming language before C emerged a few years later . From then on, C became more important than BLISS. In the first few years of C's existence there were a few projects at Bell Labs that saw BLISS as an advantage over C.

BLISS is an untyped, block-structured programming language in which expressions are in the foreground and not instructions . It contains constructs for exception handling , coroutines and macros . BLISS does not offer a GOTO instruction .

The name BLISS stands for "Basic Language for Implementation of System Software"; sometimes the abbreviation is also interpreted as "Bill's Language for Implementing System Software" because of the author William Wulf.

The original Carnegie Mellon University compiler was famous for its extensive optimization and formed the background of the textbook The Design of an Optimizing Compiler .

The Digital Equipment Corporation developed and maintained BLISS compilers for the PDP-10 , PDP-11 , DEC Alpha , DEC PRISM , Intel IA-32 , Intel IA-64 and VAX and used them intensively in-house in the 1980s. Most of the utilities for the VMS operating system were written in BLISS-32.

Properties of language

From the manual:

“BLISS has many devices from other modern high-level languages: block structure, automatic batch processing and mechanisms for defining and calling recursive procedures. […] It offers a large number of predefined data structures and […] facilities for tests and iteration. [...]

On the other hand, certain devices in other high-level languages ​​are missing in BLISS. It has no built-in devices for input / output because an operating system project usually develops its own input / output […] It allows access to machine-specific devices because system software often requires it. BLISS has properties that are unusual among high-level languages. A name […] is consistently interpreted as the address of a storage unit and not as a value in a storage unit. […] In addition, BLISS is an 'expression language' and not an 'instruction language'. That means that every construct of the language apart from the declarations is an expression. Expressions return a value and may also cause an action such as a change in memory, a change in control, or the execution of a program loop. Strictly speaking, the counterpart to a value assignment in BLISS is an expression that itself has a value. The value of an expression can either be used or ignored in BLISS. […] Finally, BLISS has a macro device that allows flexibility that is otherwise only found in macro assemblers. "

Basic characteristics of BLISS are the following:

  • All constants are whole-word values ​​for the machine being used, so on a 16-bit machine like the PDP-11 one constant is 16 bits, on a VAX 32 bits and on a PDP-10 36 bits.
  • The address of the variable is always linked to the name of a variable , not its value . For example, the instruction means that the number 8 will be added to the address of Z, not its value. If the value of Z is to be increased, the address must first be dereferenced by placing a point in front , that is to say .Z+8.Z+8
  • Identifiers for variables and constants must be declared before they can be used, typically with the keyword OWN. The compiler will then normally allocate memory for it; however, a variable can also be linked BINDto a specific memory address or a machine register with the declaration .
  • A value assignment is =noted with the symbol . The instruction Z=8specifies a whole word constant with the value 8 and stores it at the address of Z. In the light of other programming languages ​​it is unusual that the instruction Z+12=14or is also 12+Z=14permissible, which Zsaves the value 14 to the address of increased by 12 .
  • Keywords such as (“equal”), (“greater than”) and (“not equal”) are used for the comparison . The following program section assigns the absolute value of to the address of :EQLGTRNEQZQ

Q = (IF .Z GTR 0 THEN .Z ELSE -.Z);

  • Blocks (compound instructions) are similar to those of ALGOL : A block begins with BEGIN, ends with ENDand can define its own local variables. The semicolon (";") plays a special role. In Algol it is used to separate individual instructions from one another; in BLISS it determines whether the value of an expression is retained or not. The following example is from the Bliss Language Manual :
Z = BEGIN
    LOCAL TEMP;
    TEMP = .X;
    X = .Y;
    Y = .TEMP;
    .X EQL .Y
    END

A local variable is TEMPdefined here which is used to exchange the contents of two variables. The variables are then tested for equality and, because there is no semicolon after this statement, the result of the comparison (0 or 1) is retained and is Zassigned to the variable .

  • Subroutines are introduced with the keyword ROUTINE.
  • Macros are introduced with the keyword MACRO.
  • BLISS knows arrays , which are referred to here as structures and which are VECTORdeclared with the keyword .
  • Complex case distinctions using CASEexpressions
  • INCRCounting loops using expressions
  • Built-in functions for processing character strings
  • Automatic data conversions, for example between numbers and strings

example

The following example is from the Bliss Language Manual :

MODULE E1 (MAIN = CTRL) =
BEGIN
FORWARD ROUTINE
    CTRL,
    STEP;
ROUTINE CTRL =
!+
! This routine inputs a value, operates on it, and
! then outputs the result.
!-
    BEGIN
    EXTERNAL ROUTINE
        GETNUM,     ! Input a number from terminal
        PUTNUM;     ! Output a number to terminal
    LOCAL
        X,          ! Storage for input value
        Y;          ! Storage for output value
    GETNUM(X);
    Y = STEP(.X);
    PUTNUM(.Y)
    END;
ROUTINE STEP(A) =
!+
! This routine adds 1 to the given value.
!-
    (.A+1);
END
ELUDOM

Versions

  • BLISS-10
  • BLISS-11 - a cross compiler for the PDP-11
  • BLISS-16
  • BLISS-16C - the DEC version of BLISS-11
  • BLISS-32
  • BLISS-36
  • BLISS-64
  • Common BLISS - a portable subset

literature

  • Wulf, WA; Russell, DB; Habermann, AN (1971). BLISS: A Language for Systems Programming . CACM 14 (12): 780-790, Dec 1971
  • Wulf, WA; Johnson, RK; Vine, CB; Hobbs, SO; Geschke, CM (1975). The Design of an Optimizing Compiler . New York: Elsevier, ISBN 0-444-00158-1 .

Web links

Downloads

Individual evidence

  1. Bliss Language Manual ( Memento of the original from September 29, 2007 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. (PDF, 1987). @1@ 2Template: Webachiv / IABot / 63.249.85.132