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
1
vote
1 answer

How do I use loops in Oz?

From this documentation: http://mozart.github.io/mozart-v1/doc-1.4.0/loop/node1.html I get the basic loop usage for iteration: for X in SomeList do % ... end And numbers: for X in x..y do % ... end But the "features" that are explained has…
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
vote
1 answer

Why can't I get functional methods to work?

My class: declare class Collection attr list meth init list := nil end meth put(X) list := X|@list end meth get($) if @list == nil then nil else local X in X = @list.1 …
Hubro
  • 56,214
  • 69
  • 228
  • 381
1
vote
1 answer

Boolean and logical operators

I'm a begginer in Mozart-Oz, and I seek help because this language is not very intuitive, and lacks documentation. I'm trying to apply this code (which works on eclipse when i write it in java) and doesn't work in oz, here are the details: This is…
user3078046
  • 31
  • 1
  • 7
1
vote
1 answer

Oz Mozart factorial function

I have this factorial function that is currently working, but the result I'm having is not the one I need. The code is: declare fun {Fact N} if N==1 then [N] else Out={Fact N-1}in N*Out.1|Out end end {Browse {Fact 4}} The result is :…
Anita
  • 43
  • 5
1
vote
1 answer

ActiveTcl doesn't show thew the output when used with emacs and oz (Mozart 2)

I have applied for an online course which requires using Mozart with emacs and ActiveTcl. I have installed all of them based on the provided tutorial but when I feed a simple line of code like: {Browse 5+3} All I've got is: {Browse 5+3} %…
Hessam
  • 1,377
  • 1
  • 23
  • 45
1
vote
2 answers

Run Mozart/Oz system within GNU Emacs on OSX instead of Aquamacs

Is it possible to make Mozart/Oz system run within GNU Emacs on OSX instead of Aquamacs which I dislike? I tried copying /Applications/Emacs to /Applications/Aquamacs but had no luck.
Tvaroh
  • 6,645
  • 4
  • 51
  • 55
1
vote
2 answers

How to write a simple higher order function in mozart oz?

I am a beginner in mozart oz, and I would like to write a simple higher order function, like {{Add 1}2}, the result of which has to be 3. I guess this is something like nested call in C, where a function could call itself? I am not sure how to…
phil
  • 255
  • 4
  • 16
1
vote
0 answers

Test for unification in Oz

What I want to do is, test if a certain expression unifies with another in Oz. For example, I want to do something like this: fun {UnifyP A B} ... end that can return true when A can be unified to B and false else. I want to use it to do a…
mhourdakis
  • 179
  • 8
0
votes
0 answers

divide a list into two sublists in Oz

Create a function in Oz that takes as input a list of integers. The function's outputs are two lists: the first list contains even numbers the second list odd numbers. The two lists are separated by a #. Es. {Browse {F [1 2 3 4]}} -----> [1 3]#[2…
0
votes
1 answer

Prime or not using oz language

I am trying to make a function to check whether the value is a prime number or not using tail recursive function, so please can someone help me with this ` declare fun {PrimeR X D} if X==2 orelse X==3 then 1 elseif X<2 andthen ((X mod D)==0)…
0
votes
1 answer

Implementing a concurrent program that keeps track of the occurrences of characters in a input stream

How does one approach this type of concurrent stream communication program? local InS in {Browse {Counter InS}} InS=a|b|a|c|_ end One should see in the browser [a#1]|[a#1 b#1]|[a#2 b#1]|[a#2 b#1 c#1]|_ A sequential program would be trivial, but…
scsi
  • 13
  • 3
0
votes
1 answer

What is an alternative Filter operation with better concurrency (code)?

The following is a naive attempt to increase the concurrency of the Filter function: fun {Filter L F} case L of X|Xs then if thread {F X} end then X|{Filter Xs F} else {Filter Xs F} end …
0
votes
1 answer

Mozart error "illegal use of nesting marker" when creating a functor

When compiling an Oz code with a functor, I get the error "illegal use of nesting marker" on the line where "functor" is declared. What can this mean? functor export sum:Sum divisao:Div mult:Mult sub:Sub define fun {Sum X Y} X +…
0
votes
2 answers

How to work with labels in mozart oz to get the elements from pair/tuple?

I'm new to mozart oz and I have this problems to solve: a) Implement a function Zip that takes a pair Xs#Ys of two lists Xs and Ys (of the same length) and returns a pairlist, where the first field of each pair is taken from Xs and the second…
Cipri
  • 15
  • 1
  • 6
0
votes
1 answer

Declaring labels after function

I have this code in Oz: declare fun {NewCounter} C Bump Read in C={NewCell 0} fun {Bump} C:=@C+1 @C end fun {Read} @C end counter(bump:Bump read:Read) end I have two questions: 1) C, Bump and Read labels are declared after the NewCounter function.…
Jhdoe
  • 101
  • 1