AI::Prolog::Cookbook

AI::Prolog::Cookbook Perl module contains recipes for common Prolog problems.
Download

AI::Prolog::Cookbook Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Curtis Poe
  • Publisher web site:
  • http://search.cpan.org/~ovid/

AI::Prolog::Cookbook Tags


AI::Prolog::Cookbook Description

AI::Prolog::Cookbook Perl module contains recipes for common Prolog problems. AI::Prolog::Cookbook Perl module contains recipes for common Prolog problems.Logic programming can take some time to get used to. This document is intended to provide solutions to common problems encountered in logic programming. Many of the predicates listed here will depend on other predicates defined here. If in doubt, see AI::Prolog::Builtins for which predicates AI::Prolog supports directly.Like most predicates in Prolog, the following predicates can be reused in ways to generate answers that a human could logically infer from the data presented. However, many times those "answers" can result in infinite loops. For example, in the gather/3 predicate listed below, we can gather the items from a list which match the supplied list of indices. gather(, , Result). % Result is Or we can figure out which indices in a list match the resulting values: gather(Indices, , ). % Indices is However, if we wish to understand which lists will have the given lists for the given indices, we have an infinite result set. AI::Prolog and (other Prolog implementations) will return one result and then enter an infinite loop if you request the goal be resatisfied (i.e., if you ask for another result). If you see behavior such as this in your programs, you can issue the trace. command to see how Prolog is internally attempting to satisfy your goal. notrace. will turn off tracing. Requirements: · Perl


AI::Prolog::Cookbook Related Software