TY - JOUR
T1 - Automatic Loop Summarization via Path Dependency Analysis
AU - Xie, Xiaofei
AU - Chen, Bihuan
AU - Zou, Liang
AU - Liu, Yang
AU - Le, Wei
AU - Li, Xiaohong
N1 - Funding Information:
This research is supported in part by the National Research Foundation, Singapore under its National Cybersecurity R&D Program (Award No. NRF2014, NCR-NCR001-30, No. M4192001.022.601001), by the National Science Foundation of China (No. 61572349, 61272106), by the National Natural Science Foundation of China under Grant (No. 61370079), by the National Natural Science Foundation of China (NSFC-61732001) and by the US National Science Foundation (NSF) under Award 1542117.
Publisher Copyright:
© 1976-2012 IEEE.
PY - 2019/6/1
Y1 - 2019/6/1
N2 - Analyzing loops is very important for various software engineering tasks such as bug detection, test case generation and program optimization. However, loops are very challenging structures for program analysis, especially when (nested) loops contain multiple paths that have complex interleaving relationships. In this paper, we propose the path dependency automaton (PDA) to capture the dependencies among the multiple paths in a loop. Based on the PDA, we first propose a loop classification to understand the complexity of loop summarization. Then, we propose a loop analysis framework, named Proteus, which takes a loop program and a set of variables of interest as inputs and summarizes path-sensitive loop effects (i.e., disjunctive loop summary) on the variables of interest. An algorithm is proposed to traverse the PDA to summarize the effect for all possible executions in the loop. We have evaluated Proteus using loops from five open-source projects and two well-known benchmarks and applying the disjunctive loop summary to three applications: loop bound analysis, program verification and test case generation. The evaluation results have demonstrated that Proteus can compute a more precise bound than the existing loop bound analysis techniques; Proteus can significantly outperform the state-of-the-art tools for loop program verification; and Proteus can help generate test cases for deep loops within one second, while symbolic execution tools KLEE and Pex either need much more time or fail.
AB - Analyzing loops is very important for various software engineering tasks such as bug detection, test case generation and program optimization. However, loops are very challenging structures for program analysis, especially when (nested) loops contain multiple paths that have complex interleaving relationships. In this paper, we propose the path dependency automaton (PDA) to capture the dependencies among the multiple paths in a loop. Based on the PDA, we first propose a loop classification to understand the complexity of loop summarization. Then, we propose a loop analysis framework, named Proteus, which takes a loop program and a set of variables of interest as inputs and summarizes path-sensitive loop effects (i.e., disjunctive loop summary) on the variables of interest. An algorithm is proposed to traverse the PDA to summarize the effect for all possible executions in the loop. We have evaluated Proteus using loops from five open-source projects and two well-known benchmarks and applying the disjunctive loop summary to three applications: loop bound analysis, program verification and test case generation. The evaluation results have demonstrated that Proteus can compute a more precise bound than the existing loop bound analysis techniques; Proteus can significantly outperform the state-of-the-art tools for loop program verification; and Proteus can help generate test cases for deep loops within one second, while symbolic execution tools KLEE and Pex either need much more time or fail.
UR - http://www.scopus.com/inward/record.url?scp=85040092215&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85040092215&partnerID=8YFLogxK
U2 - 10.1109/TSE.2017.2788018
DO - 10.1109/TSE.2017.2788018
M3 - Article
AN - SCOPUS:85040092215
SN - 0098-5589
VL - 45
SP - 537
EP - 557
JO - IEEE Transactions on Software Engineering
JF - IEEE Transactions on Software Engineering
IS - 6
M1 - 8241837
ER -