Thanks, and here's an even simpler illustration.
local X in
{Browse
{SearchAll
proc {$ Ans}
Ans = a
Ans = X
end}}
end
If *either* of the two statements in the proc are commented out, one gets a result.
Here's my summary of Oz's concurrent logic programming model: http://cs.calstatela.edu/~wiki/index.php/Courses/CS_460/Fall_2005/Logic_Programming_in_Oz
. It is intended for people who understand programming (and who understand unification, which we already talked about) but who have no knowledge of Oz "Computation Spaces."
I've taken David's concern about the term "thread" to heart. I use the term "computation" in an informal sense with the expectation that most people will understand what it means appropriately. I didn't want to give the impression that one has to understand "Computation Space" as a formally defined concept in order to write logic programs in Oz.
-- Russ
On 10/9/05, Irene Langkilde-Geary <[EMAIL PROTECTED]> wrote:
Russ,
The code below below blocks because any binding a subspace does to a
variable external to itself is speculative, and the program must wait
until the "owner" of the variable binds it, before it can be
determined whether the binding in the subspace is entailed or failed.
> local
> X
> in
> {Browse
> {SearchAll
> proc {$ Y}
> choice Y = a [] Y = b end
> Y = X
> {Browse X#Y}
> end}}
> end
Here's an alternate version to illustrate:
local X in
thread
{Browse {SearchAll
proc {$ Y} choice Y=a [] Y=b end
Y=X {Browse X#Y}
end}}
end
{Delay 200}
X=b
{Browse [here X]}
Some links that might help:
http://www.mozart-oz.org/documentation/fdt/node17.html
http://www.mozart-oz.org/pipermail/mozart-users/2005/006524.html
And of course, Christian's thesis:
http://www.ps.uni-sb.de/Papers/abstracts/ProgrammingConstraintServices.html
Anyway, you're not the first person to wish that the key ideas about
Spaces from Christian's thesis were distilled in a prominent spot in
the main documentation of Mozart.
Irene
_________________________________________________________________________________
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
