Oberon (programming language)

Oberon (programming language)
Oberon
OberonLogo.png
Paradigm(s) imperative, structured, modular
Appeared in 1986
Designed by Niklaus Wirth
Typing discipline strong, static
Influenced by Modula-2
Influenced Oberon-2, Oberon-07, Zonnon

Oberon is a programming language created in 1986 by Professor Niklaus Wirth (creator of the Pascal, Modula, and Modula-2 programming languages) and his associates at ETH Zurich in Switzerland. It was developed as part of the implementation of the Oberon operating system. 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, Oberon.[1]

Oberon is very much like Modula-2 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.

Oberon was designed for Oberon operating system which ran on the Ceres workstation (built around the National Semiconductor 32032 CPU) and the Chameleon workstation. The Oberon language (and later, Oberon-2) has now been ported to many other operating systems, including the Java platform, where Oberon source code compiles to source code in Java, or to bytecode for a Java virtual machine. The Oberon operating system is also available for several hardware platforms other than the original workstation.

Contents

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.

Interesting features

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.

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 (object-oriented programming features were added, the 'FOR' loop was reinstated, for instance); the result was Oberon-2, currently the most common implementation. There is a release called Native Oberon which includes an operating system, and can directly boot on PC class hardware. A .NET 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 or AmigaOS.

There is an Oberon-2 Lex scanner and Yacc 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 NXP microcontrollers and a Wirth-designed RISC processor implemented using a Xilinx FPGA Spartan-3 board.

Active Oberon

Active Oberon 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, currently supported by Oberon Microsystems, a commercial company spun off from ETHZ, and by Queensland University of Technology. In addition, the Lagoona and Obliq languages carry the Oberon spirit into specialized areas.

ETHZ has released Active Oberon 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 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 for .NET development environment.

Oberon-V (originally called Seneca, after Seneca the Younger) is a descendant of Oberon designed for numerical applications on supercomputers, 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.)

See also

References

  1. ^ N. Wirth and J. Gutknecht: Project Oberon - The Design of an Operating System and Compiler. ACM Press 1992.

External links

General

Evolution of Oberon


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Oberon programming language — Infobox programming language name = Oberon paradigm = imperative, structured, modular year = 1986 designer = Niklaus Wirth | typing = strong, static dialects = implementations = influenced by = Modula 2 influenced = Oberon 2, ZonnonOberon is a… …   Wikipedia

  • Oberon-2 (programming language) — Oberon 2 Paradigm(s) imperative, structured, modular, object oriented Appeared in 1991 Designed by Niklaus Wirth, Hanspeter Mössenböck …   Wikipedia

  • Pascal (programming language) — Pascal Paradigm(s) imperative, structured Appeared in 1970 Designed by Niklaus Wirth Typing discipline static, strong, safe …   Wikipedia

  • Mesa (programming language) — Mesa Appeared in 1970s and 80s Developer Xerox PARC Typing discipline strongly typed Influenced by ALGOL Influenced Java, Modula 2, Cedar Mesa was an innovat …   Wikipedia

  • Oberon (operating system) — Oberon Tiled window arrangement of Oberon Company / developer Niklaus Wirth and Jürg Gutknecht Programmed in Oberon Source model …   Wikipedia

  • Object-oriented programming language — An object oriented programming language (also called an OO language ) is one that allows or encourages, to some degree, object oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism. Simula (1967) is… …   Wikipedia

  • Oberon (disambiguation) — Oberon is a legendary king of the fairies. Oberon may also refer to: Contents 1 People 2 Places 3 Media and entertainment 4 Other uses …   Wikipedia

  • high level programming language — aukšto lygio programavimo kalba statusas T sritis informatika apibrėžtis Programavimo kalba, natūraliai atspindinti programavimo sąvokas, nepriklausoma nuo kompiuterio arba operacinės sistemos. Programos paprastai rašomos ir skelbiamos aukšto… …   Enciklopedinis kompiuterijos žodynas

  • object-oriented programming language — objektinė programavimo kalba statusas T sritis informatika apibrėžtis ↑Programavimo kalba, kurios pagrindiniai ↑objektai (1) yra ↑objektai (2). Objektinių kalbų pavyzdžiai: „Smalltalk“, „Eiffel“, „Oberon“. Yra procedūrinių programavimo kalbų,… …   Enciklopedinis kompiuterijos žodynas

  • Object Oberon — Paradigm(s) Object oriented Appeared in 1990 (1990) Developer H Mössenböck, J Templ, R Griesemer Influenced by Oberon Influ …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”