Questions tagged [oz]

Oz is a multiparadigm programming language including logic, functional (both lazy and eager), imperative, object-oriented, constraint, distributed, and concurrent programming.

Oz is a multiparadigm programming language including logic, functional (both lazy and eager), imperative, object-oriented, constraint, distributed, and concurrent 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, fault-tolerant applications within the language. For constraint programming, Oz introduces the idea of "computation spaces"; these allow user-defined search and distribution strategies orthogonal to the constraint domain.

A canonical book on Oz programming is Concepts, Techniques, and Models of Computer Programming.

For more information, see the Mozart programming system, which is a multiplatform implementation of the Oz programming language.

110 questions
0
votes
0 answers

How do I disable concurrency in Oz?

One of the most annoying aspects of Oz is that when developing, often calls to {Browse X} never display anything in the browser, even though no errors are reported during compilation or execution. One of the reasons this can happen is if, at some…
Hubro
  • 56,214
  • 69
  • 228
  • 381
0
votes
1 answer

What are the reasons Oz/Mozart has the reputation of being slow?

I am aware that it is an academic project, but the Oz/Mozart is such a beautiful language, and I'd love to use it for my pet projects. Is this reputation deserved? If so: is it only the the compiler, or also the execution? Are the speed issues at…
user957396
  • 71
  • 4
0
votes
1 answer

Why doesn't "for X in E1..E2;E3 do" work in Oz?

I'm using Mozart 2.0.0 and I'm following these docs: http://mozart.github.io/mozart-v1/doc-1.4.0/loop/node1.html#chapter.official I'm guessing the loop syntax has changed or something, because I get a parse error when following the documentation…
Hubro
  • 56,214
  • 69
  • 228
  • 381
0
votes
1 answer

Create a list of functions Oz Mozart

I'm trying to create a List of functions is oz, this list will be pasted to another function as an input. Someone can help me with this?
Anita
  • 43
  • 5
0
votes
1 answer

Mozart/Oz Gives Error : expression at statement position

Consider the following code: declare class Test attr L meth init L:=nil end meth put(X) {Browse @L} end meth get {Browse @L} end meth isEmpty @L==nil end meth getList @L end meth setNil L:=nil end meth union(C) {Browse @L}…
Ramin Omrani
  • 3,673
  • 8
  • 34
  • 60
0
votes
2 answers

Number of digits

I'm programming a function In Mozart-Oz that returns the mirror of a number, for example Mirror(1234) will return 4321 So anyway I have the idea how to, but I'm stuck because I need an in-built function that returns the number of digits (returns an…
user3078046
  • 31
  • 1
  • 7
0
votes
1 answer

for loop in mozart/oz doesn't work

I want to have a for loop in my program which is written in mozart-oz. every time I try a for loop, it gives me error. I've checked the syntax and its true but it gives error. here is my code: OZ: declare fun {Test L} for E in L do {Browse…
Ramin Omrani
  • 3,673
  • 8
  • 34
  • 60
0
votes
1 answer

Determining if OZ variable is bound?

Is there a safe way to ask if a single assignment variable in OZ is bound or not? Using an unassigned data flow variable in a way that requires the value will cause the program to wait until a value is assigned. In a sequential environment, this…
Tom Koenig
  • 67
  • 4
0
votes
1 answer

'Do nothing' operator in Oz

As a part of a learning course, i was making a procedure that took lists as parameters and then operated on their contents. It went like this: proc {myProc A B} case B of H|T then %do something {myProc A T} end end However,…
Srv19
  • 3,458
  • 6
  • 44
  • 75
0
votes
2 answers

Returning a function from a function in OZ. Higher order problems

I am trying to write a function that will essentially return a function as a result. I am trying to achieve something like this: {{Add 3}4} where the result will come out as 7. I found the following SO question that has the same question, but the…
Tadgh
  • 1,999
  • 10
  • 23
0
votes
1 answer

Argument error in my "For" loop code (Oz/Mozart)

I've started to learn Oz/Mozart recently, and for practice, I'm trying to write the code of a simple "For" procedure, that loops from "Init" to "End" values, and in each cycle print the current cycle number to the Browser. Here is the code: This…
Granjero
  • 340
  • 3
  • 13
0
votes
2 answers

How does these Pascal Triangle functions work?

I'm reading Concepts, Techniques, and Models of Computer Programming, and there's a code at the beginning that I just cannot understand no matter how hard I try. declare Pascal AddList ShiftLeft ShiftRight fun {Pascal N} if N==1 then [1] …
MasterMastic
  • 20,711
  • 12
  • 68
  • 90
0
votes
2 answers

How do I convert an integer to a list and vice versa in Oz?

How do I convert an integer to a list and back in Oz? I need to take a number like 321 and reverse it into 123. The Reverse function in Oz only works on lists so I want to convert 321 to [3 2 1], reverse it, and convert [1 2 3] back to 123. Can…
el diablo
  • 2,647
  • 2
  • 20
  • 22
0
votes
1 answer

Adding buffer type to "New buffer in mode"

When I choose the option "New buffer in mode" I'd like to open a buffer for an obscure programming language called oz. At the moment it is not in the list of buffer modes to choose from. I have the needed software available (Mozart…
The Unfun Cat
  • 29,987
  • 31
  • 114
  • 156
0
votes
1 answer

applying non procedure and non object error

declare fun {Factorial N} local FactorialAux in fun {FactorialAux N Product} if N == 0 then Product else {FactorialAux N-1 {fibo N}|Product} end end {FactorialAux N nil} end end fun {fibo N} if N==1 then 1 …
Mcolorz
  • 145
  • 1
  • 5
  • 20