• DocumentCode
    3141641
  • Title

    What good are strong specifications?

  • Author

    Polikarpova, Nadia ; Furia, Carlo A. ; Yu Pei ; Yi Wei ; Meyer, Bertrand

  • Author_Institution
    Dept. of Software Eng., ETH Zurich, Zurich, Switzerland
  • fYear
    2013
  • fDate
    18-26 May 2013
  • Firstpage
    262
  • Lastpage
    271
  • Abstract
    Experience with lightweight formal methods suggests that programmers are willing to write specification if it brings tangible benefits to their usual development activities. This paper considers stronger specifications and studies whether they can be deployed as an incremental practice that brings additional benefits without being unacceptably expensive. We introduce a methodology that extends Design by Contract to write strong specifications of functional properties in the form of preconditions, postconditions, and invariants. The methodology aims at being palatable to developers who are not fluent in formal techniques but are comfortable with writing simple specifications. We evaluate the cost and the benefits of using strong specifications by applying the methodology to testing data structure implementations written in Eiffel and C#. In our extensive experiments, testing against strong specifications detects twice as many bugs as standard contracts, with a reasonable overhead in terms of annotation burden and run-time performance while testing. In the wide spectrum of formal techniques for software quality, testing against strong specifications lies in a “sweet spot” with a favorable benefit to effort ratio.
  • Keywords
    C++ language; data structures; formal specification; program testing; software quality; C#; Eiffel; data structure testing; design by contract; development activities; functional property specification; lightweight formal method; software quality; specifications detect; Contracts; Indexes; Mathematical model; Software; Standards; Testing; Writing;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2013 35th International Conference on
  • Conference_Location
    San Francisco, CA
  • Print_ISBN
    978-1-4673-3073-2
  • Type

    conf

  • DOI
    10.1109/ICSE.2013.6606572
  • Filename
    6606572