Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: brcfarias/esbmc

Tags

consensus-v1

Toggle consensus-v1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[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.

v0.2

Toggle v0.2's commit message
clang-format

v0.1

Toggle v0.1's commit message
[python-frontend] Improving test