Английская Википедия:BLISS
Шаблон:Other uses Шаблон:Infobox programming language BLISS is a system programming language developed at Carnegie Mellon University (CMU) by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known system language until C debuted a few years later. Since then, C became popular and common, and BLISS faded into obscurity. When C was in its infancy, a few projects within Bell Labs debated the merits of BLISS vs. C.Шаблон:Citation needed
BLISS is a typeless block-structured programming 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. However, in his 2015 oral history for the Babbage Institute's Computer Security History Project, Wulf claimed that the acronym was originally based on the name "Bill's Language for Implementing System Software."[1]
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.
Digital Equipment Corporation (DEC) developed and maintained BLISS compilers for the PDP-10,[2] PDP-11,[2] VAX,[2] DEC PRISM,[3] MIPS,[2] DEC Alpha,[2] and Intel IA-32,[2] The language did not become popular among customers and few had the compiler,[4] but DEC used it heavily in-house into the 1980s; most of the utility programs for the OpenVMS operating system were written in BLISS-32. The DEC BLISS compiler has been ported to the IA-64 and x86-64 architectures as part of the ports of OpenVMS to these platforms.[2][5] The x86-64 BLISS compiler uses LLVM as its backend code generator, replacing the proprietary GEM backend used for Alpha and IA-64.
Language description
Шаблон:Long quote Шаблон:Quote
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. SoZ+12=14
(or, alternatively12+Z=14
) places the constant 14 into the location which is 12 words after the address of Z. (This is considered bad practiceШаблон:By whom.) - Block statements are similar to those of ALGOL: a block is started with a
BEGIN
statement and terminated withEND
. 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, andNEQ
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 theBIND
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 language 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.)
- Alternative execution paths via the
Source example
The following example is taken verbatim from the Bliss Language Manual:[6]
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 - DEC version of BLISS-11
- BLISS-32
- BLISS-36
- BLISS-64
- Common BLISS - portable subset
Notes
References
- Шаблон:Cite journal Also: "BLISS: A Language for Systems Programming". (PostScript)
- 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.
- Шаблон:Cite journal
External links
- BLISS Manual at DECUS
- Lehotsky, Alan; a post about BLISS at DEC
- Madison, Matthew D.; Session notes for "Introduction to BLISS" (PostScript)
Downloads
- ↑ Шаблон:Cite interview
- ↑ 2,0 2,1 2,2 2,3 2,4 2,5 2,6 Шаблон:Cite journal
- ↑ Шаблон:Cite web
- ↑ Шаблон:Cite mailing list
- ↑ Шаблон:Cite webШаблон:Cbignore
- ↑ Ошибка цитирования Неверный тег
<ref>
; для сносокManual
не указан текст
- Английская Википедия
- Systems programming languages
- OpenVMS software
- Carnegie Mellon University software
- Programming languages
- Programming languages created in 1970
- Страницы, где используется шаблон "Навигационная таблица/Телепорт"
- Страницы с телепортом
- Википедия
- Статья из Википедии
- Статья из Английской Википедии
- Страницы с ошибками в примечаниях