Abstract
The input to backwards analysis is a program together with properties that are required to hold at given program points. The purpose of the analysis is to derive initial goals or pre-conditions that guarantee that, when the program is executed, the given properties hold. The solution for logic programs presented here is based on a transformation of the input program, which makes explicit the dependencies of the given program points on the initial goals. The transformation is derived from the resultants semantics of logic programs. The transformed program is then analysed using a standard abstract interpretation. The required pre-conditions on initial goals can be deduced from the analysis results without a further fixpoint computation. For the modes backwards analysis problem, this approach gives the same results as previous work, but requires only a standard abstract interpretation framework and no special properties of the abstract domain.
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
Bossi, A., Gabbrielli, M., Levi, G., Martelli, M.: The s-semantics approach: Theory and applications. Journal of Logic Programming 19/20, 149–197 (1994)
Bancilhon, F., Maier, D., Sagiv, Y., Ullman, J.: Magic sets and other strange ways to implement logic programs. In: Proceedings of the 5th ACM SIGMOD-SIGACT Symposium on Principles of Database Systems (1986)
Codish, M., Demoen, B.: Analysing logic programs using “Prop”- ositional logic programs and a magic wand. In: Miller, D. (ed.) Proceedings of the 1993 International Symposium on Logic Programming, Vancouver, MIT Press, Cambridge (1993)
Clark, K.: Predicate logic as a computational formalism. Technical Report DOC 79/59, Imperial College, London, Department of Computing (1979)
Comini, M., Levi, G., Meo, M.C.: A theory of observables for logic programs. Information and Computation 169(1), 23–80 (2001)
Codish, M., Søndergaard, H.: Meta-circular abstract interpretation in prolog. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds.) The Essence of Computation. LNCS, vol. 2566, pp. 109–134. Springer, Heidelberg (2002)
Codish, M., Taboch, C.: A semantic basic for the termination analysis of logic programs. The Journal of Logic Programming 41(1), 103–123 (1999)
Debray, S., Ramakrishnan, R.: Abstract Interpretation of Logic Programs Using Magic Transformations. Journal of Logic Programming 18, 149–176 (1994)
Gallagher, J., Boulanger, D., Sağlam, H.: Practical model-based static analysis for definite logic programs. In: Lloyd, J.W. (ed.) Proc. of International Logic Programming Symposium, pp. 351–365 (1995)
Genaim, S., Codish, M.: Inferring termination conditions of logic programs by backwards analysis. In: Nieuwenhuis, R., Voronkov, A. (eds.) LPAR 2001. LNCS (LNAI), vol. 2250, pp. 681–690. Springer, Heidelberg (2001)
Gabbrielli, M., Giacobazzi, R.: Goal independency and call patterns in the analysis of logic programs. In: Proceedings of the 1994 ACM Symposium on Applied Computing, SAC 1994, pp. 394–399 (1994)
Gabbrielli, M., Levi, G., Meo, M.C.: Resultants semantics for Prolog. Journal of Logic and Computation 6(4), 491–521 (1996)
Giacobazzi, R., Scozzari, F.: A logical model for relational abstract domains. ACM Transactions on Programming Languages and Systems 20(5), 1067–1109 (1998)
King, A., Lu, L.: A backward analysis for constraint logic programs. Theory and Practice of Logic Programming 2(4-5), 514–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) (to appear)
Lloyd, J.W.: Foundations of Logic Programming, 2nd edn. Springer, Heidelberg (1987)
Mesnard, F.: Inferring left-terminating classes of queries for constraint logic programs. In: Maher, M.J. (ed.) Joint International Conference and Symposium on Logic Programming, pp. 7–21. MIT Press, Cambridge (1996)
Mesnard, F., Neumerkel, U.: Applying static analysis techniques for inferring termination conditions of logic programs. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, pp. 93–110. Springer, Heidelberg (2001)
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
Gallagher, J.P. (2004). A Program Transformation for Backwards Analysis of Logic Programs. In: Bruynooghe, M. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2003. Lecture Notes in Computer Science, vol 3018. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-25938-1_8
Download citation
DOI: https://doi.org/10.1007/978-3-540-25938-1_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22174-6
Online ISBN: 978-3-540-25938-1
eBook Packages: Springer Book Archive