TY - GEN
T1 - Inferring method specifications from natural language API descriptions
AU - Pandita, Rahul
AU - Xiao, Xusheng
AU - Zhong, Hao
AU - Xie, Tao
AU - Oney, Stephen
AU - Paradkar, Amit
PY - 2012
Y1 - 2012
N2 - Application Programming Interface (API) documents are a typical way of describing legal usage of reusable software libraries, thus facilitating software reuse. However, even with such documents, developers often overlook some documents and build software systems that are inconsistent with the legal usage of those libraries. Existing software verification tools require formal specifications (such as code contracts), and therefore cannot directly verify the legal usage described in natural language text in API documents against code using that library. However, in practice, most libraries do not come with formal specifications, thus hindering tool-based verification. To address this issue, we propose a novel approach to infer formal specifications from natural language text of API documents. Our evaluation results show that our approach achieves an average of 92% precision and 93% recall in identifying sentences that describe code contracts from more than 2500 sentences of API documents. Furthermore, our results show that our approach has an average 83% accuracy in inferring specifications from over 1600 sentences describing code contracts.
AB - Application Programming Interface (API) documents are a typical way of describing legal usage of reusable software libraries, thus facilitating software reuse. However, even with such documents, developers often overlook some documents and build software systems that are inconsistent with the legal usage of those libraries. Existing software verification tools require formal specifications (such as code contracts), and therefore cannot directly verify the legal usage described in natural language text in API documents against code using that library. However, in practice, most libraries do not come with formal specifications, thus hindering tool-based verification. To address this issue, we propose a novel approach to infer formal specifications from natural language text of API documents. Our evaluation results show that our approach achieves an average of 92% precision and 93% recall in identifying sentences that describe code contracts from more than 2500 sentences of API documents. Furthermore, our results show that our approach has an average 83% accuracy in inferring specifications from over 1600 sentences describing code contracts.
UR - http://www.scopus.com/inward/record.url?scp=84864270587&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84864270587&partnerID=8YFLogxK
U2 - 10.1109/ICSE.2012.6227137
DO - 10.1109/ICSE.2012.6227137
M3 - Conference contribution
AN - SCOPUS:84864270587
SN - 9781467310673
T3 - Proceedings - International Conference on Software Engineering
SP - 815
EP - 825
BT - Proceedings - 34th International Conference on Software Engineering, ICSE 2012
T2 - 34th International Conference on Software Engineering, ICSE 2012
Y2 - 2 June 2012 through 9 June 2012
ER -