## Compositional Analysis of Modular Logic Programs (1993)

### Cached

### Download Links

- [www.cs.arizona.edu]
- [strudel.di.unipi.it]
- [profs.sci.univr.it]
- [ftp.cs.bgu.ac.il]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. Twentieth Annual ACM Symp. on Principles of Programming Languages |

Citations: | 55 - 10 self |

### BibTeX

@INPROCEEDINGS{Codish93compositionalanalysis,

author = {Michael Codish and Saumya Debray and Roberto Giacobazzi},

title = {Compositional Analysis of Modular Logic Programs},

booktitle = {In Proc. Twentieth Annual ACM Symp. on Principles of Programming Languages},

year = {1993},

pages = {451--464},

publisher = {ACM Press}

}

### Years of Citing Articles

### OpenURL

### Abstract

This paper describes a semantic basis for a compositional approach to the analysis of logic programs. A logic program is viewed as consisting of a set of modules, each module defining a subset of the program's predicates. Analyses are constructed by considering abstract interpretations of a compositional semantics. The abstract meaning of a module corresponds to its analysis and composition of abstract meanings corresponds to composition of analyses. Such an approach is essential for large program development so that altering one module does not require re-analysis of the entire program. A compositional analysis for ground dependencies is included to illustrate the approach. To the best of our knowledge this is the first account of a compositional framework for the analysis of (logic) programs. 1 Introduction It is widely acknowledged that as the size of a program increases, it becomes impractical to maintain it as a single monolithic structure. Instead, the program has to be...

### Citations

3836 |
Introduction to automata theory, languages and computation. Addison-Wesley publishing company
- John, Ullman
- 1979
(Show Context)
Citation Context ...t string in L(GP ), then no clause in F(P) can have more than N atoms in its body. The theorem follows. 2 Note that it is decidable whether the language of an arbitrary context-free grammar is finite =-=[25]-=-. Theorem 5.1 therefore gives a decidable sufficient condition for determining whether, for any given module P, the clauses in F(P) are bounded. The following example illustrates the application of th... |

1890 |
Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints
- Cousot
- 1976
(Show Context)
Citation Context ...be found in [21]. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs [27], constraint logic programs [26] and abstract interpretation =-=[15]-=-. Throughout, we assume a fixed set of function symbols \Sigma, a fixed set of predicate symbols \Pi and a fixed denumerable set of variables Var. The non-ground term algebra over \Sigma and Var is de... |

1856 |
Foundations of Logic Programming
- Lloyd
- 1987
(Show Context)
Citation Context ...s as described in [10]. The technical proofs for our results can be found in [21]. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs =-=[27]-=-, constraint logic programs [26] and abstract interpretation [15]. Throughout, we assume a fixed set of function symbols \Sigma, a fixed set of predicate symbols \Pi and a fixed denumerable set of var... |

786 | Constraint logic programming
- Jaffar, Lassez
- 1987
(Show Context)
Citation Context ...nical proofs for our results can be found in [21]. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs [27], constraint logic programs =-=[26]-=- and abstract interpretation [15]. Throughout, we assume a fixed set of function symbols \Sigma, a fixed set of predicate symbols \Pi and a fixed denumerable set of variables Var. The non-ground term ... |

635 | Systematic design of program analysis frameworks
- Cousot, Cousot
- 1979
(Show Context)
Citation Context ... discusses related work, and Section 9 concludes. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs [20] and abstract interpretation =-=[11, 12]-=-. Throughout, we will assume a fixed set of function symbols \Sigma, a fixed set of predicate symbols \Pi and a fixed denumerable set of variables Var . With each function symbol f 2 \Sigma and predic... |

610 |
Towards a theory of declarative knowledge
- Apt, Blair, et al.
- 1988
(Show Context)
Citation Context ...cates which are undefined in all modules, it is necessary to disallow certain combinations of recursion and calls to open predicates. Our approach draws on the notion of stratification (introduced in =-=[1]-=- to support a safe use of negation), identifying those programs where only negated relations whose meaning is fixed beforehand are allowed. The basic idea is that modules which call open predicates ma... |

162 | Comparing the Galois connection and widening/narrowing approaches to abstract interpretation
- Cousot, Cousot
- 1992
(Show Context)
Citation Context ... semantics. One proposal to deal with abstract domains containing infinite chains is to use some kind of widening/narrowing approach to restrict the analysis to a finite subspace of the entire domain =-=[13]-=-. Here we consider a somewhat simpler solution that can be formalized in the standard framework of abstract interpretations by restricting AInt to be a finite height lattice. We apply a further level ... |

117 | Magic templates: a spellbinding approach to logic programs
- Ramakrishnan
- 1991
(Show Context)
Citation Context ...e a goal-independent analysis of the calls which arise in the execution of a given initial goal for a (closed) program P. The analysis is based on a variant of the well known Magic Set transformation =-=[30]-=- which characterizes the calls for a program P and initial goal G in terms of a transformed program magic(P; G). Following [8] we specify the transformation using a modular approach distinguishing bet... |

115 |
Declarative modeling of the operational behavior of logic languages
- Falaschi, Levi, et al.
- 1989
(Show Context)
Citation Context ... leading to a conceptually simple and elegant treatment. This semantics is attractive for abstract interpretation purposes, since it can be seen as a generalization of the approach of Falaschi et al. =-=[17]-=-, which provides the semantic basis for abstract interpretations such as those discussed in [2, 6]. The use of clauses as semantic objects leads to interesting technical complications for abstract int... |

75 | A general framework for semantics-based bottom-up abstract interpretation of logic programs
- Barbuti, Giacobazzi, et al.
- 1993
(Show Context)
Citation Context ...ct interpretation purposes, since it can be seen as a generalization of the approach of Falaschi et al. [17], which provides the semantic basis for abstract interpretations such as those discussed in =-=[2, 6]-=-. The use of clauses as semantic objects leads to interesting technical complications for abstract interpretation, in that there are two independent dimensions along which we might need finite descrip... |

68 | A compositional semantics for logic programs
- Bossi, Gabbrielli, et al.
- 1994
(Show Context)
Citation Context ...ct interpretations based on such semantics is not entirely straightforward. The semantics we consider here as a basis for abstract interpretations is a simplification of that proposed by Bossi et al. =-=[3]. The idea-=- is to treat modules as programs in which undefined predicates are considered to be "open." The meaning of a module is given in terms of iterated unfoldings of the procedures defined in it, ... |

58 |
Smart recompilation
- Tichy
- 1986
(Show Context)
Citation Context ...mposing these abstract semantics. The problem of program analysis across module boundaries for imperative languages has been considered by a number of researchers: Cooper et al. [13] and Tichy et al. =-=[32]-=- are concerned primarily with low-level details of maintaining information to allow a compiler to determine whether a change to one program unit necessitates the recompilation of another, separately-c... |

57 |
E.: Fully Abstract Compositional Semantics for Logic Programs
- Gaifman, Shapiro
- 1989
(Show Context)
Citation Context ...s has been performed. 7 Related Work Several other compositional semantics for logic programs have been proposed in the literature. These include the work of Brogi and Turini [4], and Gaifmann et al. =-=[20]-=-. In [4] the compositional semantics is provided by composing the TP functions associated with program modules. Gaifmann et al. propose to adopt clauses as semantic objects in order to characterize pa... |

56 | Bottom-up abstract interpretation of logic programs
- Codish, Dams, et al.
- 1994
(Show Context)
Citation Context ...ct interpretation purposes, since it can be seen as a generalization of the approach of Falaschi et al. [17], which provides the semantic basis for abstract interpretations such as those discussed in =-=[2, 6]-=-. The use of clauses as semantic objects leads to interesting technical complications for abstract interpretation, in that there are two independent dimensions along which we might need finite descrip... |

56 |
Prop revisited: Propositional formulas as abstract domain for groundness analysis
- Cortesi, File, et al.
- 1991
(Show Context)
Citation Context ...gnment assign ` that maps a variable x to true if and only if `(x) is ground, and which is defined as x:vars(`(x)) = ;. The functions fl Pos : Pos ! C and ff Pos : C ! Pos are defined as follows (cf. =-=[14]-=-) fl Pos (f ) = \Phi ` fi fi (8` 0 ) : ` 0s` ) assign ` 0 j= f \Psi and ff Pos (\Theta) =s\Phi fi fi \Thetasfl Pos () \Psi . 2 Abstract clauses are similar to normalized (concrete) clauses except that... |

56 | Precise and efficient groundness analysis for logic programs - Marriott, Søndergaard - 1993 |

46 | Abstract Interpretation: Towards the Global Optimization of Prolog Programs - Bruynooghe, Demoen, et al. - 1987 |

44 |
An Algebra of Logic Programs
- Mancarella, Pedreschi
- 1988
(Show Context)
Citation Context ... ); x $ x 0 ; y $ y 0 i 9 ? ? ? ? ? ? ? ? = ? ? ? ? ? ? ? ? ; : 8 Related Work Several compositional semantics for logic programs have been proposed in the literature. These include Mancarella et al. =-=[21]-=-, Gaifmann et al. [16] and Bossi et al. [4]. In [21] the compositional semantics is provided by composing the TP functions associated with program modules. Gaifmann et al. propose to adopt clauses as ... |

43 |
Boolean functions for dependency analysis: Algebraic properties and efficient representation
- Armstrong, Marriott, et al.
- 1994
(Show Context)
Citation Context ...act atoms and on abstract substitutions are assumed in [2, 6]. 4 Example 4.1 The domain Pos was first proposed by Marriott and Sndergaard as a domain of abstract substitutions for groundness analysis =-=[1]-=-. The domain is formalized as a Galois insertion denoted ((Sub); ff Pos ; Pos; fl Pos ) and consists of equivalence classes of positive propositional formulae, ordered by implication. The generalizati... |

43 | Type dependencies for logic programs using ACI-unification
- Codish, Lagoon
(Show Context)
Citation Context ... do not hold. In any case, there are relevant examples of domains for logic program analysis that fit in our framework, e.g.\Omega as ACI unification of constraints for types and set-sharing analysis =-=[11]-=-. Termination is addressed in the standard way, i.e., by requiring that the domain of abstract interpretations AInt A obtained from a set of abstract constraints A satisfies a given finiteness propert... |

41 | A theory of modules in logic programming
- Miller
- 1986
(Show Context)
Citation Context ...orted in part by CEC DGIII EC-Israel collaborative activity, ISC-IL-90-PARFORCE 1 the entire program. Semantic treatments of modules in logic programs have been given by a number of authors (e.g. see =-=[5, 29]-=-), typically based on nontrivial extensions to Horn clause logic that lead to complex semantics; it appears to us that the development of abstract interpretations based on such semantics is not entire... |

39 |
Analysing logic programs using "Prop"-ositional logic programs and a magic wand, in
- Codish, Demoen
- 1993
(Show Context)
Citation Context ...nalysis is based on a variant of the well known Magic Set transformation [30] which characterizes the calls for a program P and initial goal G in terms of a transformed program magic(P; G). Following =-=[8]-=- we specify the transformation using a modular approach distinguishing between clauses which depend on the goal G and those which do not. Let P be a (closed) program and G = oe [] g 1 ; : : : gk an in... |

38 | Generalized Semantics and Abstract Interpretation for Constraint Logic Programs
- Giacobazzi, Debray, et al.
- 1995
(Show Context)
Citation Context ...induced from a domain A of abstract constraints (or substitutions). A general definition of abstract constraint system for abstract interpretation of possibly non Herbrand constraints can be found in =-=[22]-=-. Definition 4.1 [abstract constraints] A domain of abstract constraints is a complete lattice (A; vA ) such that (C; ff A ; A; fl A ) is a Galois insertion and for any syntactic object s and sets of ... |

34 |
Suspension analysis for concurrent logic programs
- Codish, Falaschi, et al.
- 1994
(Show Context)
Citation Context ... the abstract unfoldings of the module P sp in Figure 1 introduce arbitrarily long abstract clauses. 7 This problem can be addressed in several ways. In [7], a notion of star abstraction adopted from =-=[9]-=- is applied to limit the length of clause bodies using a domain termed Dep for ground dependency analysis. The basic idea is to collapse the occurrences of calls to a predicate p in a clause body to o... |

32 |
Register Allocation across Procedure and Module Boundaries
- Santhanam, Odnert
- 1990
(Show Context)
Citation Context ...tails of maintaining information to allow a compiler to determine whether a change to one program unit necessitates the recompilation of another, separately-compiled, unit, while Santhanam and Odnert =-=[31]-=- consider register allocation across module boundaries. While the motivation for their work is related to ours, the treatment is significantly different in that no attempt is made to give a formal sem... |

29 | Incremental Analysis of Logic Programs
- Hermenegildo, Marriott, et al.
- 1994
(Show Context)
Citation Context ... problem of incremental analysis of logic programs, where analysis can be carried out even if the program being analyzed is not available in its entirety, has been investigated by Hermenegildo et al. =-=[24]-=-. While the underlying motivation for this work resembles ours in many ways, the details differ substantially. In particular, the approach of Hermenegildo et al. involves re-analyzing (parts of) a pro... |

24 |
Contribations to the semantics of open logics programs, in
- Bossi, Gabrielli, et al.
- 1992
(Show Context)
Citation Context ...ent of abstract interpretations based on such semantics is not entirely straightforward. The semantics we consider here as a basis for abstract interpretations is a simplification of that proposed in =-=[4]-=-. The essential idea is to treat modules as programs in which undefined predicates are considered open. The meaning of a module is given in terms of iterated unfoldings of the procedures defined in it... |

19 |
Fully abstract compositional semantics for an algebra of logic programs
- Brogi, Turini
- 1995
(Show Context)
Citation Context ...dent phase of the analysis has been performed. 7 Related Work Several other compositional semantics for logic programs have been proposed in the literature. These include the work of Brogi and Turini =-=[4]-=-, and Gaifmann et al. [20]. In [4] the compositional semantics is provided by composing the TP functions associated with program modules. Gaifmann et al. propose to adopt clauses as semantic objects i... |

17 | Compositionality of SLD-derivations and their abstractions
- Comini, Levi, et al.
- 1995
(Show Context)
Citation Context ...se are typically based on various extensions to Horn logic: for example, Chen's treatment of modules [5] is based on secondorder logic, while Miller's [29] uses implication goals in clause bodies. In =-=[12]-=- Comini et al. define 11 a taxonomy of semantics that can be derived by abstracting SLD trees, and preserve properties like compositionality. In [23], the authors introduce an operation for functional... |

16 | Functional dependencies and Moore-set completions of abstract interpretations and semantics
- Giacobazzi, Ranzato
- 1995
(Show Context)
Citation Context ...s [29] uses implication goals in clause bodies. In [12] Comini et al. define 11 a taxonomy of semantics that can be derived by abstracting SLD trees, and preserve properties like compositionality. In =-=[23]-=-, the authors introduce an operation for functional combination of semantics, providing a systematic way to derive compositional semantics for logic programs. In these works, the semantics appear to b... |

12 |
A theory of modules based on second-order logic
- Chen
- 1987
(Show Context)
Citation Context ...orted in part by CEC DGIII EC-Israel collaborative activity, ISC-IL-90-PARFORCE 1 the entire program. Semantic treatments of modules in logic programs have been given by a number of authors (e.g. see =-=[5, 29]-=-), typically based on nontrivial extensions to Horn clause logic that lead to complex semantics; it appears to us that the development of abstract interpretations based on such semantics is not entire... |

12 |
Semantic Aspects of Logic Program Analysis. Ph.D. thesis, Dipartimento di Informatica, Universitá di Pisa. 17
- Giacobazzi
- 1993
(Show Context)
Citation Context ...pability to support compositional analysis. Similar properties are required by a domain to support goal-independent analyses as described in [10]. The technical proofs for our results can be found in =-=[21]-=-. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs [27], constraint logic programs [26] and abstract interpretation [15]. Throughout... |

11 | Modular Logic Programs over Finite Domains
- Gabbrielli, Giacobazzi, et al.
- 1993
(Show Context)
Citation Context ..." call p ? . While this approach indeed restricts the size of the clauses which can be generated in the analysis, it also can result in a loss of precision in the unfolding process. Alternatively=-=, in [18]-=- it is shown that for finite domains a characterization of the compositional semantics can be obtained after a finite number of unfoldings without reaching a fixed point. However, in this approach the... |

11 |
unfolding rules and fixpoint semantics, in
- Levi, Models
- 1988
(Show Context)
Citation Context ...le way to unfold each literal in each clause of P 1 once using clauses in P 2 . This operator is of interest as it can be applied to formalize both top-down and bottom-up semantics for logic programs =-=[19]. The foll-=-owing formalizes a bottom-up semantics for open logic programs in terms of "iterated unfolding" --- that is, repeatedly unfolding the clauses in a program until further unfolding produces no... |

10 | procedural and fixpoint semantics of logic programs, in
- Denis, Delahaye, et al.
- 1991
(Show Context)
Citation Context ... semantics is formalized in terms of unfolding of clauses. The unfolding operator unf specifies the result of unfolding clauses from an interpretation P 1 with clauses from an interpretation P 2 (cf. =-=[16]-=-). Definition 3.1 [unfolding] The unfolding operator unf : Int \Theta Int ! Int is defined as unf (P 1 ; P 2 ) = 8 ? ? ? ! ? ? ? : h / oe 0 [] b 1 :: \Delta \Delta \Delta :: bn fi fi fi fi fi fi fi fi... |

9 |
Exploiting goal independence in the analysis of logic programs
- Codish, Bruynooghe, et al.
- 1997
(Show Context)
Citation Context ...ht have to strengthen the abstract domain to enhance its capability to support compositional analysis. Similar properties are required by a domain to support goal-independent analyses as described in =-=[10]-=-. The technical proofs for our results can be found in [21]. 2 Preliminaries In the following we assume familiarity with the standard definitions and notation for logic programs [27], constraint logic... |

7 |
Fully abstract denotational semantics for Concurrent Prolog
- Gerth, Codish, et al.
- 1988
(Show Context)
Citation Context ...d assume that a clause represents its equivalence class and write Clause rather than [Clause] �� . We focus on logic programs which are constructed from predicate disjoint modules (considered also=-= in [15, 17]-=-). If P 1 ; : : : ; P n are logic program modules, then P = n [ i=1 P i is a modular logic program. A modular logic program is predicate disjoint if the predicates defined in each module are disjoint ... |

6 |
Reactive behavior semantics for concurrent constraint logic programs
- Gaifman, Maher, et al.
- 1989
(Show Context)
Citation Context ...dular logic program. Such a program is said to be predicate disjoint if no predicate is defined in more than one module. In the following, we assume that modular programs are predicate disjoint as in =-=[19]-=-, unless otherwise specified. For a logic program (or module) P, open(P) denotes the set of predicates that occur in the body of a clause in P but are not defined in P. For any program P, we denote by... |

1 |
Interprocedural Optimization: Eliminating Unecessary Recompilation
- Cooper, Kennedy, et al.
- 1986
(Show Context)
Citation Context ...nt modules and then composing these abstract semantics. The problem of program analysis across module boundaries for imperative languages has been considered by a number of researchers: Cooper et al. =-=[13]-=- and Tichy et al. [32] are concerned primarily with low-level details of maintaining information to allow a compiler to determine whether a change to one program unit necessitates the recompilation of... |