当前位置: X-MOL 学术Auton. Agent. Multi-Agent Syst. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Specification testing of agent-based simulation using property-based testing
Autonomous Agents and Multi-Agent Systems ( IF 2.0 ) Pub Date : 2020-06-19 , DOI: 10.1007/s10458-020-09473-8
Jonathan Thaler , Peer-Olaf Siebers

The importance of Agent-Based Simulation (ABS) as scientific method to generate data for scientific models in general and for informed policy decisions in particular has been widely recognised. However, the important technique of code testing of implementations like unit testing has not generated much research interested so far. As a possible solution, in previous work we have explored the conceptual use of property-based testing. In this code testing method, model specifications and invariants are expressed directly in code and tested through automated and randomised test data generation. This paper expands on our previous work and explores how to use property-based testing on a technical level to encode and test specifications of ABS. As use case the simple agent-based SIR model is used, where it is shown how to test agent behaviour, transition probabilities and model invariants. The outcome are specifications expressed directly in code, which relate whole classes of random input to expected classes of output. During test execution, random test data is generated automatically, potentially covering the equivalent of thousands of unit tests, run within seconds on modern hardware. This makes property-based testing in the context of ABS strictly more powerful than unit testing, as it is a much more natural fit due to its stochastic nature.

中文翻译:

使用基于属性的测试对基于代理的模拟进行规范测试

基于代理的仿真(ABS)作为生成一般用于科学模型的数据,尤其是用于知情政策决策的科学方法的重要性已得到广泛认可。但是,到目前为止,诸如单元测试之类的实现的代码测试的重要技术尚未引起很多研究兴趣。作为一种可能的解决方案,在先前的工作中,我们探索了基于属性的测试的概念用途。在这种代码测试方法中,模型规格和不变式直接在代码中表示,并通过自动随机化进行测试测试数据生成。本文扩展了我们之前的工作,并探讨了如何在技术水平上使用基于属性的测试来编码和测试ABS规范。作为用例,使用了基于代理的简单SIR模型,其中显示了如何测试代理的行为,转换概率和模型不变性。结果是直接用代码表示的规范,该规范将随机输入的整个类别与预期的输出类别相关联。在测试执行过程中,将自动生成随机测试数据,可能覆盖数以千计的单元测试,并在几秒钟内在现代硬件上运行。这使得基于ABS的基于属性的测试严格地比单元测试更强大,因为它具有随机性,因此更加自然。
更新日期:2020-06-19
down
wechat
bug