Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
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)
Bagnara, R.: Widening Pos: Simple, effective, and rarely needed. Unpublished short note (1998)
Bagnara, R., Hill, P.M., Zaffanella, E.: Set-sharing is redundant for pair-sharing. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 53–67. Springer, Heidelberg (1997)
Bagnara, R., Hill, P.M., Zaffanella, E.: Set-sharing is redundant for pair-sharing. Theoretical Computer Science (1999) To appear
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)
Bron, C., Kerbosch, J.: Finding all cliques of an undirected graph. Communications of the ACM 16(9), 575–577 (1973)
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)
Codish, M., Sφndergaard, H., Stuckey, P.J.: Sharing and groundness dependencies in logic programs. Submitted for publication
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)
Cortesi, A., Filé, G.: Sharing is optimal. Journal of Logic Programming 38(3), 371–386 (1999)
Cousot, P., Cousot, R.: Comparing the Galois connection and widening/ narrowing approaches to abstract interpretation. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, Springer, Heidelberg (1992)
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)
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)
Hill, P.M., Bagnara, R., Zaffanella, E.: The correctness of set-sharing. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 99–114. Springer, Heidelberg (1998)
Jacobs, D., Langen, A.: Static analysis of logic programs for independent AND parallelism. Journal of Logic Programming 13(2&3), 291–314 (1992)
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)
Muthukumar, K., Hermenegildo, M.: Compile-time derivation of variable dependency using abstract interpretation. Journal of Logic Programming 13(2&3), 315–347 (1992)
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)
Zaffanella, E., Bagnara, R., Hill, P.M.: Widening Sharing. Submitted for publication (1999), Available at http://www.cs.unipr.it/~bagnara/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Zaffanella, E., Bagnara, R., Hill, P.M. (1999). Widening Sharing. In: Nadathur, G. (eds) Principles and Practice of Declarative Programming. PPDP 1999. Lecture Notes in Computer Science, vol 1702. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10704567_25
Download citation
DOI: https://doi.org/10.1007/10704567_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66540-3
Online ISBN: 978-3-540-48164-5
eBook Packages: Springer Book Archive