Oz is a programming language created in 1991 by Gert Smolka.
#127on PLDB | 32Years Old | 661Users |
0Books | 22Papers | 371Repos |
Try now: Riju
Oz is a multiparadigm programming language, developed in the Programming Systems Lab at Université catholique de Louvain, for programming language education. It has a canonical textbook: Concepts, Techniques, and Models of Computer Programming. Oz was first designed by Gert Smolka and his students in 1991. Read more on Wikipedia...
functor
import
Application
System
define
{System.showInfo 'Hello, world!'}
{Application.exit 0}
end
% Hello World in Oz
functor
import
System
Application
define
{System.showInfo "Hello World!"}
{Application.exit 0}
end
% You can get a lot of information about Oz by following theses links :
% - http://mozart.github.io/
% - http://en.wikipedia.org/wiki/Oz_(programming_language)
% There is also a well known book that uses Oz for pedagogical reason :
% - http://mitpress.mit.edu/books/concepts-techniques-and-models-computer-programming
% And there are two courses on edX about 'Paradigms of Computer Programming' that also uses Oz for pedagogical reason :
% - https://www.edx.org/node/2751#.VHijtfl5OSo
% - https://www.edx.org/node/4436#.VHijzfl5OSo
%
% Here is an example of some code written with Oz.
declare
% Computes the sum of square of the N first integers.
fun {Sum N}
local SumAux in
fun {SumAux N Acc}
if N==0 then Acc
else
{Sum N-1 Acc}
end
end
{SumAux N 0}
end
end
% Returns true if N is a prime and false otherwize
fun {Prime N}
local PrimeAcc in
fun {PrimeAcc N Acc}
if(N == 1) then false
elseif(Acc == 1) then true
else
if (N mod Acc) == 0 then false
else
{PrimeAcc N Acc-1}
end
end
end
{PrimeAcc N (N div 2)}
end
end
% Reverse a list using cells and for loop (instead of recursivity)
fun {Reverse L}
local RevList in
RevList = {NewCell nil}
for E in L do
RevList := E|@RevList
end
@RevList
end
end
class Counter
attr val
meth init(Value)
val:=Value
end
meth browse
{Browse @val}
end
meth inc(Value)
val :=@val+Value
end
end
local C in
C = {New Counter init(0)}
{C inc(6)}
{C browse}
end
Feature | Supported | Token | Example |
---|---|---|---|
Booleans | ✓ | true false | |
Line Comments | ✓ | % | % A comment |
Comments | ✓ | ||
Semantic Indentation | X |
title | authors | year | citations | influentialCitations |
---|---|---|---|---|
The Oz Programming Model | G. Smolka | 1996 | 344 | 15 |
Mobile objects in distributed Oz | P. V. Roy and Seif Haridi and P. Brand and G. Smolka and Michael Mehl and R. Scheidhauer | 1997 | 116 | 4 |
Object-Oriented Concurrent Constraint Programming in Oz | G. Smolka and M. Henz and J. Würtz | 1993 | 111 | 0 |
Encapsulated Search and Constraint Programming in Oz | Christian Schulte and G. Smolka and J. Würtz | 1994 | 68 | 0 |
Using Oz for College Timetabling | M. Henz and J. Würtz | 1995 | 65 | 1 |
The Definition of Kernel Oz | G. Smolka | 1994 | 57 | 2 |
Logic programming in the context of multiparadigm programming: the Oz experience | P. V. Roy and P. Brand and D. Duchier and Seif Haridi and M. Henz and Christian Schulte | 2002 | 55 | 2 |
An overview of the design of Distributed Oz | Seif Haridi and P. V. Roy and G. Smolka | 1997 | 54 | 1 |
Logic Programming in Oz with Mozart | P. V. Roy | 1999 | 22 | 1 |
Virtual reality programming in Oz | Tomas Axling and Seif Haridi and L. Fahlén | 1996 | 22 | 2 |
Objects in Oz | M. Henz | 1997 | 16 | 2 |
Strasheela: Design and Usage of a Music Composition Environment Based on the Oz Programming Model | Torsten Anders and C. Anagnostopoulou and Michael Alcorn | 2004 | 13 | 0 |
Lösen kombinatorischer Probleme mit Constraintprogrammierung in Oz | Jörg Würtz | 1998 | 10 | 0 |
Constraint-Based Scheduling in Oz | J. Würtz | 1997 | 8 | 0 |
Constraint Programming in Oz | Tobias Müller and K. Popov and Christian Schulte and J. Würtz | 1994 | 8 | 0 |
The CURRENT Platform: Building Conversational Agents in Oz | T. Lager and Fredrik Kronlid | 2004 | 7 | 0 |
The Development of Oz and Mozart | G. Smolka | 2004 | 6 | 0 |
The Oz Programming Model (Extended Abstract) | G. Smolka | 1995 | 5 | 0 |
A Program Verification System Based on Oz | Isabelle Dony and B. L. Charlier | 2004 | 3 | 0 |
A history of the Oz multiparadigm language | P. V. Roy and Seif Haridi and C. Schulte and G. Smolka | 2020 | 3 | 0 |
The Oz Programming Language and System (Abstract) | G. Smolka | 1996 | 3 | 0 |
Compiling Formal Specifications to Oz Programs | Tim Wahls | 2004 | 2 | 0 |