Question problem 3: join the confusion 

Forum: Com Sci 221, U Chicago, Autumn 2001, Discuss Classwork
Re: News Optional assignment #9, due Thursday 6 December (Mike O'Donnell)
Date: 2001, Dec 05
From: Terry (Sotiria) Lampoudi <slampoud@cs.uchicago.edu>

I'm having some conceptual trouble with the 3rd problem of this assignment:
join(X,Y) is supposed to be destructive to its arguments, right? But I don't see how this would work in the Prolog model. It seems to me that a Prolog program is not really like a C program in that there isn't a deterministic order of execution that you specify in which, for instance, you could assign X and Y and then again assign something to X and assign X to Y in the body of join, thereby getting this destructive behavior. Prolog just tries to make the relations all true. In that case is it trying to make the relation hold for the initial values of X and Y or the final (destroyed) values?
I infer from the sentence: my representation supports increasing equivalence that join cannot be used backwards to infer values of X and Y that could have resulted in a particular other list Z. Only a relation with 3 arguments could allow that, right? So it's trying to make the relations true for the initial X and Y, not the final (destroyed) X and Y.
But then why is it that in the example it is reporting the destroyed X and Y?
I'm sorry, this probably sounds terribly circular; I'm quite confused by this behavior and not quite sure how to simulate it.
--TL


Messages

1. Feedback Equivalence problem uses a nonstandard level of abstraction by Mike O'Donnell, 2001, Dec 05

to: "problem 3: join the confusion"