Oberon Compiler

1 view
Skip to first unread message

Kahlil Algya

unread,
Aug 3, 2024, 11:12:41 AM8/3/24
to dinsgatarti

Oberon is a general-purpose programming language first published in 1987 by Niklaus Wirth and the latest member of the Wirthian family of ALGOL-like languages (Euler, ALGOL W, Pascal, Modula, and Modula-2).[1][2][3][4] Oberon was the result of a concentrated effort to increase the power of Modula-2, the direct successor of Pascal, and simultaneously to reduce its complexity. Its principal new feature is the concept of data type extension of record types.[5] It permits constructing new data types on the basis of existing ones and to relate them, deviating from the dogma of strict 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, also named Oberon at ETH Zurich in Switzerland. The name was inspired both by the Voyager space probe's pictures of the moon of the planet Uranus, named Oberon, and because Oberon is famous as the king of the elves.[6]

Oberon is designed with a motto attributed to Albert Einstein 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++ and Ada. In contrast to these, Oberon emphasizes the use of the library 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, even across modules, and index checking at runtime, null pointer 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.[8]

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.

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.

A few changes were made to the first released specification. For example, object-oriented programming (OOP) features were added, the FOR loop was reinstated. The result was Oberon-2. One release, named Native Oberon which includes an operating system, and can directly boot on IBM PC compatible class hardware. A .NET implementation of Oberon with some added minor .NET-related extensions was also developed at ETHZ. In 1993, an ETHZ university spin-off company brought a dialect of Oberon-2 to the market named Oberon-L. In 1997, it was renamed Component Pascal.

Oberon-2 compilers developed by ETH include versions for Microsoft Windows, Linux, Solaris, and classic Mac OS. Implementations from other sources exist for some other operating systems, including Atari TOS and AmigaOS.

Other compilers include Oxford Oberon-2,[10] which also understands Oberon-07, and Vishap Oberon.[11] The latter is based on Josef Templ's Oberon to C language source-to-source compiler (transpiler) named Ofront,[12] which in turn is based on the OP2 Compiler developed by Regis Crelier at ETHZ.

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.[13]

Oberon-07 compilers have been developed for use with many different computer systems. Wirth's compiler targets a reduced instruction set computer (RISC) processor of his own design that was used to implement the 2013 version of the Project Oberon operating system on a Xilinx field-programmable gate array (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, and binaries available for Windows) also exist. OBNC compiles via C and can be used on any Portable Operating System Interface (POSIX) compatible operating system. The commercial Astrobe implementation targets 32-bit ARM Cortex-M3, M4 and M7 microcontrollers. The 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. OberonJS translates Oberon to JavaScript. There is online IDE for Oberon. oberonc is an implementation for the Java virtual machine.

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 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 (see OberonX language extensions and Proceedings[14] of the 7th Joint Modular Languages Conference 2006 Oxford, UK), and knows about namespaces.[15] The operating system A2 (formerly Active Object System (AOS),[16] then Bluebottle), especially the kernel, synchronizes and coordinates different active objects.

ETHZ has released Active Oberon 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 units (CPUs) include single and dual core x86, and StrongARM.

Development continued on languages in this family. A further extension of Oberon-2 was originally named Oberon/L but later renamed to Component Pascal (CP). CP was developed for Windows and classic Mac OS by Oberon microsystems, a commercial spin-off company from ETHZ, and for .NET by Queensland University of Technology. Further, the languages Lagoona[17][18][19] and Obliq carry Oberon methods into specialized areas.

Later .NET development efforts at ETHZ focused on a new language named Zonnon. 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) is a descendant of Oberon designed for numerical applications on supercomputers, especially vector or pipelined architectures. It includes array constructors and an ALL statement.[20]

Niklaus Wirth is the author of the Oberon programming language. Together with Jrg Gutknecht, he developed the Oberon operating system, giving rise to the technological direction of Oberon languages and tools.

The event brings together developers who use Oberon-family systems in their practice, and interested listeners. Every year, experts representing fundamental science (high energy physics, biophysics), strategic industries (Rosatom), the industry of control systems (APCS, unmanned aerial vehicles), small innovative business (development of software systems for various purposes) make reports. Also in the center of attention are the problems of IT education, from grade 5 to specialized higher, and the key to their solution, developed by the Informatics-21 project. The mission of the seminar, besides the exchange of experience between the participants, is the broadcast of IT education in the industry and in the field of education.

The project coordinates the efforts of specialists in science, education, the aerospace industry and the IT industry to streamline the teaching of programming and computer science based on the achievements of Science.

Article by A.S. Ilyina and A.I. Popokov in the magazine "September First". Teaching programming based on Component Pascal / Blackbox started experimentally in Russia in 2002. The most positive experience accumulated to date, both personal and colleagues, allows us to recommend this environment for mass use in schools and universities."

Blackbox is a free and open source programming environment for the Component Pascal language. The environment supports dynamic loading of modules (compiled into machine code) and garbage collection, i.e. provides its own component object model. Writing, compiling, executing, testing can be done inside an integrated environment, which greatly increases the productivity of the programmer. Blackbox is an operating environment (a kind of micro-OS) that runs on top of a regular OS. This operating environment can be included in whole or in part in the final application (along with the compiler), allowing this application to be easily extended and rebuilt on the fly.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages