skip to main content
research-article

Consistency analysis of decision-making programs

Published:08 January 2014Publication History
Skip Abstract Section

Abstract

Applications in many areas of computing make discrete decisions under uncertainty, for reasons such as limited numerical precision in calculations and errors in sensor-derived inputs. As a result, individual decisions made by such programs may be nondeterministic, and lead to contradictory decisions at different points of an execution. This means that an otherwise correct program may execute along paths, that it would not follow under its ideal semantics, violating essential program invariants on the way. A program is said to be consistent if it does not suffer from this problem despite uncertainty in decisions.

In this paper, we present a sound, automatic program analysis for verifying that a program is consistent in this sense. Our analysis proves that each decision made along a program execution is consistent with the decisions made earlier in the execution. The proof is done by generating an invariant that abstracts the set of all decisions made along executions that end at a program location l, then verifying, using a fixpoint constraint-solver, that no contradiction can be derived when these decisions are combined with new decisions made at l.

We evaluate our analysis on a collection of programs implementing algorithms in computational geometry. Consistency is known to be a critical, frequently-violated, and thoroughly studied correctness property in geometry, but ours is the first attempt at automated verification of consistency of geometric algorithms. Our benchmark suite consists of implementations of convex hull computation, triangulation, and point location algorithms. On almost all examples that are not consistent (with two exceptions), our analysis is able to verify consistency within a few minutes.

Skip Supplemental Material Section

Supplemental Material

d3_left_t6.mp4

References

  1. CGAL, Computational Geometry Algorithms Library. http://www.cgal.org.Google ScholarGoogle Scholar
  2. J. Bertrand and A. Miné. Apron: A library of numerical abstract domains for static analysis. In CAV, pages 661--667, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. François Bourdoncle. Abstract interpretation by dynamic partitioning. Journal of Functional Programming, 2(04):407--435, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  4. S. Chaudhuri, S. Gulwani, and R. Lublinerman. Continuity analysis of programs. In POPL, pages 57--70, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. Chaudhuri, S. Gulwani, and R. Lublinerman. Continuity and robustness s of programs. Commun. ACM, 55(8):107--115, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Chen, A. Miné, J. Wang, and P. Cousot. Interval polyhedra: An abstract domain to infer interval linear relationships. In SAS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. De Berg, O. Cheong, and M. Van Kreveld. Computational geometry: algorithms and applications. Springer-Verlag, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf. Computational Geometry: Algorithms and Applications. Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. Devadoss and J. O'Rourke. Discrete and Computational Geometry. Princeton University Press, 2011.Google ScholarGoogle Scholar
  10. S. Fortune. Stable maintenance of point set triangulations in two dimensions. In FOCS, pages 494--499, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Goubault. Static analyses of the precision of floating-point operations. In SAS, pages 234--259, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ronald L. Graham. An efficient algorithm for determining the convex hull of a finite planar set. Inf. Process. Lett., 1(4):132--133, 1972.Google ScholarGoogle ScholarCross RefCross Ref
  13. J. Halpern. Reasoning about uncertainty. The MIT Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. K. Hoder, N. Bjørner, and L. de Moura. μZ - an efficient engine for fixed points with constraints. In CAV, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. C. Hoffmann, J. Hopcroft, and M. Karasick. Towards implementing robust geometric computations. In SoCG, pages 106--117, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. M. Hoffmann. The problems of accuracy and robustness in geometriccomputation. Computer, 22(3):31--39, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D.E. Knuth. Axioms and Hulls (LNCS #606). Springer-Verlag, 1992.Google ScholarGoogle Scholar
  18. R. Majumdar, E. Render, and P. Tabuada. A theory of robust software synthesis. CoRR, abs/1108.3540, 2011.Google ScholarGoogle Scholar
  19. R. Majumdar and I. Saha. Symbolic robustness analysis. Real-Time Systems Symposium, IEEE International, 0:355--363, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. K. Mehlhorn. The reliable algorithmic software challenge RASC, pages 255--263. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. K. Mehlhorn and C. Yap. Robust geometric computation. http://cs.nyu.edu/≅yap/book/egc, 2011.Google ScholarGoogle Scholar
  22. D. Monniaux. The pitfalls of verifying floating-point computations. ACM Trans. Program. Lang. Syst., 30(3), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. George C. Necula, Scott McPeak, Shree Prakash Rahul, and Westley Weimer. CIL: Intermediate language and tools for analysis and transformation of C programs. In CC, pages 213--228, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Pichardie and Y. Bertot. Formalizing convex hull algorithms. In TPHOLs, volume 2152 of LNCS, pages 346--361. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Reed and B. Pierce. Distance makes the types grow stronger: A calculus for differential privacy. In ICFP, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. Shewchuk. Adaptive precision floating-point arithmetic and fast robust geometric predicates. Discrete & Computational Geometry, 18(3):305--363, 1997.Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Consistency analysis of decision-making programs

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 49, Issue 1
            POPL '14
            January 2014
            661 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2578855
            Issue’s Table of Contents
            • cover image ACM Conferences
              POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
              January 2014
              702 pages
              ISBN:9781450325448
              DOI:10.1145/2535838

            Copyright © 2014 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 8 January 2014

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!