Skip to main content

Multivariant Assertion-Based Guidance in Abstract Interpretation

  • Conference paper
  • First Online:
Logic-Based Program Synthesis and Transformation (LOPSTR 2018)

Abstract

Approximations during program analysis are a necessary evil, as they ensure essential properties, such as soundness and termination of the analysis, but they also imply not always producing useful results. Automatic techniques have been studied to prevent precision loss, typically at the expense of larger resource consumption. In both cases (i.e., when analysis produces inaccurate results and when resource consumption is too high), it is necessary to have some means for users to provide information to guide analysis and thus improve precision and/or performance. We present techniques for supporting within an abstract interpretation framework a rich set of assertions that can deal with multivariance/context-sensitivity, and can handle different run-time semantics for those assertions that cannot be discharged at compile time. We show how the proposed approach can be applied to both improving precision and accelerating analysis. We also provide some formal results on the effects of such assertions on the analysis results.

Research partially funded by Spanish MINECO grant TIN2015-67522-C3-1-R TRACES, the Madrid M141047003 N-GREENS program, and Spanish MECD grant FPU16/04811. We thank the anonymous reviewers for their useful comments.

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

Access this chapter

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 EPUB and 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

Institutional subscriptions

Notes

  1. 1.

    E.g., we can replace line 4 in Example 2, by “assrt_aux(Z),”, and add a predicate to the program, assrt_aux(_)., with an assertion “:- pred assrt_aux(Z) : Z = 2.”.

  2. 2.

    We denote the calling conditions with \(\mathtt {calls}\) (plural) for historic reasons, and to avoid confusion with the higher order predicate in Prolog call/2.

  3. 3.

    This strict run-time semantics for check assertions was used in [27].

References

  1. Bagnara, R., Hill, P.M., Zaffanella, E.: Widening operators for powerset domains. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 135–148. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24622-0_13

    Chapter  Google Scholar 

  2. Bjørner, N., Gurfinkel, A., McMillan, K., Rybalchenko, A.: Horn clause solvers for program verification. In: Beklemishev, L.D., Blass, A., Dershowitz, N., Finkbeiner, B., Schulte, W. (eds.) Fields of Logic and Computation II. LNCS, vol. 9300, pp. 24–51. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-23534-9_2

    Chapter  Google Scholar 

  3. Bourdoncle, F.: Interprocedural abstract interpretation of block structured languages with nested procedures, aliasing and recursivity. In: Deransart, P., Maluszyński, J. (eds.) PLILP 1990. LNCS, vol. 456, pp. 307–323. Springer, Heidelberg (1990). https://doi.org/10.1007/BFb0024192

    Chapter  Google Scholar 

  4. Bruynooghe, M.: A practical framework for the abstract interpretation of logic programs. J. Logic Program. 10, 91–124 (1991)

    Article  MathSciNet  Google Scholar 

  5. Bueno, F., Cabeza, D., Hermenegildo, M., Puebla, G.: Global analysis of standard Prolog programs. In: Nielson, H.R. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 108–124. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61055-3_32

    Chapter  Google Scholar 

  6. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of POPL 1977, pp. 238–252. ACM Press (1977)

    Google Scholar 

  7. Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: The ASTREÉ analyzer. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 21–30. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-31987-0_3

    Chapter  MATH  Google Scholar 

  8. Delmas, D., Souyris, J.: Astrée: from research to industry. In: Nielson, H.R., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 437–451. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-74061-2_27

    Chapter  Google Scholar 

  9. Gómez-Zamalloa, M., Albert, E., Puebla, G.: Modular decompilation of low-level code by partial evaluation. In: SCAM, pp. 239–248. IEEE Computer Society (2008)

    Google Scholar 

  10. Gopan, D., Reps, T.: Guided static analysis. In: Nielson, H.R., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 349–365. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-74061-2_22

    Chapter  MATH  Google Scholar 

  11. Gurfinkel, A., Kahsai, T., Komuravelli, A., Navas, J.A.: The SeaHorn verification framework. In: Kroening, D., Păsăreanu, C.S. (eds.) CAV 2015. LNCS, vol. 9206, pp. 343–361. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21690-4_20

    Chapter  Google Scholar 

  12. Henriksen, K.S., Gallagher, J.P.: Abstract interpretation of PIC programs through logic programming. In: SCAM, pp. 184–196. IEEE Computer Society (2006)

    Google Scholar 

  13. Hermenegildo, M., Puebla, G., Bueno, F., García, P.L.: Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor). Sci. Comp. Progr. 58(1–2), 115–140 (2005)

    Article  MathSciNet  Google Scholar 

  14. Hermenegildo, M., Puebla, G., Bueno, F.: Using global analysis, partial specifications, and an extensible assertion language for program validation and debugging. In: Apt, K.R., Marek, V.W., Truszczynski, M., Warren, D.S. (eds.) The Logic Programming Paradigm. Artificial Intelligence, pp. 161–192. Springer, Heidelberg (1999). https://doi.org/10.1007/978-3-642-60085-2_7

    Chapter  Google Scholar 

  15. Kelly, A., Marriott, K., Søndergaard, H., Stuckey, P.: A generic object oriented incremental analyser for constraint logic programs. In: ACSC, pp. 92–101 (1997)

    Google Scholar 

  16. Klemen, M., Stulova, N., Lopez-Garcia, P., Morales, J.F., Hermenegildo, M.V.: Static performance guarantees for programs with run-time checks. In: PPDP. ACM Press (2018)

    Google Scholar 

  17. Liqat, U., et al.: Energy consumption analysis of programs based on XMOS ISA-level models. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013. LNCS, vol. 8901, pp. 72–90. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-14125-1_5

    Chapter  Google Scholar 

  18. Logozzo, F.: Cibai: an abstract interpretation-based static analyzer for modular analysis and verification of Java classes. In: Cook, B., Podelski, A. (eds.) VMCAI 2007. LNCS, vol. 4349, pp. 283–298. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-69738-1_21

    Chapter  MATH  Google Scholar 

  19. Marriott, K., Stuckey, P.J.: Programming with Constraints: An Introduction. MIT Press, Cambridge (1998)

    Book  Google Scholar 

  20. Méndez-Lojo, M., Navas, J., Hermenegildo, M.V.: A flexible, (C)LP-based approach to the analysis of object-oriented programs. In: King, A. (ed.) LOPSTR 2007. LNCS, vol. 4915, pp. 154–168. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78769-3_11

    Chapter  MATH  Google Scholar 

  21. Muthukumar, K., Hermenegildo, M.: Determination of variable dependence information at compile-time through abstract interpretation. In: NACLP 1989, pp. 166–189. MIT Press, October 1989

    Google Scholar 

  22. Muthukumar, K., Hermenegildo, M.: Compile-time derivation of variable dependency using abstract interpretation. JLP 13(2/3), 315–347 (1992)

    Article  Google Scholar 

  23. Navas, J., Méndez-Lojo, M., Hermenegildo, M.V.: User-definable resource usage bounds analysis for Java bytecode. In: BYTECODE 2009. ENTCS, vol. 253, pp. 6–86. Elsevier, March 2009

    Article  Google Scholar 

  24. Puebla, G., Bueno, F., Hermenegildo, M.: An assertion language for constraint logic programs. In: Deransart, P., Hermenegildo, M.V., Małuszynski, J. (eds.) Analysis and Visualization Tools for Constraint Programming. LNCS, vol. 1870, pp. 23–61. Springer, Heidelberg (2000). https://doi.org/10.1007/10722311_2

    Chapter  Google Scholar 

  25. Puebla, G., Bueno, F., Hermenegildo, M.: Combined static and dynamic assertion-based debugging of constraint logic programs. In: Bossi, A. (ed.) LOPSTR 1999. LNCS, vol. 1817, pp. 273–292. Springer, Heidelberg (2000). https://doi.org/10.1007/10720327_16

    Chapter  MATH  Google Scholar 

  26. Puebla, G., Hermenegildo, M.: Optimized algorithms for incremental analysis of logic programs. In: Cousot, R., Schmidt, D.A. (eds.) SAS 1996. LNCS, vol. 1145, pp. 270–284. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61739-6_47

    Chapter  Google Scholar 

  27. Stulova, N., Morales, J.F., Hermenegildo, M.V.: Some trade-offs in reducing the overhead of assertion run-time checks via static analysis. Sci. Comput. Program. 155, 3–26 (2018)

    Article  Google Scholar 

  28. Vaucheret, C., Bueno, F.: More precise yet efficient type inference for logic programs. In: Hermenegildo, M.V., Puebla, G. (eds.) SAS 2002. LNCS, vol. 2477, pp. 102–116. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45789-5_10

    Chapter  Google Scholar 

  29. Zaffanella, E., Bagnara, R., Hill, P.M.: Widening sharing. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 414–431. Springer, Heidelberg (1999). https://doi.org/10.1007/10704567_25

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Isabel Garcia-Contreras , Jose F. Morales or Manuel V. Hermenegildo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Garcia-Contreras, I., Morales, J.F., Hermenegildo, M.V. (2019). Multivariant Assertion-Based Guidance in Abstract Interpretation. In: Mesnard, F., Stuckey, P. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2018. Lecture Notes in Computer Science(), vol 11408. Springer, Cham. https://doi.org/10.1007/978-3-030-13838-7_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-13838-7_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-13837-0

  • Online ISBN: 978-3-030-13838-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics