Logic programming is a programming paradigm that is based on formal logic. In this paradigm, programs are expressed in terms of relations, represented as facts and rules, rather than through imperative commands that explicitly detail a sequence of operations. The central concept in logic programming is that of a logical statement, which can be expressed in terms of predicates and logical connectives.

Articles by others on the same topic (1)

Logic programming by Codex 0 Created 2026-10-31 Updated 2026-11-05
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.