Gradual Program Verification

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10747)


Both static and dynamic program verification approaches have significant disadvantages when considered in isolation. Inspired by research on gradual typing, we propose gradual verification to seamlessly and flexibly combine static and dynamic verification. Drawing on general principles from abstract interpretation, and in particular on the recent Abstracting Gradual Typing methodology of Garcia et al., we systematically derive a gradual verification system from a static one. This approach yields, by construction, a gradual verification system that is compatible with the original static system, but overcomes its rigidity by resorting to dynamic verification when desired. As with gradual typing, the programmer can control the trade-off between static and dynamic checking by tuning the (im)precision of pre- and postconditions. The formal semantics of the gradual verification system and the proofs of its properties, including the gradual guarantees of Siek et al., have been fully mechanized in the Coq proof assistant.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Arlt, S., Rubio-González, C., Rümmer, P., Schäf, M., Shankar, N.: The gradual verifier. In: Badger, J.M., Rozier, K.Y. (eds.) NFM 2014. LNCS, vol. 8430, pp. 313–327. Springer, Cham (2014). CrossRefGoogle Scholar
  2. 2.
    Burdy, L., Cheon, Y., Cok, D.R., Ernst, M.D., Kiniry, J.R., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of jml tools and applications. International Journal on Software Tools for Technology Transfer 7(3), 212–232 (2005). CrossRefGoogle Scholar
  3. 3.
    Cheon, Y., Leavens, G.T.: A runtime assertion checker for the java modeling language (jml) (2002)Google Scholar
  4. 4.
    Dijkstra, E.W.: Guarded commands, nondeterminacy and formal derivation of programs. Commun. ACM 18(8), 453–457 (1975). MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Fahndrich, M., Barnett, M., Logozzo, F.: Embedded contract languages. In: ACM SAC - OOPS. Association for Computing Machinery, Inc., March 2010.
  6. 6.
    Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: Proceedings of the 7th ACM SIGPLAN Conference on Functional Programming (ICFP 2002), Pittsburgh, PA, USA, pp. 48–59, September 2002Google Scholar
  7. 7.
    Garcia, R., Clark, A.M., Tanter, E.: Abstracting gradual typing. In: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2016, pp. 429–442. ACM, New York (2016).
  8. 8.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)CrossRefzbMATHGoogle Scholar
  9. 9.
    Lehmann, N., Tanter, É.: Gradual refinement types. In: Proceedings of the 44th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2017), Paris, France, pp. 775–788, January 2017Google Scholar
  10. 10.
    Leino, K.R.M., Müller, P., Smans, J.: Verification of concurrent programs with chalice. In: Aldini, A., Barthe, G., Gorrieri, R. (eds.) FOSAD 2007-2009. LNCS, vol. 5705, pp. 195–222. Springer, Heidelberg (2009). CrossRefGoogle Scholar
  11. 11.
    Meyer, B.: Eiffel: A language and environment for software engineering. Journal of Systems and Software 8(3), 199–246 (1988)CrossRefGoogle Scholar
  12. 12.
    Meyer, B.: Object-Oriented Software Construction. Prentice Hall (1988)Google Scholar
  13. 13.
    Nanevski, A., Morrisset, G., Birkedal, L.: Hoare type theory, polymorphism and separation. Journal of Functional Programming 5–6, 865–911 (2008)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Nguyen, H.H., Kuncak, V., Chin, W.-N.: Runtime checking for separation logic. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds.) VMCAI 2008. LNCS, vol. 4905, pp. 203–217. Springer, Heidelberg (2008). CrossRefGoogle Scholar
  15. 15.
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proceedings of 17th Annual IEEE Symposium on Logic in Computer Science 2002, pp. 55–74. IEEE (2002)Google Scholar
  16. 16.
    Sergey, I., Clarke, D.: Gradual ownership types. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 579–599. Springer, Heidelberg (2012). CrossRefGoogle Scholar
  17. 17.
    Siek, J., Taha, W.: Gradual typing for objects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 2–27. Springer, Heidelberg (2007). CrossRefGoogle Scholar
  18. 18.
    Siek, J.G., Taha, W.: Gradual typing for functional languages. In: Scheme and Functional Programming Workshop, vol. 6, pp. 81–92 (2006)Google Scholar
  19. 19.
    Siek, J.G., Vitousek, M.M., Cimini, M., Boyland, J.T.: Refined criteria for gradual typing. In: LIPIcs-Leibniz International Proceedings in Informatics, vol. 32. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2015)Google Scholar
  20. 20.
    Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames: combining dynamic frames and separation logic. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 148–172. Springer, Heidelberg (2009). CrossRefGoogle Scholar
  21. 21.
    Wolff, R., Garcia, R., Tanter, É., Aldrich, J.: Gradual typestate. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 459–483. Springer, Heidelberg (2011). CrossRefGoogle Scholar
  22. 22.
    Wright, A., Felleisen, M.: A syntactic approach to type soundness. Inf. Comput. 115(1), 38–94 (1994). MathSciNetCrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing AG 2018

Authors and Affiliations

  1. 1.Microsoft CorporationRedmondUSA
  2. 2.Institute for Software ResearchCarnegie Mellon UniversityPittsburghUSA
  3. 3.PLEIAD Laboratory, Computer Science Department (DCC)University of ChileSantiagoChile

Personalised recommendations