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.
Supplemental Material
Available for Download
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- Egon Börger, Erich Grädel, and Yuri Gurevich. 2001. The Classical Decision Problem. Springer Science & Business Media.Google Scholar
- Tyson Brochu and Robert Bridson. 2009. Robust Topological Operations for Dynamic Explicit Surfaces. SIAM J. Sci. Comput. 31, 4 (June 2009), 2472–2493. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Artur Czumaj, Christian Sohler, and Martin Ziegler. 2000. Property Testing in Computational Geometry. In European Symposium on Algorithms. Springer, 155–166. Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Michael Hicks, Greg Morrisett, Dan Grossman, and Trevor Jim. 2003. Safe and Flexible Memory Management in Cyclone. Technical Report.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Bryan Matthew Klingner and Jonathan Richard Shewchuk. 2008. Aggressive Tetrahedral Mesh Improvement. In Proceedings of the 16th International Meshing Roundtable. Springer, 3–23. Google Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Leslie Lamport. 2002. Specifying Systems, The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley.Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Xavier Leroy. 2009. Formal Verification of a Realistic Compiler. Commun. ACM 52, 7 (2009), 107–115. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Ruzica Piskac, Thomas Wies, and Damien Zufferey. 2013. Automating Separation Logic Using SMT. In International Conference on Computer Aided Verification. Springer, 773–789. Google Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- J.-R. Sack and J. Urrutia (Eds.). 2000. Handbook of Computational Geometry. North-Holland Publishing Co., Amsterdam, The Netherlands.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Martin Strecker. 2011. Locality in Reasoning about Graph Transformations. In International Symposium on Applications of Graph Transformations with Industrial Relevance. Springer, 169–181.Google Scholar
- 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 Scholar
Digital Library
- Jeffrey D. Ullman, Hector Garcia-Molina, and Jennifer D. Widom. 2002. Database Systems: The Complete Book. Prentice Hall, Chapter 7.Google Scholar
- Igor Walukiewicz. 2002. Monadic Second-Order Logic on Tree-Like Structures. Theoretical Computer Science 275, 1 (2002), 311–346. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Seam: provably safe local edits on graphs
Recommendations
Cogent: Verifying High-Assurance File System Implementations
ASPLOS '16We present an approach to writing and formally verifying high-assurance file-system code in a restricted language called Cogent, supported by a certifying compiler that produces C code, high-level specification of Cogent, and translation correctness ...
Cogent: Verifying High-Assurance File System Implementations
ASPLOS '16: Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating SystemsWe present an approach to writing and formally verifying high-assurance file-system code in a restricted language called Cogent, supported by a certifying compiler that produces C code, high-level specification of Cogent, and translation correctness ...
Cogent: Verifying High-Assurance File System Implementations
ASPLOS'16We present an approach to writing and formally verifying high-assurance file-system code in a restricted language called Cogent, supported by a certifying compiler that produces C code, high-level specification of Cogent, and translation correctness ...






Comments