Est. 2002 Intermediate

Zonnon

An ETH Zurich research language in the Pascal, Modula-2 and Oberon line, built for .NET, that replaces class inheritance with definitions and aggregated implementations and makes concurrency part of objects through active objects and syntax-controlled dialogs.

Created by Jürg Gutknecht (ETH Zurich), with compiler by Eugene Zueff

Paradigm Multi-paradigm: Imperative, Modular, Object-Oriented (compositional), Concurrent (active objects)
Typing Static, Strong
First Appeared 2002
Latest Version ETH Zonnon compiler 1.3.0 (November 2012)

Zonnon is a general-purpose programming language designed by Jürg Gutknecht at ETH Zurich’s Institute for Computer Systems. It is the most recent language in the Pascal, Modula-2 and Oberon line. Programs written in the small look almost the same as Modula-2 or Oberon code. The big changes come in programming in the large. Zonnon replaces class hierarchies with a compositional model of definitions and aggregated implementations. It builds concurrency into objects themselves: active objects carry their own threads, and they talk to each other through dialogs whose syntax is specified formally. The language first appeared publicly in November 2002, and its main implementation was a compiler for Microsoft .NET. The Zonnon team says that compiler was the first developed outside Microsoft to be fully integrated into Visual Studio. ETH stopped releasing new versions after 2012, but the compiler source is still available on GitHub.

History & Origins

From Project 7 to Zonnon

Zonnon came out of Project 7, which Microsoft Research launched in 1999 to get a set of non-mainstream languages running on the new .NET interoperability platform. ETH Zurich’s part was Oberon for .NET. In their OOPSLA 2002 extended abstract, Gutknecht and compiler developer Eugene Zueff said they kept going after that for two reasons. They wanted to explore .NET, and Microsoft’s new Common Compiler Infrastructure (CCI), as a place to experiment with language design. They also wanted to build “Zonnon for .NET, an evolution of Oberon for .NET.”

Zonnon also drew on two other ETH projects. Its active object came from Active Oberon (2001). Its communication mechanism, protocols defined by syntax, came from the Active C# project. A 2005 paper by Gutknecht, Vladimir Romanov and Zueff says so directly: “The notion of active object was taken from the Active Oberon language,” and the syntax-oriented protocols were “borrowed from the Active C# project.”

First appearance

The earliest dated publication is the extended abstract “Zonnon Language Experiment, or How to Implement a Non-Conventional Object Model for .NET”, presented at OOPSLA 2002 in Seattle (4-8 November 2002). It called itself “a report on a work in progress.” It already described definitions, default implementations, active objects and modules, and it gave the Common Compiler Infrastructure as the basis of the compiler.

The project’s archived news log shows the language taking shape over 2003:

  • 20 January 2003: papers on the language’s main features posted
  • 15-17 June 2003: Gutknecht and Zueff present at a Microsoft conference in Moscow
  • 22-27 August 2003: Draft 2 of the Zonnon Report, the syntax and a compiler test suite posted, and the language presented at the Joint Modular Languages Conference (JMLC 2003) in Klagenfurt, Austria
  • 1 September 2003: the project moves to www.zonnon.ethz.ch

The last slide of the JMLC talk summed up where things stood: the report was a beta “fresh from press,” and “first compilation results” from the compiler were available.

People

The language is Gutknecht’s design. A small international team did the rest:

ContributorRole
Jürg Gutknecht (ETH Zurich)Language designer
Eugene Zueff / Zouev (ETH Zurich)Compiler, Visual Studio integration
Brian Kirk (Robinson Associates) and David Lightfoot (Oxford Brookes University)Editors of the Zonnon Language Report
Vladimir Romanov (Moscow State University)Test suite, Zonnon Builder IDE, Chess Notebook sample
Roman Mitin, Nina GonovaLater compiler work, mathematical extensions
Herman Venter (Microsoft)Common Compiler Infrastructure

Design Philosophy

Kirk, Lightfoot and Gutknecht’s 2004 presentation The Concepts of Zonnon opens with three quotations as “the ethos of the project.” One is Giorgio Armani’s “three golden rules”: eliminate the superfluous, emphasise the comfortable, and acknowledge the elegance of the uncomplicated. The goals listed there include support for programming in the large, an object model where “activities in objects” replace “passive method calls,” formalised interaction between activities, and keeping “the simplicity of PASCAL, Modula-2, Oberon.” They also called for a “concise Language Report (40 Pages).” That is a deliberate nod to Wirth’s famously short language definitions.

The JMLC 2003 slides put the argument more bluntly under the heading “C# is a Good Language, but …” They name three things to improve: composability, concurrency and communicativity. The same slides say Zonnon aims to let teachers cover algorithms and data structures “without OO corset.” In other words, beginners should not have to learn class machinery first.

Key Features

Four kinds of program unit

Zonnon has four kinds of program unit. Two exist at runtime and two are used for composition:

UnitRole
ObjectA self-contained runtime component that can be created any number of times
ModuleA singleton object whose lifetime is managed by the system and loaded on demand; also a container for related types, and a structuring tool through import
DefinitionAn abstract view, or facet, of an object: declarations and method signatures
ImplementationA reusable, possibly partial, implementation of a definition that is aggregated into an object’s state

The simplest program is just a module. This example is from the project’s current site, zonnon.org:

1
2
3
4
module HelloWorld;
begin
  writeln('Hello, GitHub!')
end HelloWorld.

Composition instead of class inheritance

Zonnon has no class hierarchy. Definitions take over the jobs of both superclasses and interfaces, and an object picks up behaviour by aggregating implementations. The standard example, used in both the OOPSLA 2002 abstract and the JMLC 2003 slides, is a jukebox that is both a player and a record store:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
DEFINITION Music.Store;
  PROCEDURE Clear;
  PROCEDURE Add (s: Song);
END Store.

DEFINITION Music.Player;
  VAR cur: Song;
  PROCEDURE Play (s: Song);
  PROCEDURE Stop;
END Player.

OBJECT Music.JukeBox IMPLEMENTS Player, Store;
  IMPORT Store; (* aggregate the default implementation *)
  PROCEDURE Play (s: Song); IMPLEMENTS Player.Play;
  PROCEDURE Stop; IMPLEMENTS Player.Stop;
END JukeBox.

JukeBox never has to decide whether it is “really” a player or a store. It exposes both facets. The default Store implementation is folded into its state, and it writes the Player methods itself. Definitions can also refine other definitions, so abstractions can form a network rather than a single tree.

Active objects and AWAIT

Objects can contain activities, which are encapsulated threads. Methods marked { LOCKED } run under the object’s monitor lock. AWAIT blocks until a condition holds, and the runtime handles the scheduling. This pipeline stage is adapted from the JMLC 2003 slides, with the slide’s INC(b) typo corrected to INC(n):

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
OBJECT Station (next: Station);
  VAR { PRIVATE } n, in, out: INTEGER;
      buf: ARRAY N OF OBJECT;

  PROCEDURE { PRIVATE } Get (VAR x: OBJECT);
  BEGIN { LOCKED } AWAIT (n # 0);
    DEC(n); x := buf[out]; out := (out + 1) MOD N
  END Get;

  PROCEDURE { PUBLIC } Put (x: OBJECT);
  BEGIN { LOCKED } AWAIT (n # N);
    INC(n); buf[in] := x; in := (in + 1) MOD N
  END Put;

  ACTIVITY Process; VAR x: OBJECT;
  BEGIN LOOP Get(x); (* process x *) next.Put(x) END
  END Process;

BEGIN n := 0; in := 0; out := 0; NEW(Process)
END Station;

Zonnon also has concurrency at the statement level. A block marked BEGIN {CONCURRENT} ... END lets its statements run concurrently. Later reports describe a hierarchy of local activities, which express an object’s own internal dynamics, and agent activities, which serve callers.

Syntax-controlled dialogs

Zonnon’s most unusual feature is how active objects communicate. Instead of plain method calls or remote proxies, a caller starts an activity in the callee, and the two exchange tokens in a dialog. The legal sequences of messages are written as a grammar in EBNF. The callee’s activity acts, in effect, as a parser for that grammar. The JMLC 2003 slides show an e-ticketing protocol whose dialog is defined as CHECKPRICE Destination [TicketType] Price | BUYTICKET Destination [TicketType] AccountID TicketID, together with the rules for each of those parts. In code, !t sends a token and ?t receives one. Gutknecht described formal dialogs as “a generalization of asynchronous method calls.” The contract between two concurrent parties is a syntax that both sides can check.

Later additions

The July 2009 draft of the Zonnon Language Report (v04) lists operator overloading, indexers and exception handling as new features. It also adds a chapter on mathematical extensions: multidimensional math arrays, indexing by ranges and vectors, and sparse structures, with names deliberately modelled on MATLAB. That draft allows reserved words to be written either all in lower case or all in upper case, which is why newer examples such as the zonnon.org Hello World use lower case. Identifiers remain case-sensitive. record is defined as shorthand for a value object (object {value}).

Implementation

The ETH Zonnon compiler

The compiler front end is written in C# and uses a recursive-descent parser. Code generation and IDE integration go through Microsoft’s CCI framework, which was also used for the Cω and Spec# compilers. In his 2010 talk at the Bergen Language Design Laboratory, Zouev described three versions built on one shared core: a command-line compiler, a compiler integrated into Visual Studio, and a compiler integrated into Zonnon Builder. Zonnon Builder is a small standalone IDE aimed at beginners and Pascal programmers. The 2005 paper reports a test suite of “more than 1500 Zonnon test cases” used for systematic testing, although Zouev’s 2010 slides give a more conservative “1000+”. ETH also distributed a Zonnon plugin for Eclipse, which ran the compiler on Mono.

According to the project’s download pages, releases went like this:

ReleaseDateNotes
Build 1004311 July 2005Alpha integrated with Visual Studio .NET
VS 2005 build25 July 2006Visual Studio 2005 integration plus XML representation
Eclipse plugin 1.0.017 December 2006Bundles compiler 1.0.53 for Rotor/Mono
Build 10062 / plugin 1.0.637 October 2007Windows and Linux/Mono tracks released side by side
1.1.10by April 2009Moves to Visual Studio 2008; VS 2005 users told to stay on 1.0.89
1.2.2c. 2009-2010First release with the mathematical extensions
1.2.87 August 2010Windows (VS 2008) and Eclipse/Mono packages
1.3.09 November 2012Uses OpenCL to speed up the math extensions; last ETH release

For 1.3.0, ETH’s page listed two packages. One was a Windows installer with Visual Studio 2008 integration, Zonnon Builder and the command-line compiler. The other was a ch.ethz.zonnon zip “for Eclipse and Mono,” with separate instructions for using it with Eclipse on Linux. The page also listed known limitations: nested procedures were not supported, enumeration types could not be declared in definitions, and integer division of negative numbers followed C# instead of the language report.

Performance of the math extensions

The SBLP 2010 paper “Implementing Mathematical Data Types on Top of .NET” (Gutknecht, Mitin, Zolotykh, Gonova) is the only published benchmark. The tests ran on a laptop-class Intel Core 2 Duo T7250 at 2.0 GHz with about 2 GB of RAM:

  • Digit classification (kernelized clustering on the USPS handwritten digits 0 and 1). The optimized math-array Zonnon code was up to about 4.5 times faster than unoptimized Zonnon. The authors add that unoptimized Zonnon performs roughly like similar C# code. Compared with a native-code, SIMD-optimized Oberon implementation, the result depended on the kernel. Oberon was much faster with linear and polynomial kernels (for example, 32 ms vs 339 ms for linear learning). Zonnon was faster with the Gaussian kernel (2,593 ms vs 8,331 ms for learning).
  • Image reconstruction (kernel ridge regression with a Gaussian kernel). The whole optimized Zonnon application was about 1.5 times slower than MATLAB (104,867 vs 69,910 in the paper’s timing units, with unoptimized Zonnon at 719,784). The conjugate-gradient linear solver was about 2 times slower than MATLAB’s. The authors note that MATLAB uses the BLAS and Intel MKL libraries.

Evolution

Zonnon’s history falls into three stages:

  1. Design (2002-2003). The object model and dialogs were worked out and presented at OOPSLA 2002, in Moscow and at JMLC 2003. Kirk and Lightfoot edited the report through several drafts.
  2. Implementation (2004-2008). Compiler builds came out frequently. Zouev’s 2010 slides say the distribution was “updated almost every Monday.” The team released the Zonnon Builder IDE, integrated the compiler with successive versions of Visual Studio, shipped an Eclipse/Mono port, and developed teaching material in Russia. Research papers followed at IVNET'06 (Brazil), KPS'07 (Germany) and ICCBSS 2008 (Madrid).
  3. Extensions and wind-down (2009-2012). The v04 report draft and compiler 1.2.x added mathematical types in the tradition of Math Oberon and Pascal-XSC. Release 1.3.0 in November 2012 added OpenCL acceleration and was the last ETH release.

In March 2013 the command-line compiler, matching ETH version 1.3.0 but without the Visual Studio integration, was published on CodePlex under the Microsoft Public License. Microsoft’s CCI source was not included. Instead the repository shipped three precompiled CCI libraries, and its README warns that the compiler “does not compile with latest public version of CCI.” When CodePlex was shut down, Roman Mitin moved the code to GitHub in July 2017 as zonnonproject/compiler. He also set up zonnon.org, which hosts an introduction by example and the December 2005 v03 Language Report. He made his last changes to the compiler repository in January 2020 and to the website in January 2024.

Current Relevance

Zonnon is dormant. There has been no compiler release since 1.3.0 in 2012. The original zonnon.ethz.ch site no longer resolves in DNS, and its last Wayback Machine capture is from December 2019. Its documents now survive only in web archives and on zonnon.org. The GitHub compiler targets the .NET Framework of its time, and on Mono it had to be compiled with a special “Rotor” flag. Because it depends on old Visual Studio project formats and prebuilt CCI binaries, building it today takes some archaeology. No Docker image or package-manager distribution is known.

The language still has an audience in Russian-language computer science education. There is Mitin’s 2004 Nizhny Novgorod student manual, the 2010 Novosibirsk textbook, and an introductory programming course at the A. P. Ershov Institute of Informatics Systems in Novosibirsk that ETH’s “books & courses” page listed as using Zonnon. Whether any of these courses still run today could not be confirmed.

Why It Matters

Zonnon is a late member of the Pascal-Modula-Oberon family from ETH Zurich, and it shows how that tradition responded to the 2000s. It did not add classes to Oberon. Instead it questioned the class-and-inheritance model: one dominant hierarchy is replaced by facets and aggregation, and passive method calls with library threading are replaced by active objects with dialogs checked against a grammar. It was also an early test of how well .NET’s “many languages, one runtime” promise worked. A small academic team mapped an unconventional object model onto the CLR and got deep Visual Studio integration, which they believed no one outside Microsoft had done before. Zonnon never spread beyond research and teaching, and no later language is documented as descending from it. Still, it is a clear, compact record of three ideas that remain active topics in language design: composition over inheritance, concurrency built into the language, and communication protocols as checkable contracts.

Timeline

2002
Jürg Gutknecht and Eugene Zueff of ETH Zurich present 'Zonnon Language Experiment, or How to Implement a Non-Conventional Object Model for .NET' as an extended abstract at OOPSLA 2002 in Seattle (November), describing it as a work in progress
2003
Papers on the language go up on the project site in January; Gutknecht presents 'Zonnon: A .NET Language Beyond C#' at a Microsoft conference in Moscow (15-17 June)
2003
Gutknecht and Zueff present 'Zonnon for .NET – A Language and Compiler Experiment' at JMLC 2003 in Klagenfurt, Austria (25-27 August), alongside Draft 2 of the Zonnon Report edited by Brian Kirk and David Lightfoot; the project moves to www.zonnon.ethz.ch on 1 September
2004
A steady run of compiler builds starts (build 10031 on 2 November), with a new Language Report version (1 November) and Kirk, Lightfoot and Gutknecht's 'The Concepts of Zonnon' presentation
2005
Zonnon Builder, a lightweight IDE, ships with build 10038 (18 January); build 10043 (11 July) is an alpha integrated with Visual Studio .NET; the Language Report v03 is dated 14 December
2006
Compiler with Visual Studio 2005 integration released (25 July); Zonnon plugin for Eclipse, bundling the Rotor/Mono build of the compiler, added 17 December
2008
Gutknecht and Roman Mitin present 'Project Zonnon: A Compositional Language for Distributed Computing' at ICCBSS 2008 in Madrid (February)
2009
Compiler 1.1.10 moves the Windows version to Visual Studio 2008; a draft Language Report v04 (28 July) adds mathematical extensions, operator overloading, indexers and exception handling
2010
Compiler 1.2.8 released (7 August); math extensions (added in 1.2.2) described in 'Implementing Mathematical Data Types on Top of .NET' at SBLP 2010; Novosibirsk State University publishes V. N. and E. V. Kasyanov's Zonnon textbook
2012
ETH Zonnon compiler 1.3.0 released (9 November), using OpenCL to speed up the mathematical extensions; it is the last ETH release
2013
Command-line compiler source (corresponding to 1.3.0, without Visual Studio integration) published on CodePlex under the Microsoft Public License (March; the repository's first commit is dated 17 March)
2017
With CodePlex closing down, Roman Mitin moves the compiler to GitHub (zonnonproject/compiler) and launches zonnon.org as a GitHub Pages site (July)

Notable Uses & Legacy

Nizhny Novgorod State University

Used as the first programming language in an introductory programming course for junior students, credited to V. Gergel and R. Mitin in Zouev's 2010 slides; Mitin's 58-page Russian-language Zonnon student manual was published by the university press in 2004

Novosibirsk State University

V. N. Kasyanov and E. V. Kasyanova's 119-page textbook 'Язык программирования Zonnon' (The Zonnon Programming Language) was published in Novosibirsk in 2010, according to the university library's new-acquisitions bulletin

ETH Zurich research and teaching

Used by the Institute for Computer Systems as a testbed for language concepts such as compositional inheritance, active objects, syntax-controlled dialogs and mathematical array types on .NET, and as the subject of ETH student projects

Numerical-computing benchmarks (SBLP 2010)

In their own SBLP 2010 paper, the language's developers (Gutknecht, Mitin, Zolotykh and Gonova) used the math extensions for kernel-based USPS handwritten-digit classification and kernel ridge regression image reconstruction, as benchmarks of .NET for numerical computing rather than as a production deployment

Language Influence

Influenced By

Pascal Modula-2 Oberon Active Oberon Active C#

Running Today

Run examples using the official Docker image:

docker pull
Last updated: