qBeta – a new object-oriented language for programming and modeling

This site is under construction!
It has replaced beta.alexandra.dk, which has been closed!
It is currently incomplete and all content in the form of text, structure, formatting, etc., is preliminary and may be changed.

qBeta is a new object-oriented language for modelling and programming in the tradition of SIMULA and Beta.

An important design principle behind qBeta is that programming is modeling. In the current mainstream interpretation of object-orientation there is a seperation between object-oriented programming as practiced using C++, Java, C# and Python and object-oriented modeling as practiced using UML. In the Reference part of this book a number of publications discussing programming as modeling are listed.

qBeta is derived from Beta and most main mechanisms for Beta are supported by qBeta. As Beta, qBeta has one abstraction mechanism, the pattern, which is a generalisation of class, method (procedure), value type, function, process class, etc. A pattern may be defined as a subpattern of a more general pattern; it may be be a virtual pattern that may be specialised in subpatterns of the enclosing pattern; and it may be a nested pattern within another pattern or object.

Objects in qBeta may be active in the form of coroutines. The scheduling of coroutines may be cooperative and/or preemptive as in SIMULA and Beta. Preemptive coroutines may be used as a basis for defining active objects that may execute concurrently (in parallel).

The support for concurrency has been further developed in qBeta compared to Beta. Also, concurrency in Beta (as in mainstream languages like Java, C++, C#, Python) is inherently unsafe with respect to race conditions. It is possible to define safe concurrency abstractions like monitor, Ada-like rendezvous, message passing, etc. using so-called supplementary properties. The support for concurrency and the use of supplementary properties properties are described in papers listed in the Reference part.

Objects and value are considered different entities in qBeta. Objects have identity and state and may be referred to by other objects. Values are represented in value objects and do not have the usual structured overhead as standard objects and it is not possible to obtain aliases to value objects. As a consequence of this distinction, qBeta differentiates between reference assignment and value assignment and reference comparison and value comparison.

This site is primarily written as a reference manual for qBeta. You may learn about qBeta by taking a look at the book An Introduction to Object-Oriented Programming as Modeling by Ole Lehrmann Madsen and Birger Møller-Pedersen. This book is, however, only a draft.

Status

A compiler for qBeta has been written in Beta. It generates byte code for a virtual qBeta machine. An interpreter for the byte code has been written in Beta just as there is an interpreter written in C.

A very rudimentory bare-bone implementation has been made for a Raspberry Pie 3 Model B with an Arm processor.

The compiler is currently not available for public use since we are still experimenting with the language just as it is not in a stage suitable for public use.

A browser and debugger for qBeta has been implemented in Beta. The debugger generates Object-Sequence Diagrams that is a combination of UML object diagrams and sequence diagrams. The Reference part contains a reference to a paper describing the debugger.

Previous version of qBeta are referred to as xBeta and/or a language derived from Beta in some of the references.

Hello world