But the system should also return information about what variable substitutions satisfy a query. So we have to look more closely at the resolution process to see how the substitution values are determined. Actually, there are two issues here. In the previous sections the notion of query was introduced. In this section we will take a closer look at queries and how they are processed.
Queries allow questions to be posed regarding information contained in a program.
This type of query is called ground query . If the query is implied by the program, Prolog will return the answer yes . Otherwise the answer no is returned. Note that a period is also necessary following a query. A slightly more complex query is one that contains more than a single atom.