pet(X):- animal(X), sound(X, bark). pet(X):- animal(X), sound(X, bubbles). animal(spot). animal(barry). animal(hobbes). sound(spot, bark). sound(barry, bubbles). sound(hobbes, roar).