Oberon (programming language)
Encyclopedia
Oberon is a programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 created in 1986 by Professor Niklaus Wirth
Niklaus Wirth
Niklaus Emil Wirth is a Swiss computer scientist, best known for designing several programming languages, including Pascal, and for pioneering several classic topics in software engineering. In 1984 he won the Turing Award for developing a sequence of innovative computer languages.-Biography:Wirth...

 (creator of the Pascal
Pascal (programming language)
Pascal is an influential imperative and procedural programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structuring.A derivative known as Object Pascal...

, Modula
Modula
The Modula programming language is a descendent of the Pascal programming language. It was developed in Switzerland in the late 1970s by Niklaus Wirth, the same person who designed Pascal...

, and Modula-2
Modula-2
Modula-2 is a computer programming language designed and developed between 1977 and 1980 by Niklaus Wirth at ETH Zurich as a revision of Pascal to serve as the sole programming language for the operating system and application software for the personal workstation Lilith...

 programming languages) and his associates at ETH Zurich
ETH Zurich
The Swiss Federal Institute of Technology Zurich or ETH Zürich is an engineering, science, technology, mathematics and management university in the City of Zurich, Switzerland....

 in Switzerland
Switzerland
Switzerland name of one of the Swiss cantons. ; ; ; or ), in its full name the Swiss Confederation , is a federal republic consisting of 26 cantons, with Bern as the seat of the federal authorities. The country is situated in Western Europe,Or Central Europe depending on the definition....

. It was developed as part of the implementation of the Oberon operating system
Oberon operating system
Oberon is an operating system developed in the late 1980s at ETH Zürich using the Oberon programming language. It has an innovative visual text-based user interface for activating commands.- History :...

. The original intention was to use Modula-2 as the implementation language but it lacked the required safe type-extension facilities. Also, it was planned to eventually publish the full details of the operating system and compiler so that they could be studied and understood. These factors led to the decision to design a new language which concentrated on just the essential features necessary for the task in hand. The name is from the moon of Uranus
Uranus
Uranus is the seventh planet from the Sun. It has the third-largest planetary radius and fourth-largest planetary mass in the Solar System. It is named after the ancient Greek deity of the sky Uranus , the father of Cronus and grandfather of Zeus...

, Oberon
Oberon (moon)
Oberon , also designated ', is the outermost major moon of the planet Uranus. It is the second largest and second most massive of the Uranian moons, and the ninth most massive moon in the Solar System. Discovered by William Herschel in 1787, Oberon is named after the mythical king of the fairies...

.

Oberon is very much like Modula-2
Modula-2
Modula-2 is a computer programming language designed and developed between 1977 and 1980 by Niklaus Wirth at ETH Zurich as a revision of Pascal to serve as the sole programming language for the operating system and application software for the personal workstation Lilith...

 in its syntax, but is considerably smaller. Oberon's feature simplicity leads to considerable space and coding efficiency for its compilers. The full language can be specified in a page of EBNF. The Oberon report is, at 16 pages, about a third of the size of the Modula-2 report, and one of the early full compilers was only about 4000 lines long. Unlike Modula-2, it has garbage collection
Garbage collection (computer science)
In computer science, garbage collection is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program...

.

Oberon was designed for Oberon operating system
Oberon operating system
Oberon is an operating system developed in the late 1980s at ETH Zürich using the Oberon programming language. It has an innovative visual text-based user interface for activating commands.- History :...

 which ran on the Ceres workstation (built around the National Semiconductor 32032
NS320xx
The 320xx or NS32000 was a series of microprocessors from National Semiconductor . They were likely the first 32-bit general-purpose microprocessors on the market, but due to a number of factors never managed to become a major player...

 CPU) and the Chameleon
Chameleon (computing)
Chameleon is a computer workstation design produced at ETH Zurich running the Oberon operating system.It was also the name of an older luggable computer from the early 1980s, distinguished by being able to run both the MS-DOS and CP/M-80 operating systems....

 workstation. The Oberon language (and later, Oberon-2
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....

) has now been ported to many other operating systems, including the Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 platform, where Oberon source code compiles to source code in Java, or to bytecode
Bytecode
Bytecode, also known as p-code , is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine code...

 for a Java virtual machine. The Oberon operating system is also available for several hardware platforms other than the original workstation.

Design goals

Oberon is designed to be a 'safe' language; it employs array bounds checking, garbage collection and strong type checking. These features, particularly ones which enable logic errors to be detected as early as possible (i.e. at compile-time), can significantly reduce the number of bugs occurring in a program at runtime. However, some features included in other languages in an attempt to reduce bugs (e.g. enumerations and programmer-defined ranges on integers), were omitted. Consequently, more care should be taken by the programmer, when working with numeric expressions, to avoid logic errors.

Key characteristics

The following features characterise the Oberon language:
  • Pascal-like, but more consistent syntax
  • Type-extension with strong type-checking
  • Modules with type-checked interfaces and separate compilation
  • Compatibility between all numeric types (mixed expressions)
  • String operations
  • Support for system programming

Visibility flags

Global variables, types, constants, and procedures are by default only visible within the declaring module. They may be made public to other modules by suffixing them with a visibility flag, namely an asterisk (*) for read-write permission. The default was chosen to ensure safety in case a flag was inadvertently omitted.

Local variables, types, constants, and procedures are always visible only to the declaring procedure.

Call by reference or by value

Two possible modes are available for procedure parameters. Call-by-value allows expressions to be used as parameters, so that the value of the expression is passed down to the procedure. Call-by-reference allows variables to be used, so that the value of the variable may be changed by the procedure. A procedure may declare a reference parameter by prefixing it with the VAR keyword.

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 (object-oriented programming features were added, the 'FOR' loop was reinstated, for instance); the result was Oberon-2
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....

, currently the most common implementation. There is a release called Native Oberon
Native Oberon
Native Oberon or ETHNO, is the version of the Oberon operating system which runs on x86 PC hardware. It has minimal hardware requirements...

which includes an operating system, and can directly boot on PC class hardware. A .NET
.NET Framework
The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability...

 implementation of Oberon with the addition of some minor .NET-related extensions has also been developed at ETHZ.

Oberon-2 compilers maintained by ETH include versions for Windows, Linux, Solaris, Mac OS X. Furthermore there are implementations for various other operating systems, such as Atari-TOS
Atari TOS
TOS is the operating system of the Atari ST range of computers. This range includes the 520 and 1040ST, their STF/M/FM and STE variants and the Mega ST/STE. Later, 32-bit machines were developed using a new version of TOS, called MultiTOS, which allowed multitasking...

 or AmigaOS
AmigaOS
AmigaOS is the default native operating system of the Amiga personal computer. It was developed first by Commodore International, and initially introduced in 1985 with the Amiga 1000...

.

There is an Oberon-2 Lex scanner and Yacc
Yacc
The computer program yacc is a parser generator developed by Stephen C. Johnson at AT&T for the Unix operating system. The name is an acronym for "Yet Another Compiler Compiler." It generates a parser based on an analytic grammar written in a notation similar to BNF.Yacc used to be available as...

 parser 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.

Oberon-07

Oberon-07, defined by Niklaus Wirth in 2007 and revised in 2011, 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 LOOP and EXIT statements have been eliminated, WHILE statements have been extended, 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. For full details, see The Programming Language Oberon-07.

Oberon-07 compilers have been developed for use with 32-bit ARM
ARM architecture
ARM is a 32-bit reduced instruction set computer instruction set architecture developed by ARM Holdings. It was named the Advanced RISC Machine, and before that, the Acorn RISC Machine. The ARM architecture is the most widely used 32-bit ISA in numbers produced...

 NXP microcontrollers and a Wirth-designed RISC processor implemented using a Xilinx FPGA Spartan-3 board.

Active Oberon

Active Oberon
Active Oberon
Active Oberon is an extension of the programming language Oberon. Compared to its predecessors, Oberon and Oberon-2, it adds objects , system-guarded assertions, preemptive priority scheduling and a slightly changed syntax for methods...

 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 slightly changed syntax for methods (aka type-bound procedures in the Oberon world). Objects may be active, which means that they may be threads or processes. The operating system A2 aka Bluebottle, especially the kernel, synchronizes and coordinates different active objects.

Related languages

Development has continued on languages in this family. A further extension of Oberon-2 produced Component Pascal
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 Pascal programming language but is incompatible with it. Instead, it is a minor variant and refinement of Oberon-2, designed and supported by a small ETH...

, currently supported by Oberon Microsystems, a commercial company spun off from ETHZ, and by Queensland University of Technology
Queensland University of Technology
Queensland University of Technology is an Australian university with an applied emphasis in courses and research. Based in Brisbane, it has 40,000 students, including 6,000 international students, over 4,000 staff members, and an annual budget of more than A$750 million.QUT is marketed as "A...

. In addition, the Lagoona
Lagoona programming language
Lagoona is an experimental programming language developed by Michael Franz, a former student of Niklaus Wirth. It explores component-oriented programming with the use of stand-alone messages and message sets, message forwarding, and by de-emphasizing classes....

 and Obliq languages carry the Oberon spirit into specialized areas.

ETHZ has released Active Oberon
Active Oberon
Active Oberon is an extension of the programming language Oberon. Compared to its predecessors, Oberon and Oberon-2, it adds objects , system-guarded assertions, preemptive priority scheduling and a slightly changed syntax for methods...

 which supports active objects, and the Bluebottle operating system 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 this is written, both single and dual x86 CPUs and the StrongARM
StrongARM
The StrongARM is a family of microprocessors that implemented the ARM V4 instruction set architecture . It was developed by Digital Equipment Corporation and later sold to Intel, who continued to manufacture it before replacing it with the XScale....

 family are supported.

Recent .NET development efforts at ETHZ have been focused on a new language called Zonnon. This includes the features of Oberon and restores some from Pascal (enumerated types, built-in IO) but has some syntactic differences. Additional features include support for active objects, operator overloading and exception handling. Zonnon is available as a plug-in language for the Microsoft Visual Studio
Microsoft Visual Studio
Microsoft Visual Studio is an integrated development environment from Microsoft. It is used to develop console and graphical user interface applications along with Windows Forms applications, web sites, web applications, and web services in both native code together with managed code for all...

 for .NET development environment.

Oberon-V (originally called Seneca, after Seneca the Younger
Seneca the Younger
Lucius Annaeus Seneca was a Roman Stoic philosopher, statesman, dramatist, and in one work humorist, of the Silver Age of Latin literature. He was tutor and later advisor to emperor Nero...

) is a descendant of Oberon designed for numerical applications on supercomputer
Supercomputer
A supercomputer is a computer at the frontline of current processing capacity, particularly speed of calculation.Supercomputers are used for highly calculation-intensive tasks such as problems including quantum physics, weather forecasting, climate research, molecular modeling A supercomputer is a...

s, especially vector or pipelined architectures. It includes array constructors and an ALL statement. (See "Seneca - A Language for Numerical Applications on Vectorcomputers", Proc CONPAR 90 - VAPP IV Conf. R. Griesemer, Diss Nr. 10277, ETH Zurich.)

General


Evolution of Oberon

  • "[ftp://ftp.inf.ethz.ch/pub/software/Oberon/OberonV4/Docu/ModToOberon.ps.gz From Modula-2 to Oberon]" Wirth (1988)
  • "[ftp://ftp.inf.ethz.ch/pub/software/Oberon/OberonV4/Docu/OberonReport.ps.gz The Programming Language Oberon]" Wirth (1988)
  • "[ftp://ftp.inf.ethz.ch/pub/software/Oberon/OberonV4/Docu/Oberon2.Differences.ps.gz Differences between Oberon and Oberon-2]" Mössenböck and Wirth (1991)
  • "The Programming Language Oberon-2" H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich, January 1992
  • "What's New in Component Pascal" (Changes from Oberon-2 to CP), Pfister (2001)
  • "Differences between Oberon-07 and Oberon" Wirth (2007)
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK