Abstract

Contracts are used to specify the behavior of programs. These contracts can be verified statically, to prove that the program code is correct and the contracts are always satisfied, or they can be asserted during runtime. One programming language that offers support for contracts is Spec#. It implements an ownership model to ensure code correctness. Spec# tool support is limited to sscBoogie for static verification. CodeContracts is a project that aims to offer contracts for standard .Net, with a different specification language than Spec# and extended tool support. The goal of this thesis is to design an encoding for Spec# programs in C# and CodeContracts. With this, we are able to translate programs written in Spec# to CodeContracts compatible code, extended with ownership states and assertions that would be checked by sscBoogie, while preserving the programs semantic. For the translation, we use an extension of CodeContracts, that provides additional specification constructs, called CodeContracts++. These translated programs can then be analyzed and tested with tools that support CodeContracts, such as Pex for automatic test generation and Clousot for code analysis, that otherwise would not be available for Spec#.

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.