Skip to main content

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

Abstract

An effective translation from procedural code into equivalent constraints is necessary in order to facilitate automated reasoning about the behaviour of programs. We consider the translation of bounded loops, proposing a new form of loop unwinding called loop untangling. In comparison to standard loop unwinding the constraints representing each iteration of the loop are greatly simplified. This is achieved by decoupling the execution order from the representation of each individual iteration. We illustrate this new technique using two different examples and provide experimental results verifying that the technique produces simpler models which result in much better solver performance.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Google Scholar 

  2. Aleen, F., Clark, N.: Commutativity analysis for software parallelization: letting program transformations see the big picture. ACM Sigplan Notices 44(3), 241–252 (2009)

    Article  Google Scholar 

  3. Armando, A., Mantovani, J., Platania, L.: Bounded model checking of software using SMT solvers instead of SAT solvers. International Journal on Software Tools for Technology Transfer 11(1), 69–83 (2009)

    Article  Google Scholar 

  4. Brandwijk, P.: Verifying software with SMT and random testing using a single property specification. Master’s thesis, University of Amsterdam (2012)

    Google Scholar 

  5. Brodsky, A., Nash, H.: CoJava: optimization modeling by nondeterministic simulation. In: Benhamou, F. (ed.) CP 2006. LNCS, vol. 4204, pp. 91–106. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  6. Collavizza, H., Rueher, M., Van Hentenryck, P.: CPBPV: a constraint-programming framework for bounded program verification. Constraints 15(2), 238–264 (2010)

    Article  MATH  MathSciNet  Google Scholar 

  7. Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the Fourth ACM Symposium on Principles of Programming Languages, pp. 238–252 (1977)

    Google Scholar 

  8. Craig, W.: Linear reasoning: A new form of the Herbrand-Gentzen theorem. Journal of Symbolic Logic 22(3), 250–268 (1957)

    Article  MATH  MathSciNet  Google Scholar 

  9. Denmat, T., Gotlieb, A., Ducassé, M.: An abstract interpretation based combinator for modelling while loops in constraint programming. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 241–255. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  10. Floyd, R.W.: Assigning meanings to programs. In: Proceedings of the American Mathematical Society Symposia on Applied Mathematics, vol. 19, pp. 19–31 (1967)

    Google Scholar 

  11. Francis, K., Brand, S., Stuckey, P.J.: Optimization modelling for software developers. In: Milano, M. (ed.) CP 2012. LNCS, vol. 7514, pp. 274–289. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  12. Francis, K., Navas, J., Stuckey, P.J.: Modelling destructive assignments. In: Schulte, C. (ed.) CP 2013. LNCS, vol. 8124, pp. 315–330. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  13. Francis, K., Stuckey, P.J.: Explaining circuit propagation. Constraints 19(1), 1–29 (2014)

    Article  MathSciNet  Google Scholar 

  14. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  15. King, J.: Symbolic Execution and Program Testing. Com. ACM, 385–394 (1976)

    Google Scholar 

  16. Nethercote, N., Stuckey, P.J., Becket, R., Brand, S., Duck, G.J., Tack, G.R.: Minizinc: Towards a standard CP modelling language. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 529–543. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  17. Pottenger, W.: The role of associativity and commutativity in the detection and transformation of loop-level parallelism. In: Proceedings of the 12th International Conference on Supercomputing, pp. 188–195. ACM (1998)

    Google Scholar 

  18. Quesada, L., Van Roy, P., Deville, Y., Collet, R.: Using dominators for solving constrained path problems. In: Van Hentenryck, P. (ed.) PADL 2006. LNCS, vol. 3819, pp. 73–87. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  19. Sen, K., Marinov, D., Agha, G.: CUTE: a concolic unit testing engine for C. In: Proceedings of the 10th European Software Engineering Conference, pp. 263–272. ACM (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Francis, K., Stuckey, P.J. (2014). Loop Untangling. In: O’Sullivan, B. (eds) Principles and Practice of Constraint Programming. CP 2014. Lecture Notes in Computer Science, vol 8656. Springer, Cham. https://doi.org/10.1007/978-3-319-10428-7_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-10428-7_26

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-10427-0

  • Online ISBN: 978-3-319-10428-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics