Return all matches of a backward chaining goal.
A list or symbol.
Any backward chaining goal.
The backward chaining inference engine is started to look for all sets of bindings which satisfy
. For each of those bindings,
is instantiated and collected to return a list. The value is nil if nothing
cannot be satisfied.
Any subgoals that match the object base will only find objects from the current inferencing state.
(findall '(?x is in (1 2 3)) '(member ?x (1 2 3)))
((1 IS IN (1 2 3))
(2 IS IN (1 2 3))
(3 IS IN (1 2 3)))
(findall '(?truck is a truck) '(truck ?truck))
((#<TRUCK TRUCK1> IS A TRUCK)
(#<TRUCK TRUCK2> IS A TRUCK))
KnowledgeWorks and Prolog User Guide (Macintosh version) - 29 Feb 2008