mirror of
https://github.com/Z3Prover/z3
synced 2025-08-14 14:55:25 +00:00
debug under defined calls
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
d218e87f76
commit
efa63db691
3 changed files with 16 additions and 6 deletions
7
sus.py
7
sus.py
|
@ -5,6 +5,8 @@ and print matches in grep-like format: file:line:match
|
|||
"""
|
||||
import os
|
||||
import re
|
||||
# skip chain calls like obj.method(...)
|
||||
chain_pattern = re.compile(r"\.\s*[A-Za-z_]\w*\s*\(")
|
||||
|
||||
# pattern: identifier(... foo(...), ... bar(...)) with two function-call args
|
||||
pattern = re.compile(
|
||||
|
@ -28,7 +30,10 @@ for root, dirs, files in os.walk('src/smt'):
|
|||
for i, line in enumerate(f, 1):
|
||||
if pattern.search(line):
|
||||
# skip lines with TRACE or ASSERT in all caps
|
||||
if any(word in line for word in excl):
|
||||
if 'TRACE' in line or 'ASSERT' in line or 'VERIFY' in line:
|
||||
continue
|
||||
# skip chain calls (method-style chaining)
|
||||
if chain_pattern.search(line):
|
||||
continue
|
||||
full_path = os.path.abspath(path)
|
||||
print(f"{full_path}:{i}:{line.rstrip()}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue