A Generic Framework for Context-Sensitive Analysis of Modular Programs

Context-sensitive analysis provides information which is potentially more accurate than that provided by context-free analysis. Such information can then be applied in order to validate/debug the program and/or to specialize the program obtaining important improvements. Unfortunately, context-sensitive analysis of modular programs poses important theoretical and practical problems. One solution, used in several proposals, is to resort to context-free analysis. Other proposals do address context-sensitive analysis, but are only applicable when the description domain used satisfies rather restrictive properties. In this paper, we argue that a general framework for context-sensitive analysis of modular programs, i.e., one that allows using all the domains which have proved useful in practice in the non-modular setting, is indeed feasible and very useful. Driven by our experience in the design and implementation of analysis and specialization techniques in the context of CiaoPP, the Ciao system preprocessor, in this paper we discuss a number of design goals for context-sensitive analysis of modular programs as well as the problems which arise in trying to meet these goals. We also provide a high-level description of a framework for analysis of modular programs which does substantially meet these objectives. This framework is generic in that it can be instantiated in different ways in order to adapt to different contexts. Finally, the behavior of the different instantiations w.r.t. the design goals that motivate our work is also discussed.

[1]  Manuel V. Hermenegildo,et al.  Compile-Time Derivation of Variable Dependency Using Abstract Interpretation , 1992, J. Log. Program..

[2]  Pascal Van Hentenryck,et al.  Experimental evaluation of a generic abstract interpretation algorithm for Prolog , 1992, ICCL.

[3]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[4]  Peter J. Stuckey,et al.  A model for inter-module analysis and optimizing compilation , 2000, LOPSTR.

[5]  Hanne Riis Nielson,et al.  Programming Languages and Systems — ESOP '96 , 1996, Lecture Notes in Computer Science.

[6]  Alan Bundy,et al.  Constructing Induction Rules for Deductive Synthesis Proofs , 2006, CLASE.

[7]  Thomas P. Jensen,et al.  Modular Class Analysis with DATALOG , 2003, SAS.

[8]  Manuel V. Hermenegildo,et al.  Abstract specialization and its applications , 2003, PPoPP 2003.

[9]  Manuel V. Hermenegildo,et al.  Optimized Algorithms for Incremental Analysis of Logic Programs , 1996, SAS.

[10]  Wim Vanhoof,et al.  Towards a modular binding-time analysis for higher-order Mercury , 2000, LOPSTR.

[11]  Roberto Giacobazzi,et al.  Compositional analysis of modular logic programs , 1993, POPL '93.

[12]  Manuel V. Hermenegildo,et al.  An Assertion Language for Constraint Logic Programs , 2000, Analysis and Visualization Tools for Constraint Programming.

[13]  Pierre Jouvelot,et al.  Separate Abstract Interpretation for Control-Flow Analysis , 1994, TACS.

[14]  Peter J. Stuckey,et al.  Incremental analysis of constraint logic programs , 2000, TOPL.

[15]  Manuel V. Hermenegildo,et al.  Abstract Multiple Specialization and Its Application to Program Parallelization , 1999, J. Log. Program..

[16]  Christian W. Probst,et al.  Modular Control Flow Analysis for Libraries , 2002, SAS.

[17]  Barbara G. Ryder,et al.  Data-flow analysis of program fragments , 1999, ESEC/FSE-7.

[18]  Maurizio Gabbrielli,et al.  A Compositional Semantics for Logic Programs , 1994, Theor. Comput. Sci..

[19]  Oscar Nierstrasz,et al.  Software Engineering - ESEC/FSE '99 , 1999 .

[20]  Benjamin C. Pierce,et al.  Theoretical Aspects of Computer Software , 2001, Lecture Notes in Computer Science.

[21]  Manuel V. Hermenegildo,et al.  Some Issues in Analysis and Specialization of Modular Ciao-Prolog Programs , 1999, WOID@ICLP.

[22]  Roland H. C. Yap,et al.  Optimizing compilation of CLP( R ) , 1998, TOPL.

[23]  Jan Maluszynski,et al.  Analysis and Visualization Tools for Constraint Programming , 2000, Lecture Notes in Computer Science.

[24]  Roland H. C. Yap,et al.  Effectiveness of Optimizing Compilation for CLP(R) , 1996, JICSLP.

[25]  Manuel V. Hermenegildo,et al.  Global Analysis of Standard Prolog Programs , 1996, ESOP.

[26]  Manuel V. Hermenegildo,et al.  Program Development Using Abstract Interpretation (And The Ciao System Preprocessor) , 2003, SAS.

[27]  M. Hermenegildo,et al.  Deriving a fixpoint computation algorithm for top-down abstract interpretation of logic programs , 1990 .

[28]  Peter J. Stuckey,et al.  To the Gates of HAL: A HAL Tutorial , 2002, FLOPS.