The problem here is (I know that since a long time, but I don't know
whether I added it to the known bugs/limitations page) is that you turn
a global variable locally into a finite domain. This is basically not
implemented. It would take gigantic effort, and its value would be
limited. You can avoud the probelm by turning Y into a finite domain to
start with.
Cheers
Christian
"Luis Quesada" <luque@info.ucl.ac.be> schrieb im Newsbeitrag
news:<3BE04731.6559B12F@info.ucl.ac.be>...
> Why does the following or commit to the first option?
>
> local
> X Y
> Apply_VS= proc {$ VS}
> thread {VS.1} end
> {Apply_VS VS.2}
> end
> List_of_Threads=proc{$} X::1#Y end|_
> in
> or
> thread {Apply_VS List_of_Threads} end
> Y=1
> []
> thread {Apply_VS List_of_Threads} end
> Y=2
> end
> {Browse X#Y}
> end
>
> The interesting thing is that if you independently try the second
> option no exception is raised (as expected):
>
> local
> X Y
> Apply_VS= proc {$ VS}
> thread {VS.1} end
> {Apply_VS VS.2}
> end
> List_of_Threads=proc{$} X::1#(Y-0) end|_
> in
> thread {Apply_VS List_of_Threads} end
> Y=2
> {Browse X#Y}
> end
>
> I will try to answer my question. I think the problem is not in
> Combinator.oz but in Space.askVerbose. If you observe the output of
> Space.askVerbose in the following case:
>
> local
> X Y
> Apply_VS= proc {$ VS}
> thread {VS.1} end
> {Apply_VS VS.2}
> end
> List_of_Threads=proc{$} X::1#Y end|_
> in
> {Browse
> '#'(
> {Space.askVerbose {Space.new proc {$ _}
> thread {Apply_VS
List_of_Threads} end
> Y=1
> end}}
> {Space.askVerbose {Space.new proc {$ _}
> thread {Apply_VS
List_of_Threads} end
> Y=2
> end}}
> )
> }
> end
>
> in its second invocation it returns 'failed'. The question is Why if
> we already know that space does not raise an exception?
>
> Which is even more interesting is that situation does not occur in the
> following case:
>
> local
> X Y
> Apply_VS= proc {$ VS}
> thread {VS.1} end
> {Apply_VS VS.2}
> end
> List_of_Threads=proc{$} X::1#Y end|_
> in
> {Browse
> {Space.askVerbose {Space.new proc {$ _}
> thread {Apply_VS
List_of_Threads} end
> Y=2
> end}}
> }
> end
>
> Luis
>
> --
> Catholic University of Louvain
> Department of Computing Science and Engineering
> Place Sainte Barbe, 2
> B-1348 Louvain-la-Neuve, Belgium
> Phone: (++32) (10) 47 90 13
> Fax: (++32) (10) 45 03 45
> E-mail: luque@info.ucl.ac.be
>
>
> -
> Please send submissions to hackers@mozart-oz.org
> and administriva mail to hackers-request@mozart-oz.org.
> The Mozart Oz web site is at http://www.mozart-oz.org/.
-
Please send submissions to hackers@mozart-oz.org
and administriva mail to hackers-request@mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.