A Transformational Semantics of Static Embedded Implications of Normal Logic Programs. There are mainly two approaches for structuring logic programs. The first one is based on defining some notion of program unit or module and on providing a number of composition operators. The second approach consists in enriching logic programming with a mechanism of abstraction and scoping rules that are frequently found, for instance, in procedural programming. More precisely, this approach has been advocated by Miller and others using implications embedded in the goals of the given program as a structuring mechanism. However, as Giordano, Martelli and Rossi pointed out, we can associate two different visibility rules (static and dynamic) to this kind of structuring mechanism where, obviously, the semantics of the given program depends on the chosen rule. In this paper we consider normal constraint logic programs (with constructive negation . This class of programs combines the expressive power of normal programs with the capability to organize and to enhance dinamically their sets of clauses. In particular, first, we introduce an operational semantics based on constructive negation for this class of programs, taking into account the static visibility rule. Then, we present an alternative semantics in terms of a transformation of the given structured program into a flat one. Finally, we prove the adequacy of this transformation by showing that it preserves the computed answers of the given program. Obviously, this transformation semantics can be used as the basis for an implementation of this structuring mechanism. Resumen de Some contributions to the semantics of normal logic programs. Ana Edelmira Pasarella S. In this dissertation we study different problems that arise. We present in this section the classical approaches of de Semantics of Normal and Disjunctive Logic Programs: A Unifying Framework. Przymusinski; NMELP; 1994; View PDF; Cite; Save; Abstract. We introduce a simple. Characterizations of Stable Model Semantics for Logic Programs with. The paper is structured as. The Well-founded Semantics in Normal Logic Programs with Uncertainty. Logic programming - Wikipedia. Logic programming is a programming paradigm based on formal logic. A program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic programming language families include Prolog, Answer set programming (ASP) and Datalog. In all of these languages, rules are written in the form of clauses: H : - B1, . Facts are rules that have no body, and are written in the simplified form: H. In the simplest case in which H, B1, . However, there exist many extensions of this simple case, the most important one being the case in which conditions in the body of a clause can also be negations of atomic formulae. Logic programming languages that include this extension have the knowledge representation capabilities of a non- monotonic logic. 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 under the control of the programmer. However, in the Prolog family of languages, logic programs also have a procedural interpretation as goal- reduction procedures: to solve H, solve B1, and .. As a clause in a logic program, it can be used both as a procedure to test whether X is fallible by testing whether X is human, and as a procedure to find an X that is fallible by finding an X that is human. Even facts have a procedural interpretation. For example, the clause: human(socrates). E.: Semantics of normal logic programs with. Stable-Unstable Semantics: Beyond NP with Normal Logic Programs. Abductive logic programming. It extends normal logic programming by allowing some. Any of the different semantics of logic programming. X that is human by . Moreover, logic- based program transformation techniques can also be used to transform logic programs into logically equivalent programs that are more efficient. In the Prolog family of logic programming languages, the programmer can also use the known problem- solving behaviour of the execution mechanism to improve the efficiency of programs. History. However, the first proposal to use the clausal form of logic for representing computer programs was made by Cordell Green. Foster and Elcock's Absys, on the other hand, employed a combination of equations and lambda calculus in an assertional programming language which places no constraints on the order in which operations are performed. Advocates of declarative representations were notably working at Stanford, associated with John Mc. Carthy, Bertram Raphael and Cordell Green, and in Edinburgh, with John Alan Robinson (an academic visitor from Syracuse University), Pat Hayes, and Robert Kowalski. Advocates of procedural representations were mainly centered at MIT, under the leadership of Marvin Minsky and Seymour Papert. The most influential implementation of Planner was the subset of Planner, called Micro- Planner, implemented by Gerry Sussman, Eugene Charniak and Terry Winograd. It was used to implement Winograd's natural- language understanding program SHRDLU, which was a landmark at that time. Planner gave rise to the programming languages QA- 4, Popler, Conniver, QLISP, and the concurrent language Ether. Hayes (1. 97. 3) developed an equational language, Golux, in which different procedures could be obtained by altering the behavior of the theorem prover. Kowalski collaborated with Colmerauer in Marseille, who developed these ideas in the design and implementation of the programming language Prolog. The Association for Logic Programming was founded to promote Logic Programming in 1. Prolog gave rise to the programming languages ALF, Fril, G. An important concept in logic programming is the separation of programs into their logic component and their control component. With pure logic programming languages, the logic component alone determines the solutions produced. The control component can be varied to provide alternative ways of executing a logic program. This notion is captured by the slogan. Algorithm = Logic + Controlwhere . The top- level goal is the root of the tree. Given any node in the tree and any clause whose head matches the node, there exists a set of child nodes corresponding to the sub- goals in the body of the clause. These child nodes are grouped together by an . The alternative sets of children corresponding to alternative ways of solving the node are grouped together by an . Prolog uses a sequential, last- in- first- out, backtracking strategy, in which only one alternative and one sub- goal is considered at a time. Other search strategies, such as parallel search, intelligent backtracking, or best- first search to find an optimal solution, are also possible. In the more general case, where sub- goals share variables, other strategies can be used, such as choosing the subgoal that is most highly instantiated or that is sufficiently instantiated so that only one procedure applies. Such strategies are used, for example, in concurrent logic programming. Negation as failure. A clause in a normal logic program has the form: H : - A1, . The negation in the negative literals not Bi is commonly referred to as . For example: canfly(X): -bird(X),notabnormal(X). X): -wounded(X). bird(john). Given the goal of finding something that can fly: there are two candidate solutions, which solve the first subgoal bird(X), namely X = john and X = mary. The second subgoal not abnormal(john) of the first candidate solution fails, because wounded(john) succeeds and therefore abnormal(john) succeeds. However, The second subgoal not abnormal(mary) of the second candidate solution succeeds, because wounded(mary) fails and therefore abnormal(mary) fails. Therefore, X = mary is the only solution of the goal. Micro- Planner had a construct, called . An equivalent operator is normally built- in in modern Prolog's implementations. It is normally written as not(Goal) or \+ Goal, where Goal is some goal (proposition) to be proved by the program. This operator differs from negation in first- order logic: a negation such as \+ X == 1 fails when the variable X has been bound to the atom 1, but it succeeds in all other cases, including when X is unbound. This makes Prolog's reasoning non- monotonic: X = 1, \+ X == 1 always fails, while \+ X == 1, X = 1 can succeed, binding X to 1, depending on whether X was initially bound (note that standard Prolog executes goals in left- to- right order). The logical status of negation as failure was unresolved until Keith Clark . Completion amounts roughly to regarding the set of all the program clauses with the same predicate on the left hand side, say. H : - Body. 1. Writing the completion also requires explicit use of the equality predicate and the inclusion of a set of appropriate axioms for equality. However, the implementation of negation by failure needs only the if- halves of the definitions without the axioms of equality. For example, the completion of the program above is: canfly(X) iff bird(X), not abnormal(X). X) iff wounded(X). X) iff X = john or X = mary. X = X. not john = mary. The notion of completion is closely related to Mc. Carthy's circumscription semantics for default reasoning, and to the closed world assumption. As an alternative to the completion semantics, negation as failure can also be interpreted epistemically, as in the stable model semantics of answer set programming. In this interpretation not(Bi) means literally that Bi is not known or not believed. The epistemic interpretation has the advantage that it can be combined very simply with classical negation, as in . The inclusion of negation as failure means that logic programming is a kind of non- monotonic logic. Despite its simplicity compared with classical logic, this combination of Horn clauses and negation as failure has proved to be surprisingly expressive. For example, it provides a natural representation for the common- sense laws of cause and effect, as formalised by both the situation calculus and event calculus. It has also been shown to correspond quite naturally to the semi- formal language of legislation. In particular, Prakken and Sartor . It emerged from a collaboration between Colmerauer in Marseille and Robert Kowalski in Edinburgh. Colmerauer was working on natural language understanding, using logic to represent semantics and using resolution for question- answering. During the summer of 1. Colmerauer and Kowalski discovered that the clausal form of logic could be used to represent formal grammars and that resolution theorem provers could be used for parsing. They observed that some theorem provers, like hyper- resolution, behave as bottom- up parsers and others, like SL- resolution (1. It was in the following summer of 1. Kowalski, again working with Colmerauer, developed the procedural interpretation of implications. This dual declarative/procedural interpretation later became formalised in the Prolog notation. H : - B1, . It also became clear that such clauses could be restricted to definite clauses or Horn clauses, where H, B1, . Kowalski's procedural interpretation and LUSH were described in a 1. The first Prolog program, also written in 1. Marseille, was a French question- answering system. The use of Prolog as a practical programming language was given great momentum by the development of a compiler by David Warren in Edinburgh in 1. Experiments demonstrated that Edinburgh Prolog could compete with the processing speed of other symbolic programming languages such as Lisp. Edinburgh Prolog became the de facto standard and strongly influenced the definition of ISO standard Prolog. Abductive logic programming. A clause in an abductive logic program has the form: H : - B1, . The abducible predicates can be constrained by integrity constraints, which can have the form: false : - B1, . For example: canfly(X): -bird(X),normal(X). X),wounded(X). bird(john). Problem solving is achieved by deriving hypotheses expressed in terms of the abducible predicates as solutions of problems to be solved. These problems can be either observations that need to be explained (as in classical abductive reasoning) or goals to be solved (as in normal logic programming).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2016
Categories |