skip to main content
research-article
Open Access
Artifacts Available
Artifacts Evaluated & Functional

Seam: provably safe local edits on graphs

Published:12 October 2017Publication History
Skip Abstract Section

Abstract

Algorithms that create and mutate graph data structures are challenging to implement correctly. However, verifying even basic properties of low-level implementations, such as referential integrity and memory safety, remains non-trivial. Furthermore, any extension to such a data structure multiplies the complexity of its implementation, while compounding the challenges in reasoning about correctness. We take a language design approach to this problem. We propose Seam, a language for expressing local edits to graph-like data structures, based on a relational data model, and such that data integrity can be verified automatically. We present a verification method that leverages an SMT solver, and prove it sound and precise (complete modulo termination of the SMT solver). We evaluate the verification capabilities of Seam empirically, and demonstrate its applicability to a variety of examples, most notably a new class of verification tasks derived from geometric remeshing operations used in scientific simulation and computer graphics. We describe our prototype implementation of a Seam compiler that generates low-level code, which can then be integrated into larger applications. We evaluate our compiler on a sample application, and demonstrate competitive execution time, compared to hand-written implementations.

Skip Supplemental Material Section

Supplemental Material

References

  1. Carolyn Jane Anderson, Nate Foster, Arjun Guha, Jean-Baptiste Jeannin, Dexter Kozen, Cole Schlesinger, and David Walker. 2014. NetkAT: Semantic Foundations for Networks. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014. 113–126.Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ioannis G. Baltopoulos, Johannes Borgström, and Andrew D. Gordon. 2011. Maintaining Database Integrity with Refinement Types. In Proceedings of the 25th European Conference on Object-oriented Programming (ECOOP’11). Springer-Verlag, Berlin, Heidelberg, 484–509. http://dl.acm.org/citation.cfm?id=2032497.2032530 Google ScholarGoogle ScholarCross RefCross Ref
  3. Michael Benedikt, Timothy Griffin, and Leonid Libkin. 1996. Verifiable Properties of Database Transactions. In Proceedings of the fifteenth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems. ACM, 117–127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Gilbert Louis Bernstein and Chris Wojtan. 2013. Putting Holes in Holey Geometry: Topology Change for Arbitrary Surfaces. ACM Trans. Graph. 32, 4, Article 34 (July 2013), 12 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Karthikeyan Bhargavan, Antoine Delignat-Lavaud, Cédric Fournet, Catalin Hritcu, Jonathan Protzenko, Tahina Ramananandro, Aseem Rastogi, Nikhil Swamy, Peng Wang, Santiago Zanella Béguelin, and Jean Karim Zinzindohoué. 2017. Verified Low-Level Programming Embedded in F*. CoRR abs/1703.00053 (2017).Google ScholarGoogle Scholar
  6. Egon Börger, Erich Grädel, and Yuri Gurevich. 2001. The Classical Decision Problem. Springer Science & Business Media.Google ScholarGoogle Scholar
  7. Tyson Brochu and Robert Bridson. 2009. Robust Topological Operations for Dynamic Explicit Surfaces. SIAM J. Sci. Comput. 31, 4 (June 2009), 2472–2493. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cristiano Calcagno, Dino Distefano, Peter O’Hearn, and Hongseok Yang. 2009. Compositional Shape Analysis by Means of Bi-Abduction. In ACM SIGPLAN Notices, Vol. 44. ACM, 289–300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Artur Czumaj, Christian Sohler, and Martin Ziegler. 2000. Property Testing in Computational Geometry. In European Symposium on Algorithms. Springer, 155–166. Google ScholarGoogle ScholarCross RefCross Ref
  10. Fang Da, Christopher Batty, and Eitan Grinspun. 2014. Multimaterial Mesh-based Surface Tracking. ACM Trans. Graph. 33, 4, Article 112 (July 2014), 11 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Morgan Deters, Andrew Reynolds, Tim King, Clark Barrett, and Cesare Tinelli. 2014. A Tour of CVC4: How It Works, and How to Use It. In Proceedings of the 14th Conference on Formal Methods in Computer-Aided Design (FMCAD ’14). FMCAD Inc, Austin, TX, Article 4, 1 pages. http://dl.acm.org/citation.cfm?id=2682923.2682928Google ScholarGoogle ScholarCross RefCross Ref
  12. Zachary DeVito, James Hegarty, Alex Aiken, Pat Hanrahan, and Jan Vitek. 2013. Terra: A Multi-stage Language for Highperformance Computing. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’13). ACM, New York, NY, USA, 105–116. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. 2011. Data Representation Synthesis. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’11). ACM, New York, NY, USA, 38–49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. 2012. Concurrent Data Representation Synthesis. In ACM SIGPLAN Notices, Vol. 47. ACM, 417–428. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Michael Hicks, Greg Morrisett, Dan Grossman, and Trevor Jim. 2003. Safe and Flexible Memory Management in Cyclone. Technical Report.Google ScholarGoogle Scholar
  16. Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes Filho. 1996. Lua—An Extensible Extension Language. Software: Practice and Experience 26, 6 (1996), 635–652. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Shachar Itzhaky, Anindya Banerjee, Neil Immerman, Aleksandar Nanevski, and Mooly Sagiv. 2013. Effectively-Propositional Reasoning about Reachability in Linked Data Structures. In International Conference on Computer Aided Verification. Springer, 756–772. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Daniel Jackson. 2002. Alloy: A New Technology for Software Modelling. In Tools and Algorithms for the Construction and Analysis of Systems, 8th International Conference, TACAS 2002, Held as Part of the Joint European Conference on Theory and Practice of Software, ETAPS 2002, Grenoble, France, April 8-12, 2002, Proceedings. 20. Google ScholarGoogle ScholarCross RefCross Ref
  19. Nils Klarlund and Michael I Schwartzbach. 1993. Graph Types. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 196–205. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Bryan Matthew Klingner and Jonathan Richard Shewchuk. 2008. Aggressive Tetrahedral Mesh Improvement. In Proceedings of the 16th International Meshing Roundtable. Springer, 3–23. Google ScholarGoogle ScholarCross RefCross Ref
  21. Christoph Koch. 2010. Incremental Query Evaluation in a Ring of Databases. In Proceedings of the Twenty-ninth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS ’10). ACM, New York, NY, USA, 87–98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Shuvendu Lahiri and Shaz Qadeer. 2008. Back to the Future: Revisiting Precise Program Verification Using SMT Solvers. ACM SIGPLAN Notices 43, 1 (2008), 171–182. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Leslie Lamport. 2002. Specifying Systems, The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley.Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Chris Lattner and Vikram Adve. 2004. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the International Symposium on Code Generation and Optimization: Feedback-directed and Runtime Optimization (CGO ’04). IEEE Computer Society, Washington, DC, USA, 75–. http://dl.acm.org/citation.cfm?id=977395. 977673Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Xavier Leroy. 2009. Formal Verification of a Realistic Compiler. Commun. ACM 52, 7 (2009), 107–115. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Tal Lev-Ami, Neil Immerman, Tom Reps, Mooly Sagiv, Siddharth Srivastava, and Greta Yorsh. 2005. Simulating Reachability Using First-Order Logic with Applications to Verification of Linked Data Structures. In International Conference on Automated Deduction. Springer, 99–115. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Nicholas D. Matsakis and Felix S. Klock II. 2014. The Rust Language. In Proceedings of the 2014 ACM SIGAda Annual Conference on High Integrity Language Technology, HILT 2014, Portland, Oregon, USA, October 18-21, 2014. 103–104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Scott McPeak and George C Necula. 2005. Data Structure Specifications via Local Equality Axioms. In International Conference on Computer Aided Verification. Springer, 476–490. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Kurt Mehlhorn, Stefan Näher, Thomas Schilz, Stefan Schirra, Michael Seel, Raimund Seidel, and Christian Uhrig. 1996. Checking Geometric Programs or Verification of Geometric Structures. In Proceedings of the Twelfth Annual Symposium on Computational Geometry. ACM, 159–165. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Rahul Narain, Tobias Pfaff, and James F. O’Brien. 2013. Folding and Crumpling Adaptive Sheets. ACM Trans. Graph. 32, 4, Article 51 (July 2013), 8 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Rahul Narain, Armin Samii, and James F. O’Brien. 2012. Adaptive Anisotropic Remeshing for Cloth Simulation. ACM Trans. Graph. 31, 6, Article 152 (Nov. 2012), 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. George C. Necula, Scott McPeak, and Westley Weimer. 2002. Ccured: Type-Safe Retrofitting of Legacy Code. In Conference Record of POPL 2002: The 29th SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Portland, OR, USA, January 16-18, 2002. 128–139.Google ScholarGoogle Scholar
  33. Tobias Pfaff, Rahul Narain, Juan Miguel de Joya, and James F. O’Brien. 2014. Adaptive Tearing and Cracking of Thin Sheets. ACM Trans. Graph. 33, 4, Article 110 (July 2014), 9 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2013. Automating Separation Logic Using SMT. In International Conference on Computer Aided Verification. Springer, 773–789. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Amir Pnueli, Michael Siegel, and Eli Singerman. 1998. Translation Validation. In Tools and Algorithms for Construction and Analysis of Systems, 4th International Conference, TACAS ’98, Held as Part of the European Joint Conferences on the Theory and Practice of Software, ETAPS’98, Lisbon, Portugal, March 28 - April 4, 1998, Proceedings. 151–166. Google ScholarGoogle ScholarCross RefCross Ref
  36. Andrew Reynolds, Cesare Tinelli, Amit Goel, Sava Krstic, Morgan Deters, and Clark Barrett. 2013. Quantifier Instantiation Techniques for Finite Model Finding in SMT. In Proceedings of the 24th International Conference on Automated Deduction (CADE ’13) (Lecture Notes in Computer Science), Maria Paola Bonacina (Ed.), Vol. 7898. Springer Berlin Heidelberg, 377–391. http://www.cs.nyu.edu/~barrett/pubs/RTG+13.pdf Lake Placid, NY.Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. J.-R. Sack and J. Urrutia (Eds.). 2000. Handbook of Computational Geometry. North-Holland Publishing Co., Amsterdam, The Netherlands.Google ScholarGoogle Scholar
  38. Shmuel Sagiv, Thomas W. Reps, and Reinhard Wilhelm. 1999. Parametric Shape Analysis via 3-Valued Logic. In POPL ’99, Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, TX, USA, January 20-22, 1999. 105–118.Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Rian Shambaugh, Aaron Weiss, and Arjun Guha. 2016. Rehearsal: A Configuration Verification Tool for Puppet. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2016, Santa Barbara, CA, USA, June 13-17, 2016. 416–430. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Armando Solar-Lezama, Rodric M. Rabbah, Rastislav Bodík, and Kemal Ebcioglu. 2005. Programming by Sketching for Bit-streaming Programs. In Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation, Chicago, IL, USA, June 12-15, 2005. 281–294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Martin Strecker. 2011. Locality in Reasoning about Graph Transformations. In International Symposium on Applications of Graph Transformations with Industrial Relevance. Springer, 169–181.Google ScholarGoogle Scholar
  42. Sean Treichler, Michael Bauer, Rahul Sharma, Elliott Slaughter, and Alex Aiken. 2016. Dependent Partitioning. In Proceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2016, part of SPLASH 2016, Amsterdam, The Netherlands, October 30 - November 4, 2016. 344–358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Jeffrey D. Ullman, Hector Garcia-Molina, and Jennifer D. Widom. 2002. Database Systems: The Complete Book. Prentice Hall, Chapter 7.Google ScholarGoogle Scholar
  44. Igor Walukiewicz. 2002. Monadic Second-Order Logic on Tree-Like Structures. Theoretical Computer Science 275, 1 (2002), 311–346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. James R. Wilcox, Doug Woos, Pavel Panchekha, Zachary Tatlock, Xi Wang, Michael D. Ernst, and Thomas E. Anderson. 2015. Verdi: A Framework for Implementing and Formally Verifying Distributed Systems. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, Portland, OR, USA, June 15-17, 2015. 357–368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Chris Wojtan, Nils Thürey, Markus Gross, and Greg Turk. 2009. Deforming Meshes that Split and Merge. ACM Trans. Graph. 28, 3, Article 76 (July 2009), 10 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Chris Wojtan, Nils Thürey, Markus Gross, and Greg Turk. 2010. Physics-Inspired Topology Changes for Thin Fluid Features. ACM Trans. Graph. 29, 4, Article 50 (July 2010), 8 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Seam: provably safe local edits on graphs

      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

      • Article Metrics

        • Downloads (Last 12 months)36
        • Downloads (Last 6 weeks)5

        Other Metrics

      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!