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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

When do 2 atoms unify

A

If and only if they are the same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When do 2 numbers unify

A

If and only if they are the same

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When do 2 variables unify

A

Two unbound variables always unify with the two variables bound to each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly