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. We claim that for a substantial class of programs, compositional analyses which are based on a notion of abstract unfolding provide the same precision as non-compositional analysis. 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.K. R. Apt, H. Blair, and A. Walker. Towards a Theory of Declarative Knowledge. In J. Minker, editor, Foundations of Deductive Databases and Logic Programming, pp. 89-148. Morgan Kaufmann, Los Altos, Ca., 1988.]] Google ScholarDigital Library
- 2.R. Barbuti, R. Giacobazzi, and G. Levi. A General Framework for Semantics-based Bottom-up Abstract Interpretation of Logic Programs. Technical Report TR 12/91, Dipartimento di Informatica, Universit~ di Pisa, 1991. To appear in A CM Transactions on Programming Languages and Systems.]] Google ScholarDigital Library
- 3.BIM_Prolog reference manual. B.I.M. B- 3078, Everberg, Belgium.]]Google Scholar
- 4.A. Bossi, M. Gabbrielli, G. Levi, and M. C. Meo. Contributions to the Semantics of Open Logic Programs. In Proceedings of the Internalional Conference on Fifth Generation Computer Systems 199e, pp. 570-580, 1992.]] Google ScholarDigital Library
- 5.M. Bruynooghe, G. :lanssens, B. Demoen, and A. Callebaut. Abstract Interpretation: Towards the Global Optimization of Prolog Programs. In Proc. Fourth IEEE Int'l Syrup. on Logic Programming, pp. 192-204. IEEE Comp. Soc. Press, 1987.]]Google Scholar
- 6.M. Carlsson and J. Widen. SICS~us Prolog Users Manual SICS, Sweden, 1988.]]Google Scholar
- 7.W. Chen. A Theory of Modules Based on Second- Order Logic. In Proc. Fourth IEEE Int'l Syrup. on Logic Programming, pp. 24-33. IEEE Comp. Soc. Press, 1987.]]Google Scholar
- 8.M. Codish, D. Dams, and E. Yardeni. Bottomup Abstract interpretation of Logic Programs. Technical report, Dept. of Computer Science, The Weizmann Institute, Rehovot, 1990. To appear in Theoretical Computer Science.]] Google ScholarDigital Library
- 9.M. Codish, M. Falaschi, and K. Marriott. Suspension Analysis for Concurrent Logic Programs. In K. Furukawa, editor, Proc. Eighth Int'l Conf. on Logic Programming, pp. 331-345. The MIT Press, Cambridge, Mass., 1991.]]Google Scholar
- 10.K.D. Cooper, K. Kennedy, and L. Torczon. Interprocedural Optimization" Eliminating Unecessary Recompilation. In Proc. SIGPLAN '85 Symp. on Compiler Cons~rnction, pp. 58-67, 1986.]] Google ScholarDigital Library
- 11.P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In Proc. Fourth A CM Syrup. Principles of Programming Languages, pp. 238-252, 1977.]] Google ScholarDigital Library
- 12.P. Cousot and R. Cousot. Systematic Design of Program Analysis Frameworks. In Proc. Sixth A CM Syrup. Principles of Programming Languages, pp. 269-282, 1979.]] Google ScholarDigital Library
- 13.P. Cousot and R. Cousot. Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation. In M. Bruynooghe and M. Wirsing, editors, Proc. of PLILP'92, volume 631 of Lecture Notes in Computer Science, pages 269-295. Springer-Verlag, Berlin, 1992.]] Google ScholarDigital Library
- 14.M. Falaschi, G. Levi, M. Martelli, and C. Palamidessi. Declarative Modeling of the Operational Behavior of Logic Languages. Theoretical Computer Science, 69(3):289-318, 1989.]] Google ScholarDigital Library
- 15.H. Gaifman, M. J. Maher, and E. Y. Shapiro. Reactive Behavior Semantics for Concurrent Constraint Logic Programs. In E. Lusk and R. Overbeck, editors, Proc. North American Conf. on Logic Programming'89, pp. 553-572. The MIT Press, Cambridge, Mass., 1989.]]Google Scholar
- 16.H. Gaifman and E. Shapiro. Fully abstract compositional semantics for logic programs, in Proc. Sixteenth Annual A CM Symp. on Principles of Programming Languages, pp. 134-142. ACM, 1989.]] Google ScholarDigital Library
- 17.R. Gerth, M. Codish, Y. Lichtenstein, and E. Shapiro. Fully abstract denotational semantics for Concurrent Prolog. In Proc. Third 1EEE Symp. on Logic In Computer Science, pp. 320- 335. IEEE Computer Society Press, 1988.]]Google ScholarCross Ref
- 18.J. E. ttopcroft and 3. D. Ullman, Introduction to Automata Theory, Languages, and Computation, Addison-Wesley, 1979.]] Google ScholarDigital Library
- 19.G. Levi. Models, Unfolding Rules and Fixpoint Semantics. In R. A. Kowalski and K. A. Bowen, editors, Proc. Fifth Int 'l Conf. on Logic Programming, pp. 1649-1665. The MIT Press, Cambridge, Mass., 1988.]]Google Scholar
- 20.J. W. Lloyd. Foundations of Logic Programming. Springer-Verlag, Berlin, 1987. Second edition.]] Google ScholarDigital Library
- 21.P. Mancarella and D. Pedreschi. An Algebra of Logic Programs. In R. A. Kowalski and K. A. Bowen, editors, Proc. Fifth Int'l Conf. on Logic Programming, pp. 1006-1023. The MIT Press, Cambridge, Mass., 1988.]]Google Scholar
- 22.D. Miller. A Theory of Modules for Logic Programming, in Proceedings IEEE Symposium on Logic Programming, pp. 106-114, 1986.]]Google Scholar
- 23.V. Santhanam and D. Odnert, "Register Allocation across Procedure and Module Boundaries", Proc. A CM SIGPLAN-90 Conference on Programming Language Design and Implemen~ation, White Plains, NY, June 1990, pp. 28-39.]] Google ScholarDigital Library
- 24.W.F. Tichy and M.C. Baker. Smart Recompilation. In Proc. Twelfth A CM Syrup. on Principles of Programming Languages, pp. 236-244. ACM, 1985.]] Google ScholarDigital Library
Index Terms
- Compositional analysis of modular logic programs
Recommendations
Fully abstract compositional semantics for logic programs
POPL '89: Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe propose a framework for discussing fully abstract compositional semantics, which exposes the interrelations between the choices of observables, compositions, and meanings. Every choice of observables and compositions determines a unique fully ...
A refinement calculus for logic programs
Existing refinement calculi provide frameworks for the stepwise development of imperative programs from specifications. This paper presents a refinement calculus for deriving logic programs. The calculus contains a wide-spectrum logic programming ...
Compositional model-theoretic semantics for logic programs
AbstractWe present a compositional model-theoretic semantics for logic programs, where the composition of programs is modelled by the composition of the admissible Herbrand models of the programs. An Herbrand model is admissible if it is supported by the ...
Comments