skip to main content
10.1145/3510003.3510176acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article
Open access

Inference and test generation using program invariants in chemical reaction networks

Published: 05 July 2022 Publication History

Abstract

Chemical reaction networks (CRNs) are an emerging distributed computational paradigm where programs are encoded as a set of abstract chemical reactions. CRNs can be compiled into DNA strands which perform the computations in vitro, creating a foundation for intelligent nanodevices. Recent research proposed a software testing framework for stochastic CRN programs in simulation, however, it relies on existing program specifications. In practice, specifications are often lacking and when they do exist, transforming them into test cases is time-intensive and can be error prone. In this work, we propose an inference technique called ChemFlow which extracts 3 types of invariants from an existing CRN model. The extracted invariants can then be used for test generation or model validation against program implementations. We applied ChemFlow to 13 CRN programs ranging from toy examples to real biological models with hundreds of reactions. We find that the invariants provide strong fault detection and often exhibit less flakiness than specification derived tests. In the biological models we showed invariants to developers and they confirmed that some of these point to parts of the model that are biologically incorrect or incomplete suggesting we may be able to use ChemFlow to improve model quality.

References

[1]
Ebbe S. Andersen, Mingdong Dong, Morten M. Nielsen, Kasper Jahn, Ramesh Subramani, Wael Mamdouh, Monika M. Golas, Bjoern Sander, Holger Stark, Cristiano L. P. Oliveira, Jan Skov Pedersen, Victoria Birkedal, Flemming Besenbacher, Kurt V. Gothelf, and Jørgen Kjems. 2009. Self-assembly of a nanoscale DNA box with a controllable lid. Nature 459, 7243 (01 May 2009), 73--76.
[2]
J. H. Andrews, L. C. Briand, and Y. Labiche. 2005. Is Mutation an Appropriate Tool for Testing Experiments?. In Proceedings of the 27th International Conference on Software Engineering. Association for Computing Machinery, New York, NY, USA, 402--411.
[3]
Adam P. Arkin, Robert W. Cottingham, Christopher S. Henry, Nomi L. Harris, Rick L Stevens, Sergei Maslov, et al. 2018. KBase: The United States Department of Energy Systems Biology Knowledgebase. Nature Biotechnology 36, 7 (2018), 566--569.
[4]
Stefan Badelt, Seung Woo Shin, Robert F. Johnson, Qing Dong, Chris Thachuk, and Erik Winfree. 2017. A General-Purpose CRN-to-DSD Compiler with Formal Verification, Optimization, and Simulation Capabilities. In International Conference on DNA Computing and Molecular Programming (Lecture Notes in Computer Science). 232--248.
[5]
B. Berthomieu, P.-O. Ribet, and F. Vernadat. 2004. The tool TINA - Construction of abstract state spaces for Petri nets and time Petri nets. International Journal of Production Research 42, 14 (2004), 2741--2756.
[6]
Ivan Beschastnikh, Yuriy Brun, Jenny Abrahamson, Michael D. Ernst, and Arvind Krishnamurthy. 2015. Using declarative specification to improve the understanding, extensibility, and comparison of model-inference algorithms. IEEE Transactions on Software Engineering 41, 4 (April 2015), 408--428.
[7]
Ivan Beschastnikh, Yuriy Brun, Sigurd Schneider, Michael Sloan, and Michael D. Ernst. 2011. Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering (Szeged, Hungary) (ESEC/FSE '11). Association for Computing Machinery, New York, NY, USA, 267--277.
[8]
BioBricks Foundation 2021. BioBrick Public DNA Parts. BioBricks Foundation. Last Accessed: August 2021.
[9]
Robert Brijder. 2019. Computing with chemical reaction networks: a tutorial. Natural Computing 18,1 (2019), 119--137.
[10]
Luca Cardelli, Marta Kwiatkowska, and Luca Laurenti. 2018. Programming discrete distributions with chemical reaction networks. Natural Computing 17, 1 (01 Mar 2018), 131--145.
[11]
Mikaela Cashman, Justin Firestone, Myra B. Cohen, Thammasak Thianniwet, and Wei Niu. 2021. An Empirical Investigation of Organic Software Product Lines. Empirical Software Engineering 26, 3 (2021), 44.
[12]
Ho-Lin Chen, Rachel Cummings, David Doty, and David Soloveichik. 2014. Speed Faults in Computation by Chemical Reaction Networks. In Distributed Computing, Fabian Kuhn (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 16--30.
[13]
Yuan-Jyue Chen, Neil Dalchau, Niranjan Srinivas, Andrew Phillips, Luca Cardelli, David Soloveichik, and Georg Seelig. 2013. Programmable chemical controllers made from DNA. Nature Nanotechnology 8, 10 (2013), 755--762.
[14]
G. Chiola, G. Franceschinis, R. Gaeta, and M. Ribaudo. 1995. GreatSPN 1.7: Graphical editor and analyzer for timed and stochastic Petri nets. Performance Evaluation 24, 1 (1995), 47--68. Performance Modeling Tools.
[15]
Matthew Cook, David Soloveichik, Erik Winfree, and Jehoshua Bruck. 2009. Programmability of Chemical Reaction Networks. Springer Berlin Heidelberg, Berlin, Heidelberg, 543--584.
[16]
Christoph Csallner, Nikolai Tillmann, and Yannis Smaragdakis. 2008. DySy: Dynamic Symbolic Execution for Invariant Inference. In Proceedings of the 30th International Conference on Software Engineering (Leipzig, Germany). Association for Computing Machinery, New York, NY, USA, 281--290.
[17]
Shawn M. Douglas, Ido Bachelet, and George M. Church. 2012. A Logic-Gated Nanorobot for Targeted Transport of Molecular Payloads. Science 335, 6070 (2012), 831--834.
[18]
Samuel J. Ellis, Titus H. Klinge, James I. Lathrop, Jack H. Lutz, Robyn R. Lutz, Andrew S. Miner, and Hugh D. Potter. 2019. Runtime Fault Detection in Programmed Molecular Systems. ACM Transactions on Software Engineering Methodology 28, 2, Article 6 (March 2019), 20 pages.
[19]
Martin Feinberg. 2019. Foundations of chemical reaction network theory. Springer.
[20]
Michael C. Gerten, James I. Lathrop, Myra B. Cohen, and Titus H. Klinge. 2020. ChemTest: An Automated Software Testing Framework for an Emerging Paradigm. In Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering. 548--560.
[21]
Sakshi Gupta, Sunita Kumawat, and Gajendra Pratap Singh. 2022. Validation and Analysis of Metabolic Pathways Using Petri Nets. In Soft Computing: Theories and Applications. Springer, 361--374.
[22]
Christopher S Henry, Matthew DeJongh, Aaron A Best, Paul M Frybarger, Ben Linsay, and Rick L Sevens. 2010. High-throughput generation, optimization and analysis of genome-scale metabolic models. Nature Biotechnology 28, 9 (August 2010), 977--982.
[23]
iGEM Registry 2021. Registry of Standard Biological Parts. iGEM Foundation. Last Accessed: August 2021.
[24]
International Society for Nanoscale Science 2021. International Society for Nanoscale Science, Computation and Engineering (ISNSCE). https://isnsce.org/ Accessed on 2021-09-09.
[25]
D. Jackson. 2012. D. Jackson, Software Abstractions, 2nd ed. MIT Press, 2012. (2nd ed.). MIT Press.
[26]
Shuoxing Jiang, Zhilei Ge, Shan Mou, Hao Yan, and Chunhai Fan. 2021. Designer DNA nanostructures for therapeutics. Chem 7, 5 (2021), 1156--1179.
[27]
Monk JM, Lloyd CJ, Brunk E, and et al. 2017. iML1515, a knowledgebase that computes Escherichia coli traits. Nat Biotechnol. 35 (2017), 904--908.
[28]
Minoru Kanehisa and Susumu Goto. 2000. KEGG: kyoto encyclopedia of genes and genomes. Nucleic acids research 28, 1 (2000), 27--30.
[29]
Richard M. Karp and Raymond E. Miller. 1969. Parallel program schemata. J. Comput. System Sci. 3, 2 (1969), 147--195.
[30]
KBase 2021. The Department of Energy Systems Biology Knowledgebase. http://kbase.us.
[31]
Titus H. Klinge, James I. Lathrop, Sonia Moreno, Hugh D. Potter, Narun K. Raman, and Matthew R. Riley. 2020. ALCH: An Imperative Language for Chemical Reaction Network-Controlled Tile Assembly. In 26th International Conference on DNA Computing and Molecular Programming (DNA 26) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 174), Cody Geary and Matthew J. Patitz (Eds.). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 6:1--6:22.
[32]
Marta Kwiatkowska, Gethin Norman, and David Parker. 2010. Advances and challenges of probabilistic model checking. In 2010 48th Annual Allerton Conference on Communication, Control, and Computing (Allerton). 1691--1698.
[33]
Marta Kwiatkowska and Chris Thachuk. 2014. Probabilistic model checking for biology. In Software Systems Safety. IOS Press, 165--189.
[34]
Jefferey C. Lafarias (Ed.). 2010. The ultimate challenge : the 3x + 1 problem. American Mathematical Society.
[35]
James I. Lathrop, Titus H. Klinge, and Bryce Valley. 2021. personal communication.
[36]
James I. Lathrop, Jack H. Lutz, Robyn R. Lutz, Hugh D. Potter, and Matthew R. Riley. 2020. Population-Induced Phase Transitions and the Verification of Chemical Reaction Networks. In 26th International Conference on DNA Computing and Molecular Programming (DNA 26) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 174), Cody Geary and Matthew J. Patitz (Eds.). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 5:1--5:17.
[37]
Kaituo Li, Christoph Reichenbach, Yannis Smaragdakis, and Michal Young. 2013. Second-Order Constraints in Dynamic Invariant Inference. In Proceedings of the 2013 9th Joint Meeting on Foundations of Software Engineering (Saint Petersburg, Russia) (ESEC/FSE 2013). Association for Computing Machinery, New York, NY, USA, 103--113.
[38]
David Lo and Shahar Maoz. 2009. Mining Scenario-Based Specifications with Value-Based Invariants. In Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications (Orlando, Florida, USA). Association for Computing Machinery, New York, NY, USA, 755--756.
[39]
Matlab-Simbiology User Forum 2020. MATLAB Forum Question on Testing CRNs. https://www.mathworks.com/matlabcentral/answers/593965--unit-testing-on-simbiology-created-model?s_tid=srchtitle_simbiology_53.
[40]
Ibrahim Mesecan, Michael C. Gerten, James I. Lathrop, Myra B. Cohen, and Tomas Haddad Caldas. 2021. CRNRepair: Automated Program Repair of Chemical Reaction Networks. In 2021 IEEE/ACM International Workshop on Genetic Improvement (GI). 23--30.
[41]
Tadao Murata. 1989. Petri Nets: Properties, Analysis and Applications. Proc. IEEE 77, 4 (April 1989), 541--580.
[42]
Akbar Siami Namin and Sahitya Kakarla. 2011. The Use of Mutation in Testing Experiments and Its Sensitivity to External Threats. In Proceedings of the 2011 International Symposium on Software Testing and Analysis (ISSTA '11). Association for Computing Machinery, New York, NY, USA, 342--352.
[43]
NCBI 2021. National Center for Biotechnology Information (NCBI), National Library of Medicine (US), National Center for Biotechnology Information. https://www.ncbi.nlm.nih.gov/.
[44]
T.J. Ostrand and M.J. Balcer. 1988. The Category-partition Method for Specifying and Generating Functional Tests. Commun. ACM 31, 6 (June 1988), 676--686.
[45]
Michael Pedersen and Andrew Phillips. 2009. Towards programming languages for genetic engineering of living cells. Journal of the Royal Society Interface 6 (2009), S437--S450.
[46]
Jeff H. Perkins and Michael D. Ernst. 2004. Efficient Incremental Algorithms for Dynamic Detection of Likely Invariants. In Proceedings of the 12th ACM SIGSOFT Twelfth International Symposium on Foundations of Software Engineering (Newport Beach, CA, USA) (SIGSOFT '04/FSE-12). Association for Computing Machinery, New York, NY, USA, 23--32.
[47]
C. Adam Petri and W. Reisig. 2008. Petri net. Scholarpedia 3, 4 (2008), 6477. revision #91647.
[48]
William Poole, Ayush Pandey, Andrey Shur, Zoltan A. Tuza, and Richard M. Murray. 2020. BioCRNpyler: Compiling Chemical Reaction Networks from Biomolecular Parts in Diverse Contexts. bioRxiv (2020).
[49]
Lulu Qian, Erik Winfree, and Jehoshua Bruck. 2011. Neural network computation with DNA strand displacement cascades. Nature 475, 7356 (2011), 368--372.
[50]
Manuel Silva, Enrique Terue, and José Manuel Colom. 1998. Linear algebraic and linear programming techniques for the analysis of place/transition net systems. In Lectures on Petri Nets I: Basic Models: Advances in Petri Nets, Wolfgang Reisig and Grzegorz Rozenberg (Eds.). Springer Berlin Heidelberg, 309--373.
[51]
David Soloveichik, Georg Seelig, and Erik Winfree. 2009. DNA as a Universal Substrate for Chemical Kinetics. In DNA Computing (Lecture Notes in Computer Science, Vol. 5347). 57--69.
[52]
The Mathworks, Inc. 2021. MATLAB version 9.10.0.1613233 (R2021a). The Mathworks, Inc., Natick, Massachusetts.
[53]
Marko Vasic, Cameron Chalk, Sarfraz Khurshid, and David Soloveichik. 2020. Deep Molecular Programming: A Natural Implementation of Binary-Weight ReLU Neural Networks. In Proceedings of the 37th International Conference on Machine Learning (Proceedings of Machine Learning Research, Vol. 119), Hal Daumé III and Aarti Singh (Eds.). PMLR, 9701--9711. https://proceedings.mlr.press/v119/vasic20a.html
[54]
Marko Vasic, David Soloveichik, and Sarfraz Khurshid. 2018. CRN++: Molecular Programming Language. In DNA Computing and Molecular Programming, David Doty and Hendrik Dietz (Eds.). Springer International Publishing, 1--18.
[55]
Marko Vasic, David Soloveichik, and Sarfraz Khurshid. 2020. CRNs Exposed: A Method for the Systematic Exploration of Chemical Reaction Networks. In 26th International Conference on DNA Computing and Molecular Programming (DNA 26) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 174), Cody Geary and Matthew J. Patitz (Eds.). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 4:1--4:25.
[56]
Erik Winfree. 2019. Chemical Reaction Networks and Stochastic Local Search. In DNA Computing and Molecular Programming, Chris Thachuk and Yan Liu (Eds.). Springer International Publishing, Cham, 1--20.
[57]
Karsten Wolf. 2018. Petri Net Model Checking with LoLA 2. In Application and Theory of Petri Nets and Concurrency, Victor Khomenko and Olivier H. Roux (Eds.). Springer International Publishing, Cham, 351--362.
[58]
Lingming Zhang, Guowei Yang, Neha Rungta, Suzette Person, and Sarfraz Khurshid. 2014. Feedback-Driven Dynamic Invariant Discovery. In Proceedings of the 2014 International Symposium on Software Testing and Analysis (San Jose, CA, USA) (ISSTA 2014). Association for Computing Machinery, New York, NY, USA, 362--372.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '22: Proceedings of the 44th International Conference on Software Engineering
May 2022
2508 pages
ISBN:9781450392211
DOI:10.1145/3510003
This work is licensed under a Creative Commons Attribution-NoDerivatives International 4.0 License.

Sponsors

In-Cooperation

  • IEEE CS

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 July 2022

Check for updates

Badges

Author Tags

  1. chemical reaction networks
  2. invariants
  3. petri nets
  4. test generation

Qualifiers

  • Research-article

Funding Sources

  • NSF

Conference

ICSE '22
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)244
  • Downloads (Last 6 weeks)39
Reflects downloads up to 06 Nov 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media