Abstraction mechanisms in the BETA programming language

  • Authors:
  • Bent Bruun Kristensen;Ole Lehrmann Madsen;Birger Møller-Pedersen;Kristen Nygaard

  • Affiliations:
  • Aalborg University Center, Aalborg, Denmark;Aarhus University, Aarhus, Denmark;Norwegian Computing Center, Oslo, Norway;Norwegian Computing Center, Oslo, Norway

  • Venue:
  • POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
  • Year:
  • 1983

Quantified Score

Hi-index 0.00

Visualization

Abstract

The BETA programming language is developed as part of the BETAproject. The purpose of this project is to develop concepts,constructs and tools in the field of programming and programminglanguages. BETA has been developed from 1975 on and the variousstages of the language are documented in [BETA a].The application area of BETA is programming of embedded as wellas distributed computing systems. For this reason a major goal hasbeen to develop constructs that may be efficiently implemented.Furthermore the BETA language is intended to have a few number ofbasic but general constructs. It is then necessary that theabstraction mechanisms are powerful in order to define morespecialized constructs.BETA is an object oriented language like SIMULA 67([SIMULA]) and SMALLTALK ([SMALLTALK]). By this is meant that aconstruct like the SIMULA class/subclass mechanism is fundamentalin BETA. In contrast to SMALLTALK, BETA is a language in the ALGOL60 ([ALGOL]) family.SIMULA 67 is a system description and a programming language.The DELTA language ([DELTA]) is a system description language only,allowing description of full concurrency, continuous change andcomponent interaction, developed from a SIMULA conceptual platform.BETA started from the system concepts of DELTA, but is aprogramming language, drawing upon a large number of contributionsto programming research in the 1970s. A basic idea in BETA is tobuild the language upon one, general abstraction mechanism --- thepattern ([BETA a 77]) --- covering both data, procedural andcontrol abstractions, substituting constructs like class,procedure, function and type.Correspondingly objects, procedure activation records andvariables are all regarded as special cases of the basic buildingblock of program executions: the entity. A pattern thusdescribes a category of entities with identical structure.An entity consists of a set of attributes and anaction-part. An attribute may be a data-item or apattern. The action-part is a sequence of imperatives that may beexecuted.A data-item may be an entity or a reference to an entity.A pattern may be used in a procedure like manner in the sense thatan entity (procedure activation record) described by the patternmay be generated and executed as a part of the action sequence ofanother entity. A pattern may be used to generate entities thatexecute their action-part in concurrency with other entities. Suchentities may also execute their actions interleaved in a coroutinelike manner.Entities may be organized hierarcically by means of ageneralization of the SIMULA subclass mechanism. This givespossibilities for grouping common properties of entities ofdifferent patterns.In SIMULA 67 a class may have virtual attributes(procedures, labels, and switches). This is a powerful parametermechanism that gives the possibility to delay the specification ofan attribute to a subclass specification. However, SIMULA 67 lacksthe possibility to have virtual class attributes. Furthermore it isnecessary to have a runtime check on the parameters of virtualprocedures, since it is not possible to specify the parameter listof a virtual procedure. The virtual patterns of BETA is ageneralization of the virtual concept in SIMULA 67.In this paper the sequential part of BETA will be presented. Themain purpose is to demonstrate the use of the pattern/subpatternmechanism with virtual patterns as a powerful abstractionmechanism. In addition, a further generalization of the virtualconcept based on syntactic categories will be described.Work has been initiated to design and implement an integratedprogramming system for BETA. The approach to separatecompilation of BETA modules is described in [BETA c].This paper is organised as follows: Section 2 describesentities, patterns and imperatives. Section 3 describes thesubpattern mechanism. Virtual patterns are described in section 4.Section 5 describes the generalization of the virtual concept. Insection 6 the remaining elements of BETA not mentioned in theprevious sections are described. Finally the syntax of BETA isgiven in the appendix. Each section with a brief introduction ofthe relevant language elements whereafter a number of examples aregiven. Most of the examples are extended versions of Hoare'sSmallIntSet [Hoare 72].There is a distinction between the base language (calledbasic BETA) and standard BETA. Standard BETA is basicBETA extended with a number of commonly used constructs. Theseadditional constructs may all be regarded as patterns in basicBETA, but will often be given a special syntax. This paper willmainly focus on basic BETA. Occasionally we shall use parts of astandard BETA, but this will be stated at the appropiate place.