arrow
返回

API documentation with executable examples

delete2003-05-01
delete18
PRE
AI
D
Daniel Hoffman *
P
Paul Strooper
DOI:10.1016/S0164-1212(02)00055-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

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总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.4K
被引数:
8.4K

机构

暂无机构信息
引用论文

引用论文

err分享
err收藏
The relationship between self-presentation styles and coping with social stress
err2004-03-01
err0
PREAI
errKarl-heinz Renner; Lothar Laux; Astrid Schütz; James T. Tedeschi
err分享
err收藏
err分享
err收藏
Enhancement of hydrogenation kinetics and thermodynamic properties of ZrCo1−xCrx (x = 0−0.1) alloys for hydrogen storage*
err2020-08-01
err0
PREAI
errLinling Luo; Xiaoqiu Ye; Guanghui Zhang; Huaqin Kou; Renjin Xiong; Ge Sang; Ronghai Yu; Dongliang Zhao
err分享
err收藏
The ARF Tumor Suppressor Regulates Bone Remodeling and Osteosarcoma Development in Mice
err2010-12-30
err0
errOAAI
errDaniel A. Rauch; Michelle A. Hurchla; John C. Harding; Hongju Deng; Lauren K. Shea; Mark C. Eagleton; Stefan Niewiesk; Michael D. Lairmore; David Piwnica-Worms; Thomas J. Rosol; Jason D. Weber; Lee Ratner; Katherine N. Weilbaecher
err分享
err收藏
EXPERIENCES WITH CLUSTER AND CLASS TESTING
err1994-09-01
err21
errOAAI
errMURPHY, GC; TOWNSEND, P; WONG, PS
err分享
err收藏
学者 查看更多内容