Two Controlled Experiments Concerning the Usefulness of Assertions as a Means for Programming

  • Authors:
  • Affiliations:
  • Venue:
  • ICSM '02 Proceedings of the International Conference on Software Maintenance (ICSM'02)
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Assertions, or more generally "Programming by contract",have gained widespread acceptance in the computer sciencecommunity as a means for correct program development.However, the literature lacks an empirical evaluationof the benefits a programmer gains by using assertionsin his software development. This paper reports two controlledexperiments that close this gap. Both experimentscompare "Programming by contract" to the traditional programmingstyle without assertions.The evaluation of the first experiment suggests that assertionsdecrease the programming effort for the extension ofexisting software, measured as time needed to finish thetask, while the programming effort slightly increases duringthe development of new code. The second experimentshows that the programming effort tended to be larger withassertions than without. In addition, it shows that the reliabilityof the written programs slightly increases with theusage of assertions compared to the programs written withoutassertions.