Abstract
This paper presents a backward sharing analysis for logic programs. The analysis computes pre-conditions for a query that guarantee a given post-condition is satisfied after the query is successfully executed. The analysis uses a pair sharing domain and is capable of inferring pre-conditions that ensure the absence of sharing. This, in turn, has many applications in logic programming. The work is unique in that it demonstrates that backward analysis is applicable even for properties that are not closed under instantiation.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Codish, M., Dams, D., Yardeni, E.: Derivation and safety of an abstract unification algorithm for groundness and aliasing analysis. In: Furukawa, K. (ed.) Proceedings of the Eighth International Conference on Logic Programming, pp. 79–93. MIT Press, Cambridge (1991)
Cousot, P., Cousot, R.: Abstract interpretation: a unified framework for static analysis of programs by construction or approximation of fixpoints. In: Principles of Programming Languages, pp. 238–252. ACM Press, New York (1977)
Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs. The Journal of Logic Programming 13(1, 2, 3, 4), 103–179 (1992)
Debray, S.K.: QD-Janus: A sequential implementation of Janus in Prolog. Software Practice and Experience 23(12), 1337–1360 (1993)
Dyber, P.: Inverse image analysis generalises strictness analysis. Information and Computation 90(2), 194–216 (1991)
Falaschi, M., Hicks, P., Winsborough, W.: Demand Transformation Analysis for Concurrent Constraint Programs. The Journal of Logic Programming 41(3), 185–215 (2000)
Gabbrielli, M., Levi, G., Meo, M.C.: Resultants Semantics for Prolog. Journal of Logic and Computation 6(4), 491–521 (1996)
Gallagher, J.P.: A Program Transformation for Backwards Analysis of Logic Programs. In: Pre-Proceedings of LOPSTR 2003 - International Symposium on Logicbased Program Synthesis and Transformation (2003)
Genaim, S., Codish, M.: Inferring termination conditions for logic programs using backwards analysis. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 681–690. Springer, Heidelberg (2001)
Giacobazzi, R.: Abductive analysis of modular logic programs. Journal of Logic and Computation 8(4), 457–484 (1998)
Hall, C., Wise, D.: Generating function versions with rational strictness patterns. Science of Computer Programming 12(1), 39–74 (1989)
Hughes, J., Launchbury, J.: Reversing abstract interpretations. Science of Computer Programming 22, 307–326 (1994)
Jacobs, D., Langen, A.: Static analysis of logic programs for independent and parallelism. The Journal of Logic Programming 13(1-4), 291–314 (1992)
King, A.: Pair-sharing over rational trees. The Journal of Logic Programming 46(1-2), 139–155 (2000)
King, A., Lu, L.: A backward analysis for constraint logic programs. Theory and Practice of Logic Programming 2(4,5), 517–547 (2002)
King, A., Lu, L.: Forward versus Backward Verification of Logic Programs. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 315–330. Springer, Heidelberg (2003)
Lloyd, J.W.: Foundations of Logic Programming. Springer, Heidelberg (1987)
Lu, L., King, A.: A Framework for Backward Analysis of Logic Programs (in preparation)
Lu, L., King, A.: Type inference generalises type checking. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 85–101. Springer, Heidelberg (2002)
Marriott, K., Søndergaard, H.: Precise and efficient groundness analysis for logic programs. ACM Letters on Programming Languages and Systems 2(1-4), 181–196 (1993)
Mazur, N., Janssens, G., Bruynooghe, M.: A module based analysis for memory reuse in Mercury. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 1255–1269. Springer, Heidelberg (2000)
Mazur, N., Janssens, G., Vanhoof, W.: Collecting potential optimizations. In: Leuschel, M. (ed.) LOPSTR 2002. LNCS, vol. 2664, pp. 109–110. Springer, Heidelberg (2003)
Pedreschi, D., Ruggieri, S.: Weakest preconditions for pure Prolog programs. Information Processing Letters 67(3), 145–150 (1998)
Søndergaard, H.: An application of abstract interpretation of logic programs: occur check problem. In: Robinet, B., Wilhelm, R. (eds.) ESOP 1986. LNCS, vol. 213, pp. 324–338. Springer, Heidelberg (1986)
Wadler, P., Hughes, R.J.M.: Projections for strictness analysis. In: Kahn, G. (ed.) FPCA 1987. LNCS, vol. 274, pp. 385–407. Springer, Heidelberg (1987)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lu, L., King, A. (2004). Backward Pair Sharing Analysis. In: Kameyama, Y., Stuckey, P.J. (eds) Functional and Logic Programming. FLOPS 2004. Lecture Notes in Computer Science, vol 2998. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24754-8_11
Download citation
DOI: https://doi.org/10.1007/978-3-540-24754-8_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21402-1
Online ISBN: 978-3-540-24754-8
eBook Packages: Springer Book Archive