Automatically Identifying Calling-Prone Higher-Order Functions of Scala Programs to Assist Testers

来源 :计算机科学技术学报(英文版) | 被引量 : 0次 | 上传用户:snelgar
下载到本地 , 更方便阅读
声明 : 本文档内容版权归属内容提供方 , 如果您对本文有版权争议 , 可与客服联系进行内容授权或下架
论文部分内容阅读
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 4832 higher-order functions from 27 real-world Scala projects. Experimental results show that PHOF based 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.
其他文献
Collaborative text editing systems allow multiple users to concurrently edit the same document, which can be modeled by a replicated list object. In the literat
细节及纹理丰富的图像有很大一部分能量集中在中、高频。本文设计的压缩算法采用更为精细的小波包分解来替代Mallat分解,通过精心设计的能量判别准则选取最优小波树,保存图像中
会议
由于角点具有平移、旋转不变性质,使得基于角点这类特殊图像特征的图像匹配方法应用广泛。本文介绍了几种常见的基于角点特征的图像匹配方法,并对这些方法的优缺点及其现有的改
本文介绍了指纹图像二值化的基本方法,并对二维直方图均衡化处理指纹图像二值化方法进行了研究,利用二维直方图均衡化方法进行指纹图像的二值处理,实验表明该方法实现简单,转变为
山杏是营造生态林、经济林的兼用树种,在退耕还林工程中很受群众欢迎。但由于夏季干旱.加之害虫危害严重,给造林带来很大困难,造林成活率低,通过总结群众的经 Prunus armeni
在实现雷达测量数据的进一步应用之前杂波识别和滤除是一个重要的问题。本文描述了一种使用模糊逻辑概念在时域识别杂波的算法。算法主要选取了以下几个特征量:反射率因子的纹
会议
按照信号仿真的思路,在分析了某雷达仿真系统的信号处理过程和电子对抗机理的基础上,提出雷达训练模拟器仿真子系统的体系结构,设计并实现了脉冲信号及其干扰仿真模块,内容包括雷
会议
针对声纳水下接收处理模块的48通道高速信号,本文设计了基于两片大容量FPGA的48通道信号的并行解调和滤波抽取,并由另一片大容量FPGA最终完成数字波束形成。多通道信号的采样采
会议
本文探讨了多普勒天气雷达产生测速模糊现象的原因及其在实际探测中的识别方法,介绍了用于减轻多普勒天气雷达速度模糊的参差脉冲重复频率(PRT)方法的原理,并结合中值滤波技术
在现代的军事、民用通信以及相对应的雷达天线探测系统中,虚拟阵元形成做为实现阵列信号扩展中的一个重要内容,目的是使得阵元数目在虚拟上得到增加从而减少基阵产生主波束宽度
会议