Skip to main content

User-Definable Resource Bounds Analysis for Logic Programs

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4670))

Abstract

We present a static analysis that infers both upper and lower bounds on the usage that a logic program makes of a set of user-definable resources. The inferred bounds will in general be functions of input data sizes. A resource in our approach is a quite general, user-defined notion which associates a basic cost function with elementary operations. The analysis then derives the related (upper- and lower-bound) resource usage functions for all predicates in the program. We also present an assertion language which is used to define both such resources and resource-related properties that the system can then check based on the results of the analysis. We have performed some preliminary experiments with some concrete resources such as execution steps, bytes sent or received by an application, number of files left open, number of accesses to a database, number of calls to a procedure, number of asserts/retracts, etc. Applications of our analysis include resource consumption verification and debugging (including for mobile code), resource control in parallel/distributed computing, and resource-oriented specialization.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aspinall, D., Beringer, L., Hofmann, M., Loidl, H.-W., Momigliano, A.: A program logic for resource verification. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 34–49. Springer, Heidelberg (2004)

    Google Scholar 

  2. Bagnara, R., Pescetti, A., Zaccagnini, A., Zaffanella, E., Zolo, T.: Purrs: The Parma University’s Recurrence Relation Solver, http://www.cs.unipr.it/purrs/

  3. Basin, D., Ganzinger, H.: Complexity Analysis based on Ordered Resolution. In: 11th. IEEE Symposium on Logic in Computer Science, IEEE Computer Society Press, Los Alamitos (1996)

    Google Scholar 

  4. Bate, I., Bernat, G., Puschner, P.: Java virtual-machine support for portable worst-case execution-time analysis. In: 5th IEEE Int’l. Symp. on Object-oriented Real-time Distributed Computing (April 2002)

    Google Scholar 

  5. Chander, A., Espinosa, D., Islam, N., Lee, P., Necula, G.C.: Enforcing resource bounds via static verification of dynamic checks. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 311–325. Springer, Heidelberg (2005)

    Google Scholar 

  6. Craig, S.J., Leuschel, M.: Self-tuning resource aware specialisation for Prolog. In: Proc. of PPDP 2005, pp. 23–34. ACM Press, New York (2005)

    Chapter  Google Scholar 

  7. Debray, S.K., Lin, N.W.: Cost analysis of logic programs. TOPLAS, 15(5) (1993)

    Google Scholar 

  8. Debray, S.K., Lin, N.-W., Hermenegildo, M.: Task Granularity Analysis in Logic Programs. In: Proc. PLDI 1990, pp. 174–188. ACM, New York (1990)

    Chapter  Google Scholar 

  9. Debray, S.K., López-García, P., Hermenegildo, M., Lin, N.-W.: Lower Bound Cost Estimation for Logic Programs. In: Proc. ILPS 1997, MIT Press, Cambridge (1997)

    Google Scholar 

  10. Eisinger, J., Polian, I., Becker, B., Metzner, A., Thesing, S., Wilhelm, R.: Automatic identification of timing anomalies for cycle-accurate worst-case execution time analysis. In: Proc. of DDECS, IEEE Computer Society Press, Los Alamitos (2006)

    Google Scholar 

  11. Grobauer, B.: Cost recurrences for DML programs. In: Int’l. Conf. on Functional Programming, pp. 253–264 (2001)

    Google Scholar 

  12. Hermenegildo, M., Puebla, G., Bueno, F., López García., P.: Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and The Ciao System Preprocessor). Science of Computer Programming 58(1-2), 115–140 (2005)

    Article  MATH  Google Scholar 

  13. Igarashi, A., Kobayashi, N.: Resource usage analysis. In: Symposium on Principles of Programming Languages, pp. 331–342 (2002)

    Google Scholar 

  14. López-García, P., Bueno, F., Hermenegildo, M.: Determinacy Analysis for Logic Programs Using Mode and Type Information. In: Bruynooghe, M. (ed.) Logic Based Program Synthesis and Transformation. LNCS, vol. 3018, pp. 19–35. Springer, Heidelberg (2004)

    Google Scholar 

  15. McAllester, D.A.: On the complexity analysis of static analyses. In: Static Analysis Symp., pp. 312–329 (1999)

    Google Scholar 

  16. Le Metayer, D.: ACE: An Automatic Complexity Evaluator. ACM Transactions on Programming Languages and Systems 10(2), 248–266 (1988)

    Article  Google Scholar 

  17. Nielson, F., Nielson, H.R., Seidl, H.: Automatic complexity analysis. In: European Symposium on Programming, pp. 243–261 (2002)

    Google Scholar 

  18. Puebla, G., Ochoa, C.: Poly-Controlled Partial Evaluation. In: Proc. of PPDP 2006, pp. 261–271. ACM Press, New York (2006)

    Chapter  Google Scholar 

  19. Rosendhal, M.: Automatic Complexity Analysis. In: Proc. FPCA, ACM, New York (1989)

    Google Scholar 

  20. Thiele, L., Wilhelm, R.: Design for time-predictability. In: Perspectives Workshop: Design of Systems with Predictable Behaviour

    Google Scholar 

  21. Vasconcelos, P., Hammond, K.: Inferring Cost Equations for Recursive, Polymorphic and Higher-Order Functional Programs. In: Trinder, P., Michaelson, G.J., Peña, R. (eds.) IFL 2003. LNCS, vol. 3145, Springer, Heidelberg (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Véronica Dahl Ilkka Niemelä

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Navas, J., Mera, E., López-García, P., Hermenegildo, M.V. (2007). User-Definable Resource Bounds Analysis for Logic Programs. In: Dahl, V., Niemelä, I. (eds) Logic Programming. ICLP 2007. Lecture Notes in Computer Science, vol 4670. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74610-2_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74610-2_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74608-9

  • Online ISBN: 978-3-540-74610-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics