We study the problem of an efficient and precise sharing analysis of (constraint) logic programs. After recognizing that neither plain Sharing nor its non-redundant (but equivalent) abstraction scale well to real programs, we consider the domain proposed by C. Fecht [12,13]. This domain consists of a combination of Pos with a quite weak abstraction of Sharing. While verifying that this domain is truly remarkable, in terms of both precision and efficiency, we have revealed significant precision losses for several real programs. This loss concerns groundness, pair-sharing, linearity, but not freeness. (Indeed, we have proved that a wide family of abstractions of Sharing do not incur precision loss on freeness.) We define a simple domain for sharing analysis that supports the implementation of several widening techniques. In particular, with this domain it is straightforward to turn Fecht’s idea into a proper widening. More precise widenings are also considered. However, in spite of thorough experimentation we found that the first widening we propose is hard to improve on, provided Pos is included in the domain. We show that when Pos is not included, a widening based on cliques of sharing pairs is preferred.
KeywordsMode Analysis Sharing Analysis Widening
Unable to display preview. Download preview PDF.
- 1.Bagnara, R.: Data-Flow Analysis for Constraint Logic-Based Languages. PhD thesis, Dipartimento di Informatica, Universitd̀ Pisa, Corso Italia 40, I-56125 Pisa, Italy, Printed as Report TD-1/97 (March 1997)Google Scholar
- 2.Bagnara, R.: Widening Pos: Simple, effective, and rarely needed. Unpublished short note (1998)Google Scholar
- 4.Bagnara, R., Hill, P.M., Zaffanella, E.: Set-sharing is redundant for pair-sharing. Theoretical Computer Science (1999) To appearGoogle Scholar
- 5.Bagnara, R., Schachte, P.: Factorizing equivalent variable pairs in ROBDDbased implementations of Pos. In: Haeberer, A.M. (ed.) AMAST 1998. LNCS, vol. 1548, Springer, Heidelberg (1998)Google Scholar
- 7.Bruynooghe, M., Codish, M., Mulkers, A.: Abstract unification for a composite domain deriving sharing and freeness properties of program variables. In: de Boer, F.S., Gabbrielli, M. (eds.) Verification and Analysis of Logic Languages, Proceedings of the W2 Post-Conference Workshop, International Conference on Logic Programming, Santa Margherita Ligure, Italy, pp. 213–230 (1994)Google Scholar
- 8.Codish, M., Sφndergaard, H., Stuckey, P.J.: Sharing and groundness dependencies in logic programs. Submitted for publicationGoogle Scholar
- 9.Cortesi, A., Filé, G.: Comparison and design of abstract domains for sharing analysis. In: Saccà, D. (ed.) Proceedings of the Eighth Italian Conference on Logic Programming (GULP 1993), Gizzeria, Italy, pp. 251–265. Mediterranean Press (1993)Google Scholar
- 12.Fecht, C.: An efficient and precise sharing domain for logic programs. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. An efficient and precise sharing domain for logic programs, vol. 1140, pp. 469–470. Springer, Heidelberg (1996)Google Scholar
- 13.Fecht, C.: Efficient and precise sharing domains for logic programs. Technical Report A/04/96, Universität des Saarlandes, Fachbereich 14 Informatik, Saarbrücken, Germany (1996)Google Scholar
- 16.Langen, A.: Static Analysis for Independent And-Parallelism in Logic Programs. PhD thesis, Computer Science Department, University of Southern California, Printed as Report TR 91-05 (1990)Google Scholar
- 18.Sφndergaard, H.: An application of abstract interpretation of logic programs: Occur check reduction. In: Robinet, B., Wilhelm, R. (eds.) ESOP 1986. LNCS, vol. 213, pp. 327–338. Springer, Heidelberg (1986)Google Scholar
- 19.Zaffanella, E., Bagnara, R., Hill, P.M.: Widening Sharing. Submitted for publication (1999), Available at http://www.cs.unipr.it/~bagnara/