Russ Abbott wrote:

CTM certainly does make the point. I'm arguing that this is so central to Oz that the point should be made more forcefully and more visibly. It's probably one of the most important points to make to programmers who are trying to learn Oz. I've added a section on Data Flow Variables to the page on what programmers should know about Oz: http://cs.calstatela.edu/~wiki/index.php/Courses/CS_460/Fall_2005/What_programmers_should_know_about_Oz#Data_flow_variables <http://cs.calstatela.edu/%7Ewiki/index.php/Courses/CS_460/Fall_2005/What_programmers_should_know_about_Oz#Data_flow_variables> I'd be very interested in your comments. As I was writing it, an interesting parallel occurred to me. I've noted it the bottom of that section. I'd be very interested in your thoughts on that also.
-- Russ

On the bottom of the page you say:

"Until then, Oz programmers must keep in mind that there is a very wide
(and not very well documented) range of circumstances under which Oz
threads suspend—and they do so silently—because that's how the language
is defined."

Here is some clarification.

An operation suspends if the store does not have enough information for
the operation to continue. This is usually pretty clear: "X==0" suspends if
X is unbound, "if X then S1 else S2 end" suspends if X is unbound, "A+B"
suspends if either A or B is unbound, etc. On the other hand, list creation
"H|T" never suspends because it does not need the values of H and T. If
you want to understand what is going on in a formal sense, please look
at chapter 13 in CTM. The suspension condition is known as an 'ask' in
concurrent constraint programming: an 'ask' suspends until the store has
enough information to let the 'ask' continue.

The suspension condition is *always monotonic*. An operation suspends
when there is not enough information in the single-assignment store. An
operation that suspends may become runnable when more information is
added to the store, but it is *never* the case that a runnable operation suspends
because more information is added to the store! This makes suspension
very easy to reason about in Oz (much easier than reasoning about monitors,
for example). It's also what makes declarative concurrency possible.

Peter


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to