Examples of using Logic program in English and their translations into Serbian
{-}
-
Colloquial
-
Ecclesiastic
-
Computer
-
Latin
-
Cyrillic
A clause in a normal logic program has the form.
We can, however,vary the control component for other ways to execute a logic program.
A clause in an abductive logic program has the form.
The control component can be varied to provide alternative ways of executing a logic program.
A given constraint logic program may be reformulated to improve its efficiency.
A constraint satisfaction problem is typical solved by a constraint logic program having the following structure.
A constraint logic program is a logic program that contains constraints in the body of clauses.
The result of evaluating a goal against a constraint logic program is defined if the goal is proved.
The abductive logic program below describes a simple model of the lactose metabolism of the bacterium E. coli.
As an example, X>0 is a constraint, andis included in the last clause of the following constraint logic program.
The following constraint logic program represents a toy temporal database of john's history as a teacher.
Subject to this complication, sequential andparallel search strategies for and-or trees provide a computational model for executing logic programs.
Where"Logic" represents a logic program and"Control" represents different theorem-proving strategies.[9].
In practice, in many cases these two ways of formalizing the role of the integrity constraints coincide as the logic program and its extensions always have a unique model.
Normally, the logic program P does not contain any clauses whose head(or conclusion) refers to an abducible predicate.
Some problems are more natural(and thus, simpler)to write as logic programs, while some are more natural to write as constraint programs. .
Typically, constraint logic programs are written in such a way labeling literals are evaluated only after as many constraints as possible have been accumulated in the constraint store.
This notion is captured by the slogan Algorithm= Logic+ Control where"Logic" represents a logic program and"Control" represents different theorem-proving strategies.
Consider the abductive logic program consisting of the following(simplified) clauses: X is a citizen if X is born in the USA.
Moreover, logic-based program transformation techniques can also be used to transform logic programs into logically equivalent programs that are more efficient.
In ASP and Datalog, logic programs have only a declarative reading, and their execution is performed by means of a proof procedure or model generator whose behaviour is not meant to be controlled by the programmer.
The early work in grammar induction(also known as grammatical inference) is related to inductive programming,as rewriting systems or logic programs can be used to represent production rules.
However, in the Prolog family of languages, logic programs also have a procedural interpretation as goal-reduction procedures.
Shapiro built their first implementation(Model Inference System) in 1981:a Prolog program that inductively inferred logic programs from positive and negative examples.
Thus abductive explanations extend the logic program P by the addition of full or partial definitions of the abducible predicates.
For most practical applications, as well as for applications that require non-monotonic reasoning in artificial intelligence,Horn clause logic programs need to be extended to normal logic programs, with negative conditions.
However, in the Prolog family of languages, logic programs also have a procedural interpretation as goal-reduction procedures: to solve H, solve B1, and… and solve Bn.
One powerful paradigm that has been recently used for the representation of hypotheses in inductive programming(generally in the form of generative models) is probabilistic programming(and related paradigms,such as stochastic logic programs and Bayesian logic programming).
In the simplified, propositional case in which a logic program and a top-level atomic goal contain no variables, backward reasoning determines an and-or tree, which constitutes the search space for solving the goal.
Such problems are solved by computing"abductive explanations" of G. An abductive explanation of a problem G is a set of positive(and sometimes also negative) ground instances of the abducible predicates, such that,when these are added to the logic program P, the problem G and the integrity constraints IC both hold.