ESBMC-Python: A Bounded Model Checker for Python Programs (2407.03472v1)
Abstract: This paper introduces a tool for verifying Python programs, which, using type annotation and front-end processing, can harness the capabilities of a bounded model-checking (BMC) pipeline. It transforms an input program into an abstract syntax tree to infer and add type information. Then, it translates Python expressions and statements into an intermediate representation. Finally, it converts this description into formulae evaluated with satisfiability modulo theories (SMT) solvers. The proposed approach was realized with the efficient SMT-based bounded model checker (ESBMC), which resulted in a tool called ESBMC-Python, the first BMC-based Python-code verifier. Experimental results, with a test suite specifically developed for this purpose, showed its effectiveness, where successful and failed tests were correctly evaluated. Moreover, it found a real problem in the Ethereum Consensus Specification.
- Python tutorial, 1995.
- {{\{{TensorFlow}}\}}: a system for {{\{{Large-Scale}}\}} machine learning. In 12th USENIX symposium on operating systems design and implementation (OSDI 16), pages 265–283, 2016.
- Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019.
- Deep learning with Python, volume 1. Springer, 2017.
- Armin Biere. Bounded model checking. In Handbook of satisfiability, pages 739–764. IOS press, 2021.
- Model checking c++ programs. Software Testing, Verification and Reliability, 32(1):e1793, 2022.
- Esbmc-jimple: verifying kotlin programs via jimple intermediate representation. In Proceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 777–780, 2022.
- Esbmc-solidity: An smt-based model checker for solidity smart contracts. In Proceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings, pages 65–69, 2022.
- Concurrent bounded model checking. ACM SIGSOFT Software Engineering Notes, 40(1):1–5, 2015.
- Magnus Madsen. Static analysis of dynamic languages. 2015.
- Bmclua: A translator for model checking lua programs. ACM SIGSOFT Software Engineering Notes, 42(3):1–10, 2017.
- Smt-based bounded model checking for embedded ansi-c software. IEEE Transactions on Software Engineering, 38(4):957–974, 2011.
- Bounded model checking for fixed-point digital filters. Journal of the Brazilian Computer Society, 22(1):1:1–1:20, 2016.
- Verification of delta form realization in fixed-point digital controllers using bounded model checking. In Brazilian Symposium on Computing Systems Engineering, pages 49–54, 2014.
- Verifying fragility in digital systems with uncertainties using dsverifier v2.0. J. Syst. Softw., 153:22–43, 2019.
- DSVerifier-aided verification applied to attitude control software in unmanned aerial vehicles. IEEE Transactions on Reliability, 67(4):1420–1441, 2018.
- Formal verification of the ethereum 2.0 beacon chain. In International Conference on Tools and Algorithms for the Construction and Analysis of Systems, pages 167–182. Springer, 2022.
- Python Software Foundation. ast - abstract syntax trees, 2024. Accessed: 2024-06-03.
- Laurent Peuch. ast2json, 2024. Accessed: 2024-06-03.
- Explaining type inference. Science of Computer Programming, 27(1):37–83, 1996.
- Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(4):451–490, 1991.
- Model checking python programs with msvl. In International Workshop on Structured Object-Oriented Formal Language and Method, pages 205–224. Springer, 2019.
- Boolector: An efficient smt solver for bit-vectors and arrays. In Tools and Algorithms for the Construction and Analysis of Systems: 15th International Conference, TACAS 2009, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009, York, UK, March 22-29, 2009. Proceedings 15, pages 174–177. Springer, 2009.
- Cbmc–c bounded model checker: (competition contribution). In Tools and Algorithms for the Construction and Analysis of Systems: 20th International Conference, TACAS 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014. Proceedings 20, pages 389–391. Springer, 2014.
- Finding software vulnerabilities in open-source c projects via bounded model checking. arXiv preprint arXiv:2311.05281, 2023.