BLISS: a Language for Systems Programming
Total Page:16
File Type:pdf, Size:1020Kb
BLISS: A Language for Systems Programming W.A. Wulf, D.B. Russell, A.N. Hab ermann Carnegie-Mellon University A language, BLISS, is describ ed. This language is designed so as to b e esp ecially suitable for use in writing pro duction software systems for a sp eci c machine (the PDP-10): compilers, op erating systems, etc. Prime design goals of the design are the abilitytopro duce highly ecient object co de, to allow access to all relevant hardware features of the host machine, and to provide a rational means by which to cop e with the evolutionary nature of systems programs. A major feature which contributes to the realization of these goals is a mechanism p ermitting the de nition of the representation of all data structures in terms of the access algorithm for elements of the structure. sp eci c machine. Sp ecial purp ose languages, such Intro duction as compiler-compilers, do not fall into this category, nor do we necessarily assume that these languages In the fall of 1969, Carnegie-Mellon University need b e machine-indep endent. We stress the word acquired a pdp-10 to supp ort a research pro ject \implementation" in our de nition and havenot on computer networks. This researchinvolves used words such as \design" and \do cumentation." the pro duction of a substantial numb er of large We do not necessarily exp ect that an implemen- systems programs of the typ e whichhave usually tation language will b e an appropriate vehicle for b een written in assembly language. Atanearly expressing the initial design of a large system nor stage of this design e ort it was decided not to for the exclusive do cumentation of that system. use assembly language, but rather some higher-level Concepts suchasmachine indep endence, expressing language. This decision immediately led to another the design and implementation in the same notation, question|which language? In turn this led to a self-do cumentation, and others, are clearly desirable consideration of the characteristics, if any,which are goals and are criteria by whichweevaluated various unique to, or at least exaggerated in, the pro duction languages. and maintenance of systems programs. One pro duct However, they are not implicit in our de nition. of these delib erations was a new language, whichwe There are a few extant examples of languages which call bliss. Clearly, a language is not the only to ol t our de nition: epl (a PL/1 derivative which needed; however, it is the one with whichwedealin was initially used on multics [1] but whichhas this pap er. b een replaced by full PL/1), B5500 Extended algol We refer to bliss as an \implementation lan- (Burroughs Corp oration [2]), PL360 [3], and bcpl guage," although we admit that the term is some- [4]. what ambiguous since, presumably, all computer The various arguments for and against the use languages are used to implement something. To of higher-level languages to write systems software us the phrase connotes a general purp ose, higher- have b een discussed at length. We do not intend to level language in which the primary emphasis has repro duce them here in detail except to note that the b een placed up on a sp eci c application, namely the skeptics argue primarily on two grounds: eciency, writing of large, production software systems for a and an assertion that the systems programmer must C Copyright 1971, Asso ciation for Computing Machinery, not allowanything to get b etween himself and the Inc. Reprinted from the Decemb er 1971 issue of Communi- machine. The advo cates argue on the grounds of cations of the ACM (Volume 14, Number 12). Permission to pro duction sp eed (and cost), maintainability,re- reprint granted by the Asso ciation for Computing Machinery. design and mo di cation, and understandability and 1 ob ject co de must not dep end up on elab orate correctness. The rep ort of the NATO Conference run-time supp ort on Software Engineering held in Garmish (Octo- b er 1968) [5] contains several discussions on these Characteristics of Systems Programming Practice p oints. control over the representation of data structures It is our opinion that program eciency, except exible range of control structures (notably in- p ossibly for a very small number of very small co de cluding recursion, coroutines, and asynchronous segments, is determined byoverall program design pro cesses) and not by lo cally tricky, \bit-picking" co ding prac- mo dularization of a system into separately com- tices. Moreover, the critical co de segments are pilable submo dules frequently lo cated only after the system is op era- parameterization, esp ecially conditional compi- tional. This opinion is b orne out bymany systems lation whichhave exp erienced substantial p erformance im- provements from redesign or restructuring result- Overal l GoodLanguage Design ing from understanding or insight after the system encourages program structuring for understand- has b een running for some time (see, for example, ability E.E. David's comments, [5, pp. 55{57]). One of the encourages program structuring for debugging paramount design ob jectives of bliss was to facili- and measurement tate redesign and reco ding. Since this redesign is fre- economy of concepts (involution), generality, quently done by someone other than the program's exibility, etc. original author, there is a corollary ob jectiveof utility as a design to ol readability. This argues for go o d do cumentation| machine indep endence but also for understandability of the co de itself. Understandability is a function of many things, not The order in the ab ove list is not accidental. Those all of which are inherent in the language in which items found early in the list we consider to b e a program is written|a programmer's individual absolute requirements, while those o ccurring later in style, for example. Nevertheless, the length of a the list may b e thoughtofascriteriaby which alter- program text and the structure imp osed up on that native designs are judged once the more demanding text are imp ortant factors and argue strongly for the requirements are satis ed. use of a higher-level language. Not all of the goals mentioned ab ove are com- Presuming the decision to use an implementa- patible in practice. For example, eciency, access tion language, which one should one cho ose? An to machine features, and machine indep endence are argument might b e made for cho osing one of the con icting goals. In fact, the design of bliss is existing languages, say fortran, PL/1, or apl, not machine indep endent, although the underlying and p ossibly extending it in some way. Wehave philosophy and much of the sp eci c design are. The chosen to add to the tongues of Bab el by de ning machine for which the language was b eing designed, yet another new language, and some justi cation is the pdp-10,was constantly in the minds of the de- required. The only valid rationale for creating a new signers. The co de to b e generated for each prop osed language is that the existing ones are inappropriate construct, or form of a construct, was considered to the task. It was our judgement that no existing b efore that construct was included in, or excluded languages dealt with all of the prop er issues and from, the language. Thus the characteristics of the hence a new language was necessary. What then are target machine p ervade the language in b oth overt the sp ecial characteristics of systems programs for and subtle ways. This is not to say that bliss could which existing languages are inappropriate? (Later not b e implemented for another machine; it could. we shall discuss how these manifest themselves in It do es say that bliss is particularly well suited to bliss.) The two sp ecial characteristics most fre- implementation on the pdp-10 and that it could quently mentioned are eciency and access to all probably not b e as eciently implemented on most hardware features of the machine. We add several other machines. We think of bliss as a member things to these; the resulting list forms the design (the only one at present) of a class of languages ob jectives of bliss. that are similar in philosophy and that mirror a similar concern for the imp ortant asp ects of systems Requirements of Systems Programs programming, but where each is tailored to its host space/time economy machine. access to all relevant hardware features 2 As another example of the incompatibilityof control, and (3) data structures; nally,wemention these goals, consider the requirement for minimal some other miscellaneous features. run-time supp ort and the use of the implementation language as a design to ol. In some sense a design 1. Storage to ol should b e at a higher level than the ob ject A bliss program op erates with and on a number b eing designed|that is, the to ol should relievethe of storage \segments." A storage segment consists designer from concern over whichever details the of a xed and nite number of \words," eachof designer deems appropriate only for later consider- which is comp osed of a xed and nite number of ation. Any language relieves its user from concern \bits" (36 for the pdp-10). Anycontiguous set over certain details; even assembly language frees of bits within a word is called a \ eld." A eld the co der from the need to make sp eci c address may b e \named"; the valueofanameiscalled assignments.