Content deleted Content added
m clean up, replaced: ACM Computing Surveys (CSUR) → ACM Computing Surveys using AWB |
Jerryobject (talk | contribs) Update: Template:Infobox programming language, add: Template:Start date and age, Template:URL. Small WP:EoS WP:COPYEDITs. WP:LINKs: updates, adds, cut needless WP:NOPIPEs. WP:BADEMPHASIS quote marks > WP:ITALICs. |
||
Line 4:
|paradigm = [[multi-paradigm programming language|multi-paradigm]]: [[logic programming|logic]], [[functional programming|functional]], [[imperative programming|imperative]], [[object-oriented programming|object-oriented]], [[constraint programming|constraint]], [[distributed programming|distributed]], [[concurrent programming language|concurrent]]
|year = 1991
|designer =
|developer =
|released = {{Start date and age|1991}}
|latest release
|latest release date = {{Start date and age|2008|07|03|df=yes}}
|typing = [[dynamic typing|dynamic]]
|implementations = Mozart Programming System
|license
|dialects = Oz, Mozart
|influenced by = [[Erlang (programming language)|Erlang]], [[Lisp (programming language)|Lisp]], [[Prolog]]
|influenced = [[Alice (programming language)|Alice]], [[Scala (programming language)|Scala]]
|website =
}}
{{Use dmy dates|date=May 2012}}
Line 20 ⟶ 21:
'''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. In 1996
The Mozart Programming System is the primary implementation of Oz. It is released with an [[open source]] license by the Mozart Consortium. Mozart has been ported to different flavors of [[Unix]], [[FreeBSD]], [[Linux]], [[Microsoft Windows|Windows]], and [[
==Language features==
Oz<ref name="Oz programming model">
{{cite journal
| author =
| title = The Oz Programming Model
|journal = Lecture Notes in Computer Science
Line 34 ⟶ 35:
| pages = 324–343
| url= https://www.ps.uni-saarland.de/Publications/documents/Vol1000.pdf}}
</ref> contains most of the concepts of the major [[programming paradigm]]s, including logic, functional (both [[lazy evaluation
In addition to multi-paradigm programming, the major strengths of Oz are in [[constraint programming]] and [[distributed programming]]. Due to its factored design, Oz is able to successfully implement a network-transparent distributed programming model. This model makes it easy to program open, [[
==Language overview==
Line 54 ⟶ 55:
[2 4 6 8] % even more syntactic sugar
</source>
Those data structures are values (constant), [[first-class object|first class]] and [[dynamic typing|dynamically type checked]]. Variable names in
===Functions===
Line 125 ⟶ 126:
end
</source>
But Oz also provides a facility in case
<source lang="erlang">
declare
Line 135 ⟶ 136:
===Dataflow variables and declarative concurrency ===
When the program encounters an unbound variable it waits for a value. For example
<source lang="erlang">
thread
Line 145 ⟶ 146:
</source>
<source lang="erlang">
X = 1
Line 174 ⟶ 175:
</source>
Because of the way dataflow variables work, it is possible to put threads anywhere in
===Example: Trial division sieve===
This example computes a stream of prime numbers using the [[
<source lang="erlang">
fun {Sieve Xs}
Line 197 ⟶ 198:
| number = 3
| pages = 359–411 }}
</ref> is possible.
<source lang="erlang">
fun lazy {Fact N}
Line 208 ⟶ 209:
</source>
[[lazy evaluation]] gives the possibility of storing truly infinite data structures in Oz. The power of
<source lang="erlang">
declare
Line 244 ⟶ 245:
=== Message passing concurrency ===
The declarative concurrent model can be extended with message passing
<source lang="erlang">
declare
Line 256 ⟶ 257:
</source>
With a port and a thread,
<source lang="erlang">
fun {NewAgent Init Fun}
Line 267 ⟶ 268:
=== State and objects ===
It is again possible to extend the declarative model to support state and object-oriented programming with very simple semantics
<source lang="erlang">
local A X in
Line 276 ⟶ 277:
</source>
With these simple semantic changes
<source lang="erlang">
class Counter
Line 300:
==Execution speed==
The execution speed of a program produced by the Mozart
==See also==
* [[Alice (programming language)
* [[Dataflow programming]]
* [[:Category:Functional logic programming languages|Functional logic programming languages]]
** [[Curry (programming language)
** [[Mercury (programming language)
** [[Visual Prolog]], an object-oriented, functional, logic
==References==
Line 316:
==External links==
* {{
* [http://mozart.github.io/mozart-v1/doc-1.4.0/tutorial/index.html Tutorial of Oz]
* [http://www.info.ucl.ac.be/people/PVR/distribution.html Programming Language Research at UCL]: One of the core developers of Mozart/Oz, this group does research using Mozart/Oz as the vehicle
Line 323:
* [http://strasheela.sourceforge.net/strasheela/doc/01-Basics.html Oz Basics]
{{DEFAULTSORT:Oz (
[[Category:Multi-paradigm programming languages]]
[[Category:Functional logic programming languages]]
|