Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!metro!cluster!andrewt From: andrewt@cs.su.oz (Andrew Taylor) Newsgroups: comp.lang.prolog Subject: Re: Arrays in Prolog Message-ID: <1162@cluster.cs.su.oz> Date: 29 Aug 90 00:55:48 GMT References: <90239.175243SCHMIED@DB0TUI11.BITNET> <3899@bingvaxu.cc.binghamton.edu> <1990Aug28.065353.13951@sics.se> <3904@bingvaxu.cc.binghamton.edu> Sender: news@cluster.cs.su.oz Reply-To: andrewt@cluster.cs.su.oz (Andrew Taylor) Organization: Basser Dept of Computer Science, University of Sydney, Australia Lines: 18 In article <3904@bingvaxu.cc.binghamton.edu> vu0310@bingvaxu.cc..binghamton.edu (R. Kym Horsell) writes: >Why do you consider >it a bug if ``setarg(X,Y,Z),!'' DOES NOT remove the backtrack >point that restores the structure ``Y''? Here is a hint, consider this predicate: a(X) :- write(first - X), b(X). a(X) :- write(second - X), c(X). You'd expect that if backtracking occurred the second value of X written out would be the same as the first value of X written out. This is not so with your version of setarg. This is disasterous for either compiler analysis or human understanding of programs. Even when always undone on backtracking setarg is still a disaster so maybe all you have done is turn a disaster into a catastrophe.