Contracts in Practice
Contracts in Practice
复制标题
实践中的合同
DOI:
--
复制
发表时间:
2012
期刊:
影响因子:
--
通讯作者:
B. Meyer
中科院分区:
文献类型:
--
作者:
H.;Carlo A. Furia;M. Nordio;M. Piccioni;B. Meyer
Contracts are a form of lightweight formal specification embedded in the program text. Being executable parts of the code, they encourage programmers to devote proper attention to specifications, and help maintain consistency between specification and implementation as the program evolves. The present study investigates how contracts are used in the practice of software development. Based on an extensive empirical analysis of 21 contract-equipped Eiffel, C#, and Java projects totaling more than 260 million lines of code over 7700 revisions, it explores, among other questions: 1 which kinds of contract elements preconditions, postconditions, class invariants are used more often; 2 how contracts evolve over time; 3 the relationship between implementation changes and contract changes; and 4 the role of inheritance in the process. It has found, among other results, that: the percentage of program elements that include contracts is above 33% for most projects and tends to be stable over time; there is no strong preference for a certain type of contract element; contracts are quite stable compared to implementations; and inheritance does not significantly affect qualitative trends of contract usage.
DOI:
10.1109/icstw.2010.31
发表时间:
2010-04
期刊:
2010 Third International Conference on Software Testing, Verification, and Validation Workshops
影响因子:
--
作者:
M. Harman;Sung Gon Kim;Kiran Lakhotia;Phil McMinn;S. Yoo
通讯作者:
M. Harman;Sung Gon Kim;Kiran Lakhotia;Phil McMinn;S. Yoo