Oberon (programming language): Difference between revisions

Content deleted Content added
wirth's death -- other changes in the article may be necessary
Rescuing 2 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(24 intermediate revisions by 20 users not shown)
Line 1:
{{Short description|General-purpose programming language}}
{{External links|date=November 2024}}
{{Use dmy dates|date=January 2021}}
{{Other uses|Oberon (disambiguation)}}
{{Infobox programming language
| name = Oberon
Line 14 ⟶ 17:
| programming language =
| platform = [[ARM architecture|ARM]], [[StrongARM]]; [[IA-32]], [[x86-64]]; [[SPARC]], [[Ceres (workstation)|Ceres]] ([[NS32000|NS32032]])
| operating system = [[Microsoft Windows|Windows]], [[Linux]], [[Oracle Solaris (operating system)|Solaris]], [[classic Mac OS]], [[Atari TOS]], [[AmigaOS]]
| license =
| file ext =
Line 25 ⟶ 28:
}}
 
'''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 (programming language)|Euler]], [[ALGOL W]], [[Pascal (programming language)|Pascal]], [[Modula]], and [[Modula-2]]).<ref name=ETH>{{Cite report |last=Wirth |first=Niklaus |title=From Modula to Oberon and the programming language Oberon |series=ETH Technical Reports D-INFK |year=1987 |volume=Band 82 |publisher=Wiley |doi=10.3929/ethz-a-005363226 |url=https://doi.org/10.3929/ethz-a-005363226}}</ref><ref name=PLO>{{Cite journal |last=Wirth |first=Niklaus |date=July 1988 |title=The Programming Language Oberon |journal=Software: Practice and Experience |volume=18 |issue=7 |pages=661–670|doi=10.1002/spe.4380180707 }}</ref><ref name=M2O>{{Cite journal |last=Wirth |first=Niklaus |date=July 1988 |title=From Modula to Oberon |journal=Software: Practice and Experience |volume=18 |issue=7 |pages=671–690|doi=10.1002/spe.4380180706 |s2cid=13092279}}</ref><ref name=TE>{{Cite journal |last=Wirth |first=Niklaus |date=April 1988 |title=Type Extensions |journal= ACM Transactions on Programming Languages and Systems|volume=10 |issue=2 |pages=204–214|doi=10.1145/42190.46167 |s2cid=15829497 |doi-access=free }}</ref> Oberon was the result of a concentrated effort to increase the power of [[Modula-2]], the direct successor of [[Pascal (programming language)|Pascal]], and simultaneously to reduce its complexity. Its principal new feature is the concept of [[data type]] extension of [[Record (computer science)|record]] types.<ref>{{Cite magazine |last=Pountain |first=D. March 1991 |title=Modula's Children, Part II: Oberon |url=https://archive.org/stream/byte-magazine-1991-03/1991_03_BYTE_16-03_Network_Management#page/n187/ |magazine=[[Byte (magazine)|Byte]] |volume=16 |issue=3 |pages=135–142}}</ref> It permits constructing new data types on the basis of existing ones and to relate them, deviating from the dogma of strictlystrict [[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 (operating system)|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 (moon)|Oberon]], and because Oberon is famous as the king of the elfselves.<ref>{{Cite web |last1=Wirth |first1=Niklaus |last2=Gutknecht |first2=Jürg |author-link=Jürg Gutknecht |date=1987–2021 |url=https://people.inf.ethz.ch/wirth/ProjectOberon/PO.System.pdf |title=Project Oberon}}</ref>
 
Oberon is was maintained by Wirth and the latest Project Oberon compiler update is dated 6 March 2020.<ref>{{cite web |last=Wirth |first=Niklaus |title=Oberon Change Log |url=https://www.inf.ethz.ch/personal/wirth/news.txt |publisher=ETH Zurich |access-date=16 January 2021}}</ref>
 
==Design==
Oberon is designed with a motto attributed to [[Albert Einstein]] in mind: “Make"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 (programming language)|Ada]]. In contrast to these, Oberon emphasizes the use of the [[Library (computing)|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 <code>SYSTEM</code> in its import list. Strict [[type checking]], even across modules, and [[index checking]] at [[Runtime (program lifecycle phase)|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.<ref>{{citeCite web |last=Mössenböck |first=Hanspeter |title=Compiler Construction: The Art of Niklaus Wirth |url=ftphttps://ftp.ssw.uni-linz.acjku.at/pubResearch/Papers/Moe00b.pdf |publisheraccess-date=Johannes28 KeplerMay University2025}}</ref>
 
==Characteristics==
Features characterizing the Oberon language include:<ref>{{Cite web |last1=Wirth |first1=Niklaus |last2=Gutknecht |first2=Jürg |author-link=Jürg Gutknecht |date=1987–2021 |url=httphttps://www.projectoberon.comnet/ |title=Project Oberon }}</ref>
* Case sensitive syntax with uppercase keywords
* Type-extension with type test
Line 206 ⟶ 209:
===Oberon-2===
{{Main|Oberon-2}}
A few changes were made to the first released specification. For example, [[object-oriented programming]] (OOP) features were added, the <code>FOR</code> 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 Framework|.NET]] implementation of Oberon with thesome addition of someadded minor .NET-related extensions was also developed at ETHZ. In 1993, an ETHZ spin[[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]], [[Oracle Solaris (operating system)|Solaris]], and [[classic Mac OS]]. Implementations from other sources exist for some other operating systems, including [[Atari TOS]] and [[AmigaOS]].
 
There is an Oberon-2 [[Lex (software)|Lex]] scanner and [[Yacc]] [[parser]] by Stephen J Bevan of Manchester University, UK, based on the one in the [[Hanspeter Mössenböck|Mössenböck]] and Wirth reference. It is at version 1.4.
 
Other compilers include Oxford Oberon-2,<ref>{{Cite web |last=Spivey |date=8 April 2019 |url=http://spivey.oriel.ox.ac.uk/corner/Oxford_Oberon-2_compiler |title=Oxford Oberon-2 compiler |access-date=17 January 2021}}</ref> which also understands Oberon-07, and Vishap Oberon.<ref>{{Cite web |author=dcwbrown |date=16 June 2020 |url=https://github.com/vishaps/voc/ |title=Vishap Oberon Compiler |website=GitHub |access-date=17 January 2021}}</ref> The latter is based on Josef Templ's Oberon to [[C (programming language)|C]] language [[source-to-source compiler]] (transpiler) named Ofront,<ref>{{Cite web |author=jtempl |date=2 January 2020 |url=https://github.com/jtempl/ofront/ |title=Ofront |website=GitHub |access-date=17 January 2021}}</ref> 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., <code>FLOOR</code> and <code>FLT</code>) must be used,; the <code>WITH</code>, <code>LOOP</code> and <code>EXIT</code> statements were omitted,; <code>WHILE</code> statements were extended,; <code>CASE</code> statements can be used for type extension tests,; <code>RETURN</code> 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 <code>COPY</code>.<ref>{{Cite report |last=Wirth |first=Niklaus |date=3 May 2016 |url=https://people.inf.ethz.ch/wirth/Oberon/Oberon07.Report.pdf |title=The Programming Language Oberon-07 |website=ETH Zurich, Department of Computer Science |access-date=17 January 2021}}</ref>
 
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. [https://miasap.se/obnc/ OBNC] compiles via C and can be used on any Portable Operating System Interface ([[POSIX]]) compatible operating system. The commercial [http://www.astrobe.com Astrobe] implementation targets 32-bitSTM ARM Cortex-M0, M3, M4, M7 and M7Raspberry Pi RP2040 and RP2350 microcontrollers. The [https://github.com/congdm/Patchouli-Compiler Patchouli] compiler produces 64-bit Windows binaries. [http://www.exaprog.com/ Oberon-07M] produces 32-bit Windows binaries and implements revision 2008 of the language. [https://sites.googlegithub.com/siteAntKrotov/oberon07compiler/versiioberon-07-compiler Akron's] produces binaries for both Windows and Linux. [http://oberspace.org/oberonjs.html OberonJS] translates Oberon to [[JavaScript]]. There is [https://visual.sfu-kras.ru online IDE for Oberon]. [https://github.com/lboasso/oberonc oberonc] is an implementation for the [[Java virtual machine]].
 
===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 changed syntax for methods (named ''[[Oberon-2#Type-bound procedures|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 [http://www.ethoberon.ethz.ch/native/compiler/x.index.html OberonX language extensions] {{Webarchive|url=https://web.archive.org/web/20160304043022/http://www.ethoberon.ethz.ch/native/compiler/x.index.html |date=4 March 2016 }} and Proceedings<ref>{{cite encyclopedia |last1=Friedrich |first1=Felix |last2=Gutknecht |first2=Jürg |author-link=Jürg Gutknecht |editor1-last=Lightfoot |editor1-first=David E. |editor2-last=Szyperski |editor2-first=Clemens |date=2006 |chapter=Array-Structured Object Types for Mathematical Programming |volume=4228 |publisher=Springer, Berlin Heidelberg |pages=195–210 |isbn=978-3-540-40927-4 |encyclopedia=Modular Programming Languages |doi=10.1007/11860990_13 |series=Lecture Notes in Computer Science|s2cid=34210781 }}</ref> of the 7th Joint Modular Languages Conference 2006 Oxford, UK), and knows about [[namespace]]s.<ref>{{cite web |url=http://www.ocp.inf.ethz.ch/wiki/Documentation/Language?action=download&upname=contexts.pdf |title=Proposal for Module Contexts |access-date=21 December 2015 |archive-date=22 December 2015 |archive-url=https://web.archive.org/web/20151222125420/http://www.ocp.inf.ethz.ch/wiki/Documentation/Language?action=download&upname=contexts.pdf |url-status=dead }}</ref> The operating system [[A2 (operating system)|A2]] (formerly ''Active Object System'' (AOS),<ref name="AOSthesis">{{Cite thesis |type=PhD |last=Muller |first=Pieter Johannes |date=2002 |title=The active object system design and multiprocessor implementation |url=http://e-collection.library.ethz.ch/eserv/eth:26082/eth-26082-02.pdf |publisher=Swiss Federal Institute of Technology, Zürich ([[ETH Zurich]])}}</ref> then ''Bluebottle''), especially the [[Kernel (operating system)|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 unit]]s (CPUs) include single and dual core [[x86]], and [[StrongARM]].
Line 246 ⟶ 249:
* ''[https://www.astrobe.com Astrobe]'' ARM Oberon-07 Development System
* ''[https://modulaware.com/mwovms.htm Oberon System V4 for HP OpenVMS Alpha]'' with source code upward-compatible 64 bit addressing
* ''[https://modulaware.com/mwcvms.htm 64 bit Oberon-2 compiler]'' for HP OpenVMS Alpha
* ''[https://spivey.oriel.ox.ac.uk/corner/Oxford_Oberon-2_compiler Oxford Oberon-2 Compiler]'' and its [http://bitbucket.org/Spivey/obc-3/downloads/obcman.pdf User Manual]{{Dead link|date=July 2025 |bot=InternetArchiveBot |fix-attempted=yes }}
* ''[https://github.com/rochus-keller/Oberon Free Oberon-07 IDE]'' Free Oberon-07 IDE for Windows, Macintosh, and Linux with syntax colouring, semantic navigation and source code debugger
* ''[https://www.drdobbs.com/architecture-and-design/the-oberon-programming-language/184409405 Oberon article by Joseph Templ]'' in the January 1994 issue of Dr.Dobbs
Line 256 ⟶ 259:
* ''[https://people.inf.ethz.ch/wirth/Oberon/Oberon07.Report.pdf The Programming Language Oberon (Oberon-7, Revised Oberon)]'' Wirth, (2016, most current language report)
* ''[https://people.inf.ethz.ch/wirth/Oberon/Oberon07.pdf Differences between Oberon-07 and Oberon]'' Wirth (2011)
* ''[ftphttps://ftpwww.ethoberonssw.ethzuni-linz.chac.at/OberonResearch/OberonV4/DocuPapers/Oberon2.Report.pspdf The Programming Language Oberon-2]'' H. Mössenböck, N. Wirth, Institut für Computersysteme, ETH Zürich, January 1992
* ''[ftphttps://ftpwww.ethoberonresearch-collection.ethz.ch/Oberonbitstream/OberonV4handle/Docu/Oberon220.Differences500.11850/68904/eth-3412-01.pspdf Differences between Oberon and Oberon-2]'' Mössenböck and Wirth (1991)
* ''[https://web.archive.org/web/20110515111149/http://www.oberon.ch/pdf/CP-New.pdf What's New in Component Pascal]'' (Changes from Oberon-2 to CP), Pfister (2001)