Logic programming (source code)

= Logic programming
{wiki}

<Logic programming> represents knowledge and queries through logical clauses, letting an inference procedure search for substitutions making a query true. A fact such as `parent(ada, ben)` and a rule saying that a parent of a parent is a grandparent can answer a grandparent query without listing every answer explicitly. <Prolog> commonly combines <unification> with ordered goal search and backtracking. Declarative meaning and execution strategy must be distinguished: two logically equivalent rule orders can have different termination behaviour. The method connects <mathematical logic> to executable symbolic inference.