Abstract
Non-failure analysis aims at inferring that predicate calls in a program will never fail. This type of information has many applications in functional/logic programming. It is essential for determining lower bounds on the computational cost of calls, useful in the context of program parallelization, instrumental in partial evaluation and other program transformations, and has also been used in query optimization. In this paper, we re-cast the non-failure analysis proposed by Debray et al. as an abstract interpretation, which not only allows to investigate it from a standard and well understood theoretical framework, but has also several practical advantages. It allows us to incorporate non-failure analysis into a standard, generic abstract interpretation engine. The analysis thus benefits from the fixpoint propagation algorithm, which leads to improved information propagation. Also, the analysis takes advantage of the multi-variance of the generic engine, so that it is now able to infer separate non-failure information for different call patterns. Moreover, the implementation is simpler, and allows to perform non-failure and covering analyses alongside other analyses, such as those for modes and types, in the same framework. Finally, besides the precision improvements and the additional simplicity, our implementation (in the Ciao/CiaoPP multiparadigm programming system) also shows better efficiency.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Braem, C., Le Charlier, B., Modart, S., Van Hentenryck, P.: Cardinality analysis of prolog. In: Proc. International Symposium on Logic Programming, Ithaca, NY, November 1994, pp. 457–471. MIT Press, Cambridge (1994)
Bruynooghe, M.: A Framework for the Abstract Interpretation of Logic Programs. Tech. Rep. CW62, Dept. of C.S., Katholieke Universiteit Leuven (October 1987)
Bruynooghe, M.: A Practical Framework for the Abstract Interpretation of Logic Programs. Journal of Logic Programming 10, 91–124 (1991)
Bueno, F., López-García, P., Puebla, G., Hermenegildo, M.: The Ciao Prolog Preprocessor. Technical Report CLIP1/04, Technical University of Madrid (UPM), Facultad de Informática, 28660 Boadilla del Monte, Madrid, Spain (January 2004)
Cousot, P., Cousot, R.: Abstract Interpretation: a Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In: ACM Symposium on Principles of Programming Languages, pp. 238–252 (1977)
Dawson, S., Ramakrishnan, C.R., Ramakrishnan, I.V., Sekar, R.C.: Extracting determinacy in logic programs. In: Warren, D.S. (ed.) Proceedings of the Tenth International Conference on Logic Programming, Budapest, Hungary, pp. 424–438. The MIT Press, Cambridge (1993)
Debray, S.K., Warren, D.S.: Automatic Mode Inference for Prolog Programs. Journal of Logic Programming 5(3), 207–229 (1988)
Debray, S.K., Lin, N.-W.: Static Estimation of Query Sizes in Horn Programs. In: Kanellakis, P.C., Abiteboul, S. (eds.) ICDT 1990. LNCS, vol. 470, pp. 515–528. Springer, Heidelberg (1990)
Debray, S.K., López-García, P., Hermenegildo, M.: Non-Failure Analysis for Logic Programs. In: 1997 International Conference on Logic Programming, Cambridge, MA, June 1997, pp. 48–62. MIT Press, Cambridge (1997)
Debray, S.K., López-García, P., Hermenegildo, M., Lin, N.-W.: Lower Bound Cost Estimation for Logic Programs. In: 1997 International Logic Programming Symposium, October 1997, pp. 291–305. MIT Press, Cambridge (1997)
Gupta, G., Pontelli, E., Ali, K., Carlsson, M., Hermenegildo, M.: Parallel Execution of Prolog Programs: a Survey. ACM Transactions on Programming Languages and Systems 23(4), 472–602 (2001)
Hermenegildo, M., Bueno, F., Puebla, G., López-García, P.: Program Analysis, Debugging and Optimization Using the Ciao System Preprocessor. In: 1999 International Conference on Logic Programming, Cambridge, MA, November 1999, pp. 52–66. MIT Press, Cambridge (1999)
Hermenegildo, M., Puebla, G., Bueno, F., López-García, P.: Program Development Using Abstract Interpretation (and The Ciao System Preprocessor). In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 127–152. Springer, Heidelberg (2003)
Hermenegildo, M., Puebla, G., Marriott, K., Stuckey, P.: Incremental Analysis of Constraint Logic Programs. ACM Transactions on Programming Languages and Systems 22(2), 187–223 (2000)
Jones, N., Sondergaard, H.: A semantics-based framework for the abstract interpretation of prolog. In: Abstract Interpretation of Declarative Languages, Ellis-Horwood, ch. 6, pp. 124–142 (1987)
Mannila, H., Ukkonen, E.: Flow Analysis of Prolog Programs. In: Fourth IEEE Symposium on Logic Programming, San Francisco, California, September 1987, pp. 205–214. IEEE Computer Society, Los Alamitos (1987)
Mellish, C.S.: Abstract Interpretation of Prolog Programs. In: Shapiro, E. (ed.) ICLP 1986. LNCS, vol. 225, pp. 463–475. Springer, Heidelberg (1986)
Muthukumar, K., Hermenegildo, M.: Deriving A Fixpoint Computation Algorithm for Top-down Abstract Interpretation of Logic Programs. Technical Report ACT-DC-153-90, Microelectronics and Computer Technology Corporation (MCC), Austin, TX 78759 (April 1990)
Muthukumar, K., Hermenegildo, M.: Compile-time Derivation of Variable Dependency Using Abstract Interpretation. Journal of Logic Programming 13(2/3), 315–347 (1992)
Sato, T., Tamaki, H.: Enumeration of Success Patterns in Logic Programs. Theoretical Computer Science 34, 227–240 (1984)
Waern, A.: An Implementation Technique for the Abstract Interpretation of Prolog. In: Fifth International Conference and Symposium on Logic Programming, Seattle, Washington, August 1988, pp. 700–710 (1988)
Warren, R., Hermenegildo, M., Debray, S.K.: On the Practicality of Global Flow Analysis of Logic Programs. In: Fifth International Conference and Symposium on Logic Programming, August 1988, pp. 684–699. MIT Press, Cambridge (1988)
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
Bueno, F., López-García, P., Hermenegildo, M. (2004). Multivariant Non-failure Analysis via Standard Abstract Interpretation. 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_9
Download citation
DOI: https://doi.org/10.1007/978-3-540-24754-8_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-21402-1
Online ISBN: 978-3-540-24754-8
eBook Packages: Springer Book Archive