BLISS (programming language)

BLISS (programming language)

BLISS is a system programming language developed at Carnegie Mellon University by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known systems programming language right up until C made its debut a few years later. Since then, C took off and BLISS faded into obscurity. When C was in its infancy, a few projects within Bell Labs were debating the merits of BLISS vs. C.

BLISS is a typeless block-structured language based on expressions rather than statements, and includes constructs for exception handling, coroutines, and macros. It does not include a goto statement.

The name is variously said to be short for "Basic Language for Implementation of System Software" or "System Software Implementation Language, Backwards". It was sometimes called "Bill's Language for Implementing System Software", after Bill Wulf.

The original Carnegie Mellon compiler was notable for its extensive use of optimizations, and formed the basis of the classic book "The Design of an Optimizing Compiler".

DEC developed and maintained BLISS compilers for the PDP-10, PDP-11, DEC Alpha, Intel IA-64, and VAX, and used it heavily in-house into the 1980s; most of the utility programs for the VMS operating system were written in BLISS-32.

Language description

Cquote2|BLISS has many of the features of other modern high-level languages. It has block structure, an automatic stack, and mechanisms for defining and calling recursive routines.. provides a variety of predefined data structures and .. facilities for testing and iteration...

On the other hand, BLISS omits certain features of other high-level languages. It does not have built-in facilities for input/output, because a system-software project usually develops its own input/output or builds on basic monitor I/O or screen management services... it permits access to machine-specific features, because system software often requires this. BLISS has characteristics that are unusual among high-level languages. A name... is uniformly interpreted as the address of that segment rather than the value of the segment... Also, BLISS is an ‘‘expression language’’ rather than a ‘‘statement language’’.This means that every construct of the language that is not a declaration is an expression. Expressions produce a value as well as possibly causing an action such as modification of storage, transfer of control, or execution of a program loop. For example, the counterpart of an assignment ‘‘statement’’ in BLISS is, strictly speaking, an expression that itself has a value. The value of an expression can be either used or discarded in BLISS... Finally, BLISS includes a macro facility that provides a level of capability usually found only in macro-assemblers.| [http://63.249.85.132/langs/bliss/bliss.pdf Bliss Language Manual] |Digital Equipment Corporation (1987)

The BLISS language has the following characteristics:

* All constants are full word for the machine being used, e.g. on a 16-bit machine such as the PDP-11, a constant is 16 bits; on a VAX computer, constants are 32 bits, and on a PDP-10, a constant is 36 bits.

* A reference to a variable is always to the address of that variable. For example, the instruction Z+8 refers to adding 8 to the "address" of Z, not to its "value". If one needs to add 8 to the "value" of Z, one must prefix the variable with a period; so one would type .Z+8 to perform this function, which adds 8 to the "contents" of Z.

* Assignment is done with the standard = symbol, e.g. Z=8 – which says to create a full-word constant containing 8, and store it in the location whose address corresponds to that of Z. So, you can do something like Z+12=14 (or, alternatively 12+Z=14) which places the constant 14 into the address which is 12 words more than the address of Z. (This is considered bad practice.)

* Block statements are similar to those of ALGOL: a block is started with a BEGIN statement and terminated with END. As with ALGOL, statements are terminated with the semicolon (";"). When a value is computed, it is saved until the next statement terminator – which means that a value can be computed, assigned to a variable, and carried forward to the next statement, if desired. Alternatively, an open parenthesis may be used to begin a block, with the close parenthesis used to close the block. When parentheses are included in an expression, the standard precedence rules are used, in which parenthesized expressions are computed first,

* Conditional execution uses the IF expression, which tests a true-false condition, performs alternative actions, and returns a result.

* Comparison uses keywords such as EQL for equality (as opposed to overloading the = symbol for the same purpose), GTR for Greater Than, and NEQ for not equal. For example, the following code will assign the absolute value of Z to the address indicated by Q:

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

* Identifiers (variables and constants) must be declared before use, typically using the OWN keyword. Declaring a variable normally causes the compiler to allocate space for it; when necessary, a variable may be assigned a fixed machine address via the BIND declaration. This feature is primarily used for accessing either machine registers or certain special addresses.

* Subroutines in the language are called "routines", and are declared with the keyword ROUTINE.

* Macros, which allow for text substitution, are declared with the keyword MACRO.

* The language supports arrays, which are referred to as "structures", and declared with the keyword VECTOR.

* The language supports some high-level programming constructs such as
**Alternative execution paths via the CASE expression
**Looping through use of the INCR expression, which is similar to ALGOL's FOR statement
**Built-in string functions
**Certain automatic data conversions (number to string, etc.)

ource example

The following example is taken verbatim from the "Bliss Language Manual" cited above:

MODULE E1 (MAIN = CTRL) =BEGINFORWARD 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);ENDELUDOM

Versions

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

References

* Wulf, W. A.; Russell, D. B.; Habermann, A. N. (1971). "BLISS: A Language for Systems Programming". CACM 14(12):780-790, Dec 1971
* Wulf, W. A.; Johnson, R. K.; Weinstock, C. B.; Hobbs, S. O.; Geschke, C. M. (1975). "The Design of an Optimizing Compiler". New York: Elsevier, ISBN 0444001581.

External links

* [http://decus.decus.de:8080/htbin/webbook/PUBLIC$ROOT%3a%5bUTIL.BLISS%5d4358pro.p7.#1 BLISS Manual at DECUS]
* [http://63.249.85.132/langs Site with PDFs of manuals]
* [http://compilers.iecc.com/comparch/article/87-07-029 Alan Lehotsky posting about BLISS at DEC]
* [http://h71000.www7.hp.com/freeware/freeware80/bliss/documentation/ Language Reference Manual]
* [http://vms.process.com/scripts/fileserv/fileserv.com?BLISS-ARTICLE "BLISS: A Language for Systems Programming" by W.A. Wulf, D.B. Russell, and A.N. Habermann. (PostScript)]
* [http://vms.process.com/scripts/fileserv/fileserv.com?BLISS-INTRO Session notes for "Introduction to BLISS" by Matthew D. Madison. (PostScript)]

Downloads

* [http://pdp-10.trailing-edge.com/bb-m836d-bm/ BLISS-10]
* [ftp://iecc.com/pub/file/bliss.tar.gz Older BLISS-11]
* [http://pdp-10.trailing-edge.com/bls36v42/ BLISS-36]
* [http://h71000.www7.hp.com/freeware/freeware70/bliss/ BLISS-11, BLISS-32 and BLISS-64]
* [ftp://freevms.nvg.org/pub/vms/freevms/ FreeVMS Portable BLISS for GCC]


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • T (programming language) — The T programming language is a dialect of the Scheme programming language developed in the early 1980s by Jonathan A. Rees and Norman I. Adams of Yale University as an experiment in language design and implementation. T s purpose is to test the… …   Wikipedia

  • Bliss — can be a state of profound spiritual satisfaction, happiness or joy, often associated with religious ideas of the afterlife.Bliss is also a natural, neurophysiological experience, potentially cultivatable, for which the drug Ecstasy (MDMA) serves …   Wikipedia

  • Bliss — noun a programming language used for systems programming primarily on computers produced by . Bliss is a parallel language to C, both being derived from B and BCPL …   Wiktionary

  • BLISS — Basic Language for Implementation of System Software, entwickelt von W.A. Wulf, CMU ca. 1969 Expression Language mit Blockstrukturen, typenlos, mit Exception Handling, Coroutinen, Makrosystem und hochoptimierenden Compiler eine der ersten nicht… …   Acronyms

  • BLISS — Basic Language for Implementation of System Software, entwickelt von W.A. Wulf, CMU ca. 1969 Expression Language mit Blockstrukturen, typenlos, mit Exception Handling, Coroutinen, Makrosystem und hochoptimierenden Compiler eine der ersten nicht… …   Acronyms von A bis Z

  • Comparison of programming languages — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • List of programming languages by category — Programming language lists Alphabetical Categorical Chronological Generational This is a list of programming languages grouped by category. Some languages are listed in multiple categories. Contents …   Wikipedia

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • System programming — Systems programming (or system programming) is the activity of programming system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims to produce… …   Wikipedia

  • Generation language — Quelltext eines Programms in der objektorientierten Programmiersprache Ruby. Eine Programmiersprache ist eine Notation für Computerprogramme; sie dient sowohl dazu, diese während und nach ihrer Entwicklung (Programmierung) darzustellen als auch… …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”