Simulating Petri nets with Boolean Matrix Logic Programming (2405.11412v1)
Abstract: Recent attention to relational knowledge bases has sparked a demand for understanding how relations change between entities. Petri nets can represent knowledge structure and dynamically simulate interactions between entities, and thus they are well suited for achieving this goal. However, logic programs struggle to deal with extensive Petri nets due to the limitations of high-level symbol manipulations. To address this challenge, we introduce a novel approach called Boolean Matrix Logic Programming (BMLP), utilising boolean matrices as an alternative computation mechanism for Prolog to evaluate logic programs. Within this framework, we propose two novel BMLP algorithms for simulating a class of Petri nets known as elementary nets. This is done by transforming elementary nets into logically equivalent datalog programs. We demonstrate empirically that BMLP algorithms can evaluate these programs 40 times faster than tabled B-Prolog, SWI-Prolog, XSB-Prolog and Clingo. Our work enables the efficient simulation of elementary nets using Prolog, expanding the scope of analysis, learning and verification of complex systems with logic programming techniques.
- Encoding Higher Level Extensions of Petri Nets in Answer Set Programming. In Pedro Cabalar and Tran Cao Son, editors, Logic Programming and Nonmonotonic Reasoning, Lecture Notes in Computer Science, pages 116–121, Berlin, Heidelberg, 2013. Springer.
- Model checking multi-agent systems with logic based Petri nets. Annals of Mathematics and Artificial Intelligence, 51(2):81–121, 2007.
- What you always wanted to know about Datalog (and never dared to ask). IEEE Transactions on Knowledge and Data Engineering, 1(1):146–166, 1989.
- Irving M. Copilowish. Matrix Development of the Calculus of Relations. The Journal of Symbolic Logic, 13(4):193–203, 1948.
- Matrix multiplication via arithmetic progressions. Journal of Symbolic Computation, 9(3):251–280, 1990.
- Probabilistic (logic) programming concepts. Machine Learning, 100(1):5–47, 2015.
- Encoding Reversing Petri Nets in Answer Set Programming. In Ivan Lanese and Mariusz Rawski, editors, Reversible Computation, Lecture Notes in Computer Science, pages 264–271, Cham, 2020. Springer International Publishing.
- Andrea Domenici. Petri nets in logic. Microprocessing and Microprogramming, 30(1):193–198, 1990.
- Boolean matrix multiplication and transitive closure. In 12th Annual Symposium on Switching and Automata Theory (SWAT 1971), pages 129–131, 1971.
- Clingo = ASP + Control: Preliminary Report. Technical Communications of the Thirtieth International Conference on Logic Programming (ICLP’14), 14:1–9, 2014.
- The Stable Model Semantics for Logic Programming. In Proceedings of International Logic Programming Conference and Symposium, pages 1070–1080, 1988.
- H. J. Genrich and K. Lautenbach. System modelling with high-level Petri nets. Theoretical Computer Science, pages 109–136, 1981.
- Edward Grefenstette. Towards a Formal Distributional Semantics: Simulating Logical Calculi with Tensors. In Proceedings of the Second Joint Conference on Lexical and Computational Semantics (SEM), pages 1–10, 2013.
- Knowledge Graphs. ACM Computing Surveys, 54(4):71:1–71:37, 2021.
- Y. E. Ioannidis and E. Wong. An algebraic approach to recursive inference. In Proceedings of the 1st International Conference on Expert Database Systems, 1986.
- Yannis E. Ioannidis. On the Computation of the Transitive Closure of Relational Operators. In Proceedings of the 12th International Conference on Very Large Data Bases, VLDB ’86, pages 403–411, San Francisco, CA, USA, 1986.
- A high-level Petri net for goal-directed semantics of Horn clause logic. IEEE Transactions on Knowledge and Data Engineering, 8(2):241–259, 1996.
- A survey on knowledge graphs: representation, acquisition, and applications. IEEE Transactions on Neural Networks and Learning Systems, 33(2):494–514, 2022.
- Representation learning for dynamic graphs: a survey. The Journal of Machine Learning Research, 21(1):70:2648–70:2720, 2020.
- DBpedia - A large-scale, multilingual knowledge base extracted from Wikipedia. Semantic Web, 6(2):167–195, 2015.
- Fangzhen Lin. From Satisfiability to Linear Algebra. Technical report, Hong Kong University of Science and Technology, 2013.
- J. W. Lloyd. Foundations of Logic Programming. Springer Science and Business Media, 2012.
- iML1515, a knowledgebase that computes escherichia coli traits. Nature Biotechnology, 35(10):904–908, 2017.
- S. H. Muggleton. Inductive logic programming. New Generation Computing, 8:295–318, 1991.
- S. H. Muggleton. Hypothesizing an algorithm from one example: the role of specificity. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 381(2251):20220046, 2023.
- T. Murata and D. Zhang. A predicate-transition net model for parallel interpretation of logic programs. IEEE Transactions on Software Engineering, 14(4):481–497, 1988.
- T. Murata. Petri nets: Properties, analysis and applications. Proceedings of the IEEE, 77(4):541–580, 1989.
- A Review of Relational Machine Learning for Knowledge Graphs. Proceedings of the IEEE, 104(1):11–33, 2016.
- OpenFlights. Open flight route database. https://openflights.org/, 2014.
- Charles Sanders Peirce. Collected Papers of Charles Sanders Peirce, Volumes II. Harvard University Press, 1932.
- YAGO: A Multilingual Knowledge Base from Wikipedia, Wordnet, and Geonames. In Paul Groth, Elena Simperl, Alasdair J. G. Gray, Marta Sabou, Markus Krötzsch, Freddy Lécué, Fabian Flöck, and Yolanda Gil, editors, The Semantic Web - ISWC 2016 - 15th International Semantic Web Conference, Kobe, Japan, October 17-21, 2016, Proceedings, Part II, volume 9982 of Lecture Notes in Computer Science, pages 177–185, 2016.
- Wolfgang Reisig. Understanding Petri Nets: Modeling Techniques, Analysis Methods, Case Studies. Springer, Berlin, Heidelberg, 2013.
- Elementary net systems. In Reisig, W., Rozenberg, G. (eds) Lectures on Petri Nets I: Basic Models. ACPN 1996. Lecture Notes in Computer Science, volume 1491. Springer Berlin Heidelberg, 1998.
- Advances in flux balance analysis by integrating machine learning and mechanism-based models. Computational and Structural Biotechnology Journal, 19:4626–4640, 2021.
- Abducing Relations in Continuous Spaces. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, pages 1956–1962, 2018.
- Taisuke Sato. A linear algebraic approach to datalog evaluation. Theory and Practice of Logic Programming, 17(3):244–265, 2017.
- ConceptNet 5.5: An Open Multilingual Graph of General Knowledge. Proceedings of the AAAI Conference on Artificial Intelligence, 31(1), 2017.
- Knowledge-Guided Identification of Petri Net Models of Large Biological Systems. In Stephen H. Muggleton, Alireza Tamaddoni-Nezhad, and Francesca A. Lisi, editors, Inductive Logic Programming, Lecture Notes in Computer Science, pages 317–331, 2012.
- A Srinivasan. The ALEPH manual. Machine Learning at the Computing Laboratory, Oxford University, 2001.
- XSB: Extending Prolog with Tabled Logic Programming. Theory and Practice of Logic Programming, 12(1-2):157–187, 2012.
- Alfred Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific Journal of Mathematics, 5(2):85–309, 1955.
- The Semantics of Predicate Logic as a Programming Language. Journal of the ACM, 23(4):733–742, 1976.
- Knowledge Graph Embedding: A Survey of Approaches and Applications. IEEE Transactions on Knowledge and Data Engineering, 29(12):2724–2743, 2017.
- SWI-Prolog. Theory and Practice of Logic Programming, 12(1-2):67–96, 2012.
- Neng-Fa Zhou. The language features and architecture of B-Prolog. Theory and Practice of Logic Programming, 12(1-2):189–218, 2012.