ChemTest: An Automated Software Testing Framework for an Emerging Paradigm

In recent years the use of non-traditional computing mechanisms has grown rapidly. One paradigm uses chemical reaction networks (CRNs) to compute via chemical interactions. CRNs are used to prototype molecular devices at the nanoscale such as intelligent drug therapeutics. In practice, these programs are first written and simulated in environments such as MatLab and later compiled into physical molecules such as DNA strands. However, techniques for testing the correctness of CRNs are lacking. Current methods of validating CRNs include model checking and theorem proving, but these are limited in scalability. In this paper we present the first (to the best of our knowledge) testing framework for CRNs, ChemTest. ChemTest evaluates test oracles on individual simulation traces and supports functional, metamorphic, internal and hyper test cases. It also allows for flakiness and programs that are probabilistic. We performed a large case study demonstrating that ChemTest can find seeded faults and scales beyond model checking. Of our tests, 21% are inherently flaky, suggesting that systematic support for this paradigm is needed. On average, functional tests find 66.5% of the faults, while metamorphic tests find 80.4%, showing the benefit of using metamorphic relationships in our test framework. In addition, we show how the time at evaluation impacts fault detection.

[1]  J. Bauer,et al.  Chemical reaction network theory for in-silico biologists , 2003 .

[2]  Wolfgang Reisig,et al.  Petri Nets: Applications and Relationships to Other Models of Concurrency , 1986, Lecture Notes in Computer Science.

[3]  Jack H. Lutz,et al.  Population-Induced Phase Transitions and the Verification of Chemical Reaction Networks , 2020, DNA.

[4]  Matthew Cook,et al.  Computation with finite stochastic chemical reaction networks , 2008, Natural Computing.

[5]  Jehoshua Bruck,et al.  Probabilistic switching circuits in DNA , 2018, Proceedings of the National Academy of Sciences.

[6]  Aws Albarghouthi,et al.  FairSquare: probabilistic verification of program fairness , 2017, Proc. ACM Program. Lang..

[7]  G. Seelig,et al.  DNA as a universal substrate for chemical kinetics , 2010, Proceedings of the National Academy of Sciences.

[8]  Matt A. King,et al.  Three-Dimensional Structures Self-Assembled from DNA Bricks , 2012 .

[9]  R. Aris Prolegomena to the rational analysis of systems of chemical reactions , 1965 .

[10]  Darko Marinov,et al.  An empirical analysis of flaky tests , 2014, SIGSOFT FSE.

[11]  Marta Z. Kwiatkowska,et al.  PRISM 4.0: Verification of Probabilistic Real-Time Systems , 2011, CAV.

[12]  Zijiang Yang,et al.  Radius aware probabilistic testing of deadlocks with guarantees , 2016, 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE).

[13]  Luca Cardelli,et al.  Design and analysis of DNA strand displacement devices using probabilistic model checking , 2012, Journal of The Royal Society Interface.

[14]  Saikat Dutta,et al.  Storm: program reduction for testing and debugging probabilistic programming systems , 2019, ESEC/SIGSOFT FSE.

[15]  Darko Marinov,et al.  DeFlaker: Automatically Detecting Flaky Tests , 2018, 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE).

[16]  Luca Cardelli,et al.  Programmable chemical controllers made from DNA. , 2013, Nature nanotechnology.

[17]  Marc J. Balcer,et al.  The category-partition method for specifying and generating fuctional tests , 1988, CACM.

[18]  Lulu Qian,et al.  Scaling up molecular pattern recognition with DNA-based winner-take-all neural networks , 2018, Nature.

[19]  Ho-Lin Chen,et al.  Deterministic function computation with chemical reaction networks , 2012, Natural Computing.

[20]  Matthew R. Lakin,et al.  Modular verification of chemical reaction network encodings via serializability analysis , 2016, Theor. Comput. Sci..

[21]  Gilles Pokam,et al.  Selective mutation testing for concurrent code , 2013, ISSTA.

[22]  Wing Lam,et al.  iDFlakies: A Framework for Detecting and Partially Classifying Flaky Tests , 2019, 2019 12th IEEE Conference on Software Testing, Validation and Verification (ICST).

[23]  Dan Alistarh,et al.  Robust Detection in Leak-Prone Population Protocols , 2017, DNA.

[24]  Chris Thachuk,et al.  Probabilistic Model Checking for Biology , 2014, Software Systems Safety.

[25]  Christel Baier,et al.  Principles of Model Checking (Representation and Mind Series) , 2008 .

[26]  Darko Marinov,et al.  Mitigating the effects of flaky tests on mutation testing , 2019, ISSTA.

[27]  Sergio Segura,et al.  A Survey on Metamorphic Testing , 2016, IEEE Transactions on Software Engineering.

[28]  Akbar Siami Namin,et al.  The use of mutation in testing experiments and its sensitivity to external threats , 2011, ISSTA '11.

[29]  Jack H. Lutz,et al.  Automated requirements analysis for a molecular watchdog timer , 2014, ASE.

[30]  Luca Cardelli,et al.  The Formal Language and Design Principles of Autonomous DNA Walker Circuits. , 2016, ACS synthetic biology.

[31]  Jack H. Lutz,et al.  Runtime Fault Detection in Programmed Molecular Systems , 2017, ACM Trans. Softw. Eng. Methodol..

[32]  Sarfraz Khurshid,et al.  CRN++: Molecular programming language , 2018, Natural Computing.

[33]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[34]  Ehud Shapiro,et al.  Bringing DNA computers to life , 2006 .

[35]  Matthew Cook,et al.  Combining self-healing and proofreading in self-assembly , 2008, Natural Computing.

[36]  Upulee Kanewala,et al.  Experiences of Testing Bioinformatics Programs for Detecting Subtle Faults , 2016, 2016 IEEE/ACM International Workshop on Software Engineering for Science (SE4Science).

[37]  Marsha Chechik,et al.  Temporal Logic Query Checking: A Tool for Model Exploration , 2003, IEEE Trans. Software Eng..

[38]  Luca Cardelli,et al.  A programming language for composable DNA circuits , 2009, Journal of The Royal Society Interface.

[39]  Lloyd M. Smith Nanotechnology: Molecular robots on the move , 2010, Nature.

[40]  Mauro Pezzè,et al.  Effectiveness and Challenges in Generating Concurrent Tests for Thread-Safe Classes , 2018, 2018 33rd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[41]  D. Gillespie,et al.  Deterministic limit of stochastic chemical kinetics. , 2009, The journal of physical chemistry. B.

[42]  Richard A. Muscat,et al.  DNA nanotechnology from the test tube to the cell. , 2015, Nature nanotechnology.

[43]  Erik Winfree,et al.  A General-Purpose CRN-to-DSD Compiler with Formal Verification, Optimization, and Simulation Capabilities , 2017, DNA.

[44]  Christian E. Schafmeister,et al.  CANDO: A Compiled Programming Language for Computer-Aided Nanomaterial Design and Optimization Based on Clasp Common Lisp , 2016, ELS.

[45]  Ján Manuch,et al.  Simplifying Analyses of Chemical Reaction Networks for Approximate Majority , 2017, DNA.

[46]  P. Rothemund Folding DNA to create nanoscale shapes and patterns , 2006, Nature.

[47]  Lulu Qian,et al.  A Simple DNA Gate Motif for Synthesizing Large-Scale Circuits , 2008, DNA.

[48]  Jack H. Lutz,et al.  Robust Biomolecular Finite Automata , 2015, Theor. Comput. Sci..

[49]  Andrew Phillips,et al.  Towards programming languages for genetic engineering of living cells , 2009, Journal of The Royal Society Interface.

[50]  Jehoshua Bruck,et al.  Neural network computation with DNA strand displacement cascades , 2011, Nature.

[51]  Saikat Dutta,et al.  Testing probabilistic programming systems , 2018, ESEC/SIGSOFT FSE.

[52]  Rupak Majumdar,et al.  Randomized testing of distributed systems with probabilistic guarantees , 2018, Proc. ACM Program. Lang..

[53]  Titus H. Klinge,et al.  Robust Signal Restoration in Chemical Reaction Networks , 2016, NANOCOM.

[54]  Lulu Qian,et al.  Supporting Online Material Materials and Methods Figs. S1 to S6 Tables S1 to S4 References and Notes Scaling up Digital Circuit Computation with Dna Strand Displacement Cascades , 2022 .

[55]  Robyn R. Lutz,et al.  State logging in chemical reaction networks , 2017, NANOCOM.

[56]  Jack H. Lutz,et al.  The Tile Assembly Model is Intrinsically Universal , 2011, 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science.

[57]  Erik Winfree,et al.  Universal Computation and Optimal Construction in the Chemical Reaction Network-Controlled Tile Assembly Model , 2015, DNA.

[58]  Koushik Sen,et al.  Effective random testing of concurrent programs , 2007, ASE.

[59]  Matthew J. Patitz,et al.  A Domain-Specific Language for Programming in the Tile Assembly Model , 2009, DNA.

[60]  Hao Yan,et al.  DNA Origami with Complex Curvatures in Three-Dimensional Space , 2011, Science.