certora-cli-beta-mirror 8.2.3__py3-none-any.whl → 8.3.1__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 +42 -7
- certora_cli/CertoraProver/certoraBuildSui.py +49 -5
- certora_cli/CertoraProver/certoraConfigIO.py +8 -1
- certora_cli/CertoraProver/certoraContextAttributes.py +109 -21
- certora_cli/Shared/certoraUtils.py +3 -1
- certora_cli/Shared/certoraValidateFuncs.py +22 -7
- {certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/METADATA +2 -2
- {certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/RECORD +15 -15
- 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.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/LICENSE +0 -0
- {certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/WHEEL +0 -0
- {certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/entry_points.txt +0 -0
- {certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
|
|
2897
|
-
|
|
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
|
-
|
|
2911
|
-
|
|
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:
|
|
@@ -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}")
|
|
@@ -99,7 +99,7 @@ def handle_override_base_config(context: CertoraContext) -> None:
|
|
|
99
99
|
try:
|
|
100
100
|
with (Path(context.override_base_config).open() as conf_file):
|
|
101
101
|
override_base_config_attrs = Util.read_conf_file(conf_file)
|
|
102
|
-
|
|
102
|
+
context.attrs_set_in_main_conf = context.conf_file_attr.copy()
|
|
103
103
|
context.conf_file_attr = {**override_base_config_attrs, **context.conf_file_attr}
|
|
104
104
|
|
|
105
105
|
if 'override_base_config' in override_base_config_attrs:
|
|
@@ -111,6 +111,13 @@ 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 boolean attribute does not appear in main conf but is True in the base conf, set it to True
|
|
115
|
+
if override_base_config_attrs[attr] is True and attr not in context.attrs_set_in_main_conf:
|
|
116
|
+
setattr(context, attr, True)
|
|
117
|
+
continue
|
|
118
|
+
# if boolean attribute does appear in main conf and is False, do not override it
|
|
119
|
+
elif attr in context.conf_file_attr and value is False:
|
|
120
|
+
continue # skip override if a boolean attribute was explicitly set to False in the conf file
|
|
114
121
|
setattr(context, attr, override_base_config_attrs.get(attr))
|
|
115
122
|
else:
|
|
116
123
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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,
|
|
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,
|
|
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 =
|
|
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
|
|
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
|
|
{certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.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.3.1
|
|
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 33ef152. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -12,18 +12,18 @@ certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfa
|
|
|
12
12
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
|
13
13
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
|
14
14
|
certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
|
|
15
|
-
certora_cli/CertoraProver/certoraBuild.py,sha256=
|
|
15
|
+
certora_cli/CertoraProver/certoraBuild.py,sha256=hcZA6lvTFottYU5C9t0KaEKc_jGEIzSEj5u5fotJPPI,225213
|
|
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
|
|
19
|
-
certora_cli/CertoraProver/certoraBuildSui.py,sha256=
|
|
19
|
+
certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
|
|
20
20
|
certora_cli/CertoraProver/certoraCloudIO.py,sha256=99IRWSA4wAF1q_yu7m1IpDlybMVqtupW_C5qa3Xrhs0,54351
|
|
21
21
|
certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-u0H2fAFulTLAn7GW-j3ox2XZSz0ghdjk0,14116
|
|
22
22
|
certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZtV_b8QI1Egi6cbB5-uuh5beYN0,12630
|
|
23
23
|
certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
|
|
24
|
-
certora_cli/CertoraProver/certoraConfigIO.py,sha256
|
|
24
|
+
certora_cli/CertoraProver/certoraConfigIO.py,sha256=-1EhJYsiheYvyCgOOWrRCQBjqtqNXrpMKJYRq5cKJ0Y,8171
|
|
25
25
|
certora_cli/CertoraProver/certoraContext.py,sha256=OVNACUNj9fGb9He8sGdod2waC0eWE8ZgXNPWjRC1lFg,28817
|
|
26
|
-
certora_cli/CertoraProver/certoraContextAttributes.py,sha256=
|
|
26
|
+
certora_cli/CertoraProver/certoraContextAttributes.py,sha256=dFV44uoKzpfAc5mCcTXVrAR3aFBi1YS_6evWcS5akVA,70197
|
|
27
27
|
certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
|
|
28
28
|
certora_cli/CertoraProver/certoraContextValidator.py,sha256=clXwmYHIBUmOJ8ADRUmu9U6_pNe_tXRNawvUPBLlYVY,46490
|
|
29
29
|
certora_cli/CertoraProver/certoraContractFuncs.py,sha256=-CV7MkmsrwYfdYFAd6ZZib_6-mDG_ytxPM4hAjxtbMM,7137
|
|
@@ -64,16 +64,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
|
|
|
64
64
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
|
65
65
|
certora_cli/Shared/certoraAttrUtil.py,sha256=Nw8ban5Axp6c6dT-KJfCD9i9tKnGk1DbvRDDNH3--DU,8574
|
|
66
66
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
|
67
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
|
68
|
-
certora_cli/Shared/certoraValidateFuncs.py,sha256=
|
|
67
|
+
certora_cli/Shared/certoraUtils.py,sha256=wayg6igrwaKi05pqBwAeu0GWFmaTXF8vK8kS_b2GSog,58450
|
|
68
|
+
certora_cli/Shared/certoraValidateFuncs.py,sha256=mYguICGfUwVZ9qPBFajss1xqHPDR-KRtskgERLum4AM,43225
|
|
69
69
|
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=
|
|
70
|
+
certora_jars/ASTExtraction.jar,sha256=-WUqC3U6UHyft5d3qW9FKoYl8IZuSL3D0Q28Et0YrE4,17652496
|
|
71
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=X42-7NRQKFGFXVr_SME0w7ZA4Uw93ZIjVzYT3NCVgnE,142
|
|
72
|
+
certora_jars/Typechecker.jar,sha256=SY3njRtjl8HoPVzwc5n6sEx6U9DvW5mdWlEqm4BWbMA,17614653
|
|
73
73
|
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.
|
|
74
|
+
certora_cli_beta_mirror-8.3.1.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
|
75
|
+
certora_cli_beta_mirror-8.3.1.dist-info/METADATA,sha256=vSnbSzRa86vjT_SuM9GwISkExJ9IB8KUdzrfV1O8cTw,1286
|
|
76
|
+
certora_cli_beta_mirror-8.3.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
77
|
+
certora_cli_beta_mirror-8.3.1.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
|
|
78
|
+
certora_cli_beta_mirror-8.3.1.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
|
79
|
+
certora_cli_beta_mirror-8.3.1.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.3.1", "branch": "", "commit": "33ef152", "timestamp": "20251010.9.6.993359", "version": "8.3.1"}
|
certora_jars/Typechecker.jar
CHANGED
|
Binary file
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.2.3.dist-info → certora_cli_beta_mirror-8.3.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|