certora-cli-alpha-master 20250913.0.7.15157__py3-none-macosx_10_9_universal2.whl → 20250915.8.25.409401__py3-none-macosx_10_9_universal2.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 +8 -0
- certora_cli/CertoraProver/certoraBuildSui.py +49 -5
- certora_cli/Shared/certoraUtils.py +2 -0
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/METADATA +2 -2
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/RECORD +12 -12
- certora_jars/ASTExtraction.jar +0 -0
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/LICENSE +0 -0
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/WHEEL +0 -0
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/entry_points.txt +0 -0
- {certora_cli_alpha_master-20250913.0.7.15157.dist-info → certora_cli_alpha_master-20250915.8.25.409401.dist-info}/top_level.txt +0 -0
@@ -3817,6 +3817,14 @@ def build_source_tree(sources: Set[Path], context: CertoraContext, overwrite: bo
|
|
3817
3817
|
cwd_file_path.parent.mkdir(parents=True, exist_ok=True)
|
3818
3818
|
cwd_file_path.touch()
|
3819
3819
|
|
3820
|
+
# copy context.forge_remappings to remappings.txt in the source tree, overwriting any existing remappings.txt
|
3821
|
+
forge_remappings = getattr(context, 'forge_remappings', None)
|
3822
|
+
if forge_remappings:
|
3823
|
+
remappings_file_path = Util.get_certora_sources_dir() / context.cwd_rel_in_sources / Util.REMAPPINGS_FILE
|
3824
|
+
with remappings_file_path.open("w") as remap_file:
|
3825
|
+
for remap in context.forge_remappings:
|
3826
|
+
remap_file.write(remap + "\n")
|
3827
|
+
|
3820
3828
|
# the empty file .project_directory is written in the source tree to denote the project directory
|
3821
3829
|
rust_proj_dir = getattr(context, 'rust_project_directory', None)
|
3822
3830
|
if rust_proj_dir:
|
@@ -15,6 +15,7 @@
|
|
15
15
|
|
16
16
|
from __future__ import annotations
|
17
17
|
|
18
|
+
import subprocess
|
18
19
|
import sys
|
19
20
|
from pathlib import Path
|
20
21
|
|
@@ -37,13 +38,13 @@ log = logging.getLogger(__name__)
|
|
37
38
|
|
38
39
|
def build_sui_project(context: CertoraContext, timings: Dict) -> None:
|
39
40
|
"""
|
40
|
-
Compile the
|
41
|
+
Compile the Sui artefact and record elapsed time in *timings*.
|
41
42
|
|
42
43
|
Args:
|
43
44
|
context: The CertoraContext object containing the configuration.
|
44
45
|
timings: A dictionary to store timing information.
|
45
46
|
"""
|
46
|
-
log.debug("Build
|
47
|
+
log.debug("Build Sui target")
|
47
48
|
start = time.perf_counter()
|
48
49
|
set_sui_build_directory(context)
|
49
50
|
timings["buildTime"] = round(time.perf_counter() - start, 4)
|
@@ -52,17 +53,60 @@ def build_sui_project(context: CertoraContext, timings: Dict) -> None:
|
|
52
53
|
|
53
54
|
|
54
55
|
def set_sui_build_directory(context: CertoraContext) -> None:
|
55
|
-
|
56
|
+
sources: Set[Path] = set()
|
56
57
|
|
57
|
-
|
58
|
+
# If no move_path was specified, try to build the package
|
59
|
+
if not context.move_path:
|
60
|
+
move_toml_file = Util.find_file_in_parents("Move.toml")
|
61
|
+
if not move_toml_file:
|
62
|
+
raise Util.CertoraUserInputError("Could not find Move.toml, and no move_path was specified.")
|
63
|
+
sources.add(move_toml_file.absolute())
|
64
|
+
run_sui_build(context, move_toml_file.parent)
|
58
65
|
|
59
|
-
|
66
|
+
assert context.move_path, "expecting move_path to be set after build"
|
67
|
+
move_dir = Path(context.move_path)
|
68
|
+
assert move_dir.exists(), f"Output path '{move_dir}' does not exist"
|
69
|
+
assert move_dir.is_dir(), f"Output path '{move_dir}' is not a directory"
|
70
|
+
|
71
|
+
# Add all source files. We get these from the Sui build output, because it includes dependencies as well, and is
|
72
|
+
# available even if we didn't run the build ourselves.
|
73
|
+
sources.update(move_dir.rglob("*.move"))
|
74
|
+
|
75
|
+
# Add conf file if it exists
|
60
76
|
if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
|
61
77
|
sources.add(Path(context.conf_file).absolute())
|
62
78
|
|
79
|
+
# Copy the binary modules and source maps
|
80
|
+
shutil.copytree(move_dir,
|
81
|
+
Util.get_build_dir() / move_dir.name,
|
82
|
+
ignore=shutil.ignore_patterns('*.move'))
|
83
|
+
|
63
84
|
try:
|
64
85
|
# Create generators
|
65
86
|
build_source_tree(sources, context)
|
66
87
|
|
67
88
|
except Exception as e:
|
68
89
|
raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
|
90
|
+
|
91
|
+
def run_sui_build(context: CertoraContext, package_dir: Path) -> None:
|
92
|
+
assert not context.move_path, "run_sui_build: expecting move_path to be empty"
|
93
|
+
|
94
|
+
build_cmd = ["sui", "move", "build", "--test", "--path", str(package_dir)]
|
95
|
+
|
96
|
+
try:
|
97
|
+
build_cmd_text = ' '.join(build_cmd)
|
98
|
+
log.info(f"Building by calling `{build_cmd_text}`")
|
99
|
+
result = subprocess.run(build_cmd, capture_output=False)
|
100
|
+
|
101
|
+
# Check if the script executed successfully
|
102
|
+
if result.returncode != 0:
|
103
|
+
raise Util.CertoraUserInputError(f"Error running `{build_cmd_text}`")
|
104
|
+
|
105
|
+
context.move_path = str(package_dir / "build")
|
106
|
+
|
107
|
+
except Util.TestResultsReady as e:
|
108
|
+
raise e
|
109
|
+
except Util.CertoraUserInputError as e:
|
110
|
+
raise e
|
111
|
+
except Exception as e:
|
112
|
+
raise Util.CertoraUserInputError(f"An unexpected error occurred: {e}")
|
@@ -1418,6 +1418,8 @@ def handle_remappings_file(context: SimpleNamespace) -> List[str]:
|
|
1418
1418
|
elif find_nearest_foundry_toml():
|
1419
1419
|
remappings = get_mappings_from_forge_remappings()
|
1420
1420
|
|
1421
|
+
context.forge_remappings = remappings
|
1422
|
+
|
1421
1423
|
return remappings
|
1422
1424
|
|
1423
1425
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version:
|
3
|
+
Version: 20250915.8.25.409401
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
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 977b242. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -13,11 +13,11 @@ certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfa
|
|
13
13
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
14
14
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
15
15
|
certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
|
16
|
-
certora_cli/CertoraProver/certoraBuild.py,sha256=
|
16
|
+
certora_cli/CertoraProver/certoraBuild.py,sha256=ileKhlWeKmt5VADQxR8RyB9UzsoWHaMsiOsVkdEToMs,223972
|
17
17
|
certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=YnZmBZ_gCIbLwExgK5oxFlVDQGe4_YuGIpDLMy589E0,13318
|
18
18
|
certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
|
19
19
|
certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
|
20
|
-
certora_cli/CertoraProver/certoraBuildSui.py,sha256=
|
20
|
+
certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
|
21
21
|
certora_cli/CertoraProver/certoraCloudIO.py,sha256=99IRWSA4wAF1q_yu7m1IpDlybMVqtupW_C5qa3Xrhs0,54351
|
22
22
|
certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-u0H2fAFulTLAn7GW-j3ox2XZSz0ghdjk0,14116
|
23
23
|
certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZtV_b8QI1Egi6cbB5-uuh5beYN0,12630
|
@@ -65,16 +65,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
|
|
65
65
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
66
66
|
certora_cli/Shared/certoraAttrUtil.py,sha256=Nw8ban5Axp6c6dT-KJfCD9i9tKnGk1DbvRDDNH3--DU,8574
|
67
67
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
68
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
68
|
+
certora_cli/Shared/certoraUtils.py,sha256=msCKShnEQCJuXvbbF2YVDs_lAKZclnVIZoYNG0Qe63U,58450
|
69
69
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=BPLuVsS3yAcYIuCvkXtDuFQKf2qaT74TIddB0lM84yM,42508
|
70
70
|
certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
|
71
|
-
certora_jars/ASTExtraction.jar,sha256=
|
72
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
73
|
-
certora_jars/Typechecker.jar,sha256=
|
71
|
+
certora_jars/ASTExtraction.jar,sha256=ikcKnHuLhUhMA7wKNBwvv84DyGYpS_SfcCPPfBCB0mE,17623191
|
72
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=ASw0g48SyKZn3GL5LO9iJJA056u0ooSEI166CXsDt5s,168
|
73
|
+
certora_jars/Typechecker.jar,sha256=BoMtRNf45c1hq-15kXUnLHAmkn2vbLB5-a4Uf79M7fw,17585348
|
74
74
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
|
-
certora_cli_alpha_master-
|
76
|
-
certora_cli_alpha_master-
|
77
|
-
certora_cli_alpha_master-
|
78
|
-
certora_cli_alpha_master-
|
79
|
-
certora_cli_alpha_master-
|
80
|
-
certora_cli_alpha_master-
|
75
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
76
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/METADATA,sha256=Bp0nksSnTPr2DEJJfriff8r66Lf5Briix6GsCnia3B0,1303
|
77
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
|
78
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
|
79
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
80
|
+
certora_cli_alpha_master-20250915.8.25.409401.dist-info/RECORD,,
|
certora_jars/ASTExtraction.jar
CHANGED
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "977b242", "timestamp": "20250915.8.25.409401", "version": "20250915.8.25.409401+977b242"}
|
certora_jars/Typechecker.jar
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|