certora-cli-alpha-master 20241218.18.41.295142__tar.gz → 20241219.2.15.305705__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {certora_cli_alpha_master-20241218.18.41.295142/certora_cli_alpha_master.egg-info → certora_cli_alpha_master-20241219.2.15.305705}/PKG-INFO +2 -2
- certora_cli_alpha_master-20241219.2.15.305705/README.md +1 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/rustMutator.py +38 -50
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705/certora_cli_alpha_master.egg-info}/PKG-INFO +2 -2
- certora_cli_alpha_master-20241219.2.15.305705/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/setup.py +2 -2
- certora_cli_alpha_master-20241218.18.41.295142/README.md +0 -1
- certora_cli_alpha_master-20241218.18.41.295142/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/LICENSE +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/MANIFEST.in +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_bins/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollector.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollectorFactory.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollectorSol.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollectorSolBased.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollectorVy.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/CompilerCollectorYul.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/Compiler/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraBuild.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraBuildCacheManager.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraBuildDataClasses.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraCloudIO.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraCollectRunMetadata.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraCompilerParameters.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraConfigIO.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraContext.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraContextAttributes.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraContextClass.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraContextValidator.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraContractFuncs.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraExtensionInfo.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraJobList.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraMiniSpecParser.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraNodeFilters.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraParseBuildScript.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraSourceFinders.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraType.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EVMVerifier/certoraVerifyGenerator.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/equivCheck.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/mutateApp.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/mutateAttributes.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/mutateConstants.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/mutateUtil.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Mutate/mutateValidate.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/ExpectedComparator.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/certoraAttrUtil.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/certoraLogging.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/certoraUtils.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/Shared/certoraValidateFuncs.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/certoraEqCheck.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/certoraMutate.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/certoraRun.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli/certoraSolanaProver.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli_alpha_master.egg-info/SOURCES.txt +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli_alpha_master.egg-info/dependency_links.txt +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli_alpha_master.egg-info/entry_points.txt +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli_alpha_master.egg-info/requires.txt +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_cli_alpha_master.egg-info/top_level.txt +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/certora_jars/__init__.py +0 -0
- {certora_cli_alpha_master-20241218.18.41.295142 → certora_cli_alpha_master-20241219.2.15.305705}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version:
|
3
|
+
Version: 20241219.2.15.305705
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
6
6
|
Author: Certora
|
@@ -23,4 +23,4 @@ Requires-Dist: StrEnum
|
|
23
23
|
Requires-Dist: tomli
|
24
24
|
Requires-Dist: universalmutator
|
25
25
|
|
26
|
-
Commit
|
26
|
+
Commit 2b6a3e9. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -0,0 +1 @@
|
|
1
|
+
Commit 2b6a3e9. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
|
3
|
+
import atexit
|
3
4
|
import shutil
|
4
5
|
import subprocess
|
5
6
|
import argparse
|
@@ -31,7 +32,7 @@ def parse_args() -> argparse.Namespace:
|
|
31
32
|
)
|
32
33
|
)
|
33
34
|
parser.add_argument(
|
34
|
-
"--
|
35
|
+
"--file_to_mutate",
|
35
36
|
"-f",
|
36
37
|
type=Path,
|
37
38
|
required=True,
|
@@ -74,27 +75,12 @@ def parse_args() -> argparse.Namespace:
|
|
74
75
|
return parser.parse_args()
|
75
76
|
|
76
77
|
|
77
|
-
def
|
78
|
-
"""
|
79
|
-
Restore the original source file from the backup.
|
80
|
-
|
81
|
-
Args:
|
82
|
-
backup_file (Path): Path to the backup file.
|
83
|
-
file_to_mutant (Path): Path to the original source file.
|
84
|
-
"""
|
85
|
-
rust_mutator_logger.info(f"Restoring the original '{file_to_mutant}' from '{backup_file}'...")
|
86
|
-
if Util.restore_backup(backup_file):
|
87
|
-
rust_mutator_logger.info(f"Original '{file_to_mutant}' restored successfully.")
|
88
|
-
else:
|
89
|
-
rust_mutator_logger.warning(f"No backup file '{backup_file}' found. Skipping restoration.")
|
90
|
-
|
91
|
-
|
92
|
-
def clean_temp_files(file_to_mutant: Path) -> None:
|
78
|
+
def clean_temp_files(file_to_mutate: Path) -> None:
|
93
79
|
"""
|
94
80
|
Remove temporary mutant output files matching the pattern '.um.mutant_output.*'.
|
95
81
|
|
96
82
|
Args:
|
97
|
-
|
83
|
+
file_to_mutate (Path): Path to the original source file.
|
98
84
|
"""
|
99
85
|
temp_files = Path().rglob(".um.mutant_output.*")
|
100
86
|
|
@@ -103,7 +89,7 @@ def clean_temp_files(file_to_mutant: Path) -> None:
|
|
103
89
|
temp_file.unlink()
|
104
90
|
rust_mutator_logger.info(f"Removed: {temp_file}")
|
105
91
|
|
106
|
-
backup_file = next(Path().rglob(f"{
|
92
|
+
backup_file = next(Path().rglob(f"{file_to_mutate}.um.backup.*"), None)
|
107
93
|
if backup_file:
|
108
94
|
backup_file.unlink()
|
109
95
|
rust_mutator_logger.info(f"Removed: {backup_file}")
|
@@ -148,22 +134,22 @@ def uniform_selection(mutants: List[Path], num_select: int, seed: int) -> List[P
|
|
148
134
|
return shuffled_mutants[:num_select]
|
149
135
|
|
150
136
|
|
151
|
-
def validate_source_file(
|
137
|
+
def validate_source_file(file_to_mutate: Path) -> None:
|
152
138
|
"""
|
153
139
|
Validate that the source file exists and has a .rs extension.
|
154
140
|
|
155
141
|
Args:
|
156
|
-
|
142
|
+
file_to_mutate (Path): Path to the Rust source file.
|
157
143
|
|
158
144
|
Raises:
|
159
145
|
Util.CertoraUserInputError: If validation fails.
|
160
146
|
"""
|
161
|
-
if not
|
162
|
-
raise Util.CertoraUserInputError(f"Source file '{
|
163
|
-
if not
|
164
|
-
raise Util.CertoraUserInputError(f"Source file '{
|
165
|
-
if
|
166
|
-
raise Util.CertoraUserInputError(f"Source file '{
|
147
|
+
if not file_to_mutate.exists():
|
148
|
+
raise Util.CertoraUserInputError(f"Source file '{file_to_mutate}' does not exist.")
|
149
|
+
if not file_to_mutate.is_file():
|
150
|
+
raise Util.CertoraUserInputError(f"Source file '{file_to_mutate}' is not a file.")
|
151
|
+
if file_to_mutate.suffix != ".rs":
|
152
|
+
raise Util.CertoraUserInputError(f"Source file '{file_to_mutate}' does not have a .rs extension.")
|
167
153
|
|
168
154
|
|
169
155
|
def validate_mutant_dir(mutants_location: Path) -> None:
|
@@ -186,13 +172,13 @@ def validate_mutant_dir(mutants_location: Path) -> None:
|
|
186
172
|
rust_mutator_logger.info(f"Mutant directory '{mutants_location}' created successfully.")
|
187
173
|
|
188
174
|
|
189
|
-
def validate_mutant_count(
|
175
|
+
def validate_mutant_count(file_to_mutate: Path, mutants_location: Path, num_mutants: int, seed: int) -> None:
|
190
176
|
"""
|
191
177
|
Validate the number of mutants generated is less than or equal to the specified limit. If the number of mutants
|
192
178
|
exceeds the limit, select uniformly based on the seed and delete the rest.
|
193
179
|
|
194
180
|
Args:
|
195
|
-
|
181
|
+
file_to_mutate (Path): Path to the original Rust source file.
|
196
182
|
mutants_location (Path): Directory containing generated mutants.
|
197
183
|
num_mutants (int): Upper bound on the number of mutants to generate.
|
198
184
|
seed (int, optional): Seed value for random selection.
|
@@ -201,7 +187,7 @@ def validate_mutant_count(file_to_mutant: Path, mutants_location: Path, num_muta
|
|
201
187
|
Util.CertoraUserInputError: If no mutants are generated.
|
202
188
|
"""
|
203
189
|
# Define the regex pattern to extract the mutant number
|
204
|
-
pattern = re.compile(rf"{re.escape(
|
190
|
+
pattern = re.compile(rf"{re.escape(file_to_mutate.stem)}\.mutant\.(\d+)\.rs$")
|
205
191
|
|
206
192
|
# Gather all mutants matching the pattern
|
207
193
|
mutants = [mutant for mutant in mutants_location.iterdir() if pattern.match(mutant.name)]
|
@@ -233,7 +219,7 @@ def validate_mutant_count(file_to_mutant: Path, mutants_location: Path, num_muta
|
|
233
219
|
for mutant, mutant_number in numbered_mutants:
|
234
220
|
if not 0 <= mutant_number < num_mutants:
|
235
221
|
for i in range(num_mutants):
|
236
|
-
new_file_name = mutant.with_name(f"{
|
222
|
+
new_file_name = mutant.with_name(f"{file_to_mutate.stem}.mutant.{i}.rs")
|
237
223
|
if new_file_name.exists():
|
238
224
|
continue
|
239
225
|
mutant.rename(new_file_name)
|
@@ -251,12 +237,12 @@ def validate_mutate_command() -> None:
|
|
251
237
|
raise Util.CertoraUserInputError("universalmutator command 'mutate' not found in PATH.")
|
252
238
|
|
253
239
|
|
254
|
-
def run_mutate(
|
240
|
+
def run_mutate(file_to_mutate: Path, mutants_location: Path, build_command: str) -> None:
|
255
241
|
"""
|
256
242
|
Execute the universalmutator command to generate mutants, displaying a progress bar.
|
257
243
|
|
258
244
|
Args:
|
259
|
-
|
245
|
+
file_to_mutate (Path): Path to the Rust source file.
|
260
246
|
mutants_location (Path): Directory to store generated mutants.
|
261
247
|
build_command (str): Command to execute for each mutant to verify compilation.
|
262
248
|
|
@@ -265,7 +251,7 @@ def run_mutate(file_to_mutant: Path, mutants_location: Path, build_command: str)
|
|
265
251
|
"""
|
266
252
|
mutate_command = [
|
267
253
|
"mutate",
|
268
|
-
str(
|
254
|
+
str(file_to_mutate),
|
269
255
|
"rust",
|
270
256
|
"--mutantDir",
|
271
257
|
str(mutants_location),
|
@@ -287,7 +273,7 @@ def run_mutate(file_to_mutant: Path, mutants_location: Path, build_command: str)
|
|
287
273
|
total_mutants = None
|
288
274
|
mutant_pattern = re.compile(r"^PROCESSING MUTANT: (\d+):")
|
289
275
|
total_pattern = re.compile(r"^(\d+) MUTANTS GENERATED BY RULES")
|
290
|
-
valid_mutant_pattern = re.compile(rf"VALID \[written to {mutants_location.stem}/{
|
276
|
+
valid_mutant_pattern = re.compile(rf"VALID \[written to {mutants_location.stem}/{file_to_mutate.stem}\.mutant\.\d+\.rs\]")
|
291
277
|
|
292
278
|
progress_bar = None
|
293
279
|
|
@@ -306,7 +292,7 @@ def run_mutate(file_to_mutant: Path, mutants_location: Path, build_command: str)
|
|
306
292
|
if total_match:
|
307
293
|
total_mutants = int(total_match.group(1))
|
308
294
|
progress_bar = tqdm(total=total_mutants, desc="Mutants Generated", unit="mutant")
|
309
|
-
rust_mutator_logger.info(f"Total mutants
|
295
|
+
rust_mutator_logger.info(f"Total mutants generated: {total_mutants}")
|
310
296
|
continue
|
311
297
|
|
312
298
|
# Update progress bar for each processed mutant
|
@@ -340,7 +326,7 @@ def run_mutate(file_to_mutant: Path, mutants_location: Path, build_command: str)
|
|
340
326
|
process.terminate()
|
341
327
|
|
342
328
|
def run_universal_mutator(
|
343
|
-
|
329
|
+
file_to_mutate: Path,
|
344
330
|
build_script: str,
|
345
331
|
mutants_location: Path,
|
346
332
|
num_mutants: int = NUM_MUTANTS,
|
@@ -351,7 +337,7 @@ def run_universal_mutator(
|
|
351
337
|
Generate mutants for the specified source file and ensure the original file remains unchanged.
|
352
338
|
|
353
339
|
Args:
|
354
|
-
|
340
|
+
file_to_mutate (Path): Path to the Rust source file.
|
355
341
|
build_script (str): Command to execute for each mutant to verify compilation.
|
356
342
|
mutants_location (Path): Directory to store generated mutants.
|
357
343
|
num_mutants (int): Upper bound on the number of mutants to generate (default: {NUM_MUTANTS}).
|
@@ -365,7 +351,10 @@ def run_universal_mutator(
|
|
365
351
|
backup_file = None
|
366
352
|
build_command = f"cp MUTATE & python3 {build_script}"
|
367
353
|
|
354
|
+
atexit.register(clean_temp_files, file_to_mutate)
|
355
|
+
|
368
356
|
try:
|
357
|
+
|
369
358
|
# Set up the logger
|
370
359
|
setup_logger(debug)
|
371
360
|
|
@@ -373,38 +362,37 @@ def run_universal_mutator(
|
|
373
362
|
validate_mutate_command()
|
374
363
|
|
375
364
|
# Validate source file
|
376
|
-
validate_source_file(
|
365
|
+
validate_source_file(file_to_mutate)
|
377
366
|
|
378
367
|
# Backup the original source file
|
379
|
-
rust_mutator_logger.info(f"Backing up '{
|
380
|
-
backup_file = Util.create_backup(
|
368
|
+
rust_mutator_logger.info(f"Backing up '{file_to_mutate}' ...")
|
369
|
+
backup_file = Util.create_backup(file_to_mutate)
|
370
|
+
|
381
371
|
if backup_file:
|
382
|
-
|
372
|
+
atexit.register(Util.restore_backup, backup_file)
|
373
|
+
rust_mutator_logger.info(f"Backing up '{file_to_mutate}' to '{backup_file} succeeded")
|
383
374
|
else:
|
384
|
-
rust_mutator_logger.warning(f"Backing up '{
|
375
|
+
rust_mutator_logger.warning(f"Backing up '{file_to_mutate}' to '{backup_file} failed")
|
385
376
|
|
386
377
|
# Validate or create mutant directory
|
387
378
|
validate_mutant_dir(mutants_location)
|
388
379
|
|
389
380
|
# Run the mutation command
|
390
|
-
run_mutate(
|
381
|
+
run_mutate(file_to_mutate, mutants_location, build_command)
|
391
382
|
|
392
383
|
# Make sure the number of mutants generated is less than or equal to the specified limit
|
393
|
-
validate_mutant_count(
|
394
|
-
|
384
|
+
validate_mutant_count(file_to_mutate, mutants_location, num_mutants, seed)
|
395
385
|
finally:
|
396
|
-
# Restore the original source file
|
397
386
|
if backup_file:
|
398
387
|
Util.restore_backup(backup_file)
|
399
|
-
|
400
|
-
clean_temp_files(file_to_mutant)
|
388
|
+
clean_temp_files(file_to_mutate)
|
401
389
|
|
402
390
|
|
403
391
|
if __name__ == "__main__":
|
404
392
|
# Parse command-line arguments
|
405
393
|
args = parse_args()
|
406
394
|
run_universal_mutator(
|
407
|
-
args.
|
395
|
+
args.file_to_mutate,
|
408
396
|
args.build_script,
|
409
397
|
args.mutants_location,
|
410
398
|
args.num_mutants,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version:
|
3
|
+
Version: 20241219.2.15.305705
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
6
6
|
Author: Certora
|
@@ -23,4 +23,4 @@ Requires-Dist: StrEnum
|
|
23
23
|
Requires-Dist: tomli
|
24
24
|
Requires-Dist: universalmutator
|
25
25
|
|
26
|
-
Commit
|
26
|
+
Commit 2b6a3e9. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "2b6a3e9", "timestamp": "20241219.2.15.305705", "version": "20241219.2.15.305705+2b6a3e9"}
|
Binary file
|
@@ -3,11 +3,11 @@ import setuptools
|
|
3
3
|
|
4
4
|
setuptools.setup(
|
5
5
|
name="certora-cli-alpha-master",
|
6
|
-
version="
|
6
|
+
version="20241219.2.15.305705",
|
7
7
|
author="Certora",
|
8
8
|
author_email="support@certora.com",
|
9
9
|
description="Runner for the Certora Prover",
|
10
|
-
long_description="Commit
|
10
|
+
long_description="Commit 2b6a3e9. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.",
|
11
11
|
long_description_content_type="text/markdown",
|
12
12
|
url="https://pypi.org/project/certora-cli-alpha-master",
|
13
13
|
packages=setuptools.find_packages(),
|
@@ -1 +0,0 @@
|
|
1
|
-
Commit 1731e84. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
certora_cli_alpha_master-20241218.18.41.295142/certora_jars/CERTORA-CLI-VERSION-METADATA.json
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "1731e84", "timestamp": "20241218.18.41.295142", "version": "20241218.18.41.295142+1731e84"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|