Results 1 - 10
of
20
A Backward Slicing Algorithm for Prolog
, 1996
"... . Slicing is a program analysis technique originally developed by Weiser for imperative languages. Weiser showed that slicing is a natural tool for debugging, but it has other numerous applications (program integration, program optimization, etc.) In this article we describe a backward slicing algor ..."
Abstract
-
Cited by 29 (1 self)
- Add to MetaCart
. Slicing is a program analysis technique originally developed by Weiser for imperative languages. Weiser showed that slicing is a natural tool for debugging, but it has other numerous applications (program integration, program optimization, etc.) In this article we describe a backward slicing algorithm for Prolog which produces executable slices. The proposed algorithm is applicable at least to pure Prolog extended by some simple built-in predicates that handle the explicit unification =/2 and arithmetic. To our knowledge, this algorithm is the first one to be proposed for Prolog. Because of the indeterminism and lack of explicit control flow of Prolog, existing algorithms cannot be trivially adapted. The two main contributions of this paper are a general definition of slicing adapted to Prolog and a slicing algorithm that produces executable programs. 1 Introduction Slicing is a program analysis technique originally developed by Weiser [We84] for imperative languages. It consists of...
Skeleton-based Agent Development for Electronic
- In Proc. AAMAS’02
, 2002
"... In this paper we describe work in progress concerning the (semi-)automatic support for developing agents. We focus on the scenario in which agents have to be designed to follow an electronic institution. An initial design pattern is automatically extracted from a given electronic institution and oer ..."
Abstract
-
Cited by 23 (4 self)
- Add to MetaCart
In this paper we describe work in progress concerning the (semi-)automatic support for developing agents. We focus on the scenario in which agents have to be designed to follow an electronic institution. An initial design pattern is automatically extracted from a given electronic institution and oered to programmers willing to develop agents for the speci c purpose of joining and performing in the electronic institution. We resort to logic programming as our underlying computational framework, explaining and justifying this decision.
Tracing Prolog Programs by Source Instrumentation is Efficient Enough
"... Tracing by automatic program source instrumentation has major advantages over compiled code instrumentation: it is more portable, it benefits from many compiler optimizations, it produces traces in terms of the original program, and it can be tailored to specific debugging needs. The usual argument ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
Tracing by automatic program source instrumentation has major advantages over compiled code instrumentation: it is more portable, it benefits from many compiler optimizations, it produces traces in terms of the original program, and it can be tailored to specific debugging needs. The usual argument in favor of compiled code instrumentation is its supposed efficiency. We have compared the performance of two operational low-level Prolog tracers with source instrumentation. We have executed classical Prolog benchmark programs, collecting trace information without displaying it. On average, collecting trace information by program instrumentation is about as fast as using a low-level tracer in one case, and only twice slower in the other. This is a minor penalty to pay, compared to the advantages of the approach. To our knowledge, this is the first time that a quantitative comparison of both approaches is made for any programming language. 1 Introduction There are four basic ways to trace ...
OPIUM: An Extendable Trace Analyzer for PROLOG
- Special issue on Synthesis, Transformation and Analysis of Logic Programs
, 1999
"... : Traces of program executions are a helpful source of information for automated debugging. They, however, usually give a too low level picture of the executed program. Opium, our extendable trace analyser for Prolog, is connected to a "standard" tracer. Opium is programmable and extendable. It pro ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
: Traces of program executions are a helpful source of information for automated debugging. They, however, usually give a too low level picture of the executed program. Opium, our extendable trace analyser for Prolog, is connected to a "standard" tracer. Opium is programmable and extendable. It provides a trace query language and abstract views of executions which solve the problems of low-level traces. Opium has shown its capabilities to build abstract tracers and automated debugging facilities. This article describes the trace query mechanism, from the model to its implementation. Characteristic examples are detailed. Extensions written so far on top of the trace query mechanism are listed. Two recent extensions are presented: the abstract tracers for the LO (Linear Objects) and the CHR (Constraint Handling Rules) languages. These two extensions were specified and implemented within a few days. They show how to use Opium for real applications. Key-words: Software Engineering, Auto...
Verification of Logic Programs
- JOURNAL OF LOGIC PROGRAMMING
, 1997
"... We propose a proof method in the style of Hoare's logic, aimed at providing a unifying framework for the verification of logic and Prolog programs with respect to their specifications. The method, which relies on purely declarative reasoning, has been designed as a trade-off between expressive power ..."
Abstract
-
Cited by 8 (2 self)
- Add to MetaCart
We propose a proof method in the style of Hoare's logic, aimed at providing a unifying framework for the verification of logic and Prolog programs with respect to their specifications. The method, which relies on purely declarative reasoning, has been designed as a trade-off between expressive power and ease of use. On the basis of a few simple principles, we reason uniformly on several properties of logic and Prolog programs, including partial correctness, total correctness, absence of run-time errors, safe omission of the occur-check, computed answers, modular program development. We finally generalize the method to general programs.
Efficient Detection of Incompleteness Errors in the Abstract Debugging of Logic Programs
- Proc. 2nd International Workshop on Automated and Algorithmic Debugging, AADEBUG’95
, 1995
"... Abstract. Abstract debugging of logic programs is an extension of declarative debugging, where we deal with specifications of operational properties, which can be characterized as abstractions of SLD-trees (observables). We introduce a simple and efficient method to detect incompleteness errors, whi ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
Abstract. Abstract debugging of logic programs is an extension of declarative debugging, where we deal with specifications of operational properties, which can be characterized as abstractions of SLD-trees (observables). We introduce a simple and efficient method to detect incompleteness errors, which is based on the application of the immediate consequences operator to the specification. The method is proved to be correct and complete whenever the immediate consequences operator has a unique fixpoint. We then prove that this property is always satisfied if the program belongs to a large class of programs (acceptable programs). We finally show that the same property can be proved for any program P, if the observable belongs to a suitable class of observables. 1
On Partial Validation of Logic Programs
- proc of the 6th Conf. on Algebraic Methodology and Software Technology, Sydney (Australia), volume 1349 of LNCS
, 1997
"... . In this paper, we propose a method allowing us to compare the result of an execution of a logic program and a specification of the intended semantics. This approach is particularly interesting when the set of answers cannot be computed in finite time with usual prolog interpreters. We compute, usi ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
. In this paper, we propose a method allowing us to compare the result of an execution of a logic program and a specification of the intended semantics. This approach is particularly interesting when the set of answers cannot be computed in finite time with usual prolog interpreters. We compute, using a special operational mechanism, a finite set of rewrite rules synthesizing the whole set of answers w.r.t. a goal. Then, we use some tree tuple grammar based techniques to express the languages of the computed answers. An algorithm allows us to compare this language with the intended semantics language which is extracted from a user's specification. This method can be considered as a partial validation mechanism for logic programs. 1 Introduction Validation, partial validation and verification constitute central issues for full logic programming environment building [5]. By partial validation we mean here the comparison between the operational semantics of the program for a given goal, ...
Some Design Issues in the Visualization of Constraint Logic Program Execution
- In AGP'98 Joint Conference on Declarative Programming
, 1998
"... Visualization of program executions has been found useful in applications which include education and debugging. However, traditional visualization techniques often fall short of expectations or are altogether inadequate for new programming paradigms, such as Constraint Logic Programming (CLP), whos ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
Visualization of program executions has been found useful in applications which include education and debugging. However, traditional visualization techniques often fall short of expectations or are altogether inadequate for new programming paradigms, such as Constraint Logic Programming (CLP), whose declarative and operational semantics differ in some crucial ways from those of other paradigms. In particular, traditional ideas regarding flow control and the behavior of data often cannot be lifted in a straightforward way to (C)LP from other families of programming languages. In this paper we discuss techniques for visualizing program execution and data evolution in CLP. We briefly review some previously proposed visualization paradigms, and also propose a number of (to our knowledge) novel ones. The graphical representations have been chosen based on the perceived needs of a programmer trying to analyze the behavior and characteristics of an execution. In particular, we concentrate on...
A Flexible Framework for Dynamic and Static Slicing of Logic Programs
- In Proc. of the First Int’l Workshop on Practical Aspects of Declarative Languages (PADL’99
, 1999
"... . Slicing is a technique for automatically obtaining subparts of a program with a collective meaning. When the slicing takes into account the actual execution of the program, it is said to be dynamic; when only statically available information is used, it is said to be static. In this paper we d ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
. Slicing is a technique for automatically obtaining subparts of a program with a collective meaning. When the slicing takes into account the actual execution of the program, it is said to be dynamic; when only statically available information is used, it is said to be static. In this paper we describe a flexible framework to slice logic programs that accommodates both dynamic and static approaches naturally. Our framework addresses practical aspects of logic programs such as different executions, system predicates and side-effects and can be customized to any logic language, provided we have its (concrete or abstract) interpreter and information on the behavior of system predicates. Keywords. Logic program slicing, program analysis & understanding. 1 Introduction Slicing is a technique for obtaining subparts of a program with a collective meaning. It was originally proposed by Weiser [35, 36], in the context of procedural languages. When we slice a program, we are interest...
A Hybrid Backward Slicing Algorithm Producing Executable Slices for Prolog
, 1995
"... ion of a literal) An abstraction of a literal A is the literal A where zero, one or more arguments have been replaced by anonymous variables. Definition 3 (Abstraction of a clause) If C is the clause A / B 1 ; : : : ; Bn , an abstraction of C is either: ffl the empty clause, denoted by ;, or ffl ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
ion of a literal) An abstraction of a literal A is the literal A where zero, one or more arguments have been replaced by anonymous variables. Definition 3 (Abstraction of a clause) If C is the clause A / B 1 ; : : : ; Bn , an abstraction of C is either: ffl the empty clause, denoted by ;, or ffl a unit clause, denoted by A 0 /, where A 0 is an abstraction of A, or ffl a clause of the form A 0 / B 0 1 ; : : : ; B 0 p , derived from C by removing zero, one or more literals of the body and where all remaining literals, B 0 1 ; : : : ; B 0 p are abstractions of the corresponding literals in C. A slice for a logic program, referred below to as a "logic" slice, is defined as follows: Definition 4 ("Logic" slice) A slice S for a logic program P and a slicing criterion hG; Pi is a program such that: 1. S contains one abstraction of each clause of P , 2. the sequence of values of the arguments at positions P computed by the resolution of G [ S is identical to the sequence o...

