講演抄録/キーワード |
講演名 |
2014-05-09 09:30
Identifying Cross-Function Side Effects using Static Analysis ○Jiachen Yang・Keisuke Hotta・Yoshiki Higo・Shinji Kusumoto(Osaka Univ.) SS2014-5 |
抄録 |
(和) |
Side effects are modifications done to the state of the objects in Object-Oriented Programming languages such as Java. Side effects can happen across the boundary of the functions, therefore they are important properties that often be neglected by the documentations. In this paper, we studied the side effects of functions by using a static analysis method to automatically infer the state dependencies for the return value and side effects of functions. We also present a set of annotations to document these state dependencies. As a result, the annotations presented in this paper reveals well-defined state interactions between objects. These annotations can be used in further investigations by both programmers and tools. We have implemented the analysis method targeting Java bytecode and tested it on vary-sized open source Java software libraries. From our experimental results, we found that 25--33% of the functions in the evaluated open source Java libraries are pure functions, which indicates that a large percentage of the functions is suitable for high level refactoring. And we present a case study of equals and hashCode functions to show the importance of our method in real world programming tasks. |
(英) |
Side effects are modifications done to the state of the objects in Object-Oriented Programming languages such as Java. Side effects can happen across the boundary of the functions, therefore they are important properties that often be neglected by the documentations. In this paper, we studied the side effects of functions by using a static analysis method to automatically infer the state dependencies for the return value and side effects of functions. We also present a set of annotations to document these state dependencies. As a result, the annotations presented in this paper reveals well-defined state interactions between objects. These annotations can be used in further investigations by both programmers and tools. We have implemented the analysis method targeting Java bytecode and tested it on vary-sized open source Java software libraries. From our experimental results, we found that 25--33% of the functions in the evaluated open source Java libraries are pure functions, which indicates that a large percentage of the functions is suitable for high level refactoring. And we present a case study of equals and hashCode functions to show the importance of our method in real world programming tasks. |
キーワード |
(和) |
state boundary / state dependency / object-oriented / effect annotation / static analysis / / / |
(英) |
state boundary / state dependency / object-oriented / effect annotation / static analysis / / / |
文献情報 |
信学技報, vol. 114, no. 23, SS2014-5, pp. 25-30, 2014年5月. |
資料番号 |
SS2014-5 |
発行日 |
2014-05-01 (SS) |
ISSN |
Print edition: ISSN 0913-5685 Online edition: ISSN 2432-6380 |
著作権に ついて |
技術研究報告に掲載された論文の著作権は電子情報通信学会に帰属します.(許諾番号:10GA0019/12GB0052/13GB0056/17GB0034/18GB0034) |
査読に ついて |
本技術報告は査読を経ていない技術報告であり,推敲を加えられていずれかの場に発表されることがあります. |
PDFダウンロード |
SS2014-5 |