next up previous contents index
Next: 5.2.1.0.2 Determining Call Similarity Up: 5.2.1 Call Variance vs. Previous: 5.2.1 Call Variance vs.   Contents   Index


5.2.1.0.1 Determining Call Similarity via Variance

By default, XSB determines that a call $C$ is similar to a tabled subgoal $S$ if $C$ is a variant of $S$ -- 5.2. As an example p(X,Y,X) is a variant of p(A,B,A), but not of p(X,Y,Y), or p(X,Y,Z). Variance-based call similarity was used in the original formulation of SLG resolution [15] for the evaluation of normal logic programs according to the well-founded semantics and interacts well with many of Prolog's extra-logical constructs.

Under variance-based call similarity, when a tabled call $C$ is made, a search for a table entry containing a variant subgoal $S$ is performed. Notice that if such an $S$ should exist, then all of its answers are also answers to $C$, and therefore will be resolved against it.



Terrance Swift 2007-10-05