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...

Full description

Saved in:
Bibliographic Details
Main Authors: Ziying Dai, Xiaoguang Mao, Yan Lei, Yuhua Qi, Rui Wang, Bin Gu
Format: Article
Language:English
Published: Wiley 2013-01-01
Series:The Scientific World Journal
Online Access:http://dx.doi.org/10.1155/2013/171647
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850218508118392832
author Ziying Dai
Xiaoguang Mao
Yan Lei
Yuhua Qi
Rui Wang
Bin Gu
author_facet Ziying Dai
Xiaoguang Mao
Yan Lei
Yuhua Qi
Rui Wang
Bin Gu
author_sort Ziying Dai
collection DOAJ
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 Article
id doaj-art-36d952bbf29b4ec09998df3257153d43
institution OA Journals
issn 1537-744X
language English
publishDate 2013-01-01
publisher Wiley
record_format Article
series The Scientific World Journal
spelling doaj-art-36d952bbf29b4ec09998df3257153d432025-08-20T02:07:41ZengWileyThe Scientific World Journal1537-744X2013-01-01201310.1155/2013/171647171647Compositional Mining of Multiple Object API Protocols through State AbstractionZiying Dai0Xiaoguang Mao1Yan Lei2Yuhua Qi3Rui Wang4Bin Gu5School of Computer, National University of Defense Technology, Changsha 410073, ChinaSchool of Computer, National University of Defense Technology, Changsha 410073, ChinaSchool of Computer, National University of Defense Technology, Changsha 410073, ChinaSchool of Computer, National University of Defense Technology, Changsha 410073, ChinaSchool of Computer, National University of Defense Technology, Changsha 410073, ChinaBeijing Institute of Control Engineering, Beijing 100190, ChinaAPI 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.http://dx.doi.org/10.1155/2013/171647
spellingShingle Ziying Dai
Xiaoguang Mao
Yan Lei
Yuhua Qi
Rui Wang
Bin Gu
Compositional Mining of Multiple Object API Protocols through State Abstraction
The Scientific World Journal
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
url http://dx.doi.org/10.1155/2013/171647
work_keys_str_mv AT ziyingdai compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT xiaoguangmao compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT yanlei compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT yuhuaqi compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT ruiwang compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction
AT bingu compositionalminingofmultipleobjectapiprotocolsthroughstateabstraction