Automatically Identifying Calling-Prone Higher-Order Functions of Scala Programs to Assist Testers
Automatically Identifying Calling-Prone Higher-Order Functions of Scala Programs to Assist Testers
复制标题
自动识别 Scala 程序中容易调用的高阶函数以协助测试人员
DOI:
10.1007/s11390-020-0526-y
复制
发表时间:
2020-11
影响因子:
0.7
通讯作者:
Xuan Ji-Feng
中科院分区:
文献类型:
--
作者:
Xu Yi-Sen;Jia Xiang-Yang;Wu Fan;Li Lingbo;Xuan Ji-Feng
For the rapid development of internetware, functional programming languages, such as Haskell and Scala, can be used to implement complex domain-specific applications. In functional programming languages, a higher-order function is a function that takes functions as parameters or returns a function. Using higher-order functions in programs can increase the generality and reduce the redundancy of source code. To test a higher-order function, a tester needs to check the requirements and write another function as the test input. However, due to the complex structure of higher-order functions, testing higher-order functions is a time-consuming and labor-intensive task. Testers have to spend an amount of manual effort in testing all higher-order functions. Such testing is infeasible if the time budget is limited, such as a period before a project release. In practice, not every higher-order function is actually called. We refer to higher-order functions that are about to be called as calling-prone ones. Calling-prone higher-order functions should be tested first. In this paper, we propose an automatic approach, namely Phof, which predicts whether a higher-order function of Scala programs will be called in the future, i.e., identifying calling-prone higher-order functions. Our approach can assist testers to reduce the number of higher-order functions of Scala programs under test. In Phof, we extracted 24 features from source code and logs to train a predictive model based on known higher-order function calls. We empirically evaluated our approach on 4 832 higher-order functions from 27 real-world Scala projects. Experimental results show that Phofbased on the random forest algorithm and the Synthetic Minority Oversampling Technique Processing strategy (SMOTE) performs well in the prediction of calls of higher-order functions. Our work can be used to support the scheduling of limited test resources.
登录
查看更多内容
影响因子:
2.5
作者:
E. Ziegel
通讯作者:
E. Ziegel
DOI:
10.1016/j.jlamp.2017.09.002
发表时间:
2017-12
期刊:
J. Log. Algebraic Methods Program.
影响因子:
--
作者:
Vlad Rusu;Andrei Arusoaie
通讯作者:
Vlad Rusu;Andrei Arusoaie
DOI:
10.1145/3241653.3241661
发表时间:
2018-09
期刊:
Proceedings of the 9th ACM SIGPLAN International Symposium on Scala
影响因子:
--
作者:
Olof Karlsson;Philipp Haller
通讯作者:
Olof Karlsson;Philipp Haller
DOI:
--
发表时间:
1992-10
期刊:
--
影响因子:
--
作者:
J. R. Quinlan
通讯作者:
J. R. Quinlan
DOI:
10.1145/3361242.3361256
发表时间:
2019-10
期刊:
Proceedings of the 11th Asia-Pacific Symposium on Internetware
影响因子:
--
作者:
Yisen Xu;Xiangyang Jia;J. Xuan
通讯作者:
Yisen Xu;Xiangyang Jia;J. Xuan