Logic-based Software Program
(Redirected from Logic programming)
Jump to navigation
Jump to search
A Logic-based Software Program is a declarative program that follows a computational logic paradigm.
- Context:
- It can (typically) be composed of a set of Logic Program Clauses.
- It can implement a Logic-based Algorithm.
- It can (typically) be defined in a Logic-based Programming Language.
- Example(s):
- Counter-Example(s):
- an Imperative Program.
- a SQL Program.
- See: Functional-based Software Program, Computational Logic, Logic Programming, Propositional Logic, First-order Logic, Nonmonotonic Logic, Logic Clause.
References
2011
- (Sammut & Webb, 2011) ⇒ Claude Sammut, and Geoffrey I. Webb. (2011). “Logic Program.” In: (Sammut & Webb, 2011) p.631
- QUOTE: 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):
- Using resolution we obtain the following answers to the query
X = philip, Y = william ; X = john, Y = william ; X = elizabeth, Y = william ; X = frances, Y = william.