• DocumentCode
    2587562
  • Title

    Discern: Towards the Automatic Discovery of Software Contracts

  • Author

    Feldman, Yishai A. ; Gendler, Leon

  • Author_Institution
    Efi Arazi Sch. of Comput. Sci., Interdisciplinary Center, Herzliya
  • fYear
    2006
  • fDate
    11-15 Sept. 2006
  • Firstpage
    90
  • Lastpage
    99
  • Abstract
    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
  • Keywords
    Java; formal specification; software libraries; Discern; Java; StringBuffer; Vector class; design by contract; language libraries; software contracts; Computer errors; Computer science; Contracts; Data mining; Information analysis; Investments; Libraries; Null value; Programming profession; Writing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering and Formal Methods, 2006. SEFM 2006. Fourth IEEE International Conference on
  • Conference_Location
    Pune
  • Print_ISBN
    0-7695-2678-0
  • Type

    conf

  • DOI
    10.1109/SEFM.2006.16
  • Filename
    1698726