In Prolog, “Setof” predicate can be used to find out all the solutions of a predicate. For example, you have this database:
Wisdom (SAP, Testing Tools)
Wisdom (PHP, Perl)
And if you want to find the solutions of Wisdom(X, Y). We can enter
Setof ([ X,Y] ,Wisdom (X,Y), Z).
Z = [[ SAP , Testing Tools], [ PHP, Perl] ]