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

Make a decreasing list from a number

I need to create a decreasing list of all whole numbers between X and Y (inclusive). I am trying this: declare local fun {Dec From To} From | {Dec From-1 To} end in {Browse {Loop 8 1}} % Should Display: [8, 7, 6, 5, 4, 3, 2,…
Moses
  • 157
  • 1
  • 1
  • 8
0
votes
1 answer

Pattern matching with a record in Oz

i'm having some trouble wrapping my head on how to utilize the elements of a record in Oz with pattern matching. Below is my code declare fun {Eval X E} case X of int(N) then N [] var(X) then E.X [] mul(X Y) then X*Y [] add(X Y) then X+Y …
0
votes
1 answer

Puzzle in Mozart Oz

I am trying to solve the below puzzle in Mozart oz. Susie loved animals and had a large collection of stuffed animals. However, there were several that were her favorites. She decided this morning to rearrange her stuffed animals and give each of…
0
votes
1 answer

Need the output horizontally in Mozart OZ programming

Below given is the code I have made for finding Non- Prime numbers between 1-100 by using Mozart OZ programming language. Code in Mozart OZ: declare for A in 1..20 do for I in 2..A div 2 break:Ab do if A mod I ==0 then {Browse A} {Ab} …
0
votes
1 answer

How to write a proper procedure in Oz?

I am very new to Oz, so sorry if this is somewhat basic. The following code, for calculating the area, diameter and circumference of a circle does not work. It throws an error saying "illegal arity in application". I have tried tweaking the code in…
Nora
  • 1,825
  • 8
  • 31
  • 47
0
votes
1 answer

toplevel abstraction in line 1

I see the following error when running the program at the bottom:- %***************************** failure ************************** %** %** Tell: 1024 = two_10 %** %** Call Stack: %** toplevel abstraction in line 1, column 0, PC =…
Himanshu
  • 2,384
  • 2
  • 24
  • 42
0
votes
1 answer

Mozart/Oz: how to make record with Record.make

I am trying to create a record from list using Record.make: declare L=[z [a b] [1 2]] {Record.make L.1 L.2 0} but getting an error: Expected type: feature At argument: 1 How to make a second argument L.2 to be A 'feature' type? I assume L.2 is a…
Alexey Novakov
  • 744
  • 6
  • 20
0
votes
1 answer

syntax error, unexpected T_end, expecting T_the

I'm new to OZ Mozart, I'm trying to write a triangular sequence but the programming won't work. declare fun {Sequence N R} fun {Help I} if I < N sum = {Int.toFloat(N*(N+1)/2.0)} %I + 1 case R of nil then {Append [sum] nil} …
Kun
  • 580
  • 2
  • 13
0
votes
1 answer

Scan through individual numbers in a list with Oz

I am working on learning Oz, but with very little online resources apart from the official documentation I am REALLY struggling to find out how to scan through a list in order to create a working partition function. In this example im just trying to…
Kyle Robinson
  • 45
  • 2
  • 7
0
votes
1 answer

Expected 'end' in case statement

The following code compiles and runs as expected: fun {Tokenize Lexemes} case Lexemes of Head|Tail then case Head of "+" then operator(type:plus)|{Tokenize Tail} else …
tsorn
  • 3,365
  • 1
  • 29
  • 48
0
votes
2 answers

Oz: Counting 0 in trees with unlimited subtrees

Im writing a code for an exercise for my uni and have a problem. I'm quite beginner with Oz and just can't figure out why does this code not showing anything but is accepted by the compiler: declare Tree W P T1 T2 T3 T4 fun {Count0 Tree} case…
wiwo
  • 721
  • 1
  • 13
  • 18
0
votes
1 answer

Mozart (Emacs) shotrtcuts on mac

I'm learning Oz language. Im using Mozart for this and learning from this tutorial: http://mozart.github.io/mozart-v1/doc-1.4.0/tutorial/\ I'm a total beginner on it. There is a lot of shortcuts in this tutorial and I just can't find them on my…
wiwo
  • 721
  • 1
  • 13
  • 18
0
votes
1 answer

How to use the module List in Oz

I found info about a module in Oz that contains procedures operating on lists here: https://mozart.github.io/mozart-v1/doc-1.4.0/base/list.html But I have been trying different procedures in different ways, for example: declare proc {Length L} …
Angela
  • 7
  • 2
0
votes
1 answer

Find the max in a list - OZ

I have to make a program in Oz that will return the max integer in a list. The code that I have so far looks like this: declare proc {Max Xs K} case Xs of nil then K = 0 [] X|Xr then local M in …
april
  • 1
  • 2
0
votes
2 answers

How to bind an unbound value in a List in Oz

Let's say we have the following code: local L in L = {List.make 10 $} % Bind nth element to something here end How does one set any of these unbound values? The Oz List Documentation didn't shed any light on this. The only related question…
Spyral
  • 760
  • 1
  • 12
  • 33