skip to main content
article

Verification of high-level transformations with inductive refinement types

Published:07 April 2020Publication History
Skip Abstract Section

Abstract

High-level transformation languages like Rascal include expressive features for manipulating large abstract syntax trees: first-class traversals, expressive pattern matching, backtracking and generalized iterators. We present the design and implementation of an abstract interpretation tool, Rabit, for verifying inductive type and shape properties for transformations written in such languages. We describe how to perform abstract interpretation based on operational semantics, specifically focusing on the challenges arising when analyzing the expressive traversals and pattern matching. Finally, we evaluate Rabit on a series of transformations (normalization, desugaring, refactoring, code generators, type inference, etc.) showing that we can effectively verify stated properties.

References

  1. Alexander Aiken and Brian R. Murphy. 1991. Implementing Regular Tree Expressions. In FPLCA 1991. 427-447. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Ahmad Salim Al-Sibahi. 2017. The Formal Semantics of Rascal Light. CoRR abs/1703.02312 (2017). http://arxiv.org/abs/1703.02312.Google ScholarGoogle Scholar
  3. Ahmad Salim Al-Sibahi, Aleksandar S. Dimovski, and Andrzej Wasowski. 2016. Symbolic execution of high-level transformations. In SLE 2016. 207-220. http://dl.acm.org/citation.cfm?id=2997382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Ahmad Salim Al-Sibahi, Thomas P. Jensen, Aleksandar S. Dimovski, and Andrzej Wasowski. 2018. Verification of High-Level Transformations with Inductive Refinement Types. ArXiv e-prints (Sept. 2018). arXiv:cs.PL/1809.06336 https://arxiv.org/abs/1809.06336.Google ScholarGoogle Scholar
  5. Aws Albarghouthi, Josh Berdine, Byron Cook, and Zachary Kincaid. 2015. Spatial Interpolants. In ESOP 2015. 634-660.Google ScholarGoogle Scholar
  6. Oana Fabiana Andreescu, Thomas Jensen, and Stéphane Lescuyer. 2015. Dependency Analysis of Functional Specifications with Algebraic Data Structures. In ICFEM 2015. 116-133.Google ScholarGoogle Scholar
  7. Bas Basten, Jeroen van den Bos, Mark Hills, Paul Klint, Arnold Lankamp, Bert Lisser, Atze van der Ploeg, Tijs van der Storm, and Jurgen J. Vinju. 2015. Modular language implementation in Rascal - Experience Report. Sci. Comput. Program. 114 (2015), 7-19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Marcin Benke, Peter Dybjer, and Patrik Jansson. 2003. Universes for Generic Programs and Proofs in Dependent Type Theory. 10, 4 (2003), 265-289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Véronique Benzaken, Giuseppe Castagna, Kim Nguyen, and Jérôme Siméon. 2013. Static and dynamic semantics of NoSQL languages. In POPL 2013. 101-114. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Martin Bodin, Thomas Jensen, and Alan Schmitt. 2015. Certified Abstract Interpretation with Pretty-Big-Step Semantics. In CPP 2015. 29-40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Ahmed Bouajjani, Cezara Dragoi, Constantin Enea, and Mihaela Sighireanu. 2012. Abstract Domains for Automated Reasoning about List-Manipulating Programs with Infinite Data. In VMCAI 2012. 1-22. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Martin Bravenboer, Karl Trygve Kalleberg, Rob Vermaas, and Eelco Visser. 2008. Stratego/XT 0.17. A language and toolset for program transformation. Sci. Comput. Program. 72, 1-2 (2008), 52-70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Giuseppe Castagna and Kim Nguyen. 2008. Typed iterators for XML. In ICFP 2008. 15-26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Bor-Yuh Evan Chang and Xavier Rival. 2008. Relational Inductive Shape Analysis. In POPL 2008. 247-260. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. James Chapman, Pierre-Évariste Dagand, Conor McBride, and Peter Morris. 2010. The gentle art of levitation. In ICFP 2010. 3-14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. James R. Cordy. 2006. The TXL source transformation language. Sci. Comput. Program. 61, 3 (2006), 190-210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Patrick Cousot. 2003. Verification by Abstract Interpretation. In Verification: Theory and Practice, Essays Dedicated to Zohar Manna on the Occasion of His 64th Birthday. 243-268.Google ScholarGoogle Scholar
  18. Patrick Cousot and Radhia Cousot. 1995. Formal Language, Grammar and Set-Constraint-Based Program Analysis by Abstract Interpretation. In FPCA 1995. 170-181. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Patrick Cousot and Radhia Cousot. 2002. Modular Static Program Analysis. In CC 2002. 159-178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jesús Sánchez Cuadrado, Esther Guerra, and Juan de Lara. 2017. Static Analysis of Model Transformations. IEEE Trans. Software Eng. 43, 9 (2017), 868-897.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. David Darais, Nicholas Labich, Phuc C. Nguyen, and David Van Horn. 2017. Abstracting definitional interpreters (functional pearl). PACMPL 1, ICFP (2017), 12:1-12:25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Emanuele De Angelis, Fabio Fioravanti, Alberto Pettorossi, and Maurizio Proietti. 2014. Program verification via iterated specialization. Sci. Comput. Program. 95 (2014), 149-175. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Nachum Dershowitz and Zohar Manna. 1979. Proving Termination with Multiset Orderings. Commun. ACM 22, 8 (1979), 465-476. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Timothy S. Freeman and Frank Pfenning. 1991. Refinement Types for ML. In PLDI 1991. 268-277. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Nicolas Halbwachs and Mathias Péron. 2008. Discovering properties about arrays in simple programs. In PLDI 2008. 339-348. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. John Harrison. 2009. Handbook of Practical Logic and Automated Reasoning. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. David Van Horn and Matthew Might. 2010. Abstracting abstract machines. In Proceeding of the 15th ACM SIGPLAN international conference on Functional programming, ICFP 2010, Baltimore, Maryland, USA, September 27-29, 2010, Paul Hudak and Stephanie Weirich (Eds.). ACM, 51-62. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. 1993. Partial evaluation and automatic program generation. Prentice Hall. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Paul Klint, Tijs van der Storm, and Jurgen Vinju. 2011. EASY Metaprogramming with Rascal. In GTTSE III, João M. Fernandes, Ralf Lämmel, Joost Visser, and João Saraiva (Eds.). 222-289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Alexei P. Lisitsa and Andrei P. Nemytykh. 2015. Finite Countermodel Based Verification for Program Transformation (A Case Study). In Proceedings of the Third International Workshop on Verification and Program Transformation, [email protected] 2015, London, United Kingdom, 11th April 2015. (EPTCS), Alexei Lisitsa, Andrei P. Nemytykh, and Alberto Pettorossi (Eds.), Vol. 199. 15-32.Google ScholarGoogle Scholar
  31. Jiangchao Liu and Xavier Rival. 2017. An array content static analysis based on non-contiguous partitions. Computer Languages, Systems & Structures 47 (2017), 104-129.Google ScholarGoogle ScholarCross RefCross Ref
  32. Neil Mitchell and Colin Runciman. 2007. Uniform boilerplate and list processing. In Haskell 2007, Freiburg, Germany. 49-60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Alan Mycroft and Neil D. Jones. 1985. A relational framework for abstract interpretation. In Programs as Data Objects. 156-171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Valentin Perrelle and Nicolas Halbwachs. 2010. An Analysis of Permutations in Arrays. In VMCAI 2010. 279-294. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Tuan-Hung Pham and Michael W. Whalen. 2013. An Improved Unrolling-Based Decision Procedure for Algebraic Data Types. In VSTTE 2013. 129-148. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Andrew Reynolds and Viktor Kuncak. 2015. Induction for SMT Solvers. In VMCAI 2015. 80-98. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Xavier Rival and Laurent Mauborgne. 2007. The trace partitioning abstract domain. ACM Trans. Program. Lang. Syst. 29, 5 (2007), 26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Xavier Rival, Antoine Toubhans, and Bor-Yuh Evan Chang. 2014. Construction of Abstract Domains for Heterogeneous Properties. In ISoLA 2014. 489-492.Google ScholarGoogle Scholar
  39. Mads Rosendahl. 2013. Abstract Interpretation as a Programming Language. In Semantics, Abstract Interpretation, and Reasoning about Programs: Essays Dedicated to David A. Schmidt on the Occasion of his Sixtieth Birthday. 84-104.Google ScholarGoogle Scholar
  40. John M. Rushby, Sam Owre, and Natarajan Shankar. 1998. Subtypes for Specifications: Predicate Subtyping in PVS. IEEE Trans. Software Eng. 24, 9 (1998), 709-720. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. David A. Schmidt. 1998. Trace-Based Abstract Interpretation of Operational Semantics. Lisp and Symbolic Computation 10, 3 (1998), 237-271. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Dana S. Scott. 1976. Data Types as Lattices. SIAM J. Comput. 5, 3 (1976), 522-587.Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Peter Sestoft and Niels Hallenberg. 2017. Programming language concepts. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Anthony M. Sloane. 2011. Lightweight Language Processing in Kiama. In GTTSE III, JoãoM. Fernandes, Ralf Lämmel, Joost Visser, and João Saraiva (Eds.). Lecture Notes in Computer Science, Vol. 6491. Springer Berlin Heidelberg, 408-425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Michael B. Smyth and Gordon D. Plotkin. 1982. The Category-Theoretic Solution of Recursive Domain Equations. SIAM J. Comput. 11, 4 (1982), 761-783.Google ScholarGoogle ScholarCross RefCross Ref
  46. Morten Heine Sørensen, Robert Glück, and Neil D. Jones. 1996. A Positive Supercompiler. J. Funct. Program. 6, 6 (1996), 811-838.Google ScholarGoogle ScholarCross RefCross Ref
  47. Philippe Suter, Mirco Dotta, and Viktor Kuncak. 2010. Decision procedures for algebraic data types with abstractions. In POPL 2010, Manuel V. Hermenegildo and Jens Palsberg (Eds.). ACM, 199-210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Antoine Toubhans, Bor-Yuh Evan Chang, and Xavier Rival. 2013. Reduced Product Combination of Abstract Domains for Shapes. In VMCAI 2013. 375-395. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Niki Vazou, Patrick Maxim Rondon, and Ranjit Jhala. 2013. Abstract Refinement Types. In ESOP 2013. 209-228. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Glynn Winskel. 1993. Information Systems. MIT Press, Chapter 12.Google ScholarGoogle Scholar
  51. Niklaus Wirth. 1996. Compiler Construction. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Hongwei Xi and Frank Pfenning. 1998. Eliminating Array Bound Checking Through Dependent Types. In PLDI 1998. 249-257. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Verification of high-level transformations with inductive refinement types

                    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 53, Issue 9
                      GPCE '18
                      September 2018
                      214 pages
                      ISSN:0362-1340
                      EISSN:1558-1160
                      DOI:10.1145/3393934
                      Issue’s Table of Contents
                      • cover image ACM Conferences
                        GPCE 2018: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
                        November 2018
                        214 pages
                        ISBN:9781450360456
                        DOI:10.1145/3278122

                      Copyright © 2018 ACM

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 7 April 2020

                      Check for updates

                      Qualifiers

                      • 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!