Generation of algebraic data type values using evolutionary algorithms

IF 0.7 4区 数学 Q3 COMPUTER SCIENCE, THEORY & METHODS
Ignacio Ballesteros , Clara Benac-Earle , Julio Mariño , Lars-Åke Fredlund , Ángel Herranz
{"title":"Generation of algebraic data type values using evolutionary algorithms","authors":"Ignacio Ballesteros ,&nbsp;Clara Benac-Earle ,&nbsp;Julio Mariño ,&nbsp;Lars-Åke Fredlund ,&nbsp;Ángel Herranz","doi":"10.1016/j.jlamp.2024.101022","DOIUrl":null,"url":null,"abstract":"<div><div>Automatic data generation is a key component of automated software testing. Random generation of test input data can uncover some bugs in software, but its effectiveness decreases when those inputs must satisfy complex properties in order to be meaningful. In this work, we study an evolutionary approach to generate values that can be encoded as algebraic data types plus additional properties. First, the approach is illustrated with the generation of sorted lists. Then, we generalize the technique to arbitrary algebraic data type definitions. Finally, we consider the problem of constrained data types where the data must satisfy some nontrivial property, using the well-known example of red-black trees for our experiments. This example will allow us to introduce the main principles of evolutionary algorithms and how these principles can be applied to obtain valid, nontrivial samples of a given data structure. Our experiments have revealed that this evolutionary approach is able to improve diversity, and increase the size of valid generated values with respect to simple random sampling techniques.</div></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"143 ","pages":"Article 101022"},"PeriodicalIF":0.7000,"publicationDate":"2024-11-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Logical and Algebraic Methods in Programming","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2352220824000762","RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
引用次数: 0

Abstract

Automatic data generation is a key component of automated software testing. Random generation of test input data can uncover some bugs in software, but its effectiveness decreases when those inputs must satisfy complex properties in order to be meaningful. In this work, we study an evolutionary approach to generate values that can be encoded as algebraic data types plus additional properties. First, the approach is illustrated with the generation of sorted lists. Then, we generalize the technique to arbitrary algebraic data type definitions. Finally, we consider the problem of constrained data types where the data must satisfy some nontrivial property, using the well-known example of red-black trees for our experiments. This example will allow us to introduce the main principles of evolutionary algorithms and how these principles can be applied to obtain valid, nontrivial samples of a given data structure. Our experiments have revealed that this evolutionary approach is able to improve diversity, and increase the size of valid generated values with respect to simple random sampling techniques.
利用进化算法生成代数数据类型值
自动生成数据是自动软件测试的关键组成部分。随机生成测试输入数据可以发现软件中的一些错误,但当这些输入数据必须满足复杂的属性才能有意义时,其有效性就会降低。在这项工作中,我们研究了一种进化方法,用于生成可编码为代数数据类型和附加属性的值。首先,我们用生成排序列表来说明这种方法。然后,我们将该技术推广到任意代数数据类型定义。最后,我们考虑了受约束数据类型的问题,即数据必须满足某些非难属性,并以众所周知的红黑树为例来进行实验。通过这个例子,我们可以介绍进化算法的主要原理,以及如何应用这些原理来获取给定数据结构的有效、非次要样本。我们的实验表明,与简单的随机取样技术相比,这种进化方法能够提高多样性,并增加有效生成值的大小。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Journal of Logical and Algebraic Methods in Programming
Journal of Logical and Algebraic Methods in Programming COMPUTER SCIENCE, THEORY & METHODS-LOGIC
CiteScore
2.60
自引率
22.20%
发文量
48
期刊介绍: The Journal of Logical and Algebraic Methods in Programming is an international journal whose aim is to publish high quality, original research papers, survey and review articles, tutorial expositions, and historical studies in the areas of logical and algebraic methods and techniques for guaranteeing correctness and performability of programs and in general of computing systems. All aspects will be covered, especially theory and foundations, implementation issues, and applications involving novel ideas.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信