| John W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987. |
....idea behind declarative error diagnosis is to collect information about what the program is intended to do, and compare this with what it actually does. Declarative debugging of logic programs can diagnose both wrong and missing computed answers, and it has been proved logically sound and complete [10, 16, 21]. Declarative debuggers have recently been de ned for several other programming paradigms [7, 19, 1] Declarative programming is supported both by functional and logic programming. However, each of these programming styles has di erent advantages w.r.t. practical applications. Functional ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-154, 1987. 10
....evaluation. For logic programs, a number of approaches to explain the results of query evaluation have been proposed in the literature. Algorithmic debugging techniques [28] explain the evaluation of a query by tracing the proof search performed by SLD resolution. Declarative debugging techniques [20, 24] assume a user provided intended model of the given program and then attempt to explain the unexpected success failure of a query by nding a program clause which is false in the intended model. Assertion based debugging techniques [18] perform program validation and debugging by static and ....
J.W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-154, 1987.
....a semiautomatic technique which allows to detect bugs on the basis of the intended meaning of the source program, disregarding operational concerns. Declarative debugging of logic programs can diagnose both wrong and missing computed answers, and it has been proved logically sound and complete [2, 7]. Work partially supported by the Spanish CICYT (project CICYT TIC98 0445 C0302 97 TREND ) Declarative debugging has been adapted to other programming paradigms, including lazy functional programming [14, 15, 10, 13, 18] and combined functional logic programming [12, 11] A common feature ....
....trees that relate computed answers to the declarative semantics of programs. More precisely, we formalize a procedure for building proof trees from successful computations. This allows us to prove the logical correctness of the debugger, extending older results from the field of logic programming [2, 7] to a substantially more difficult context. Moreover, our work is intended as a guideline for a future prototype implementation of a working debugger for the functional logic programming system T OY [9] The paper is organized as follows. Section 2 presents the general debugging scheme from [11] ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Declarative Error Diagnosis. New Generation Computing 5(2):133-- 154, 1987.
....assumes de nite clause logic program. Extensions are also disussed in Section 6. Related Work A number of proposals to explain the results of query evaluation of logic programs have been put forth in the past. These include algorithmic debugging techniques [10] declarative debugging techniques [4, 6], assertion based debugging techniques [7] and explanation techniques [5] A more detailed comparison between justi cation and these aproaches appears in our earlier work [8] Suce it is say here that although justi cation is similar in spirit to the above approaches in terms of their objectives ....
J.W. Lloyd. Declarative error diagnosis. In New Generation Computing, 5(2):133-154, 1987.
....evaluation. For logic programs, a number of approaches to explain the results of query evaluation have been proposed in the literature. Algorithmic debugging techniques [28] explain the evaluation of a query by tracing the proof search performed by SLD resolution. Declarative debugging techniques [20, 24] assume a user provided intended model of the given program and then attempt to explain the unexpected success failure of a query by nding a program clause which is false in the intended model. Assertion based debugging techniques [18] perform program validation and debugging by static and ....
J.W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-154, 1987.
....wrong solution mode can be entered to debug the goal. case n) If they are all the solutions, the failure is legitimate and backtracking ensues ; debugging proceeds at step B4. Comparison to Other Work The only other similar work is algorithmic debugging [Shapiro 82,83, Fernand 85, Av Ron 84] Lloyd 86] adapts it to MU Prolog, and [Lloyd Takeuchi 86, Takeuchi 86] to GHC [Ueda 85] Eisenstadt et al..84, Eisenstadt 85] are recent developments of traditional trace and spy methods. The following are the main contrasts between rational (R) and algorithmic (A) debugging : A1) The level of ....
Lloyd, J. Declarative error diagnosis, Dept. of Computer Science report, Univ. of Melbourne
....Related Work A number of approaches to explain the results of query evaluation of logic programs have been proposed in the literature. Algorithmic debugging techniques [24] explain the evaluation of a query by tracing the proof search performed by SLD resolution. Declarative debugging techniques [17, 20] assume a user provided intended model of the given program and then attempt to explain the unexpected success failure of a query by nding a program clause which is false in the intended model. Assertion based debugging techniques [22] perform program validation and debugging by static and ....
J.W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-154, 1987.
....such as ours, due to nonexistence of an abstraction function [DP98, Pie98] Unlike our approach, the work of [CLMV99] is not focused on implementing a tool, but rather on theoretical aspects of the diagnosis problem. A related idea is that of algorithmic debugging (declarative diagnosis) Sha82, Llo87a] However that framework does not work at compile time; it exploits a particular run of a program resulting in an error symptom. The design of our tool is a novel contribution, but its components and principles are based on existing ideas and techniques of logic programming, which however ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
....this has tended to remain in this field. Exceptions to this are [36] and [40] which concentrate on debugging lazy functional languages and [25] which concentrates on debugging Pascal. Since Shapiro s original theoretical treatment, several other alternatives have been proposed, for example [17] [29], 51] and [3] Ferrand [17] presents a treatment for definite programs 6 Background 7 and Lloyd [29] extends this to full first order logic syntax via the Lloyd Topor transformations [30] Lloyd and Ferrand both present variations of the top down approach where the search follows the ....
....lazy functional languages and [25] which concentrates on debugging Pascal. Since Shapiro s original theoretical treatment, several other alternatives have been proposed, for example [17] 29] 51] and [3] Ferrand [17] presents a treatment for definite programs 6 Background 7 and Lloyd [29] extends this to full first order logic syntax via the Lloyd Topor transformations [30] Lloyd and Ferrand both present variations of the top down approach where the search follows the subprocedures of a procedure, asking in the order procedure then each subprocedure. Yan [51] provides the ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5:133--154, 1987.
....This new view may beneficially enhance the cross fertilization between the diagnosis and debugging fields. Additionally, we operationalize the debugging process via a contradiction removal (or abductive) approach to the problem. The ideas of this work extend in several ways the ones of [4]. A program can be thought of as a theory whose logical consequences engender its actual input output behaviour. Whereas the program s intended input output behaviour is postulated by the theory s purported models, i.e. the truths the theory supposedly accounts for. The object of the debugging ....
....models, i.e. the truths the theory supposedly accounts for. The object of the debugging exercise is to pinpoint erroneous or missing axioms, from erroneous or missing derived truths, so as to account for each discrepancy between a theory and its models. The classical declarative debugging theory [4] assumes that these models are completely known via an omniscient entity or oracle . In a more general setting, that our theory accounts for, these models may be only partially known and the lacking information might not be (easily) obtainable. By hypothesizing the incorrect and missing axioms ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
....criticisms of Console and Torasso s approach which do not carry over to our representation, ours having the advantage of a more expressive language: explicit negation as well as negation as failure. We also set forth a method to debug pure Prolog programs, showing that declarative debugging [12] can be envisaged as contradiction removal, and providing a simple and clear solution to this problem. Furthermore we show how diagnostic problems can be solved with contradiction removal applied to the artifact s representation in logic plus observations. Declarative debugging can be used to ....
....[2, 6, 26] 4 Application to Declarative Debugging We can apply contradiction removal to perform debugging of terminating pure Horn Prolog programs, assuming a program stands for its ground version. In [21] we generalize to normal programs. Besides looping there are only two other kinds of error [12]: wrong solutions and finitely missing solutions. 4.1 Debugging Wrong Solutions Consider the buggy program P , where a(2) succeeds wrongly: a(1) a(X) b(X) c(Y,Y) b(2) b(3) c(1,X) c(2,2) What are the minimal causes of this bug There are three: the second rule for a has a bug; b(2) ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987.
.... order to respond to such epistemological requirements as above, we introduce into scenario semantics the general flexible notion of optative acceptance of hypotheses, and proceed to illustrate its application to both the problems of fault diagnosis [16] and declarative debugging of logic programs [7], using the formulations initially devised for them in [1] Whereas the contradiction removal semantics approach of [10] has been shown applicable to a wide range of non monotonic reasoning problems [11] including the applications in this paper [12, 13] it is based on minimally or sceptically ....
....not ab 2 (X) ab 1 (X) p(X) not ab 2 (X) p(t) The consequences of POS of P are, as expected: fb(d) f(d) not ab 1 (d) not ab 2 (d) p(t) b(t) f(t) ab 1 (t) not ab 2 (t)g 4. 3 Debugging of pure Prolog In pure Prolog programs, besides looping there are only two other kinds of error, see [7]: wrong solutions or finitely missing solutions. First we apply prime optative semantics to perform debugging of wrong solutions of pure Prolog programs, assuming that a Prolog program stands for its ground version. For an elaboration of these techniques the reader is refered to [12, 13] ....
J. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2), 1987.
....:b; not :c; not :dg In order to perform debugging we transform this program into an open one in a straightforward way, by explicitly assuming each rule not incorrect and that each predicate covers intended calls to it. The open literals are the inc (for incorrect) and unc (for uncovered literals [40] and their explicit complements (cf. 49] for a detailed justification of this program rendering, and nonpropositional examples) The fixed part is: a not b; not inc(a=1) a unc(a) b c; not inc(b=1) b unc(b) c b; d; not inc(c=1) c unc(c) c not c; not inc(c=2) d unc(d) a unc( a) ....
J. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2), 1987.
....rule; and revision consists in assuming A instead. Since revised assumptions may introduce fresh contradictions, the revision process must be iterated. We thank JNICT and Esprit BR project Compulog 2 (no 6810) for their support. We also set forth a novel simple method to debug logic programs [9], showing how debugging can be envisaged as contradiction removal. Thus, exactly the same technique can be employed to first debug the blueprint specification of an artifact, and used next to perform diagnoses with the debugged specification. Because [16] relies on Generalised Stable Models [7] to ....
....the algorithm the reader is refered to [15] It can be shown this algorithm is NP Hard [3] 3 Application to Declarative Debugging In this section we apply contradiction removal to perform debugging of terminating normal logic programs. Besides looping there are only two other kinds of error, cf. [9]: wrong solutions and missing solutions. 3.1 Debugging Wrong Solutions Consider the following buggy program P : a(1) a(X) b(X) c(Y,Y) b(2) b(3) c(1,X) c(2,2) 6 [17] gives an algorithm for computing minimal diagnoses, called DIAGNOSE (with a bug corrected in [4] DIAGNOSE can be used to ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
....No information about error symptoms is used. The algorithm reuses an abstract immediate consequence function from a type analysis system. The user does not have to provide whole specifications, their fragments can be submitted in an on demand way. 1 Introduction Declarative debugging [12, 11, 8] is a technique which, given a program P and a specification I of the intended declarative semantics of P , allows one to localize program bugs, when the actual semantics M(P ) and the specification I are different. Declarative debugging algorithms are based on a theory which requires I to be ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987.
....more easily. By using this instance of the debugging scheme and our general definition of buggy nodes, we can arrive at the following definition. buggy(A) not valid(A) successfulclause(A, B) valid(B) This is a weaker version of the definition of an incorrect clause instance A: B given in [Llo87] and [Nai92] which insists that A must be unsatisfiable. Unsatisfiability is overly restrictive and causes problems for debugging goals with non ground answers. NUDE has some unfortunate hacks for precisely this reason. The main implementation decision to be made in a debugger based on our scheme ....
....sets of answers. The top down debugger using these definitions is equivalent to debugger N. 5 in [Nai92] It can be extended to handle coroutining by using partial answers and asking more questions (having more children in the tree in our framework) Missing answer diagnosers return uncovered atoms [Llo87] [Nai92] NB94] or not completely covered atoms [DNTM89] The original definition of an uncovered atom was a valid atom for which there is no matching clause with a valid body. Atoms returned by the debugger presented here have an instance which is an uncovered atom, as defined below. Again, this ....
J.W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
....insufficiency) a[c] is an incompleteness symptom (resp. insufficiency symptom) of P according to I if a[c] 2 I Gamma lfp(T ffi ;P ) resp. a[c] 2 I Gamma gfp(T ffi ;P ) The interest is that the definitions are formulated in a uniform framework and extend existing definitions of LP [18, 6, 5, 14, 3, 7, 16]. Thus, they are better understood, particularly thanks to proof trees and T ffi ;P . In the particular case of LP: our framework contributes to the comparison between above papers. Lemma 8. 1. If a[c] is a strong insufficiency then a[c] is a weak insufficiency. 2. There exists a strong ....
J. W. Lloyd. Declarative Error Diagnosis. New Generation Computing, 5(2):133-- 154,, 1987.
....two kinds of bug symptom. Many declarative diagnosers for logic programs have been developed. Shapiro [17, 18] developed the algorithmic debugging method 1 and exemplified the method through pure Prolog. Ferrand [5] adapted the algorithmic debugging method for definite logic programs. Lloyd [8, 9] presented a declarative diagnoser for arbitrary logic programs. The diagnoser is a meta program which makes it easy to improve its performance by adding control information as meta calls. Lloyd [8, 9] obtained 1 We use the term diagnosis instead of debugging because debugging is a process which ....
....Prolog. Ferrand [5] adapted the algorithmic debugging method for definite logic programs. Lloyd [8, 9] presented a declarative diagnoser for arbitrary logic programs. The diagnoser is a meta program which makes it easy to improve its performance by adding control information as meta calls. Lloyd [8, 9] obtained 1 We use the term diagnosis instead of debugging because debugging is a process which involves bug detection and bug correction as well as bug diagnosis. a top down diagnoser by adding control information. Yan [19] improved the topdown diagnoser by reorganising its control ....
[Article contains additional citation context not shown here]
J.W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
....inference, i.e. validation by inference and by execution coincide if the declarative and procedural meaning of the specification coincide. In the case of validation errors, the specification may have to be modified. To localise the discrepancy in the specification we can use declarative debugging [Lloyd 87; Nadjm Tehrani 89; Ducass et al. 90] To make declarative debugging practical, we will employ the fact that a specification is composed from components of the repository which are considered as bug free. This suggests a bottom up debugging strategy. Combining top down and bottom up debugging ....
J. W. Lloyd, Declarative Error Diagnosis, New Generation Computing, 5 (1987), pp. 133-154
....in I. An atom A is an incompletely covered atom of P w.r.t. I if an instance of A is an uncovered atom of P w.r.t. I. If there is an inconsistency or insufficiency symptom of P w.r.t. I then there is an inconsistent clause instance of P w.r.t. I or an incompletely covered atom of P w.r.t. I [8, 12, 13, 22]. Therefore, given an inconsistency or insufficiency symptom of P w.r.t. I, a declarative diagnoser for logic programs searches for an inconsistent clause instance of P w.r.t. I or an incompletely covered atom of P w.r.t. I. Many declarative diagnosers for logic programs have been developed. ....
....covered atom of P w.r.t. I. Many declarative diagnosers for logic programs have been developed. Shapiro [18, 19] developed the algorithmic debugging method 1 and exemplified the method through pure Prolog. Ferrand [8] adapted the algorithmic debugging method for definite logic programs. Lloyd [12, 13] presented a declarative diagnoser for arbitrary logic programs. The diagnoser is a meta program which makes it easy to improve its performance by adding control information as meta calls. Lloyd [12, 13] obtained a top down diagnoser by adding control information. Yan [22] improved the top down ....
[Article contains additional citation context not shown here]
J.W. Lloyd. Declarative Error Diagnosis. New Generation Computing, 5(2):133-- 154, 1987.
.... language requires extensive non local analysis of the program, and for many programs acceptable results require significant user intervention [2] ffl Logic programming languages have the potential to make debugging much easier, since one can implement declarative debuggers for such languages [12, 16, 19]. Realization of this potential would not only improve productivity, it would also eliminate a large fraction of the uncertainty in the schedules of major projects. The realization of these advantages in full requires a pure language. A language such as Godel [9] which allows the bulk of a ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987.
.... would be incoherent to use only low level debugging tools whereas theses languages benefit from a declarative semantics (as opposed to operational semantics) Declarative Debugging (DD) was introduced in Logic Programming (LP) by Shapiro (and called Algorithmic Program Debugging [24] see also [8, 14, 6, 7, 21, 5, 18, 19]) Declarative means that the user has no need to consider the computational behaviour of the logic programming system, he needs only a declarative knowledge of the expected properties of the program. The previous reflections on symptoms and errors can be applied to Constraint Logic Programming ....
....answer s 0 = f(s 1 ; s n ) such that s 0 is a symptom but the s i s are not. Obviously f and the positive answer formulae proved by each s i is a positive incorrectness. Each strategy in order to locate a positive incorrectness can be considered, for example the top down strategy [24, 6, 14, 19]. Usually the search terminates when the first incorrectness is found, so changing the strategy can optimize the number of queries. Strategies better than the top down (or bottom up) are for example the divide and query strategy [24, 1] or some heuristics based strategies [22, 20] Finally, we ....
[Article contains additional citation context not shown here]
J. W. Lloyd. Declarative Error Diagnosis. New Generation Computing, 5(2):133--154,, 1987.
....arrive at the following definition. 9 The Journal of Functional and Logic Programming 1997 3 Naish A Declarative Debugging Scheme x4.1. 1 buggy(A) Gamma not valid(A) successful clause(A, B) valid(B) This is a weaker version of the definition of an incorrect clause instance A: B given in [Llo87] and [Nai92] which insists that A must be unsatisfiable. Unsatisfiability is overly restrictive and causes problems for debugging goals with nonground answers. NUDE has some unfortunate hacks for precisely this reason. As an example, consider an alternative buggy clause for insert: insert(N, ....
....1997 3 Naish A Declarative Debugging Scheme x4.1.2 tions is equivalent to debugger N. 5 in [Nai92] It can be extended to handle coroutining by using partial answers and asking more questions (having more children in the tree in our framework) Missing answer diagnosers return uncovered atoms [Llo87, Nai92, NB95] or not completely covered atoms [DNTM89] The original definition of an uncovered atom was a valid atom for which there is no matching clause with a valid body. Atoms returned by the debugger presented here have an instance which is an uncovered atom, as defined below. buggy(A) Gamma ....
J. W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987.
No context found.
John W. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2):133--154, 1987.
No context found.
J. Lloyd. Declarative error diagnosis. New Generation Computing, 5(2), 1987.
First 50 documents
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC