返回
API documentation with executable examples
DOI:10.1016/S0164-1212(02)00055-9.png)
摘要
En 中文
The rise of component-based software development has created an urgent need for effective application program interface (API) documentation. Experience has shown that it is hard to create precise and readable documentation. Prose documentation can provide a good overview but lacks precision. Formal methods offer precision but the resulting documentation is expensive to develop. Worse, few developers have the skill or inclination to read formal documentation. We present a pragmatic solution to the problem of API documentation. We augment the prose documentation with executable test cases, including expected outputs, and use the prose plus the test cases as the documentation. With appropriate tool support, the test cases are easy to develop and read. Such test cases constitute a completely formal, albeit partial, specification of input/output behavior. Equally important, consistency between code and documentation is demonstrated by running the test cases. This approach provides an attractive bridge between formal and informal documentation. We also present a tool that supports compact and readable test cases; and generation of test drivers and documentation, and illustrate the approach with detailed case studies. (C) 2002 Elsevier Science Inc. All rights reserved.
Keyword:
FORMAL SPECIFICATION
AI总结
对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。
期刊
IF:
4.1
论文数:
5.4K
被引数:
8.4K
机构
暂无机构信息
引用论文
Evaluation of different target genes for the detection of
Salmonella
sp. by loop‐mediated isothermal amplification通过环介导等温扩增技术检测Salmonella不同目标基因的评价
Single-Gender “Innovations”: Can Publicly Funded Single-Gender School Choice Options Be Constitutionally Justified?单一性别“创新”:公共资助的单一性别学校选择方案能否得到宪法上的正当性辩护?

