I take it all back. Oz is a powerful Concurrent Logic language. I took me a while to see how to use it that way. (And the fact that it can't be used that way without using a library procedure such as SearchAll really threw me off.)
Because much of the computation is encapsulated within a SearchAll, I found it difficult to debug. {Ozcar.breakpoint} doesn't seem to be triggered. I've been reduced to running very small subsections of the code in isolation or including a lot of output statements. Are there better ways?
In any event, I've written a logic program version of the Zebra puzzle: http://www.mozart-oz.org/documentation/fdt/node23.html#section.elimination.zebra
. I followed the FD strategy as closely as I could, which was quite closely. It's a pretty straightforward translation--although it runs on a bit.
The strategy is to fill in the house numbers for one of the groups of properties. (I used Colors, but it doesn't matter.) It then runs all the constraints. Finally, it fills in any values that had not been filled in by the constraints.
Instead of pasting the code, which is fairly long, it us here: http://cs.calstatela.edu/~wiki/index.php/Courses/CS_460/Fall_2005/Notes_for_Oct_8#The_zebra_puzzle
.
As you will see if you look at it, I couldn't figure out how to write a decent Adjacent. So the current version is just brute force. When I tried to use X+1 and X-1 etc., I couldn't get it to work. I still don't know why, so I've given up for now.
Any suggestions about that or anything else in the code are appreciated.
-- Russ
On 10/6/05, Bob Calco <[EMAIL PROTECTED]> wrote:
I third Torsten and second Christian.
I've been a "lurker" and occasional dabbler in Oz for awhile but
haven't yet turned the corner to become anything like an expert in
Mozart-Oz. I do, however, appreciate it for what it is: A
ground-breaking language for distributed, concurrent programming.
It's hard to convey its values in a world where IBM and Microsoft push
commodity programming with Java/WebSphere, on the one hand, and .NET
on the other.
If I could afford to give up my involvement in corporate development
altogether up for the sheer pleasure of helping to nurture Oz into the
first rate success it can be, I would. But there are hurdles, not the
least of which being that, at present, even very capable and
intelligent academics struggle with the underlying concepts of Oz, for
some reason. I think it has to do with the 'paradigm shift' involved
in grokking multiparadigm programming, more so than the actual
difficulty of the material. There is a lot of 'unlearning' one has to
do before one can properly learn "the Oz Way." Anyway.
I get the concepts and I think I have some good ideas for what it
would take to make it more commercially viable. But, alas, there exist
only 24 hours in a day and only 7 days in a week. I won't give up but
I have to find some time to apply myself to the task.
I'm glad to see so much activity lately. I think the best thing that
can happen right now is those of us who "believe in Oz" could get
together and build something really attention-grabbing with it that is
also useful to business. I think Oz's best chances of success -- in
terms of quick wins in the commercial world -- is as a middle-tier,
business logic platform. Let java and .NET duke it out in terms of
rich UI vs web, etc. Let the RDBMSs do their thing. Oz needs to "own"
the middle tier and show superior value in business logic and
real-time logistics applications.
All this is of course IMHO.
- Bob Calco
Lithia, FL
! -----Original Message-----
! From: [EMAIL PROTECTED]
! [mailto:[EMAIL PROTECTED]] On Behalf Of
! Christian Schulte
! Sent: Thursday, October 06, 2005 6:07 PM
! To: [EMAIL PROTECTED]
! Subject: RE: What is Mozart-Oz
!
! Dear all,
!
! I very much second Torsten. The spirit of Oz, its strength
! and also its
! weakness are due to the fact that it is a radical departure
! from Prolog.
!
! The driving principle in Oz is concurrency! The rest of the
! language design
! just follows as a corollary to that: abstractions useful for
! concurrency are
! at the very core (first-class procedures), search is designed to be
! compatbile with concurrency, concurrency is extended to
! distribution (as one
! particular perspective on distribution) and so on. Assuming
! that something
! that departs so radically can be digested in passing and rather
! differentially does not sound overly convincing to me.
!
! As a last comment, different is neither better nor worse. It is just
! different.
!
! Christian
!
! -----Original Message-----
! From: [EMAIL PROTECTED]
! [mailto:[EMAIL PROTECTED]] On Behalf Of Torsten
Anders
! Sent: Thursday, October 06, 2005 3:18 PM
! To: [EMAIL PROTECTED]
! Subject: Re: What is Mozart-Oz
!
!
! Dear Russ,
!
! Like others here, I am sorry, but I have to disagree strongly. I
! suggest you start reading CTM from the beginning and resist just
! jumping to your favourite subjects such as relational
! programming ;-)
! You will then realise that most of all, Oz is a multi-paradigm
! programming language.
!
! CTM does not only introduce the several programming models of
! Oz, but
! also carefully discusses how Oz compares with other languages
! designed
! for the respective programming model ( e.g. how Oz performs
! with other
! functional languages, concurrent languages, OOP languages etc).
!
! Best,
! Torsten
!
! BTW: I am actually a musician and with no formal computer science
! training (I only did a few years of Lisp programming before).
! Even for
! me the Mozart-Oz doc is perfectly comprehensible.
!
! > Having spent the last three weeks or so working with
! Mozart-Oz, [skip]
!
! I am _not_ able to read a few thousand pages of documentation
! in only
! three weeks. You may need some more time so to digest, before
! you come
! to a final verdict, how others misunderstood what they
! produced in more
! than ten years ;-) Needless to say, that I am only a humble user as
! well..
!
!
! --
! Torsten Anders
! Sonic Arts Research Centre
! Queen's University Belfast (UK)
! www.torsten-anders.de
!
! On 05.10.2005, at 21:54, Russ Abbott wrote:
!
! > I found out about Mozart-Oz after attending the Agent 2004
! conference
! > at U Chicago about a year ago. Michael North and others
! there told me
! > about it. They had had a class in it earlier that year and
! were very
! > impressed with it. They told me that it was organized as a
! core base
! > language on top of which most of the major programming language
! > capabilities (including Prolog-style unification and
! backtracking and
! > also including functional programming)had been built in a
! principled
! > way. I was quite excited about this--although I didn't
! really follow
! > up until recently. You can imagine my expectations when I started
! > looking at it. Neither CTM--at least looking at the table
! of contents
! > and flipping through the pages--nor the online tutorial material
! > disabuse one of this perspective.
! >
! > Having spent the last three weeks or so working with Mozart-Oz, my
! > impression now is that it is a Constraint Propagation system.
! > Everything else is built to serve that objective. Although
! I have no
! > expertise in CP, I am very impressed with what you have built. My
! > guess is that Mozart-Oz is a state-of-the-art CP system.
! (Are there
! > better ones around?) On the other hand, I don't think it is a
! > state-of-the-art system in other regards. But it shouldn't be
! > expected to be a state-of-the-art system for every aspect of
! > programming.
! >
! > So I strongly recommend that Mozart-Oz be publicized for
! what it is, a
! > fantastic CP system. With that in mind, I would recommend
! > re-organizing both the tutorial material and CTM. In CTM,
! for example,
! > not only is CPat the very end, it is in a section entitled
! > "Specialized Computation Models." The implication is that,
! yes one
! > could do CP in Oz just as one could use Oz for Gui building
! and for
! > Distributed programming. And not only can one build these various
! > kinds of computation models, they really are Oz afterthoughts. The
! > real Oz is the in the General Computation Models. I think
! that gives
! > the wrong impression. Does anyone believe that the GUI and
! Distributed
! > Programming capabilities of Oz are competitive with what
! one could get
! > elsewhere? Does anyone believe Oz is as good an OO
! language as <pick
! > your favorite OO language>? On the other hand Oz CP is in
! a class by
! > itself.
! >
! > So if I were to promote and teach Oz, I would focus on CP. I
would
! > promote it as CP, and I would teach it as CP. I would start with
! > simple CP problems and show how to do them. I would then
! talk about
! > Computation Spaces and how they work and about concurrency and how
! > that's part of how Computation Spaces work. I would also
! talk about
! > the language itself as a way to write constraints, which is
! really its
! > primary purpose.
! >
! > At that point, I might stop and talk about the language in
! more depth
! > as a language, pointing out that it is after all a general purpose
! > programming language. Not only can it be used to write
! constraints,
! > it can be used to write all sorts of non-constraint
! programs. But I
! > would ask people to keep in mind that many of the decision
! made when
! > developing the language (that threads block waiting for
! variables to
! > get values, for example) were made because it was intended as a
! > language for writing constraints and not because it was
! invented as a
! > general purpose language which was then adoptedas a
! > constraintlanguage when one was needed.
! >
! > I think that an approach like this would make it much easier for
! > someone approachingMozart-Oz from the outside to
! understand what's
! > going on. I also think it would be a more honest description of
! > what's really going on.
! >
! > I know I'm still a new comer to this community and that I
! haven't made
! > the sort of investments most of you have made in it. So
! perhaps my
! > opinion is somewhat gratuitous--as well as being still somewhat
! > uniformed. So if any of the above has been offensive to
! anyone, I
! > apologize.
! >
! > -- Russ
! >
! >
!
______________________________________________________________________
! > _
! > __________
! > mozart-users mailing list
! > [email protected]
! > http://www.mozart-oz.org/mailman/listinfo/mozart-users
! >
!
!
! ______________________________________________________________
! ______________
! _____
! mozart-users mailing list
! [email protected]
! http://www.mozart-oz.org/mailman/listinfo/mozart-users
!
!
! ______________________________________________________________
! ___________________
! mozart-users mailing list
! [email protected]
! http://www.mozart-oz.org/mailman/listinfo/mozart-users
!
_________________________________________________________________________________
mozart-users mailing list [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users
_________________________________________________________________________________ mozart-users mailing list [email protected] http://www.mozart-oz.org/mailman/listinfo/mozart-users
