Satisfying Goals Flashcards
1
Q
What is unification
A
The matching algorithm used to choose a particular clause. It considers numbers atoms variables compound terms lists
2
Q
When do 2 atoms unify
A
If and only if they are the same
3
Q
When do 2 numbers unify
A
If and only if they are the same
4
Q
When do 2 variables unify
A
Two unbound variables always unify with the two variables bound to each other.
5
Q
When do 2 compound terms unify
A
Two compound terms unify if and only if they have the same functor and the same arity, and their arguments can be unified pairwise.
6
Q
When do 2 lists unify
A
Two lists unify if and only if they have the same number of elements and their elements can be unified pairwise.