{"title":"关于断言作为编程手段的有效性的两个对照实验","authors":"Matthias M. Müller, R. Typke, Oliver Hagner","doi":"10.1109/ICSM.2002.1167755","DOIUrl":null,"url":null,"abstract":"Assertions, or more generally \"programming by contract\", have gained widespread acceptance in the computer science community as a means for correct program development. However the literature lacks an empirical evaluation of the benefits a programmer gains by using assertions in his software development. This paper reports two controlled experiments that close this gap. Both experiments compare \"programming by contract\" to the traditional programming style without assertions. The evaluation of the first experiment suggests that assertions decrease the programming effort for the extension of existing software, measured as time needed to finish the task, while the programming effort slightly increases during the development of new code. The second experiment shows that the programming effort tended to be larger with assertions than without. In addition, it shows that the reliability of the written programs slightly increases with the usage of assertions compared to the programs written without assertions.","PeriodicalId":385190,"journal":{"name":"International Conference on Software Maintenance, 2002. Proceedings.","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2002-10-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"20","resultStr":"{\"title\":\"Two controlled experiments concerning the usefulness of assertions as a means for programming\",\"authors\":\"Matthias M. Müller, R. Typke, Oliver Hagner\",\"doi\":\"10.1109/ICSM.2002.1167755\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Assertions, or more generally \\\"programming by contract\\\", have gained widespread acceptance in the computer science community as a means for correct program development. However the literature lacks an empirical evaluation of the benefits a programmer gains by using assertions in his software development. This paper reports two controlled experiments that close this gap. Both experiments compare \\\"programming by contract\\\" to the traditional programming style without assertions. The evaluation of the first experiment suggests that assertions decrease the programming effort for the extension of existing software, measured as time needed to finish the task, while the programming effort slightly increases during the development of new code. The second experiment shows that the programming effort tended to be larger with assertions than without. In addition, it shows that the reliability of the written programs slightly increases with the usage of assertions compared to the programs written without assertions.\",\"PeriodicalId\":385190,\"journal\":{\"name\":\"International Conference on Software Maintenance, 2002. Proceedings.\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2002-10-03\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"20\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"International Conference on Software Maintenance, 2002. Proceedings.\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICSM.2002.1167755\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Conference on Software Maintenance, 2002. Proceedings.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSM.2002.1167755","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Two controlled experiments concerning the usefulness of assertions as a means for programming
Assertions, or more generally "programming by contract", have gained widespread acceptance in the computer science community as a means for correct program development. However the literature lacks an empirical evaluation of the benefits a programmer gains by using assertions in his software development. This paper reports two controlled experiments that close this gap. Both experiments compare "programming by contract" to the traditional programming style without assertions. The evaluation of the first experiment suggests that assertions decrease the programming effort for the extension of existing software, measured as time needed to finish the task, while the programming effort slightly increases during the development of new code. The second experiment shows that the programming effort tended to be larger with assertions than without. In addition, it shows that the reliability of the written programs slightly increases with the usage of assertions compared to the programs written without assertions.