certora-cli-alpha-master 20250613.6.41.742523__py3-none-any.whl → 20250614.14.39.832553__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/certoraBuild.py +2 -2
- certora_cli/CertoraProver/certoraBuildRust.py +2 -1
- certora_cli/CertoraProver/certoraCloudIO.py +5 -27
- certora_cli/CertoraProver/certoraContext.py +0 -2
- certora_cli/CertoraProver/certoraParseBuildScript.py +3 -2
- certora_cli/Shared/certoraUtils.py +10 -1
- certora_cli/Shared/proverCommon.py +2 -0
- certora_cli/certoraRun.py +2 -0
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/METADATA +2 -2
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/RECORD +16 -16
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/LICENSE +0 -0
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/WHEEL +0 -0
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/entry_points.txt +0 -0
- {certora_cli_alpha_master-20250613.6.41.742523.dist-info → certora_cli_alpha_master-20250614.14.39.832553.dist-info}/top_level.txt +0 -0
@@ -3614,7 +3614,7 @@ def build_source_tree(sources: Set[Path], context: CertoraContext, overwrite: bo
|
|
3614
3614
|
|
3615
3615
|
try:
|
3616
3616
|
if overwrite:
|
3617
|
-
# expecting target path to exist.
|
3617
|
+
# expecting the target path to exist.
|
3618
3618
|
if target_path.exists():
|
3619
3619
|
build_logger.debug(f"Overwriting {target_path} by copying from {source_path}")
|
3620
3620
|
else:
|
@@ -3632,7 +3632,7 @@ def build_source_tree(sources: Set[Path], context: CertoraContext, overwrite: bo
|
|
3632
3632
|
cwd_file_path.parent.mkdir(parents=True, exist_ok=True)
|
3633
3633
|
cwd_file_path.touch()
|
3634
3634
|
|
3635
|
-
# the empty file .project_directory is written in the source tree to denote the
|
3635
|
+
# the empty file .project_directory is written in the source tree to denote the project directory
|
3636
3636
|
rust_proj_dir = getattr(context, 'rust_project_directory', None)
|
3637
3637
|
if rust_proj_dir:
|
3638
3638
|
proj_dir_parent_relative = os.path.relpath(rust_proj_dir, os.getcwd())
|
@@ -51,6 +51,7 @@ def build_rust_app(context: CertoraContext) -> None:
|
|
51
51
|
feature_flag = '--features'
|
52
52
|
if context.cargo_tools_version:
|
53
53
|
build_command.extend(["--tools-version", context.cargo_tools_version])
|
54
|
+
context.rust_project_directory = Util.find_nearest_cargo_toml()
|
54
55
|
|
55
56
|
if context.cargo_features is not None:
|
56
57
|
build_command.append(feature_flag)
|
@@ -102,7 +103,7 @@ def add_solana_files_to_sources(context: CertoraContext, sources: Set[Path]) ->
|
|
102
103
|
|
103
104
|
|
104
105
|
def collect_files_from_rust_sources(context: CertoraContext, sources: Set[Path]) -> None:
|
105
|
-
patterns = ["*.rs", "*.so", "*.wasm",
|
106
|
+
patterns = ["*.rs", "*.so", "*.wasm", Util.CARGO_TOML_FILE, "Cargo.lock", "justfile"]
|
106
107
|
exclude_dirs = [".certora_internal"]
|
107
108
|
|
108
109
|
if hasattr(context, 'rust_project_directory'):
|
@@ -760,42 +760,20 @@ class CloudVerification:
|
|
760
760
|
Util.get_configuration_layout_data_file(),
|
761
761
|
Util.get_build_dir() / Path(self.context.files[0]).name]
|
762
762
|
|
763
|
+
if Util.get_debug_log_file().exists():
|
764
|
+
files_list.append(Util.get_debug_log_file())
|
765
|
+
|
763
766
|
if Util.get_certora_sources_dir().exists():
|
764
767
|
files_list.append(Util.get_certora_sources_dir())
|
765
768
|
|
766
769
|
if hasattr(self.context, 'build_script') and self.context.build_script:
|
767
|
-
result = compress_files(self.logZipFilePath, Util.get_debug_log_file(),
|
768
|
-
short_output=Ctx.is_minimal_cli_output(self.context))
|
769
|
-
|
770
|
-
if not result:
|
771
|
-
return False
|
772
|
-
files_list.append(self.logZipFilePath)
|
773
|
-
|
774
|
-
# Create a .RustExecution file to classify zipInput as a rust source code
|
775
|
-
rust_execution_file = Util.get_build_dir() / ".RustExecution"
|
776
|
-
rust_execution_file.touch(exist_ok=True)
|
777
|
-
files_list.append(rust_execution_file)
|
778
|
-
|
779
770
|
if attr_file := getattr(self.context, 'rust_logs_stdout', None):
|
780
771
|
files_list.append(Util.get_build_dir() / Path(attr_file).name)
|
781
772
|
if attr_file := getattr(self.context, 'rust_logs_stderr', None):
|
782
773
|
files_list.append(Util.get_build_dir() / Path(attr_file).name)
|
783
774
|
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
elif Attrs.is_solana_app() or Attrs.is_soroban_app():
|
788
|
-
for file in self.context.files:
|
789
|
-
files_list.append(Path(file))
|
790
|
-
|
791
|
-
result = compress_files(self.ZipFilePath, *files_list,
|
792
|
-
short_output=Ctx.is_minimal_cli_output(self.context))
|
793
|
-
else:
|
794
|
-
raise Util.CertoraUserInputError(
|
795
|
-
'When running rust application, context should either have attribute "rust_executables" '
|
796
|
-
'provided by build_script execution, '
|
797
|
-
'or either is_solana_app(), is_soroban_app() should be set to True'
|
798
|
-
)
|
775
|
+
result = compress_files(self.ZipFilePath, *files_list,
|
776
|
+
short_output=Ctx.is_minimal_cli_output(self.context))
|
799
777
|
|
800
778
|
else:
|
801
779
|
# Zip the log file first separately and again with the rest of the files, so it will not be decompressed
|
@@ -150,8 +150,6 @@ def get_local_run_cmd(context: CertoraContext) -> List[str]:
|
|
150
150
|
java_cmd.extend(context.java_args.strip().split(' '))
|
151
151
|
|
152
152
|
cmd = java_cmd + ["-jar", jar_path] + run_args
|
153
|
-
if context.test == str(Util.TestValue.LOCAL_JAR):
|
154
|
-
raise Util.TestResultsReady(' '.join(cmd))
|
155
153
|
return cmd
|
156
154
|
|
157
155
|
|
@@ -90,11 +90,12 @@ def run_rust_build(context: CertoraContext, build_cmd: List[str]) -> None:
|
|
90
90
|
|
91
91
|
add_solana_files_to_context(context, json_obj)
|
92
92
|
|
93
|
-
if context.test == str(Util.TestValue.AFTER_BUILD_RUST):
|
94
|
-
raise Util.TestResultsReady(context)
|
95
93
|
assert not context.files, f"run_rust_build: expecting files to be empty, got: {context.files}"
|
96
94
|
context.files = [os.path.join(context.rust_project_directory, context.rust_executables)]
|
97
95
|
|
96
|
+
if context.test == str(Util.TestValue.AFTER_BUILD_RUST):
|
97
|
+
raise Util.TestResultsReady(context)
|
98
|
+
|
98
99
|
except Util.TestResultsReady as e:
|
99
100
|
raise e
|
100
101
|
except FileNotFoundError as e:
|
@@ -96,6 +96,7 @@ EMV_JAR = Path("emv.jar")
|
|
96
96
|
CERTORA_SOURCES = Path(".certora_sources")
|
97
97
|
SOLANA_INLINING = "solana_inlining"
|
98
98
|
SOLANA_SUMMARIES = "solana_summaries"
|
99
|
+
CARGO_TOML_FILE = "cargo.toml"
|
99
100
|
|
100
101
|
ALPHA_PACKAGE_NAME = 'certora-cli-alpha'
|
101
102
|
ALPHA_PACKAGE_MASTER_NAME = ALPHA_PACKAGE_NAME + '-master'
|
@@ -1271,7 +1272,7 @@ class TestValue(NoValEnum):
|
|
1271
1272
|
determines the chekpoint where the execution will halt. The exception TestResultsReady will be thrown. The value
|
1272
1273
|
will also determine what object will be attached to the exception for inspection by the caller
|
1273
1274
|
"""
|
1274
|
-
|
1275
|
+
BEFORE_LOCAL_PROVER_CALL = auto()
|
1275
1276
|
CHECK_ARGS = auto()
|
1276
1277
|
AFTER_BUILD = auto()
|
1277
1278
|
CHECK_SOLC_OPTIONS = auto()
|
@@ -1462,6 +1463,14 @@ def eq_by(f: Callable[[T, T], bool], a: Sequence[T], b: Sequence[T]) -> bool:
|
|
1462
1463
|
"""
|
1463
1464
|
return len(a) == len(b) and all(map(f, a, b))
|
1464
1465
|
|
1466
|
+
def find_nearest_cargo_toml() -> Optional[Path]:
|
1467
|
+
current = Path.cwd()
|
1468
|
+
for parent in [current] + list(current.parents):
|
1469
|
+
candidate = parent / CARGO_TOML_FILE
|
1470
|
+
if candidate.is_file():
|
1471
|
+
return candidate
|
1472
|
+
return None
|
1473
|
+
|
1465
1474
|
def file_in_source_tree(file_path: Path) -> bool:
|
1466
1475
|
# if the file is under .certora_source, return True
|
1467
1476
|
file_path = Path(file_path).absolute()
|
@@ -176,6 +176,8 @@ def run_local(context: CertoraContext, timings: Dict, additional_commands: Optio
|
|
176
176
|
cmd.extend(additional_commands)
|
177
177
|
|
178
178
|
print(f'Verifier run command:\n {" ".join(cmd)}')
|
179
|
+
if context.test == str(Util.TestValue.BEFORE_LOCAL_PROVER_CALL):
|
180
|
+
raise Util.TestResultsReady(' '.join(cmd))
|
179
181
|
rc = Util.run_jar_cmd(
|
180
182
|
cmd,
|
181
183
|
override_exit_code=compare_with_expected_file,
|
certora_cli/certoraRun.py
CHANGED
@@ -99,6 +99,8 @@ def run_certora(args: List[str], attrs_class: Optional[Type[AttrUtil.Attributes]
|
|
99
99
|
print(f"Verifier run command:\n {check_cmd_string}", flush=True)
|
100
100
|
|
101
101
|
compare_with_tool_output = False
|
102
|
+
if context.test == str(Util.TestValue.BEFORE_LOCAL_PROVER_CALL):
|
103
|
+
raise Util.TestResultsReady(' '.join(check_cmd))
|
102
104
|
run_result = Util.run_jar_cmd(check_cmd, compare_with_tool_output, logger_topic="verification",
|
103
105
|
print_output=True)
|
104
106
|
# For solana and wasm, we don't check types so build time is zero.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version:
|
3
|
+
Version: 20250614.14.39.832553
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
6
6
|
Author: Certora
|
@@ -37,4 +37,4 @@ Dynamic: requires-dist
|
|
37
37
|
Dynamic: requires-python
|
38
38
|
Dynamic: summary
|
39
39
|
|
40
|
-
Commit
|
40
|
+
Commit e12b20d. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -4,21 +4,21 @@ certora_cli/certoraEVMProver.py,sha256=gLxqPXG9jKlCdLdgfo0aNjvp09vbHGSs8wghY6RH0
|
|
4
4
|
certora_cli/certoraEqCheck.py,sha256=qfZq7bpU1kbAIezC66W61VfKNZz7Uywg2Ygup62qYeo,1069
|
5
5
|
certora_cli/certoraMutate.py,sha256=XhFHyNVP_sk-3XkY6AAV5fVliEFAVRq-JeDGsqE5IQQ,3333
|
6
6
|
certora_cli/certoraRanger.py,sha256=cwejxWTNlHsbwtu6Lew0SNsynSeq_ZKJu1Cr9uu0DhE,1314
|
7
|
-
certora_cli/certoraRun.py,sha256=
|
7
|
+
certora_cli/certoraRun.py,sha256=mTBAi-SVCApy8BvfvKAL8Z4PdGcaBV3G5vNXPrFdgTI,8817
|
8
8
|
certora_cli/certoraSolanaProver.py,sha256=7hu-YJJNA_P5eAJq_jYh6IGjiUf0PegGUBRCJ5AhE7s,3274
|
9
9
|
certora_cli/certoraSorobanProver.py,sha256=qE6b_vicC8KgOvUz7UTOaDuXT3UW0MMhq3keQgUVvzs,2865
|
10
10
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
11
11
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
12
|
-
certora_cli/CertoraProver/certoraBuild.py,sha256=
|
12
|
+
certora_cli/CertoraProver/certoraBuild.py,sha256=vEjY15A_4OWuNELys2joVxbl-k_lKC25RRfBlvQgfRI,212074
|
13
13
|
certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=dzXC8A-V9gr1GGsPYglQLlFLoR2Tk4dTJuMHaxXBfgw,13257
|
14
14
|
certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=8tPny9-pasC7CCRKQclaVQ3qcEDNa6EdOUu1ZWh0MZY,14704
|
15
|
-
certora_cli/CertoraProver/certoraBuildRust.py,sha256=
|
16
|
-
certora_cli/CertoraProver/certoraCloudIO.py,sha256=
|
15
|
+
certora_cli/CertoraProver/certoraBuildRust.py,sha256=ofKvmtqzUGTrgVm5crcybV7gbElbjiUc6Z4FphPEjz0,6016
|
16
|
+
certora_cli/CertoraProver/certoraCloudIO.py,sha256=w3mqA5ANgIX6dsb6Nxg4jl9zBRdAX5kw9xLeYmA-iHc,53062
|
17
17
|
certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=waMo5_nzirDaK7aoPCfoS7jOqqi_6huRc-_jTrDcZO8,14252
|
18
18
|
certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=n67E7hjVdPlBXMh1FMzcWSgu3v5SfFM_HOO2JpbCeY0,11787
|
19
19
|
certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
|
20
20
|
certora_cli/CertoraProver/certoraConfigIO.py,sha256=uq-uNnjVBzg9Kh41fDqn-lnwSJXe4k2_iy5GTnQIDa8,7560
|
21
|
-
certora_cli/CertoraProver/certoraContext.py,sha256=
|
21
|
+
certora_cli/CertoraProver/certoraContext.py,sha256=A4RZMEd7Slx8dt_zEyohfA22wnwE8uw1cyc5ln3BE4k,25716
|
22
22
|
certora_cli/CertoraProver/certoraContextAttributes.py,sha256=tc5ieED4H1TaCG4FfEJmdx9b7NDyJzC3qlGfUbIFetg,69106
|
23
23
|
certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
|
24
24
|
certora_cli/CertoraProver/certoraContextValidator.py,sha256=A7blCXdJTnxTh5x1w1fADinWtRUPJoAZC3bfPj3W3Hs,45333
|
@@ -27,7 +27,7 @@ certora_cli/CertoraProver/certoraExtensionInfo.py,sha256=YlShzdoqJQgXXj3r0TJ3fir
|
|
27
27
|
certora_cli/CertoraProver/certoraJobList.py,sha256=FBIYgJ60I0Ok7vchfTbcuJJbiXgnfAhrONoVeZoHti4,11464
|
28
28
|
certora_cli/CertoraProver/certoraMiniSpecParser.py,sha256=NjjMwf5Rav3YWpoOJh4PZ-QOS8exC2cg4yIBSbZA6l0,9660
|
29
29
|
certora_cli/CertoraProver/certoraNodeFilters.py,sha256=5Uk2mixZKeis_JVd3HkLgoEVklkAYBXAZiNHRlXOIfY,2830
|
30
|
-
certora_cli/CertoraProver/certoraParseBuildScript.py,sha256=
|
30
|
+
certora_cli/CertoraProver/certoraParseBuildScript.py,sha256=l7KQA1poEjmbmuYbMskz0jOQg6cW0lM3vk5ruAGPjPI,4863
|
31
31
|
certora_cli/CertoraProver/certoraProjectScanner.py,sha256=jT7FeWzcy8o83LrZRwsg_L4x6im6Fm_0LZFKVbKr3Jk,6862
|
32
32
|
certora_cli/CertoraProver/certoraSourceFinders.py,sha256=qwJtwrQq3NUNYmdmn1UmANN4lmJFIUh4M-St2x1FJ2Y,19038
|
33
33
|
certora_cli/CertoraProver/certoraType.py,sha256=wD-Sr3xk_dJGtbvw33oIGu_lf15NCZuKWjUb4HlVcUM,29318
|
@@ -60,16 +60,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
|
|
60
60
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
61
61
|
certora_cli/Shared/certoraAttrUtil.py,sha256=ZsoS6xbSZnAjEoPEcfiJi6CvHU-1ySBKubvVKh78ohs,8373
|
62
62
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
63
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
63
|
+
certora_cli/Shared/certoraUtils.py,sha256=n99E6MzET_kYf0SK4XSh0OcT40T22UjqN4ynDGB6o-w,56477
|
64
64
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=EGoCGTtGMRzWdN-T5GducwkYbyqZBcSjQZHpau0fWnQ,41922
|
65
|
-
certora_cli/Shared/proverCommon.py,sha256
|
65
|
+
certora_cli/Shared/proverCommon.py,sha256=PqkjycZ3TdZr0RNWoPuA_VZ5b7EAAsu9ewymNH6kIm4,11291
|
66
66
|
certora_cli/Shared/rustProverCommon.py,sha256=NIZ5ECbhuiMegyRAl07CV3r68MFG2tBNKgUAQoV4uLI,2049
|
67
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
68
|
-
certora_jars/Typechecker.jar,sha256=
|
67
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=apYeIrHAGY_76r5vjToiMzTQaWuQm1LboyWq4F_v2rU,170
|
68
|
+
certora_jars/Typechecker.jar,sha256=VsMghU163R5wdmGEE0pKe3d-su2NM7V3m9-HwMxTlN8,17142931
|
69
69
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
70
|
-
certora_cli_alpha_master-
|
71
|
-
certora_cli_alpha_master-
|
72
|
-
certora_cli_alpha_master-
|
73
|
-
certora_cli_alpha_master-
|
74
|
-
certora_cli_alpha_master-
|
75
|
-
certora_cli_alpha_master-
|
70
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
71
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/METADATA,sha256=NXnlOlKqBpRIJ9Gr92kPwgG_cjeRKNu9gGdIM8bD1as,1248
|
72
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
73
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
|
74
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
75
|
+
certora_cli_alpha_master-20250614.14.39.832553.dist-info/RECORD,,
|
@@ -1 +1 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "e12b20d", "timestamp": "20250614.14.39.832553", "version": "20250614.14.39.832553+e12b20d"}
|
certora_jars/Typechecker.jar
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|