certora-cli-beta-mirror 8.1.0__py3-none-any.whl → 8.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- certora_cli/CertoraProver/certoraApp.py +4 -1
- certora_cli/CertoraProver/certoraBuild.py +66 -42
- certora_cli/CertoraProver/concordance.py +939 -0
- certora_cli/Mutate/mutateValidate.py +32 -0
- certora_cli/Shared/certoraUtils.py +27 -4
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/METADATA +2 -2
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/RECORD +14 -13
- certora_jars/ASTExtraction.jar +0 -0
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/LICENSE +0 -0
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/WHEEL +0 -0
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/entry_points.txt +0 -0
- {certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/top_level.txt +0 -0
|
@@ -41,6 +41,38 @@ class MutateValidator:
|
|
|
41
41
|
self.validate_arg_types()
|
|
42
42
|
self.validate_gambit_objs()
|
|
43
43
|
self.validate_attribute_combinations()
|
|
44
|
+
self.validate_manual_mutation()
|
|
45
|
+
|
|
46
|
+
def validate_manual_mutation(self) -> None:
|
|
47
|
+
if self.mutate_app.manual_mutants:
|
|
48
|
+
if not isinstance(self.mutate_app.manual_mutants, list):
|
|
49
|
+
raise Util.CertoraUserInputError("manual_mutants should be a list of objects")
|
|
50
|
+
for mutant in self.mutate_app.manual_mutants:
|
|
51
|
+
if not isinstance(mutant, dict):
|
|
52
|
+
raise Util.CertoraUserInputError(f"manual_mutants should be a list of objects, "
|
|
53
|
+
f"but found {type(mutant)} instead")
|
|
54
|
+
|
|
55
|
+
mandatory_keys = {Constants.FILE_TO_MUTATE, Constants.MUTANTS_LOCATION}
|
|
56
|
+
mutant_keys = set(mutant.keys())
|
|
57
|
+
|
|
58
|
+
missing_keys = mandatory_keys - mutant_keys
|
|
59
|
+
extra_keys = mutant_keys - mandatory_keys
|
|
60
|
+
|
|
61
|
+
if missing_keys:
|
|
62
|
+
raise Util.CertoraUserInputError(f"manual_mutants object must contain keys: {mandatory_keys}, "
|
|
63
|
+
f"missing: {missing_keys}")
|
|
64
|
+
if extra_keys:
|
|
65
|
+
raise Util.CertoraUserInputError(f"manual_mutants object contains invalid keys: {extra_keys}, "
|
|
66
|
+
f"only allowed: {mandatory_keys}")
|
|
67
|
+
try:
|
|
68
|
+
Vf.validate_readable_file(mutant[Constants.FILE_TO_MUTATE], Util.SOL_EXT)
|
|
69
|
+
except Exception as e:
|
|
70
|
+
raise Util.CertoraUserInputError(f"Invalid file_to_mutate in manual mutant: {mutant[Constants.FILE_TO_MUTATE]}", e)
|
|
71
|
+
|
|
72
|
+
try:
|
|
73
|
+
Vf.validate_dir(mutant[Constants.MUTANTS_LOCATION])
|
|
74
|
+
except Exception as e:
|
|
75
|
+
raise Util.CertoraUserInputError(f"Invalid mutants location {mutant[Constants.MUTANTS_LOCATION]}", e)
|
|
44
76
|
|
|
45
77
|
def mutation_attribute_in_prover(self) -> None:
|
|
46
78
|
gambit_attrs = ['filename', 'contract', 'functions', 'seed', 'num_mutants']
|
|
@@ -1369,6 +1369,30 @@ def get_mappings_from_forge_remappings() -> List[str]:
|
|
|
1369
1369
|
|
|
1370
1370
|
return remappings
|
|
1371
1371
|
|
|
1372
|
+
def check_remapping_file() -> None:
|
|
1373
|
+
seen: Dict[str, str] = {}
|
|
1374
|
+
|
|
1375
|
+
if not REMAPPINGS_FILE.exists():
|
|
1376
|
+
return
|
|
1377
|
+
with open(REMAPPINGS_FILE) as f:
|
|
1378
|
+
for lineno, line in enumerate(f, 1):
|
|
1379
|
+
line = line.strip()
|
|
1380
|
+
if not line or line.startswith("#") or "=" not in line:
|
|
1381
|
+
continue
|
|
1382
|
+
parts = line.split("=")
|
|
1383
|
+
if len(parts) != 2:
|
|
1384
|
+
raise CertoraUserInputError(f"Invalid remapping in {REMAPPINGS_FILE} line {lineno}: {line}")
|
|
1385
|
+
key, value = map(str.strip, parts)
|
|
1386
|
+
|
|
1387
|
+
if key in seen:
|
|
1388
|
+
if seen[key] == value:
|
|
1389
|
+
io_logger.warning(f"Warning: duplicate key-value pair at line {lineno}: {key}={value}")
|
|
1390
|
+
else:
|
|
1391
|
+
raise CertoraUserInputError(f"Conflicting values in {REMAPPINGS_FILE} for key '{key}' "
|
|
1392
|
+
f"at line {lineno} (previous: '{seen[key]}', new: '{value}')")
|
|
1393
|
+
else:
|
|
1394
|
+
seen[key] = value
|
|
1395
|
+
|
|
1372
1396
|
|
|
1373
1397
|
def handle_remappings_file(context: SimpleNamespace) -> List[str]:
|
|
1374
1398
|
""""
|
|
@@ -1380,13 +1404,12 @@ def handle_remappings_file(context: SimpleNamespace) -> List[str]:
|
|
|
1380
1404
|
:return:
|
|
1381
1405
|
"""
|
|
1382
1406
|
remappings = []
|
|
1407
|
+
check_remapping_file()
|
|
1383
1408
|
if REMAPPINGS_FILE.exists() and not FOUNDRY_TOML_FILE.exists():
|
|
1384
1409
|
try:
|
|
1385
1410
|
with REMAPPINGS_FILE.open() as remappings_file:
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
if len(set(keys)) < len(keys):
|
|
1389
|
-
raise CertoraUserInputError(f"remappings.txt includes duplicated keys in: {keys}")
|
|
1411
|
+
remappings_set = set(filter(lambda x: x != "", map(lambda x: x.strip(), remappings_file.readlines())))
|
|
1412
|
+
remappings = list(remappings_set)
|
|
1390
1413
|
except CertoraUserInputError as e:
|
|
1391
1414
|
raise e from None
|
|
1392
1415
|
except Exception as e:
|
{certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta-mirror
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.2.0
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta-mirror
|
|
6
6
|
Author: Certora
|
|
@@ -39,4 +39,4 @@ Dynamic: requires-dist
|
|
|
39
39
|
Dynamic: requires-python
|
|
40
40
|
Dynamic: summary
|
|
41
41
|
|
|
42
|
-
Commit
|
|
42
|
+
Commit 03cec31. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -11,8 +11,8 @@ certora_cli/certoraSolanaProver.py,sha256=1R1YnGHCofb05GqFgpxRh3ZmHkmwMm1hPM7rfe
|
|
|
11
11
|
certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfamOjisk,2840
|
|
12
12
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
|
13
13
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
|
14
|
-
certora_cli/CertoraProver/certoraApp.py,sha256=
|
|
15
|
-
certora_cli/CertoraProver/certoraBuild.py,sha256=
|
|
14
|
+
certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
|
|
15
|
+
certora_cli/CertoraProver/certoraBuild.py,sha256=CEavCUO0mBZ74dxR23RRInyDskHAddoX8Ox8-gaqnJk,222188
|
|
16
16
|
certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=YnZmBZ_gCIbLwExgK5oxFlVDQGe4_YuGIpDLMy589E0,13318
|
|
17
17
|
certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
|
|
18
18
|
certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
|
|
@@ -36,6 +36,7 @@ certora_cli/CertoraProver/certoraProjectScanner.py,sha256=jT7FeWzcy8o83LrZRwsg_L
|
|
|
36
36
|
certora_cli/CertoraProver/certoraSourceFinders.py,sha256=qwJtwrQq3NUNYmdmn1UmANN4lmJFIUh4M-St2x1FJ2Y,19038
|
|
37
37
|
certora_cli/CertoraProver/certoraType.py,sha256=inwaLkMVwtJnwkyQhDJs-wRxoyytu2Xa_BJ5MdGlZqY,29737
|
|
38
38
|
certora_cli/CertoraProver/certoraVerifyGenerator.py,sha256=YMuzGj2RNOnADOx8UnV2ys1ptw_-2mermgC9ZLMWceo,11052
|
|
39
|
+
certora_cli/CertoraProver/concordance.py,sha256=CCDN7hT9rnlU-ZKJ7hVxHR2fS8ZXwKVdE59jtMTtY0M,38666
|
|
39
40
|
certora_cli/CertoraProver/erc7201.py,sha256=BME5kBZsDx6lgqLn7EE91I1cEOZtsnZ8BlRVF62eEBE,1660
|
|
40
41
|
certora_cli/CertoraProver/splitRules.py,sha256=dNhy05ShB_-rWYTnJH5m-Xc5A4HGStAvwLRs1BTu1GA,7627
|
|
41
42
|
certora_cli/CertoraProver/storageExtension.py,sha256=nrCrbH8ne-yCYSDFzh3J9A7Q6h96WxhEfLbfxGSUCSc,14363
|
|
@@ -59,21 +60,21 @@ certora_cli/Mutate/mutateApp.py,sha256=UY4TWn9f318b2upVAFUL0cqcgzlyTDZ5XeNW3Mjof
|
|
|
59
60
|
certora_cli/Mutate/mutateAttributes.py,sha256=2onGaPmztwmHg5V_X7BUG4HcQCThhqYzGYKBy695Izc,10587
|
|
60
61
|
certora_cli/Mutate/mutateConstants.py,sha256=LRrz3wMM8WpPYSshkc-PLYqT0nexcWQeBNsehip-LOE,3945
|
|
61
62
|
certora_cli/Mutate/mutateUtil.py,sha256=B7MCIFtZBetjR4MMxU6F5ikYsaot1wTG7XYMjgVXl4k,2287
|
|
62
|
-
certora_cli/Mutate/mutateValidate.py,sha256=
|
|
63
|
+
certora_cli/Mutate/mutateValidate.py,sha256=vL3YxVkHIGoxolAcvPhK2xitUV0frQ4jTdTN270yeQ4,9298
|
|
63
64
|
certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99wT2PNdu4se8w,18457
|
|
64
65
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
|
65
66
|
certora_cli/Shared/certoraAttrUtil.py,sha256=Nw8ban5Axp6c6dT-KJfCD9i9tKnGk1DbvRDDNH3--DU,8574
|
|
66
67
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
|
67
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
|
68
|
+
certora_cli/Shared/certoraUtils.py,sha256=buUE95PnbpDEbYEZss_jcP7pWCRJhXnfV-eOA6-zvYM,58407
|
|
68
69
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=BPLuVsS3yAcYIuCvkXtDuFQKf2qaT74TIddB0lM84yM,42508
|
|
69
70
|
certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
|
|
70
|
-
certora_jars/ASTExtraction.jar,sha256=
|
|
71
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
|
72
|
-
certora_jars/Typechecker.jar,sha256
|
|
71
|
+
certora_jars/ASTExtraction.jar,sha256=yGLGQYChi03jYAh5xcEdCDtJNrKJUaUvnKCvqPNEIoI,17614869
|
|
72
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=7erl5giUb6YUO0NSTkPTRLlt1Ji4iJDxlLrnsCrPlzo,144
|
|
73
|
+
certora_jars/Typechecker.jar,sha256=-EbNEH1eheFLgb1vVSlG5o1g1bAmK2Q6iBKFkKMaND0,17577026
|
|
73
74
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
-
certora_cli_beta_mirror-8.
|
|
75
|
-
certora_cli_beta_mirror-8.
|
|
76
|
-
certora_cli_beta_mirror-8.
|
|
77
|
-
certora_cli_beta_mirror-8.
|
|
78
|
-
certora_cli_beta_mirror-8.
|
|
79
|
-
certora_cli_beta_mirror-8.
|
|
75
|
+
certora_cli_beta_mirror-8.2.0.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
|
76
|
+
certora_cli_beta_mirror-8.2.0.dist-info/METADATA,sha256=bU4nWKle__qGpvqqT8bsiiLCehI_qEtlpBFNi-2tcX4,1286
|
|
77
|
+
certora_cli_beta_mirror-8.2.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
78
|
+
certora_cli_beta_mirror-8.2.0.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
|
|
79
|
+
certora_cli_beta_mirror-8.2.0.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
|
80
|
+
certora_cli_beta_mirror-8.2.0.dist-info/RECORD,,
|
certora_jars/ASTExtraction.jar
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "certora-cli-beta-mirror", "tag": "8.
|
|
1
|
+
{"name": "certora-cli-beta-mirror", "tag": "8.2.0", "branch": "", "commit": "03cec31", "timestamp": "20250821.16.28.619968", "version": "8.2.0"}
|
certora_jars/Typechecker.jar
CHANGED
|
Binary file
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.1.0.dist-info → certora_cli_beta_mirror-8.2.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|