-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcex_analyzer.py
More file actions
48 lines (40 loc) · 1.27 KB
/
cex_analyzer.py
File metadata and controls
48 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import argparse
from typing import cast
import sys
from analyzer.analysis import analyze
from analyzer.types import AnalysisArgs
if __name__ == "__main__":
# Parse command line arguments
parser = argparse.ArgumentParser(
description='Analyze Certora Prover counterexamples and generate natural language explanations.',
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
%(prog)s /path/to/report myRule
%(prog)s /path/to/report myRule --method myMethod
%(prog)s /path/to/report myRule --method MyContract.myMethod
"""
)
parser.add_argument(
'folder',
type=str,
help='Path to the Certora report directory containing the counterexample data'
)
parser.add_argument(
'rule',
type=str,
help='Name of the rule to analyze'
)
parser.add_argument(
'--method',
type=str,
default=None,
help='Optional method identifier. Can be either "method" or "contract.method" format'
)
parser.add_argument(
'--quiet',
action='store_true',
help='Suppress intermediate output during analysis (only show final result)'
)
args = parser.parse_args()
sys.exit(analyze(cast(AnalysisArgs, args)))