Tags: brcfarias/esbmc
Tags
[python-frontend] Filter global variables and classes during function… … verification (esbmc#2115) This PR enhances the verification process with the `--function` option by filtering global variables and classes. Previously converting all global elements could cause verification failures due to unsupported features, even if those elements weren't used in the specified function. Now we track only the classes and variables used within the function being verified. This tracking is nested, meaning that if function A calls function B, we also verify the global variables and classes used in function B. ### **Example** ```python x = 1 y = blah() # function blah is undefined (could be an unsupported feature) def foo() -> None: z = x ``` When running ESBMC with `esbmc --function foo`, the verification should not fail as the variable `y` isn't used in the function `foo()`. Only the global variable `x` is needed for verifying this function.