certora-cli-beta-mirror 8.2.2__tar.gz → 8.3.0__tar.gz

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.
Files changed (88) hide show
  1. {certora_cli_beta_mirror-8.2.2/certora_cli_beta_mirror.egg-info → certora_cli_beta_mirror-8.3.0}/PKG-INFO +2 -2
  2. certora_cli_beta_mirror-8.3.0/README.md +1 -0
  3. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraBuild.py +42 -7
  4. certora_cli_beta_mirror-8.3.0/certora_cli/CertoraProver/certoraBuildSui.py +112 -0
  5. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraConfigIO.py +2 -0
  6. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraContextAttributes.py +109 -21
  7. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/certoraUtils.py +3 -1
  8. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/certoraValidateFuncs.py +22 -7
  9. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0/certora_cli_beta_mirror.egg-info}/PKG-INFO +2 -2
  10. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_jars/ASTExtraction.jar +0 -0
  11. certora_cli_beta_mirror-8.3.0/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
  12. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_jars/Typechecker.jar +0 -0
  13. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/setup.py +2 -2
  14. certora_cli_beta_mirror-8.2.2/README.md +0 -1
  15. certora_cli_beta_mirror-8.2.2/certora_cli/CertoraProver/certoraBuildSui.py +0 -68
  16. certora_cli_beta_mirror-8.2.2/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
  17. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/LICENSE +0 -0
  18. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/MANIFEST.in +0 -0
  19. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_bins/__init__.py +0 -0
  20. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollector.py +0 -0
  21. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py +0 -0
  22. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorSol.py +0 -0
  23. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorSolBased.py +0 -0
  24. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorVy.py +0 -0
  25. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorYul.py +0 -0
  26. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/Compiler/__init__.py +0 -0
  27. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/__init__.py +0 -0
  28. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraApp.py +0 -0
  29. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraBuildCacheManager.py +0 -0
  30. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraBuildDataClasses.py +0 -0
  31. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraBuildRust.py +0 -0
  32. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraCloudIO.py +0 -0
  33. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraCollectConfigurationLayout.py +0 -0
  34. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraCollectRunMetadata.py +0 -0
  35. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraCompilerParameters.py +0 -0
  36. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraContext.py +0 -0
  37. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraContextClass.py +0 -0
  38. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraContextValidator.py +0 -0
  39. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraContractFuncs.py +0 -0
  40. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraExtensionInfo.py +0 -0
  41. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraJobList.py +0 -0
  42. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraMiniSpecParser.py +0 -0
  43. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraNodeFilters.py +0 -0
  44. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraParseBuildScript.py +0 -0
  45. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraProjectScanner.py +0 -0
  46. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraSourceFinders.py +0 -0
  47. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraType.py +0 -0
  48. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/certoraVerifyGenerator.py +0 -0
  49. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/erc7201.py +0 -0
  50. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/splitRules.py +0 -0
  51. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/CertoraProver/storageExtension.py +0 -0
  52. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
  53. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
  54. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
  55. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
  56. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
  57. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/__init__.py +0 -0
  58. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/equivCheck.py +0 -0
  59. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
  60. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/__init__.py +0 -0
  61. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/mutateApp.py +0 -0
  62. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/mutateAttributes.py +0 -0
  63. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/mutateConstants.py +0 -0
  64. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/mutateUtil.py +0 -0
  65. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Mutate/mutateValidate.py +0 -0
  66. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/ExpectedComparator.py +0 -0
  67. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/__init__.py +0 -0
  68. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/certoraAttrUtil.py +0 -0
  69. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/certoraLogging.py +0 -0
  70. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/Shared/proverCommon.py +0 -0
  71. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/__init__.py +0 -0
  72. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraCVLFormatter.py +0 -0
  73. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraConcord.py +0 -0
  74. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraEVMProver.py +0 -0
  75. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraEqCheck.py +0 -0
  76. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraMutate.py +0 -0
  77. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraRanger.py +0 -0
  78. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraRun.py +0 -0
  79. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraSolanaProver.py +0 -0
  80. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/certoraSorobanProver.py +0 -0
  81. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli/rustMutator.py +0 -0
  82. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli_beta_mirror.egg-info/SOURCES.txt +0 -0
  83. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli_beta_mirror.egg-info/dependency_links.txt +0 -0
  84. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli_beta_mirror.egg-info/entry_points.txt +0 -0
  85. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli_beta_mirror.egg-info/requires.txt +0 -0
  86. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_cli_beta_mirror.egg-info/top_level.txt +0 -0
  87. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/certora_jars/__init__.py +0 -0
  88. {certora_cli_beta_mirror-8.2.2 → certora_cli_beta_mirror-8.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-beta-mirror
3
- Version: 8.2.2
3
+ Version: 8.3.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 04cd39e. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
42
+ Commit 3c8a0dd. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -0,0 +1 @@
1
+ Commit 3c8a0dd. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -2849,7 +2849,7 @@ class CertoraBuildGenerator:
2849
2849
  self.handle_erc7201_annotations()
2850
2850
  self.handle_storage_extension_harnesses()
2851
2851
 
2852
- def extract_slayout(self, original_file: str, ns_storage: Set[NameSpacedStorage], compiler_version: str) -> NewStorageInfo:
2852
+ def extract_slayout(self, original_file: str, ns_storage: Set[NameSpacedStorage], compiler_version: str, target_file: str) -> NewStorageInfo:
2853
2853
  """
2854
2854
  Given a file containing a contract with namespaced storage, extract the storage information
2855
2855
  corresponding to the namespaced types.
@@ -2893,8 +2893,8 @@ class CertoraBuildGenerator:
2893
2893
  abs_path = Util.abs_posix_path(tmp_file.name)
2894
2894
  self.context.file_to_contract[abs_path] = {harness_name}
2895
2895
 
2896
- try:
2897
- # Compile & fetch the raw storage_layout
2896
+ def attempt_compilation() -> NewStorageInfo:
2897
+ """Helper function to compile and extract layout"""
2898
2898
  compile_idx = storageExtension.get_next_file_index(self.file_to_sdc_name)
2899
2899
  sdcs = self.collect_for_file(tmp_file.name, compile_idx, CompilerLangSol(), Path.cwd(), Util.abs_posix_path(tmp_file.name), None)
2900
2900
  if not sdcs:
@@ -2903,12 +2903,38 @@ class CertoraBuildGenerator:
2903
2903
 
2904
2904
  # Remap each slot according to the ERC-7201 namespace
2905
2905
  remapped_fields = storageExtension.remapped_fields_from_layout(layout, var_to_slot)
2906
-
2907
2906
  return (remapped_fields, layout.get('types', {}))
2908
2907
 
2908
+ # First attempt with original content
2909
+ try:
2910
+ return attempt_compilation()
2909
2911
  except Exception as e:
2910
- build_logger.error(f"Error extracting storage layout for {original_file}: {str(e)}")
2911
- raise
2912
+ if not target_file:
2913
+ build_logger.error(f"Error extracting storage layout for {original_file}: {str(e)}")
2914
+ raise
2915
+
2916
+ # Retry with target file import
2917
+ build_logger.info("First attempt failed, retrying with import of target file")
2918
+
2919
+ # Read current content
2920
+ tmp_file.seek(0)
2921
+ current_content = tmp_file.read()
2922
+
2923
+ # Prepare modified content with target import at the beginning
2924
+ rel_target_path = os.path.relpath(target_file, Path.cwd())
2925
+ modified_content = f'import "{rel_target_path}";\n{current_content}'
2926
+
2927
+ # Write modified content
2928
+ tmp_file.seek(0)
2929
+ tmp_file.truncate()
2930
+ tmp_file.write(modified_content)
2931
+ tmp_file.flush()
2932
+
2933
+ try:
2934
+ return attempt_compilation()
2935
+ except Exception as retry_e:
2936
+ build_logger.error(f"Retry also failed for {original_file}: {str(retry_e)}")
2937
+ raise retry_e
2912
2938
  finally:
2913
2939
  # Delete the key from the context
2914
2940
  self.context.file_to_contract.pop(abs_path, None)
@@ -2957,7 +2983,8 @@ class CertoraBuildGenerator:
2957
2983
 
2958
2984
  # Now that we have all the storage layout information, extract it once
2959
2985
  slayouts[key] = self.extract_slayout(imported_file, ns_storage,
2960
- get_relevant_compiler(Path(target_file), self.context))
2986
+ get_relevant_compiler(Path(target_file), self.context),
2987
+ target_file)
2961
2988
 
2962
2989
  if self.context.test == str(Util.TestValue.STORAGE_EXTENSION_LAYOUT):
2963
2990
  raise Util.TestResultsReady(slayouts)
@@ -3817,6 +3844,14 @@ def build_source_tree(sources: Set[Path], context: CertoraContext, overwrite: bo
3817
3844
  cwd_file_path.parent.mkdir(parents=True, exist_ok=True)
3818
3845
  cwd_file_path.touch()
3819
3846
 
3847
+ # copy context.forge_remappings to remappings.txt in the source tree, overwriting any existing remappings.txt
3848
+ forge_remappings = getattr(context, 'forge_remappings', None)
3849
+ if forge_remappings:
3850
+ remappings_file_path = Util.get_certora_sources_dir() / context.cwd_rel_in_sources / Util.REMAPPINGS_FILE
3851
+ with remappings_file_path.open("w") as remap_file:
3852
+ for remap in context.forge_remappings:
3853
+ remap_file.write(remap + "\n")
3854
+
3820
3855
  # the empty file .project_directory is written in the source tree to denote the project directory
3821
3856
  rust_proj_dir = getattr(context, 'rust_project_directory', None)
3822
3857
  if rust_proj_dir:
@@ -0,0 +1,112 @@
1
+ # The Certora Prover
2
+ # Copyright (C) 2025 Certora Ltd.
3
+ #
4
+ # This program is free software: you can redistribute it and/or modify
5
+ # it under the terms of the GNU General Public License as published by
6
+ # the Free Software Foundation, version 3 of the License.
7
+ #
8
+ # This program is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
+
16
+ from __future__ import annotations
17
+
18
+ import subprocess
19
+ import sys
20
+ from pathlib import Path
21
+
22
+ scripts_dir_path = Path(__file__).parent.parent.resolve() # containing directory
23
+ sys.path.insert(0, str(scripts_dir_path))
24
+
25
+ import shutil
26
+ import time
27
+ import logging
28
+ from pathlib import Path
29
+ from typing import Set, Dict
30
+
31
+ from CertoraProver.certoraBuild import build_source_tree
32
+ from CertoraProver.certoraContextClass import CertoraContext
33
+ from Shared import certoraUtils as Util
34
+
35
+
36
+ log = logging.getLogger(__name__)
37
+
38
+
39
+ def build_sui_project(context: CertoraContext, timings: Dict) -> None:
40
+ """
41
+ Compile the Sui artefact and record elapsed time in *timings*.
42
+
43
+ Args:
44
+ context: The CertoraContext object containing the configuration.
45
+ timings: A dictionary to store timing information.
46
+ """
47
+ log.debug("Build Sui target")
48
+ start = time.perf_counter()
49
+ set_sui_build_directory(context)
50
+ timings["buildTime"] = round(time.perf_counter() - start, 4)
51
+ if context.test == str(Util.TestValue.AFTER_BUILD):
52
+ raise Util.TestResultsReady(context)
53
+
54
+
55
+ def set_sui_build_directory(context: CertoraContext) -> None:
56
+ sources: Set[Path] = set()
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)
65
+
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
76
+ if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
77
+ sources.add(Path(context.conf_file).absolute())
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
+
84
+ try:
85
+ # Create generators
86
+ build_source_tree(sources, context)
87
+
88
+ except Exception as e:
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}")
@@ -111,6 +111,8 @@ def handle_override_base_config(context: CertoraContext) -> None:
111
111
  if hasattr(context, attr):
112
112
  value = getattr(context, attr, False)
113
113
  if not value:
114
+ if attr in context.conf_file_attr and value is False:
115
+ continue # skip override if a boolean attribute was explicitly set to False in the conf file
114
116
  setattr(context, attr, override_base_config_attrs.get(attr))
115
117
  else:
116
118
  raise Util.CertoraUserInputError(f"{attr} appears in the base conf file {context.override_base_config} but is not a known attribute.")
@@ -670,7 +670,7 @@ class EvmAttributes(AttrUtil.Attributes):
670
670
 
671
671
  EXCLUDE_RULE = AttrUtil.AttributeDefinition(
672
672
  arg_type=AttrUtil.AttrArgType.LIST,
673
- attr_validation_func=Vf.validate_rule_name,
673
+ attr_validation_func=Vf.validate_evm_rule_name,
674
674
  jar_flag='-excludeRule',
675
675
  help_msg="Filter out the list of rules/invariants to verify. Asterisks are interpreted as wildcards",
676
676
  default_desc="Verifies all rules and invariants",
@@ -684,7 +684,7 @@ class EvmAttributes(AttrUtil.Attributes):
684
684
 
685
685
  SPLIT_RULES = AttrUtil.AttributeDefinition(
686
686
  arg_type=AttrUtil.AttrArgType.LIST,
687
- attr_validation_func=Vf.validate_rule_name,
687
+ attr_validation_func=Vf.validate_evm_rule_name,
688
688
  help_msg="List of rules to be sent to Prover each on a separate run",
689
689
  default_desc="Verifies all rules and invariants in a single run",
690
690
  argparse_args={
@@ -912,7 +912,7 @@ class EvmAttributes(AttrUtil.Attributes):
912
912
  )
913
913
 
914
914
  METHOD = AttrUtil.AttributeDefinition(
915
- attr_validation_func=Vf.validate_method_flag,
915
+ attr_validation_func=Vf.validate_evm_method_flag,
916
916
  jar_flag='-method',
917
917
  arg_type=AttrUtil.AttrArgType.LIST,
918
918
  help_msg="Filter methods to be verified by their signature",
@@ -926,7 +926,7 @@ class EvmAttributes(AttrUtil.Attributes):
926
926
  )
927
927
 
928
928
  EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
929
- attr_validation_func=Vf.validate_method_flag,
929
+ attr_validation_func=Vf.validate_evm_method_flag,
930
930
  jar_flag='-excludeMethod',
931
931
  arg_type=AttrUtil.AttrArgType.LIST,
932
932
  help_msg="Filter out methods to be verified by their signature",
@@ -939,6 +939,34 @@ class EvmAttributes(AttrUtil.Attributes):
939
939
  disables_build_cache=False
940
940
  )
941
941
 
942
+ RANGER_INCLUDE_METHOD = AttrUtil.AttributeDefinition(
943
+ attr_validation_func=Vf.validate_evm_method_flag,
944
+ jar_flag='-rangerMethod',
945
+ arg_type=AttrUtil.AttrArgType.LIST,
946
+ help_msg="Filter methods to be included in ranger sequences by their signature",
947
+ default_desc="All methods are considered in constructing ranger sequences",
948
+ argparse_args={
949
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
950
+ 'action': AttrUtil.APPEND
951
+ },
952
+ affects_build_cache_key=False,
953
+ disables_build_cache=False
954
+ )
955
+
956
+ RANGER_EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
957
+ attr_validation_func=Vf.validate_evm_method_flag,
958
+ jar_flag='-rangerExcludeMethod',
959
+ arg_type=AttrUtil.AttrArgType.LIST,
960
+ help_msg="Filter out methods to be included in ranger sequences by their signature",
961
+ default_desc="All methods are considered in constructing ranger sequences",
962
+ argparse_args={
963
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
964
+ 'action': AttrUtil.APPEND
965
+ },
966
+ affects_build_cache_key=False,
967
+ disables_build_cache=False
968
+ )
969
+
942
970
  OPTIMISTIC_CONTRACT_RECURSION = AttrUtil.AttributeDefinition(
943
971
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
944
972
  help_msg="Assume the recursion limit is never reached in cases of "
@@ -1173,20 +1201,6 @@ class InternalUseAttributes(AttrUtil.Attributes):
1173
1201
 
1174
1202
  class BackendAttributes(AttrUtil.Attributes):
1175
1203
 
1176
- RULE = AttrUtil.AttributeDefinition(
1177
- arg_type=AttrUtil.AttrArgType.LIST,
1178
- attr_validation_func=Vf.validate_rule_name,
1179
- jar_flag='-rule',
1180
- help_msg="Verify only the given list of rules/invariants. Asterisks are interpreted as wildcards",
1181
- default_desc="Verifies all rules and invariants",
1182
- argparse_args={
1183
- 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1184
- 'action': AttrUtil.APPEND
1185
- },
1186
- affects_build_cache_key=False,
1187
- disables_build_cache=False
1188
- )
1189
-
1190
1204
  UNUSED_SUMMARY_HARD_FAIL = AttrUtil.AttributeDefinition(
1191
1205
  attr_validation_func=Vf.validate_on_off,
1192
1206
  jar_flag='-unusedSummaryHardFail',
@@ -1638,8 +1652,24 @@ class RustAttributes(AttrUtil.Attributes):
1638
1652
  )
1639
1653
 
1640
1654
 
1655
+ class EvmRuleAttribute(AttrUtil.Attributes):
1656
+ RULE = AttrUtil.AttributeDefinition(
1657
+ arg_type=AttrUtil.AttrArgType.LIST,
1658
+ attr_validation_func=Vf.validate_evm_rule_name,
1659
+ jar_flag='-rule',
1660
+ help_msg="Verify only the given list of rules/invariants. Asterisks are interpreted as wildcards",
1661
+ default_desc="Verifies all rules and invariants",
1662
+ argparse_args={
1663
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1664
+ 'action': AttrUtil.APPEND
1665
+ },
1666
+ affects_build_cache_key=False,
1667
+ disables_build_cache=False
1668
+ )
1669
+
1670
+
1641
1671
  class EvmProverAttributes(CommonAttributes, DeprecatedAttributes, EvmAttributes, InternalUseAttributes,
1642
- BackendAttributes):
1672
+ BackendAttributes, EvmRuleAttribute):
1643
1673
  FILES = AttrUtil.AttributeDefinition(
1644
1674
  attr_validation_func=Vf.validate_evm_input_file,
1645
1675
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -1696,7 +1726,8 @@ class RangerAttributes(EvmProverAttributes):
1696
1726
  return [attr.name for attr in combined_list] + [cls.LOOP_ITER.name, cls.RANGER_FAILURE_LIMIT.name]
1697
1727
 
1698
1728
 
1699
- class SorobanProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, RustAttributes):
1729
+ class SorobanProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, EvmRuleAttribute,
1730
+ RustAttributes):
1700
1731
  FILES = AttrUtil.AttributeDefinition(
1701
1732
  attr_validation_func=Vf.validate_soroban_extension,
1702
1733
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -1742,8 +1773,65 @@ class SuiProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttrib
1742
1773
  )
1743
1774
  )
1744
1775
 
1776
+ RULE = AttrUtil.AttributeDefinition(
1777
+ arg_type=AttrUtil.AttrArgType.LIST,
1778
+ attr_validation_func=Vf.validate_move_rule_name,
1779
+ jar_flag='-rule',
1780
+ help_msg="Verify only the given list of rules. Asterisks are interpreted as wildcards",
1781
+ default_desc="Verifies all rules",
1782
+ argparse_args={
1783
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1784
+ 'action': AttrUtil.APPEND
1785
+ },
1786
+ affects_build_cache_key=False,
1787
+ disables_build_cache=False
1788
+ )
1789
+
1790
+ EXCLUDE_RULE = AttrUtil.AttributeDefinition(
1791
+ arg_type=AttrUtil.AttrArgType.LIST,
1792
+ attr_validation_func=Vf.validate_move_rule_name,
1793
+ jar_flag='-excludeRule',
1794
+ help_msg="Filter out the list of rules to verify. Asterisks are interpreted as wildcards",
1795
+ default_desc="Verifies all rules",
1796
+ argparse_args={
1797
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1798
+ 'action': AttrUtil.APPEND
1799
+ },
1800
+ affects_build_cache_key=False,
1801
+ disables_build_cache=False
1802
+ )
1803
+
1804
+ METHOD = AttrUtil.AttributeDefinition(
1805
+ attr_validation_func=Vf.validate_move_method_flag,
1806
+ jar_flag='-method',
1807
+ arg_type=AttrUtil.AttrArgType.LIST,
1808
+ help_msg="Filter functions to be verified by their name",
1809
+ default_desc="Verifies all target functions.",
1810
+ argparse_args={
1811
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1812
+ 'action': AttrUtil.APPEND
1813
+ },
1814
+ affects_build_cache_key=False,
1815
+ disables_build_cache=False
1816
+ )
1817
+
1818
+ EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
1819
+ attr_validation_func=Vf.validate_move_method_flag,
1820
+ jar_flag='-excludeMethod',
1821
+ arg_type=AttrUtil.AttrArgType.LIST,
1822
+ help_msg="Filter out functions to be verified by their name",
1823
+ default_desc="Verifies all target functions.",
1824
+ argparse_args={
1825
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1826
+ 'action': AttrUtil.APPEND
1827
+ },
1828
+ affects_build_cache_key=False,
1829
+ disables_build_cache=False
1830
+ )
1831
+
1745
1832
 
1746
- class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, RustAttributes):
1833
+ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, EvmRuleAttribute,
1834
+ RustAttributes):
1747
1835
  FILES = AttrUtil.AttributeDefinition(
1748
1836
  attr_validation_func=Vf.validate_solana_extension,
1749
1837
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -307,7 +307,7 @@ class ExitException(Exception):
307
307
  super().__init__(message)
308
308
  self.exit_code = exit_code # Store the integer data
309
309
 
310
- MIN_JAVA_VERSION = 11 # minimal java version to run the local type checker jar
310
+ MIN_JAVA_VERSION = 19 # minimal java version to run the local type checker jar
311
311
 
312
312
 
313
313
  def text_style(txt: str, style: str) -> str:
@@ -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
 
@@ -769,7 +769,7 @@ def validate_check_method_flag(method: str) -> str:
769
769
  raise Util.CertoraUserInputError(f"Malformed method '{method}' in `--check_method`: unmatched parenthesis")
770
770
  return method
771
771
 
772
- def validate_method_flag(method: str) -> str:
772
+ def validate_evm_method_flag(method: str) -> str:
773
773
  contract_and_method = method.split('.')
774
774
  if len(contract_and_method) > 2:
775
775
  raise Util.CertoraUserInputError(f"Malformed method '{method}' in `--method` list: a method should be of the form `[ContractName.]functionABISignature(...)`")
@@ -788,6 +788,8 @@ def validate_method_flag(method: str) -> str:
788
788
 
789
789
  return method
790
790
 
791
+ def validate_move_method_flag(method: str) -> str:
792
+ return validate_move_function_name(method)
791
793
 
792
794
  def __validate_matching_parens(s: str) -> bool:
793
795
  stack = []
@@ -823,17 +825,30 @@ def __validate_solidity_id(string: str, object: str) -> str:
823
825
  def validate_contract_name(contract_name: str) -> str:
824
826
  return __validate_solidity_id(contract_name, "contract")
825
827
 
826
-
827
- def validate_rule_name(rule_str: str) -> str:
828
- if ("*" not in rule_str):
829
- return __validate_solidity_id(rule_str, "rule")
830
-
831
- # we have a rule pattern string
828
+ def validate_rule_pattern_string(rule_str: str) -> str:
832
829
  if not re.match(r"^[a-zA-Z0-9_$*]+$", rule_str):
833
830
  raise Util.CertoraUserInputError(f"invalid rule pattern \"{rule_str}\": rule patterns must contain only "
834
831
  "letters, digits, dollar signs, underscores, or asterisks")
835
832
  return rule_str
836
833
 
834
+ def validate_evm_rule_name(rule_str: str) -> str:
835
+ if ("*" in rule_str):
836
+ return validate_rule_pattern_string(rule_str)
837
+ else:
838
+ return __validate_solidity_id(rule_str, "rule")
839
+
840
+ def validate_move_function_name(name: str) -> str:
841
+ if not re.match(r"^0x[0-9a-fA-F]+::[a-zA-Z_][a-zA-Z0-9_]*::[a-zA-Z_][a-zA-Z0-9_]*$", name):
842
+ raise Util.CertoraUserInputError(f"invalid Move function name \"{name}\": must be a fully-qualified Move "
843
+ "function name")
844
+ return name
845
+
846
+ def validate_move_rule_name(rule_str: str) -> str:
847
+ if ("*" in rule_str):
848
+ return validate_rule_pattern_string(rule_str)
849
+ else:
850
+ return validate_move_function_name(rule_str)
851
+
837
852
 
838
853
  MAX_MSG_LEN: int = 256
839
854
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-beta-mirror
3
- Version: 8.2.2
3
+ Version: 8.3.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 04cd39e. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
42
+ Commit 3c8a0dd. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -0,0 +1 @@
1
+ {"name": "certora-cli-beta-mirror", "tag": "8.3.0", "branch": "", "commit": "3c8a0dd", "timestamp": "20250925.14.13.331118", "version": "8.3.0"}
@@ -3,11 +3,11 @@ import setuptools
3
3
 
4
4
  setuptools.setup(
5
5
  name="certora-cli-beta-mirror",
6
- version="8.2.2",
6
+ version="8.3.0",
7
7
  author="Certora",
8
8
  author_email="support@certora.com",
9
9
  description="Runner for the Certora Prover",
10
- long_description="Commit 04cd39e. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.",
10
+ long_description="Commit 3c8a0dd. 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-beta-mirror",
13
13
  packages=setuptools.find_packages(),
@@ -1 +0,0 @@
1
- Commit 04cd39e. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -1,68 +0,0 @@
1
- # The Certora Prover
2
- # Copyright (C) 2025 Certora Ltd.
3
- #
4
- # This program is free software: you can redistribute it and/or modify
5
- # it under the terms of the GNU General Public License as published by
6
- # the Free Software Foundation, version 3 of the License.
7
- #
8
- # This program is distributed in the hope that it will be useful,
9
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
- # GNU General Public License for more details.
12
- #
13
- # You should have received a copy of the GNU General Public License
14
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
-
16
- from __future__ import annotations
17
-
18
- import sys
19
- from pathlib import Path
20
-
21
- scripts_dir_path = Path(__file__).parent.parent.resolve() # containing directory
22
- sys.path.insert(0, str(scripts_dir_path))
23
-
24
- import shutil
25
- import time
26
- import logging
27
- from pathlib import Path
28
- from typing import Set, Dict
29
-
30
- from CertoraProver.certoraBuild import build_source_tree
31
- from CertoraProver.certoraContextClass import CertoraContext
32
- from Shared import certoraUtils as Util
33
-
34
-
35
- log = logging.getLogger(__name__)
36
-
37
-
38
- def build_sui_project(context: CertoraContext, timings: Dict) -> None:
39
- """
40
- Compile the Rust artefact and record elapsed time in *timings*.
41
-
42
- Args:
43
- context: The CertoraContext object containing the configuration.
44
- timings: A dictionary to store timing information.
45
- """
46
- log.debug("Build Rust target")
47
- start = time.perf_counter()
48
- set_sui_build_directory(context)
49
- timings["buildTime"] = round(time.perf_counter() - start, 4)
50
- if context.test == str(Util.TestValue.AFTER_BUILD):
51
- raise Util.TestResultsReady(context)
52
-
53
-
54
- def set_sui_build_directory(context: CertoraContext) -> None:
55
- assert context.move_path, "build_sui_project: expecting move_path to link to a build directory"
56
-
57
- shutil.copytree(context.move_path, Util.get_build_dir() / Path(context.move_path).name)
58
-
59
- sources: Set[Path] = set()
60
- if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
61
- sources.add(Path(context.conf_file).absolute())
62
-
63
- try:
64
- # Create generators
65
- build_source_tree(sources, context)
66
-
67
- except Exception as e:
68
- raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
@@ -1 +0,0 @@
1
- {"name": "certora-cli-beta-mirror", "tag": "8.2.2", "branch": "", "commit": "04cd39e", "timestamp": "20250904.12.49.982490", "version": "8.2.2"}