Learning-based extraction of first-order logic representations of API directives
Developers often rely on API documentation to learn API directives, i.e., constraints and guidelines related to API usage. Failing to follow API directives may cause defects or improper implementations. Since there are no industry-wide standards on how to document API directives, they take many form...
Saved in:
Main Authors: | , , , , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2021
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/8902 https://ink.library.smu.edu.sg/context/sis_research/article/9905/viewcontent/fse21a.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-9905 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-99052024-06-27T08:16:22Z Learning-based extraction of first-order logic representations of API directives LIU, Mingwei PENG, Xin MARCUS, Andrian TREUDE, Christoph BAI, Xuefang LYU, Gang XIE, Jiazhen ZHANG, Xiaoxin Developers often rely on API documentation to learn API directives, i.e., constraints and guidelines related to API usage. Failing to follow API directives may cause defects or improper implementations. Since there are no industry-wide standards on how to document API directives, they take many forms and are often hard to understand by developers or challenging to parse with tools. In this paper, we propose a learning based approach for extracting first-order logic representations of API directives (FOL directives for short). The approach, called LeadFOL, uses a joint learning method to extract atomic formulas by identifying the predicates and arguments involved in directive sentences, and recognizes the logical relations between atomic formulas, by parsing the sentence structures. It then parses the arguments and uses a learning based method to link API references to their corresponding API elements. Finally, it groups the formulas of the same class or method together and transforms them into conjunctive normal form. Our evaluation shows that LeadFOL can accurately extract more FOL directives than a state-of-the-art approach and that the extracted FOL directives are useful in supporting code reviews. 2021-08-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8902 info:doi/10.1145/3468264.3468618 https://ink.library.smu.edu.sg/context/sis_research/article/9905/viewcontent/fse21a.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University API Documentation Directive First Order Logic Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
API Documentation Directive First Order Logic Software Engineering |
spellingShingle |
API Documentation Directive First Order Logic Software Engineering LIU, Mingwei PENG, Xin MARCUS, Andrian TREUDE, Christoph BAI, Xuefang LYU, Gang XIE, Jiazhen ZHANG, Xiaoxin Learning-based extraction of first-order logic representations of API directives |
description |
Developers often rely on API documentation to learn API directives, i.e., constraints and guidelines related to API usage. Failing to follow API directives may cause defects or improper implementations. Since there are no industry-wide standards on how to document API directives, they take many forms and are often hard to understand by developers or challenging to parse with tools. In this paper, we propose a learning based approach for extracting first-order logic representations of API directives (FOL directives for short). The approach, called LeadFOL, uses a joint learning method to extract atomic formulas by identifying the predicates and arguments involved in directive sentences, and recognizes the logical relations between atomic formulas, by parsing the sentence structures. It then parses the arguments and uses a learning based method to link API references to their corresponding API elements. Finally, it groups the formulas of the same class or method together and transforms them into conjunctive normal form. Our evaluation shows that LeadFOL can accurately extract more FOL directives than a state-of-the-art approach and that the extracted FOL directives are useful in supporting code reviews. |
format |
text |
author |
LIU, Mingwei PENG, Xin MARCUS, Andrian TREUDE, Christoph BAI, Xuefang LYU, Gang XIE, Jiazhen ZHANG, Xiaoxin |
author_facet |
LIU, Mingwei PENG, Xin MARCUS, Andrian TREUDE, Christoph BAI, Xuefang LYU, Gang XIE, Jiazhen ZHANG, Xiaoxin |
author_sort |
LIU, Mingwei |
title |
Learning-based extraction of first-order logic representations of API directives |
title_short |
Learning-based extraction of first-order logic representations of API directives |
title_full |
Learning-based extraction of first-order logic representations of API directives |
title_fullStr |
Learning-based extraction of first-order logic representations of API directives |
title_full_unstemmed |
Learning-based extraction of first-order logic representations of API directives |
title_sort |
learning-based extraction of first-order logic representations of api directives |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2021 |
url |
https://ink.library.smu.edu.sg/sis_research/8902 https://ink.library.smu.edu.sg/context/sis_research/article/9905/viewcontent/fse21a.pdf |
_version_ |
1814047626548477952 |