HOME

TheInfoList



OR:

Oberon is a general-purpose
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
first published in 1987 by Niklaus Wirth and the latest member of the Wirthian family of
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
-like languages (
Euler Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ...
,
ALGOL W ALGOL W is a programming language. It is based on a proposal for ALGOL X by Niklaus Wirth and Tony Hoare as a successor to ALGOL 60. ALGOL W is a relatively simple upgrade of the original ALGOL 60, adding string, bitstring, complex number and ...
,
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
,
Modula The Modula programming language is a descendant of the Pascal language. It was developed in Switzerland, at ETH Zurich, in the mid-1970s by Niklaus Wirth, the same person who designed Pascal. The main innovation of Modula over Pascal is a modul ...
, and
Modula-2 Modula-2 is a structured, procedural programming language developed between 1977 and 1985/8 by Niklaus Wirth at ETH Zurich. It was created as the language for the operating system and application software of the Lilith personal workstation. It ...
). Oberon was the result of a concentrated effort to increase the power of
Modula-2 Modula-2 is a structured, procedural programming language developed between 1977 and 1985/8 by Niklaus Wirth at ETH Zurich. It was created as the language for the operating system and application software of the Lilith personal workstation. It ...
, the direct successor of
Pascal Pascal, Pascal's or PASCAL may refer to: People and fictional characters * Pascal (given name), including a list of people with the name * Pascal (surname), including a list of people and fictional characters with the name ** Blaise Pascal, Frenc ...
, and simultaneously to reduce its complexity. Its principal new feature is the concept of type extension of record types. It permits constructing new data types on the basis of existing ones and to relate them, deviating from the dogma of strictly static typing of data. Type extension is Wirth's way of inheritance reflecting the viewpoint of the parent site. Oberon was developed as part of the implementation of an
operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
, also named
Oberon Oberon () is a king of the fairies in medieval and Renaissance literature. He is best known as a character in William Shakespeare's play ''A Midsummer Night's Dream'', in which he is King of the Fairies and spouse of Titania, Queen of the Fairi ...
at
ETH Zurich (colloquially) , former_name = eidgenössische polytechnische Schule , image = ETHZ.JPG , image_size = , established = , type = Public , budget = CHF 1.896 billion (2021) , rector = Günther Dissertori , president = Joël Mesot , a ...
in
Switzerland ). Swiss law does not designate a ''capital'' as such, but the federal parliament and government are installed in Bern, while other federal institutions, such as the federal courts, are in other cities (Bellinzona, Lausanne, Luzern, Neuchâtel ...
. The name is from the moon of the planet
Uranus Uranus is the seventh planet from the Sun. Its name is a reference to the Greek god of the sky, Uranus ( Caelus), who, according to Greek mythology, was the great-grandfather of Ares (Mars), grandfather of Zeus (Jupiter) and father of ...
, named
Oberon Oberon () is a king of the fairies in medieval and Renaissance literature. He is best known as a character in William Shakespeare's play ''A Midsummer Night's Dream'', in which he is King of the Fairies and spouse of Titania, Queen of the Fairi ...
. Oberon is still maintained by Wirth and the latest Project Oberon compiler update is dated 6 March 2020.


Design

Oberon is designed with a motto attributed to
Albert Einstein Albert Einstein ( ; ; 14 March 1879 – 18 April 1955) was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time. Einstein is best known for developing the theor ...
in mind: “Make things as simple as possible, but not simpler.” The principal guideline was to concentrate on features that are basic and essential and to omit ephemeral issues. Another factor was recognition of the growth of complexity in languages such as
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
and
Ada Ada may refer to: Places Africa * Ada Foah, a town in Ghana * Ada (Ghana parliament constituency) * Ada, Osun, a town in Nigeria Asia * Ada, Urmia, a village in West Azerbaijan Province, Iran * Ada, Karaman, a village in Karaman Province, T ...
. In contrast to these, Oberon emphasizes the use of the
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
concept to extend the language. Enumeration and subrange types, which were present in Modula-2, were omitted, and set types are limited to sets of integers. All imported items must be qualified by the name of the module where they are declared. Low-level facilities are highlighted by only allowing them to be used in a module which includes the identifier SYSTEM in its import list. Strict
type checking In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progra ...
, even across modules, and index checking at runtime,
null pointer In computing, a null pointer or null reference is a value saved for indicating that the pointer or reference does not refer to a valid object. Programs routinely use null pointers to represent conditions such as the end of a list of unknown leng ...
checking, and the safe type extension concept largely allow programming to rely on the language rules alone. The intent of this strategy was to produce a language that is easier to learn, simpler to implement, and very efficient. Oberon compilers have been viewed as compact and fast, while providing code quality comparable to commercial compilers.


Characteristics

Features characterizing the Oberon language include: * Case sensitive syntax with uppercase keywords * Type-extension with type test * Modules and separate compiling * String operations * Isolating unsafe code * Support for system programming


Object orientation

Oberon supports extension of record types for the construction of abstractions and heterogeneous structures. In contrast to the later dialects, Oberon-2 and Active Oberon, the original Oberon lacks a dispatch mechanism as a language feature but has it as a programming technique or design pattern. This gives great flexibility in OOP. In the Oberon operating system, two programming techniques are used together for the dispatch call: Method suite and Message handler.


Method suite

In this technique, a table of procedure variables is defined and a
global variable In computer programming, a global variable is a variable with global scope, meaning that it is visible (hence accessible) throughout the program, unless shadowed. The set of all global variables is known as the ''global environment'' or ''global s ...
of this type is declared in the extended module and assigned back in the generic module: MODULE Figures; ''(* Abstract module *)'' TYPE Figure* = POINTER TO FigureDesc; Interface* = POINTER TO InterfaceDesc; InterfaceDesc* = RECORD draw* : PROCEDURE (f : Figure); clear* : PROCEDURE (f : Figure); mark* : PROCEDURE (f : Figure); move* : PROCEDURE (f : Figure; dx, dy : INTEGER); END; FigureDesc* = RECORD if : Interface; END; PROCEDURE Init* (f : Figure; if : Interface); BEGIN f.if := if END Init; PROCEDURE Draw* (f : Figure); BEGIN f.if.draw(f) END Draw; ''(* Other procedures here *)'' END Figures. We extend the generic type Figure to a specific shape: MODULE Rectangles; IMPORT Figures; TYPE Rectangle* = POINTER TO RectangleDesc; RectangleDesc* = RECORD (Figures.FigureDesc) x, y, w, h : INTEGER; END; VAR if : Figures.Interface; PROCEDURE New* (VAR r : Rectangle); BEGIN NEW(r); Figures.Init(r, if) END New; PROCEDURE Draw* (f : Figure); VAR r : Rectangle; BEGIN r := f(Rectangle); ''(* f AS Rectangle *)'' ''(* ... *)'' END Draw; (* Other procedures here *) BEGIN ''(* Module initialisation *)'' NEW(if); if.draw := Draw; if.clear := Clear; if.mark := Mark; if.move := Move END Rectangles. Dynamic dispatch is only done via procedures in Figures module that is the generic module.


Message handler

This technique consists of replacing the set of methods with a single procedure, which discriminates among the various methods: MODULE Figures; ''(* Abstract module *)'' TYPE Figure* = POINTER TO FigureDesc; Message* = RECORD END; DrawMsg* = RECORD (Message) END; ClearMsg* = RECORD (Message) END; MarkMsg* = RECORD (Message) END; MoveMsg* = RECORD (Message) dx*, dy* : INTEGER END; Handler* = PROCEDURE (f : Figure; VAR msg : Message); FigureDesc* = RECORD ''(* Abstract *)'' handle : Handler; END; PROCEDURE Handle* (f : Figure; VAR msg : Message); BEGIN f.handle(f, msg) END Handle; PROCEDURE Init* (f : Figure; handle : Handler); BEGIN f.handle := handle END Init; END Figures. We extend the generic type Figure to a specific shape: MODULE Rectangles; IMPORT Figures; TYPE Rectangle* = POINTER TO RectangleDesc; RectangleDesc* = RECORD (Figures.FigureDesc) x, y, w, h : INTEGER; END; PROCEDURE Draw* (r : Rectangle); BEGIN ''(* ... *)'' END Draw; ''(* Other procedures here *)'' PROCEDURE Handle* (f: Figure; VAR msg: Figures.Message); VAR r : Rectangle; BEGIN r := f(Rectangle); IF msg IS Figures.DrawMsg THEN Draw(r) ELSIF msg IS Figures.MarkMsg THEN Mark(r) ELSIF msg IS Figures.MoveMsg THEN Move(r, msg(Figures.MoveMsg).dx, msg(Figures.MoveMsg).dy) ELSE (* ignore *) END END Handle; PROCEDURE New* (VAR r : Rectangle); BEGIN NEW(r); Figures.Init(r, Handle) END New; END Rectangles. In the Oberon operating system both of these techniques are used for dynamic dispatch. The first one is used for a known set of methods; the second is used for any new methods declared in the extension module. For example, if the extension module Rectangles were to implement a new Rotate() procedure, within the Figures module it could only be called via a message handler.


Implementations and variants


Oberon

No-cost implementations of Oberon (the language) and Oberon (the operating system) can be found on the Internet (several are from ETHZ itself).


Oberon-2

A few changes were made to the first released specification. For example,
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
(OOP) features were added, the FOR loop was reinstated. The result was ''
Oberon-2 Oberon-2 is an extension of the original Oberon programming language that adds limited reflection and object-oriented programming facilities, open arrays as pointer base types, read-only field export, and reintroduces the FOR loop from Modula-2. ...
''. One release, named '' Native Oberon'' which includes an operating system, and can directly boot on
IBM PC compatible IBM PC compatible computers are similar to the original IBM PC, XT, and AT, all from computer giant IBM, that are able to use the same software and expansion cards. Such computers were referred to as PC clones, IBM clones or IBM PC clones ...
class hardware. A .NET implementation of Oberon with the addition of some minor .NET-related extensions was also developed at ETHZ. In 1993, an ETHZ spin off company brought a dialect of Oberon-2 to the market named ''Oberon-L''. In 1997, it was renamed ''
Component Pascal Component Pascal is a programming language in the tradition of Niklaus Wirth's Pascal, Modula-2, Oberon and Oberon-2. It bears the name of the language Pascal and preserves its heritage, but is incompatible with Pascal. Instead, it is a minor ...
''. Oberon-2 compilers developed by ETH include versions for
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
,
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
, Solaris, and
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. ...
. Implementations from other sources exist for some other operating systems, including
Atari TOS TOS (The Operating System) is the operating system of the Atari ST range of computers. This range includes the 520ST and 1040ST, their STF/M/FM and STE variants and the Mega ST/STE. Later, 32-bit machines (Atari TT030, TT, Atari Falcon, Falcon030 ...
and
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early versions ...
. There is an Oberon-2 Lex scanner and
Yacc Yacc (Yet Another Compiler-Compiler) is a computer program for the Unix operating system developed by Stephen C. Johnson. It is a Look Ahead Left-to-Right Rightmost Derivation (LALR) parser generator, generating a LALR parser (the part of a co ...
parser Parsing, syntax analysis, or syntactic analysis is the process of analyzing a string of symbols, either in natural language, computer languages or data structures, conforming to the rules of a formal grammar. The term ''parsing'' comes from Lat ...
by Stephen J Bevan of Manchester University, UK, based on the one in the Mössenböck and Wirth reference. It is at version 1.4. Other compilers include Oxford Oberon-2, which also understands Oberon-07, and Vishap Oberon. The latter is based on Josef Templ's Oberon to C language
source-to-source compiler A source-to-source translator, source-to-source compiler (S2S compiler), transcompiler, or transpiler is a type of translator that takes the source code of a program written in a programming language as its input and produces an equivalent sou ...
(transpiler) named Ofront, which in turn is based on the OP2 Compiler developed by Regis Crelier at ETHZ.


Oberon-07

Oberon-07, defined by Niklaus Wirth in 2007 and revised in 2008, 2011, 2013, 2014, 2015, and 2016 is based on the original version of Oberon rather than Oberon-2. The main changes are: explicit numeric conversion functions (e.g., FLOOR and FLT) must be used, the WITH, LOOP and EXIT statements were omitted, WHILE statements were extended, CASE statements can be used for type extension tests, RETURN statements can only be connected to the end of a function, imported variables and structured value parameters are read-only and arrays can be assigned without using COPY. Oberon-07 compilers have been developed for use with many different computer systems. Wirth's compiler targets a
reduced instruction set computer In computer engineering, a reduced instruction set computer (RISC) is a computer designed to simplify the individual instructions given to the computer to accomplish tasks. Compared to the instructions given to a complex instruction set comp ...
(RISC) processor of his own design that was used to implement the 2013 version of the
Project Oberon The Oberon System is a modular, single-user, single-process, multitasking operating system written in the programming language Oberon. It was originally developed in the late 1980s at ETH Zurich. The Oberon System has an unconventional visual tex ...
operating system on a Xilinx
field-programmable gate array A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturinghence the term ''Field-programmability, field-programmable''. The FPGA configuration is generally specifi ...
(FPGA) Spartan-3 board. Ports of the RISC processor to FPGA Spartan-6, Spartan-7, Artix-7 and a RISC emulator for Windows (compilable on Linux and
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
, and binaries available for Windows) also exist
OBNC
compiles via C and can be used on any Portable Operating System Interface (
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
) compatible operating system. The commercia
Astrobe
implementation targets 32-bit ARM Cortex-M3, M4 and M7 microcontrollers. Th
Patchouli
compiler produces 64-bit Windows binaries
Oberon-07M
produces 32-bit Windows binaries and implements revision 2008 of the language
Akron's
produces binaries for both Windows and Linux

translates Oberon to
JavaScript JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
. There i
online IDE for Oberonoberonc
is an implementation for the
Java virtual machine A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describe ...
.


Active Oberon

Active Oberon Active Oberon is a general purpose programming language developed during 1996-1998 by the group around Niklaus Wirth and Jürg Gutknecht at the Swiss Federal Institute of Technology in Zürich ( ETH Zurich). It is an extension of the programming ...
is yet another variant of Oberon, which adds objects (with object-centered access protection and local activity control), system-guarded assertions, preemptive priority scheduling and a changed syntax for methods (named '' type-bound procedures'' in Oberon vocabulary). Objects may be active, which means that they may be threads or processes. Further, Active Oberon has a way to implement operators (including overloading), an advanced syntax for using arrays (se
OberonX language extensions
and Proceedings of the 7th Joint Modular Languages Conference 2006 Oxford, UK), and knows about
namespace In computing, a namespace is a set of signs (''names'') that are used to identify and refer to objects of various kinds. A namespace ensures that all of a given set of objects have unique names so that they can be easily identified. Namespaces ...
s. The operating system A2 (formerly ''Active Object System'' (AOS), then ''Bluebottle''), especially the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
, synchronizes and coordinates different active objects. ETHZ has released
Active Oberon Active Oberon is a general purpose programming language developed during 1996-1998 by the group around Niklaus Wirth and Jürg Gutknecht at the Swiss Federal Institute of Technology in Zürich ( ETH Zurich). It is an extension of the programming ...
which supports active objects, and the operating systems based thereon (Active Object System (AOS), Bluebottle, A2), and environment (JDK, HTTP, FTP, etc.) for the language. As with many prior designs from ETHZ, versions of both are available for download on the Internet. As of 2003, supported
central processing unit A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, a ...
s (CPUs) include single and dual core x86, and
StrongARM The StrongARM is a family of computer microprocessors developed by Digital Equipment Corporation and manufactured in the late 1990s which implemented the ARM architecture, ARM v4 instruction set architecture. It was later acquired by Intel in ...
.


Related languages

Development continued on languages in this family. A further extension of Oberon-2 was originally named Oberon/L but later renamed to
Component Pascal Component Pascal is a programming language in the tradition of Niklaus Wirth's Pascal, Modula-2, Oberon and Oberon-2. It bears the name of the language Pascal and preserves its heritage, but is incompatible with Pascal. Instead, it is a minor ...
(CP). CP was developed for Windows and
classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. ...
by Oberon microsystems, a commercial spin-off company from ETHZ, and for .NET by
Queensland University of Technology Queensland University of Technology (QUT) is a public research university located in the urban coastal city of Brisbane, Queensland, Australia. QUT is located on two campuses in the Brisbane area viz. Gardens Point and Kelvin Grove. The unive ...
. Further, the languages ''Lagoona'' and ''
Obliq Obliq is an interpreted, object-oriented programming language designed to make distributed, and locally multithreaded, computing simpler and easier to program, while providing program safety and an implicit type system. The interpreter is wr ...
'' carry Oberon methods into specialized areas. Later .NET development efforts at ETHZ focused on a new language named
Zonnon Zonnon is a general purpose programming language in the line or family of the preceding languages Pascal, Modula, and Oberon. Jürg Gutknecht is the author. Its conceptual model is based on objects, definitions, implementations, and modules. ...
. This includes the features of Oberon and restores some from Pascal (enumerated types, built-in IO) but has some syntactic differences. Other features include support for active objects, operator overloading, and exception handling. Oberon-V (originally named Seneca, after
Seneca the Younger Lucius Annaeus Seneca the Younger (; 65 AD), usually known mononymously as Seneca, was a Stoic philosopher of Ancient Rome, a statesman, dramatist, and, in one work, satirist, from the post-Augustan age of Latin literature. Seneca was born ...
) is a descendant of Oberon designed for numerical applications on
supercomputer A supercomputer is a computer with a high level of performance as compared to a general-purpose computer. The performance of a supercomputer is commonly measured in floating-point operations per second ( FLOPS) instead of million instructio ...
s, especially vector or pipelined architectures. It includes array constructors and an ALL statement.


See also

*
Oberon (operating system) The Oberon System is a modular, single-user, single-process, multitasking operating system written in the programming language Oberon. It was originally developed in the late 1980s at ETH Zurich. The Oberon System has an unconventional visual text ...
*
A2 (operating system) A2 (formerly named Active Object System (AOS), and then Bluebottle) is a modular, object-oriented operating system, with some unconventional features, including automatic garbage-collected memory management, and a zooming user interface. It was ...
* Oberon on Wikibooks


Resources


General

*
Official website (latest available copy at archive org)
' at ETH-Zürich *
Niklaus Wirth's Oberon Page
' at ETH-Zürich *

' at SSW, Linz *
Oberon: The Programming Language
' at Ulm *
Project Oberon, The Design of an Operating System and a Compiler
', book in PDF by Niklaus Wirth and Jürg Gutknecht, 2005 Edition *

' *
Astrobe
' ARM Oberon-07 Development System *

' with source code upward-compatible 64 bit addressing *

' for HP OpenVMS Alpha *
Oxford Oberon-2 Compiler
' and it
User Manual
*
Free Oberon-07 IDE
' Free Oberon-07 IDE for Windows, Macintosh, and Linux with syntax colouring, semantic navigation and source code debugger *
Oberon article by Joseph Templ
' in the January 1994 issue of Dr.Dobbs


Evolution of Oberon

*
Modula-2 and Oberon
' Wirth (2005) *
The Programming Language Oberon
' Wirth, (1988/90) *
The Programming Language Oberon (Oberon-7, Revised Oberon)
' Wirth, (2016, most current language report) *
Differences between Oberon-07 and Oberon
' Wirth (2011) * '' tp://ftp.ethoberon.ethz.ch/Oberon/OberonV4/Docu/Oberon2.Report.ps The Programming Language Oberon-2' H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich, January 1992 * '' tp://ftp.ethoberon.ethz.ch/Oberon/OberonV4/Docu/Oberon2.Differences.ps Differences between Oberon and Oberon-2' Mössenböck and Wirth (1991) *
What's New in Component Pascal
' (Changes from Oberon-2 to CP), Pfister (2001)


References

{{DEFAULTSORT:Oberon (Programming Language) Modula programming language family Class-based programming languages Procedural programming languages Oberon programming language family Systems programming languages Programming languages created in 1986 Statically typed programming languages ja:Oberon