Cargando…

Compositional Mining of Multiple Object API Protocols through State Abstraction

API protocols specify correct sequences of method invocations. Despite their usefulness, API protocols are often unavailable in practice because writing them is cumbersome and error prone. Multiple object API protocols are more expressive than single object API protocols. However, the huge number of...

Descripción completa

Detalles Bibliográficos
Autores principales: Dai, Ziying, Mao, Xiaoguang, Lei, Yan, Qi, Yuhua, Wang, Rui, Gu, Bin
Formato: Online Artículo Texto
Lenguaje:English
Publicado: Hindawi Publishing Corporation 2013
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3690388/
https://www.ncbi.nlm.nih.gov/pubmed/23844378
http://dx.doi.org/10.1155/2013/171647
_version_ 1782274375445118976
author Dai, Ziying
Mao, Xiaoguang
Lei, Yan
Qi, Yuhua
Wang, Rui
Gu, Bin
author_facet Dai, Ziying
Mao, Xiaoguang
Lei, Yan
Qi, Yuhua
Wang, Rui
Gu, Bin
author_sort Dai, Ziying
collection PubMed
description API protocols specify correct sequences of method invocations. Despite their usefulness, API protocols are often unavailable in practice because writing them is cumbersome and error prone. Multiple object API protocols are more expressive than single object API protocols. However, the huge number of objects of typical object-oriented programs poses a major challenge to the automatic mining of multiple object API protocols: besides maintaining scalability, it is important to capture various object interactions. Current approaches utilize various heuristics to focus on small sets of methods. In this paper, we present a general, scalable, multiple object API protocols mining approach that can capture all object interactions. Our approach uses abstract field values to label object states during the mining process. We first mine single object typestates as finite state automata whose transitions are annotated with states of interacting objects before and after the execution of the corresponding method and then construct multiple object API protocols by composing these annotated single object typestates. We implement our approach for Java and evaluate it through a series of experiments.
format Online
Article
Text
id pubmed-3690388
institution National Center for Biotechnology Information
language English
publishDate 2013
publisher Hindawi Publishing Corporation
record_format MEDLINE/PubMed
spelling pubmed-36903882013-07-09 Compositional Mining of Multiple Object API Protocols through State Abstraction Dai, Ziying Mao, Xiaoguang Lei, Yan Qi, Yuhua Wang, Rui Gu, Bin ScientificWorldJournal Research Article API protocols specify correct sequences of method invocations. Despite their usefulness, API protocols are often unavailable in practice because writing them is cumbersome and error prone. Multiple object API protocols are more expressive than single object API protocols. However, the huge number of objects of typical object-oriented programs poses a major challenge to the automatic mining of multiple object API protocols: besides maintaining scalability, it is important to capture various object interactions. Current approaches utilize various heuristics to focus on small sets of methods. In this paper, we present a general, scalable, multiple object API protocols mining approach that can capture all object interactions. Our approach uses abstract field values to label object states during the mining process. We first mine single object typestates as finite state automata whose transitions are annotated with states of interacting objects before and after the execution of the corresponding method and then construct multiple object API protocols by composing these annotated single object typestates. We implement our approach for Java and evaluate it through a series of experiments. Hindawi Publishing Corporation 2013-06-03 /pmc/articles/PMC3690388/ /pubmed/23844378 http://dx.doi.org/10.1155/2013/171647 Text en Copyright © 2013 Ziying Dai et al. https://creativecommons.org/licenses/by/3.0/ This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
spellingShingle Research Article
Dai, Ziying
Mao, Xiaoguang
Lei, Yan
Qi, Yuhua
Wang, Rui
Gu, Bin
Compositional Mining of Multiple Object API Protocols through State Abstraction
title Compositional Mining of Multiple Object API Protocols through State Abstraction
title_full Compositional Mining of Multiple Object API Protocols through State Abstraction
title_fullStr Compositional Mining of Multiple Object API Protocols through State Abstraction
title_full_unstemmed Compositional Mining of Multiple Object API Protocols through State Abstraction
title_short Compositional Mining of Multiple Object API Protocols through State Abstraction
title_sort compositional mining of multiple object api protocols through state abstraction
topic Research Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3690388/
https://www.ncbi.nlm.nih.gov/pubmed/23844378
http://dx.doi.org/10.1155/2013/171647
work_keys_str_mv AT daiziying compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT maoxiaoguang compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT leiyan compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT qiyuhua compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT wangrui compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT gubin compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction