info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] Why dereference()


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] Why dereference()
Date: Thu, 24 Mar 2011 12:26:34 +0000

Hello,

VariableTerm's value may point to another Term or be null and during the
execution of the program what it points to may change as unification and
backtracking occur. Hence dereference() provides what the value of
VariableTerm currently links to. Since a particular VariableTerm may be
unified with another VariableTerm n times before reaching one which was
unified with an actual value dereference() needs to be able to recurse.
Additionally it is used by ChangableTerm to change which value they hold
depending on the current state of different Prolog flags.

I hope that this helps,

Daniel

On Wed, 2011-03-23 at 19:13 +0530, Jatin Puri wrote:
> Hello,
> 
> I have a small query related to VariableTerm. I am unable to
> understand the functionality behind dereference(). I mean what is the
> essence behind linking Variable#value to some other VariableTerm and
> continuing the process.
> The manual just says 
> "During exectuion a VariableTerm may become unified with some other
> Term"
> On searching, I just couldn't understand the intention behind it. Can
> you please please explain under what circumstances does it happen and
> why?
> 
> Best Regards,
> Jatin Puri
> 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]