Questions tagged [mozart]

The Mozart Programming System is an advanced development platform for intelligent, distributed applications, utilizing the Oz programming language.

The Mozart Programming System is an advanced development platform for intelligent, distributed applications. The system is the result of a decade of research in programming language design and implementation, constraint-based inference, distributed computing, and human-computer interfaces. As a result, Mozart is unequalled in expressive power and functionality. Mozart has an interactive incremental development environment and a production-quality implementation for Unix and Windows platforms. Mozart is the fruit of an ongoing research collaboration by the Mozart Consortium.

Mozart is based on the Oz language, which supports declarative programming, object-oriented programming, constraint programming, and concurrency as part of a coherent whole. For distribution, Mozart provides a true network transparent implementation with support for network awareness, openness, and fault tolerance. Mozart supports multi-core programming with its network transparent distribution and is an ideal platform for both general-purpose distributed applications as well as for hard problems requiring sophisticated optimization and inferencing abilities. We have developed many applications including sophisticated collaborative tools, multi-agent systems, and digital assistants, as well as applications in natural language understanding and knowledge representation, in scheduling and time-tabling, and in placement and configuration.

For more information, see the Oz programming language.

81 questions
0
votes
1 answer

How to use absolute values in Mozart?

I'm trying to get an absolute value of expression Z=:X-Y but it's not working. Here is my code: declare PSO proc {PSO W} X Y Z W in X=5 Y=2 Z=:Y-X W=:Abs(Z) W=w(w:W) {FD.distribute ff W} end {ExploreOne PSO} I would like to…
always_bloo
  • 165
  • 5
  • 13
0
votes
1 answer

Using "If statement" - OZ

I have problem using "if statement" in Mozart. Program starts but only result it gives is: 1#_. I'd like to know why it's now working. declare PSO proc{PSO W} X1 X2 X3 X4 Y1 Y2 Y3 Y4 in X1::1#6 X2::1#6 X3::1#6 X4::1#6 Y1::1#6 …
always_bloo
  • 165
  • 5
  • 13
0
votes
1 answer

Mozart Function parse error

when am trying to run this factorial function on this Mozart online complier i got parse error ! declare fun {Fact N} fun{Aux N Nmax FactNminus1} if N>Nmax then nil else (FactNminus1*N)|{Aux N+1 Nmax FactNminus1*N} end …
Mohamed A. Shebl
  • 384
  • 3
  • 5
  • 16
0
votes
1 answer

Mozart Oz function that returns nothing but executes several instructions

The question is in the title, how do I create a function which doesn't provide a returned value, but could execute several instructions? For example: declare fun {doStuff Tree} case Tree of bTree(T left:leaf right:leaf) then {Browse Tree} …
user3078046
  • 31
  • 1
  • 7
0
votes
2 answers

Writing a Factorial function with Lists

While I believe I have found a sound algorithm for my function (Factorial) I'm very confused as to why it loops infinitely. Here's my code : declare fun{Fact N} local M=1 in %I suppose it loops from here?? local FactT in …
user3078046
  • 31
  • 1
  • 7
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
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