Skip to main content

Logic Program

  • Reference work entry
  • First Online:
Encyclopedia of Machine Learning and Data Mining
  • 78 Accesses

A logic program is a set of logical rules or clauses. Logic programs are employed to answer queries using the resolution inference rule. For example, consider the following logic program:

grandparent(X,Y) :- parent(X,Z),                     parent(Z,Y). parent(X,Y) :- father(X,Y). parent(X,Y) :- mother(X,Y). father(charles, william).     mother(diana, william). father(philip, charles).     mother(elizabeth, charles). father(john, diana).     mother(frances, diana).

Using resolution we obtain the following answers to the query :-grandparent(X,Y):

X = philip,         Y = william ; X = john,           Y = william ; X = elizabeth,    Y = william ; X = frances,       Y = william.

Cross-References

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 699.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD 949.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer Science+Business Media New York

About this entry

Cite this entry

(2017). Logic Program. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning and Data Mining. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-7687-1_490

Download citation

Publish with us

Policies and ethics