Skip to main content
Log in

Descending chains and narrowing on template abstract domains

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

A static analysis by abstract interpretation is typically composed of an ascending phase followed by a descending one. The descending phase is used to improve the precision of the analysis after that a post-fixpoint has been reached. Termination is often guaranteed by using narrowing operators, especially on numerical domains which are generally endowed with infinite descending chains. Under the hypothesis of dealing with reducible flow graphs, we provide an abstract semantics which improves the analysis precision and we show that, for a large class of numerical abstract domains over integer variables (such as intervals, octagons, template parallelotopes and template polyhedra), infinite descending chains cannot arise and we can safely omit narrowing. The abstract semantics is a slight variation of the standard one and can be easily implemented. We also provide an acceleration procedure which ensures termination of the descending phase without narrowing even with non-reducible graphs. Finally, we propose a new family of weak narrowing operators for real variables which improve the analysis precision.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Notes

  1. We use the terms variable to denote a variable in the program, and unknown to denote a variable in the data-flow equations.

  2. To the best of our knowledge, this is the first example in the literature which shows a program analysis iterating over an infinite descending sequence in an integer numerical domain.

  3. http://pop-art.inrialpes.fr/people/bjeannet/bjeannet-forge/fixpoint/.

  4. http://github.com/jandom-devel/ScalaFix.

References

  1. Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.: Compilers: Principles, Techniques and Tools, 2nd edn. Addison Wesley, Boston (2006)

    MATH  Google Scholar 

  2. Amato, G., Di Nardo Di Maio, S., Meo, M.C., Scozzari, F.: Narrowing operators on template abstract domains. In: Bjøner, N., de Boer, F. (eds.) Proceedings of the 20th International Symposium on FM 2015: Formal Methods, Oslo, Norway, June 24–26, 2015, Lecture Notes in Computer Science, vol. 9109, pp. 57–72. Springer, Berlin (2015). doi:10.1007/978-3-319-19249-9_5

  3. Amato, G., Parton, M., Scozzari, F.: Discovering invariants via simple component analysis. J. Symb. Comput. 47(12), 1533–1560 (2012). doi:10.1016/j.jsc.2011.12.052

    Article  MathSciNet  MATH  Google Scholar 

  4. Amato, G., Scozzari, F.: The abstract domain of parallelotopes. In: Midtgaard, J., Might, M. (eds.) Proceedings of the Fourth International Workshop on Numerical and Symbolic Abstract Domains (NSAD 2012), Electronic Notes in Theoretical Computer Science, vol. 287, pp. 17–28. Elsevier, Amsterdam (2012). doi:10.1016/j.entcs.2012.09.003

  5. Amato, G., Scozzari, F.: Localizing widening and narrowing. In: Logozzo, F., Fähndrich, M. (eds.) In: Proceedings of the 20th International Symposium on Static Analysis (SAS 2013), Seattle, WA, USA, June 20–22, 2013, Lecture Notes in Computer Science, vol. 7935, pp. 25–42. Springer, Berlin (2013). doi:10.1007/978-3-642-38856-9_4

  6. Amato, G., Scozzari, F., Seidl, H., Apinis, K., Vojdani, V.: Efficiently intertwining widening and narrowing. Sci. Comput. Program. 120, 1–24 (2016). doi:10.1016/j.scico.2015.12.005

    Article  Google Scholar 

  7. Apinis, K., Seidl, H., Vojdani, V.: How to combine widening and narrowing for non-monotonic systems of equations. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’13), pp. 377–386. ACM, New York (2013). doi:10.1145/2491956.2462190

  8. Bourdoncle, F.: Efficient chaotic iteration strategies with widenings. In: Bjørner, D., Broy, M., Pottosin, I.V. (eds.) Proceedings of the Formal Methods in Programming and Their Applications, International Conference Academgorodok, Novosibirsk, Russia June 28–July 2, 1993, Lecture Notes in Computer Science, vol. 735, pp. 128–141. Springer, Berlin (1993). doi:10.1007/BFb0039704

  9. Costan, A., Gaubert, S., Goubault, E., Martel, M., Putot, S.: A policy iteration algorithm for computing fixed points in static analysis of programs. In: Etessami, K., Rajamani, S.K. (eds.) Proceedings of the 17th International Conference on Computer Aided Verification (CAV 2005), Edinburgh, Scotland, UK, July 6–10, 2005, Lecture Notes in Computer Science, vol. 3576, pp. 462–475. Springer, Berlin (2005). doi:10.1007/11513988_46

  10. Cousot, P., Cousot, R.: Static determination of dynamic properties of programs. In: Proceedings of the Second International Symposium on Programming, pp. 106–130. Dunod, Paris (1976)

  11. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL ’77: Proceedings of the 4th ACM SIGACT–SIGPLAN symposium on Principles of programming languages, pp. 238–252. ACM Press, New York (1977). doi:10.1145/512950.512973

  12. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: POPL ’79: Proceedings of the 6th ACM SIGACT–SIGPLAN Symposium on Principles of Programming Languages, pp. 269–282. ACM Press, New York (1979). doi:10.1145/567752.567778

  13. Cousot, P., Cousot, R.: Comparing the Galois connection and widening/narrowing approaches to abstract interpretation. In: Bruynooghe, M., Wirsing, M. (eds.) Proceedings of the 4th International Symposium on Programming Language Implementation and Logic Programming (PLILP’92), Leuven, Belgium, August 26–28, 1992, Lecture Notes in Computer Science, vol. 631, pp. 269–295. Springer, Berlin (1992). doi:10.1007/3-540-55844-6_101. Invited paper

  14. Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: POPL ’78: Proceedings of the 5th ACM SIGACT–SIGPLAN Symposium on Principles of Programming Languages, pp. 84–97. ACM Press, New York (1978). doi:10.1145/512760.512770

  15. Gawlitza, T.M., Monniaux, D.: Invariant generation through strategy iteration in succinctly represented control flow graphs. Log. Methods Comput. Sci. (2012). doi:10.2168/LMCS-8(3:29)2012

  16. Gawlitza, T.M., Seidl, H.: Solving systems of rational equations through strategy iteration. ACM Trans. Program. Lang. Syst. 33(3), 1–48 (2011). doi:10.1145/1961204.1961207

    Article  Google Scholar 

  17. Gonnord, L., Halbwachs, N.: Combining widening and acceleration in linear relation analysis. In: Yi, K. (ed.) Proceedings of the 13th International Symposium on Static Analysis (SAS 2006), Seoul, August 29–31, 2006, Lecture Notes in Computer Science, vol. 4134, pp. 144–160. Springer, Berlin (2006). doi:10.1007/11823230_10

  18. Halbwachs, N., Henry, J.: When the decreasing sequence fails. In: Miné, A., Schmidt, D. (eds.) Proceedings of the 19th International Symposium on Static Analysis (SAS 2012), Deauville, September 11–13, 2012, Lecture Notes in Computer Science, vol. 7460, pp. 198–213. Springer, Berlin (2012). doi:10.1007/978-3-642-33125-1_15

  19. Miné, A.: The octagon abstract domain. High-Order Symb. Comput. 19(1), 31–100 (2006). doi:10.1007/s10990-006-8609-1

    Article  MATH  Google Scholar 

  20. Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Scalable analysis of linear systems using mathematical programming. In: Cousot, R. (ed.) Proceedings of the 6th International Conference on Verification, Model Checking, and Abstract Interpretation (VMCAI 2005), Paris, January 17–19, 2005, Lecture Notes in Computer Science, vol. 3385, pp. 25–41. Springer, Berlin (2005). doi:10.1007/b105073

  21. Simon, A., King, A., Howe, J.M.: Two variables per linear inequality as an abstract domain. In: Leuschel, M. (ed.) Logic Based Program Synthesis and Transformation 12th International Workshop (LOPSTR 2002), Madrid, Spain, September 17–20, 2002. Revised Selected Papers, Lecture Notes in Computer Science, vol. 2664, pp. 71–89. Springer, Berlin (2003). doi:10.1007/3-540-45013-0_7

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gianluca Amato.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Amato, G., Di Nardo Di Maio, S., Meo, M.C. et al. Descending chains and narrowing on template abstract domains. Acta Informatica 55, 521–545 (2018). https://doi.org/10.1007/s00236-016-0291-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-016-0291-0

Mathematics Subject Classification

Navigation