Abstract

Closures, first-class citizen procedures that are able to capture their lexical environment, increase the expressiveness of objectoriented languages such as C#, Scala, and various dynamic languages. However, closures make program specification and verification more difficult. For instance, a verification methodology must allow specifications to describe the behavior of one method relatively to the specification of another method passed as argument, and it must allow specifications to describe the behavior of a closure without exposing its captured state. This paper presents a modular specification and partial correctness verification methodology for closures. Our solution is based on first-order logic and, thus, well suited for automatic verification with SMT solvers. We present an encoding of our methodology in the Boogie program verifier. Using this encoding, we have verified a series of interesting examples that cover the main applications of closures such as delegation patterns and even the creation of custom control flow.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call