Re: copy_term/2 in Eclipse



so it might be something (wrong) with the toplevel printing routines
and not necessarily with copy_term itself. Joachim will enligthen us, I'm
sure :-)

Thank you very much, that was the right hint! The predicate and thus my
program works fine; the problem was only in the way the toplevel and
debugger printing routines displayed the variables. To obtain the
"right" output, one has to do the following:

[eclipse 1]: set_flag(variable_names,off).

Yes (0.00s cpu)

Then the output is the following:

[eclipse 2]: copy_term(s(X,a,Y,X), C).

X = _67
Y = _76
C = s(_183, a, _185, _183)
Yes (0.00s cpu)

and

[eclipse 3]: A = f(X), copy_term(A,B), X = 1.

A = f(1)
X = 1
B = f(_249)
Yes (0.00s cpu)

and

[eclipse 4]: copy_term(f(X),Z), Z = f(A), A == X.

No (0.00s cpu)

[There was no change in the last example, but I think there actually
should not be any. The query fails because of "A==X"; A and X are
distinct variables.]

But again, turning variable names off is *not* necessary for the
predicate to work properly; it is just needed in order for the toplevel
output to not replace the newly generated variables (like _183) by their
source's name (like X).

Regards
Jens
.



Relevant Pages

  • Re: cpu overheating
    ... Saying that software which fully utilises the CPU has a DEFECT ... then we can find out what is consuming it. ...
    (Fedora)
  • Re: something is doing something on my disk nonstop - how to trace what it is and why?
    ... >> monitors and I need to trace which process is using nonstop my harddrive ... any hint how to do that? ... >> usage and mem usage but not disk ... > the cpu is accessing the drive, therefore if your computer is not doing ...
    (alt.os.linux.redhat)
  • Re: cpu overheating
    ... too hot because it is doing something CPU intensive... ... Saying that software which fully utilises the CPU has a DEFECT ... on Windows, I suggest you start being more sensible. ...
    (Fedora)
  • Re: [9fans] Re: [sources] 20070413: /rc/bin/cpurc.local
    ... like another CPU could pick it up in the middle. ... p->mach is just a hint unless you hold the scheduling lock. ... That's why dequeueproc double-checks: ...
    (comp.os.plan9)