loading...
Discern: Towards the Automatic Discovery of Software Contracts
Pune, India September 11-September 15
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/SEFM.2006.16Fourth IEEE International Conference ...
 This Article 
 
PDF
HTML
 
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Yishai A. Feldman, The Interdisciplinary Center, Israel
Leon Gendler, Tel Aviv University, Israel
Design by contract is a practical methodology for evolving code together with its specification; it helps prevent many errors, and catch others close to their sources. Unfortunately, writing (and maintaining) contracts requires a non-trivial investment of time and effort. We are developing a tool, called Discern, to statically analyze existing programs and discover draft contracts for them. Discern works by propagating weakest preconditions and strongest postconditions through the code. Known pre- and postconditions of operations used in the code help refine the contract; conversely, new assertions discovered can be propagated to clients of the method being analyzed. As usual, loops make the analysis difficult; heuristics are used to recognize the most common loop forms and extract useful information about them.

Discern uses a library containing specifications of the most-used language libraries. With the manual addition of one postcondition and tagging of 3 assertions as invariants, Discern computed the correct preconditions for all but one method of Java?s Vector class, and similar results were obtained for StringBuffer.

Citation:
Yishai A. Feldman, Leon Gendler, "Discern: Towards the Automatic Discovery of Software Contracts," sefm, pp.90-99, Fourth IEEE International Conference on Software Engineering and Formal Methods (SEFM'06), 2006
Usage of this product signifies your acceptance of the Terms of Use.