Karkour (2022), Py*: Formalization of Python's Verifiable Bytecode and Virtual Machine in F*
Proceedings of the ESSLLI 2022 Student Session
Py*: Formalization of Python's Verifiable Bytecode and Virtual Machine in F*
In order to avoid implementation bugs and inconsistencies of defining programming languages, computer scientists define formal semantics rules that guide the implementation process. In the case of Python, it lacks a formal implementation as it doesn't have formal semantics that describe the behavior of its complex functionalities. Previous attempts to provide formal implementation for Python didn't fully succeed. Since direct formalization of Python source code is hard, in this project, we define formal semantics rules for Python's Bytecode instead, and embed them in the theorem prover F*. Following that we extract efficient executable OCaml code of our embedding, which could be used to interpret Python Bytecode and to find bugs in other interpreters.