Results 1  10
of
20
Type Dependencies for Logic Programs using ACIunification
 In Proceedings of the 1996 Israeli Symposium on Theory of Computing and Systems
, 1996
"... This paper presents a new notion of typing for logic programs which generalizes the notion of directional types. The generation of type dependencies for a logic program is fully automatic with respect to a given domain of types. The analysis method is based on a novel combination of program abstract ..."
Abstract

Cited by 43 (8 self)
 Add to MetaCart
This paper presents a new notion of typing for logic programs which generalizes the notion of directional types. The generation of type dependencies for a logic program is fully automatic with respect to a given domain of types. The analysis method is based on a novel combination of program abstraction and ACIunification which is shown to be correct and optimal. Type dependencies are obtained by abstracting programs, replacing concrete terms by their types, and evaluating the meaning of the abstract programs using a standard semantics for logic programs enhanced by ACIunification. This approach is generic and can be used with any standard semantics. The method is both theoretically clean and easy to implement using general purpose tools. The proposed domain of types is condensing which means that analyses can be carried out in both topdown or bottomup frameworks with no loss of precision for goalindependent analyses. The proposed method has been fully implemented within a bottomup approach and the experimental results are promising.
Directional Type Checking of Logic Programs
 In Proceedings of the 1st International Static Analysis Symposium
, 1994
"... We present an algorithm for automatic type checking of logic programs with respect to directional types that describe both the structure of terms and the directionality of predicates. The type checking problem is reduced to a decidable problem on systems of inclusion constraints over set expressio ..."
Abstract

Cited by 42 (1 self)
 Add to MetaCart
We present an algorithm for automatic type checking of logic programs with respect to directional types that describe both the structure of terms and the directionality of predicates. The type checking problem is reduced to a decidable problem on systems of inclusion constraints over set expressions. We discuss some properties of the reduction algorithm, complexity, and present a proof of correctness. 1 1 Introduction Most logic programming languages are untyped. In Prolog, for example, it is considered meaningful to apply any nary predicate to any ntuple of terms. However, it is generally accepted that static type checking has great advantages in detecting programming errors early and for generating efficient executable code. Motivated at least in part by the success of type systems for procedural and functional languages, there is currently considerable interest in finding appropriate definitions of type and welltyping for logic languages. This paper explores the type checki...
Verification of Logic Programs with Delay Declarations
 Proceedings of the Fourth International Conference on Algebraic Methodology and Software Technology, (AMAST'95), Lecture Notes in Computer Science
, 1995
"... . Logic programs augmented with delay declarations form a higly expressive programming language in which dynamic networks of processes that communicate asynchronously by means of multiparty channels can be easily created. In this paper we study correctness these programs. In particular, we propose p ..."
Abstract

Cited by 32 (1 self)
 Add to MetaCart
. Logic programs augmented with delay declarations form a higly expressive programming language in which dynamic networks of processes that communicate asynchronously by means of multiparty channels can be easily created. In this paper we study correctness these programs. In particular, we propose proof methods allowing us to deal with occur check freedom, absence of deadlock, absence of errors in presence of arithmetic relations, and termination. These methods turn out to be simple modifications of the corresponding methods dealing with Prolog programs. This allows us to derive correct delay declarations by analyzing Prolog programs. Finally, we point out difficulties concerning proofs of termination. Notes. The research of the first author was partly supported by the ESPRIT Basic Research Action 6810 (Compulog 2). This paper will appear as an invited lecture in: Proc. of the Fourth International Conference on Algebraic Methodology and Software Technology, (AMAST'95). 1 Introduction ...
Directional Types and the Annotation Method
, 1997
"... This paper shows that the annotation proof method, proposed by Deransart for proving declarative properties of logic programs, is also applicable for proving correctness of directional types. In particular, the sufficient correctness criterion of welltypedness by Bronsard et al, turns out to be a s ..."
Abstract

Cited by 28 (3 self)
 Add to MetaCart
This paper shows that the annotation proof method, proposed by Deransart for proving declarative properties of logic programs, is also applicable for proving correctness of directional types. In particular, the sufficient correctness criterion of welltypedness by Bronsard et al, turns out to be a specialization of the annotation method. The comparison shows a general mechanism for construction of similar specializations, which is applied to derive yet another concept of welltypedness. The usefulness of the new correctness criterion is shown on examples of Prolog programs, where the traditional notion of welltypedness is not applicable. We further show that the new welltyping condition can be applied to different execution models. This is illustrated by an example of an execution model where unification is controlled by directional types, and where our new welltyping condition is applied to show the absence of deadlock. / 1. INTRODUCTION
Two Aspects of Directional Types
 Proceedings of the Twelfth International Conference on Logic Programming
, 1995
"... The idea of directional types is to describe the computational behaviour of Prolog programs by associating an input and an output assertion to every predicate. The input assertion puts a restriction on the form of the arguments of the predicate in the initial atomic goals. The output assertion descr ..."
Abstract

Cited by 21 (2 self)
 Add to MetaCart
The idea of directional types is to describe the computational behaviour of Prolog programs by associating an input and an output assertion to every predicate. The input assertion puts a restriction on the form of the arguments of the predicate in the initial atomic goals. The output assertion describes the form of the arguments at success, given that the predicate is called as specified by its input assertion. This paper discusses two aspects of directional types: the declarative notion of inputoutput correctness and the operational notion of call correctness . By separating these two concepts, we readily obtain better correctness criteria than those existing in the literature. We further show how directional types can be used for controlling execution of logic programs through a delay mechanism. 1 Introduction Recently there has been a growing interest in the notion of directional types for Prolog programs [6, 12, 2, 3, 1, 11]. This kind of prescriptive typing describes the intende...
Directional Type Inference for Logic Programs
, 1998
"... . We follow the setbased approach to directional types proposed by Aiken and Lakshman [1]. Their type checking algorithm works via set constraint solving and is sound and complete for given discriminative types. We characterize directional types in modeltheoretic terms. We present an algorithm ..."
Abstract

Cited by 16 (6 self)
 Add to MetaCart
. We follow the setbased approach to directional types proposed by Aiken and Lakshman [1]. Their type checking algorithm works via set constraint solving and is sound and complete for given discriminative types. We characterize directional types in modeltheoretic terms. We present an algorithm for inferring directional types. The directional type that we derive from a logic program P is uniformly at least as precise as any discriminative directional type of P, i.e., any directional type out of the class for which the type checking algorithm of Aiken and Lakshman is sound and complete. We improve their algorithm as well as their lower bound and thereby settle the complexity (DEXPTIMEcomplete) of the corresponding problem. 1 Introduction Directional types form a type system for logic programs which is based on the view of a predicate as a directional procedure which, when applied to a tuple of input terms, generates a tuple of output terms. There is a rich literature on ty...
Program Verification and Prolog
 Specification and Validation Methods for Programming Languages and Systems
, 1994
"... We show here that verification of Prolog programs can be systematically carried out within a simple framework which comprises syntactic analysis, declarative semantics, modes and types. We apply these techniques to study termination, partial correctness, occurcheck freedom, absence of errors and abs ..."
Abstract

Cited by 15 (3 self)
 Add to MetaCart
We show here that verification of Prolog programs can be systematically carried out within a simple framework which comprises syntactic analysis, declarative semantics, modes and types. We apply these techniques to study termination, partial correctness, occurcheck freedom, absence of errors and absence of floundering. Finally, we discuss which aspects of these techniques can be automated. Notes. This research was partly supported by the ESPRIT Basic Research Action 6810 (Compulog 2). A preliminary, shorter, version of this paper appeared as Apt [3]. 1 Introduction 1.1 Motivation Prolog is 20 years old and so is logic programming. However, they were developed separately and these two developments never really merged. The first track is best exemplified by Sterling and Shapiro [36], which puts emphasis on programming style and techniques, and the second by Lloyd [25], which concentrates on the theoretical foundations. As a result of these separate developments, until recently little...
Declarative Interpretations Reconsidered
 Proceedings of the International Conference on Logic Programming (ICLP'94), Santa Margherita Ligure
, 1994
"... Three semantics have been proposed as the most promising candidates for a declarative interpretation for logic programs and pure Prolog programs: the least Herbrand model, the least term model, i.e. the Csemantics, and the Ssemantics. Previous results show that a strictly increasing information ..."
Abstract

Cited by 12 (2 self)
 Add to MetaCart
Three semantics have been proposed as the most promising candidates for a declarative interpretation for logic programs and pure Prolog programs: the least Herbrand model, the least term model, i.e. the Csemantics, and the Ssemantics. Previous results show that a strictly increasing information ordering between these semantics exists for the class of all programs. In particular, the Ssemantics allows us to model computed answer substitutions, which is not the case for the other two. We study here the relationship between these three semantics for specific classes of programs. We show that for a large class of programs (which is Turing complete) these three semantics are isomorphic. As a consequence, given a query, we can extract from the least Herbrand model of the program all computed answer substitutions. This result is applied to propose a method for proving partial correctness of programs based on the least Herbrand model. AMS Subject Classification (1991): 68Q40, 68T15. CR Subject Classification (1991): F.3.2., F.4.1, H.3.3, I.2.3. Keywords and Phrases: logic programs, declarative semantics, isomorphism, partial correctness. Notes. The research of the first author was partly supported by the ESPRIT Basic Research Action 6810 (Compulog 2). The research of the second author was supported by the Italian National Research Council (CNR). This article will appear in: Proc. of International Conference on Logic Programming (ICLP '94), The MIT Press, P. Van Hentenryck (editor). 1
The Declarative Semantics of the Prolog Selection Rule
 In Proceedings of the Ninth Annual IEEE Symposium on Logic in Computer Science, LICS ’94
, 1994
"... We axiomatize the Prolog selection rule which always selects the leftmost literal in a goal. We introduce a new completion of a logic program which we call the #completion of the program. The #completion is formulated as a firstorder theory in a language extended by new predicate symbols which e ..."
Abstract

Cited by 10 (4 self)
 Add to MetaCart
We axiomatize the Prolog selection rule which always selects the leftmost literal in a goal. We introduce a new completion of a logic program which we call the #completion of the program. The #completion is formulated as a firstorder theory in a language extended by new predicate symbols which express success, failure and lefttermination of queries. The main results of the paper are the following. If a query succeeds, fails or is leftterminating under the Prolog selection rule, then the corresponding formula in the extended language is provable from the #completion. Conversely, if a logic program and a query are correct with respect to some mode assignment and if one can prove in the #completion that the query succeeds and is leftterminating, then the goal is successful and Prolog, using its depth first search, will compute an answer substitution for the goal. This result can even be extended to so called nonfloundering queries. 1
Replacement Can Preserve Termination
"... We consider the replacement transformation operation, a very general and powerful transformation, and study under which conditions it preserves universal termination besides computed answer substitutions. With this safe replacement we can significantly extend the safe unfold/fold transformation sequ ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
We consider the replacement transformation operation, a very general and powerful transformation, and study under which conditions it preserves universal termination besides computed answer substitutions. With this safe replacement we can significantly extend the safe unfold/fold transformation sequence presented in [11]. By exploiting typing information, more useful conditions can be defined and we may deal with some special cases of replacement very common in practice, namely switching two atoms in the body of a clause and the associativity of a predicate. This is a first step in the direction of exploiting a Pre/Post specification on the intended use of the program to be transformed. Such specification can restrict the instances of queries and clauses to be considered and then relax the applicability conditions on the transformation operations.