certora-cli-beta 8.11.3__tar.gz → 8.13.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.
- {certora_cli_beta-8.11.3/certora_cli_beta.egg-info → certora_cli_beta-8.13.0}/PKG-INFO +2 -2
- certora_cli_beta-8.13.0/README.md +1 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildRust.py +3 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraCloudIO.py +3 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContextAttributes.py +55 -3
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraParseBuildScript.py +3 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/splitRules.py +31 -17
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/certoraUtils.py +1 -1
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/certoraValidateFuncs.py +11 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraSolanaProver.py +22 -1
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0/certora_cli_beta.egg-info}/PKG-INFO +2 -2
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_jars/ASTExtraction.jar +0 -0
- certora_cli_beta-8.13.0/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_jars/Typechecker.jar +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/setup.py +2 -2
- certora_cli_beta-8.11.3/README.md +0 -1
- certora_cli_beta-8.11.3/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/LICENSE +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/MANIFEST.in +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_bins/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollector.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorSol.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorSolBased.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorVy.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/CompilerCollectorYul.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/castingInstrumenter.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraApp.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuild.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildCacheManager.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildDataClasses.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildSui.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraCollectConfigurationLayout.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraCollectRunMetadata.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraCompilerParameters.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraConfigIO.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContext.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContextClass.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContextValidator.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContractFuncs.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraExtensionInfo.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraJobList.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraMiniSpecParser.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraNodeFilters.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraOffsetConverter.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraProjectScanner.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraSourceFinders.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraType.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraVerifyGenerator.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/erc7201.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/storageExtension.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/uncheckedOverflowInstrumenter.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/equivCheck.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/mutateApp.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/mutateAttributes.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/mutateConstants.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/mutateUtil.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Mutate/mutateValidate.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/ExpectedComparator.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/certoraAttrUtil.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/certoraLogging.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/proverCommon.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraCVLFormatter.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraConcord.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraEVMProver.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraEqCheck.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraMutate.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraRanger.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraRun.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraSorobanProver.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/certoraSuiProver.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/rustMutator.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/SOURCES.txt +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/dependency_links.txt +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/entry_points.txt +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/requires.txt +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/top_level.txt +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_jars/__init__.py +0 -0
- {certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.13.0
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta
|
|
6
6
|
Author: Certora
|
|
@@ -38,4 +38,4 @@ Dynamic: requires-dist
|
|
|
38
38
|
Dynamic: requires-python
|
|
39
39
|
Dynamic: summary
|
|
40
40
|
|
|
41
|
-
Commit
|
|
41
|
+
Commit 3ce73ef. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Commit 3ce73ef. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildRust.py
RENAMED
|
@@ -83,6 +83,9 @@ def build_rust_app(context: CertoraContext) -> None:
|
|
|
83
83
|
build_command.extend(["--tools-version", context.cargo_tools_version])
|
|
84
84
|
context.rust_project_directory = Util.find_nearest_cargo_toml()
|
|
85
85
|
|
|
86
|
+
if getattr(context, 'solana_sbf_arch', None) is not None:
|
|
87
|
+
build_command.extend(["--arch", context.solana_sbf_arch])
|
|
88
|
+
|
|
86
89
|
if context.cargo_features is not None:
|
|
87
90
|
build_command.append(feature_flag)
|
|
88
91
|
build_command.append(' '.join(context.cargo_features))
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraCloudIO.py
RENAMED
|
@@ -611,6 +611,9 @@ class CloudVerification:
|
|
|
611
611
|
rust_jar_settings.append('-solanaInlining')
|
|
612
612
|
rust_jar_settings.append(paths_in_source_dir(self.context.solana_inlining))
|
|
613
613
|
|
|
614
|
+
if self.context.assert_on_panic is not None:
|
|
615
|
+
rust_jar_settings.extend(['-solanaAssertOnPanic', str(self.context.assert_on_panic).lower()])
|
|
616
|
+
|
|
614
617
|
auth_data["jarSettings"] = rust_jar_settings + jar_settings
|
|
615
618
|
|
|
616
619
|
elif Attrs.is_sui_app():
|
|
@@ -29,7 +29,7 @@ from CertoraProver.certoraCollectConfigurationLayout import AttributeJobConfigDa
|
|
|
29
29
|
|
|
30
30
|
attributes_logger = logging.getLogger("attributes")
|
|
31
31
|
|
|
32
|
-
FORBIDDEN_PROVER_ARGS = ['-solanaInlining', '-solanaSummaries']
|
|
32
|
+
FORBIDDEN_PROVER_ARGS = ['-solanaInlining', '-solanaSummaries', '-solanaAssertOnPanic']
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def validate_prover_args(value: str) -> str:
|
|
@@ -1842,6 +1842,28 @@ class RustAttributes(AttrUtil.Attributes):
|
|
|
1842
1842
|
disables_build_cache=False
|
|
1843
1843
|
)
|
|
1844
1844
|
|
|
1845
|
+
CARGO_BUILD_VERBOSE = AttrUtil.AttributeDefinition(
|
|
1846
|
+
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
|
1847
|
+
help_msg="Show stderr output from the Rust build process",
|
|
1848
|
+
default_desc="Stderr from the build process is suppressed on success",
|
|
1849
|
+
argparse_args={
|
|
1850
|
+
'action': AttrUtil.STORE_TRUE
|
|
1851
|
+
},
|
|
1852
|
+
affects_build_cache_key=False,
|
|
1853
|
+
disables_build_cache=False
|
|
1854
|
+
)
|
|
1855
|
+
|
|
1856
|
+
SOLANA_SBF_ARCH = AttrUtil.AttributeDefinition(
|
|
1857
|
+
attr_validation_func=Vf.validate_solana_sbf_arch,
|
|
1858
|
+
help_msg="Target architecture for certora-sbf. Legal values: sbf, v0, v1, v2, v3",
|
|
1859
|
+
default_desc="Default architecture chosen by certora-sbf",
|
|
1860
|
+
argparse_args={
|
|
1861
|
+
'action': AttrUtil.UniqueStore
|
|
1862
|
+
},
|
|
1863
|
+
affects_build_cache_key=True,
|
|
1864
|
+
disables_build_cache=False
|
|
1865
|
+
)
|
|
1866
|
+
|
|
1845
1867
|
|
|
1846
1868
|
class EvmRuleAttribute(AttrUtil.Attributes):
|
|
1847
1869
|
RULE = AttrUtil.AttributeDefinition(
|
|
@@ -1892,8 +1914,8 @@ class ConcordAttributes(EvmProverAttributes):
|
|
|
1892
1914
|
|
|
1893
1915
|
@classmethod
|
|
1894
1916
|
def unsupported_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
|
|
1895
|
-
return [cls.VERIFY, cls.
|
|
1896
|
-
cls.
|
|
1917
|
+
return [cls.VERIFY, cls.PROTOCOL_NAME, cls.PROTOCOL_AUTHOR, cls.EXCLUDE_RULE,
|
|
1918
|
+
cls.EXCLUDE_METHOD, cls.PARAMETRIC_CONTRACTS, cls.COVERAGE_INFO, cls.FOUNDRY,
|
|
1897
1919
|
cls.INDEPENDENT_SATISFY, cls.MULTI_ASSERT_CHECK, cls.MULTI_EXAMPLE, cls.PROJECT_SANITY,
|
|
1898
1920
|
cls.RULE_SANITY, cls.ADDRESS, cls.CONTRACT_EXTENSIONS, cls.CONTRACT_RECURSION_LIMIT, cls.LINK,
|
|
1899
1921
|
cls.OPTIMISTIC_CONTRACT_RECURSION, cls.STRUCT_LINK, cls.DYNAMIC_BOUND, cls.DYNAMIC_DISPATCH,
|
|
@@ -2050,6 +2072,17 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
|
|
|
2050
2072
|
)
|
|
2051
2073
|
)
|
|
2052
2074
|
|
|
2075
|
+
ASSERT_ON_PANIC = AttrUtil.AttributeDefinition(
|
|
2076
|
+
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
|
2077
|
+
help_msg="Treat calls to Rust panic functions as assertion violations",
|
|
2078
|
+
default_desc="Rust panic functions are not treated as assertion violations",
|
|
2079
|
+
argparse_args={
|
|
2080
|
+
'action': AttrUtil.STORE_TRUE
|
|
2081
|
+
},
|
|
2082
|
+
affects_build_cache_key=False,
|
|
2083
|
+
disables_build_cache=False
|
|
2084
|
+
)
|
|
2085
|
+
|
|
2053
2086
|
SOLANA_INLINING = AttrUtil.AttributeDefinition(
|
|
2054
2087
|
attr_validation_func=Vf.validate_readable_file,
|
|
2055
2088
|
arg_type=AttrUtil.AttrArgType.LIST,
|
|
@@ -2074,6 +2107,25 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
|
|
|
2074
2107
|
disables_build_cache=False
|
|
2075
2108
|
)
|
|
2076
2109
|
|
|
2110
|
+
SPLIT_RULES = AttrUtil.AttributeDefinition(
|
|
2111
|
+
arg_type=AttrUtil.AttrArgType.LIST,
|
|
2112
|
+
attr_validation_func=Vf.validate_evm_rule_name,
|
|
2113
|
+
help_msg="List of rules to be sent to Prover each on a separate run",
|
|
2114
|
+
default_desc="Verifies all rules in a single run",
|
|
2115
|
+
argparse_args={
|
|
2116
|
+
'nargs': AttrUtil.MULTIPLE_OCCURRENCES,
|
|
2117
|
+
'action': AttrUtil.APPEND
|
|
2118
|
+
},
|
|
2119
|
+
affects_build_cache_key=False,
|
|
2120
|
+
disables_build_cache=False
|
|
2121
|
+
)
|
|
2122
|
+
|
|
2123
|
+
GROUP_ID = AttrUtil.AttributeDefinition(
|
|
2124
|
+
attr_validation_func=Vf.validate_uuid,
|
|
2125
|
+
affects_build_cache_key=False,
|
|
2126
|
+
disables_build_cache=False
|
|
2127
|
+
)
|
|
2128
|
+
|
|
2077
2129
|
|
|
2078
2130
|
ATTRIBUTES_CLASS: Optional[Type[AttrUtil.Attributes]] = None
|
|
2079
2131
|
|
|
@@ -63,6 +63,9 @@ def run_rust_build(context: CertoraContext, build_cmd: List[str]) -> None:
|
|
|
63
63
|
build_script_logger.info(f"Building by calling `{' '.join(build_cmd)}`")
|
|
64
64
|
result = subprocess.run(build_cmd, capture_output=True, text=True)
|
|
65
65
|
|
|
66
|
+
if getattr(context, 'cargo_build_verbose', False) and result.stderr:
|
|
67
|
+
build_script_logger.info(f"Build stderr:\n{result.stderr}")
|
|
68
|
+
|
|
66
69
|
# Check if the script executed successfully
|
|
67
70
|
if result.returncode != 0:
|
|
68
71
|
raise Util.CertoraUserInputError(f"Error running the script {context.build_script}\n{result.stderr}")
|
|
@@ -44,7 +44,7 @@ def update_msg(msg: str, rule_str: str) -> str:
|
|
|
44
44
|
|
|
45
45
|
class SplitRulesHandler():
|
|
46
46
|
context: CertoraContext
|
|
47
|
-
all_rules: Optional[Set[str]] = None # all rules in the spec
|
|
47
|
+
all_rules: Optional[Set[str]] = None # all rules in the spec (from Typechecker.jar for EVM, from conf file for Rust)
|
|
48
48
|
split_rules: Optional[Set[str]] = None # all rules that should be run separately (based on --split_rules)
|
|
49
49
|
rest_rules: Optional[Set[str]] = None # all rules that should not be run separately ( all_rules - split_rules)
|
|
50
50
|
|
|
@@ -66,11 +66,22 @@ class SplitRulesHandler():
|
|
|
66
66
|
|
|
67
67
|
def get_cvl_rules(self, split_rules: bool = False) -> Set[str]:
|
|
68
68
|
"""
|
|
69
|
-
getting cvl rules
|
|
70
|
-
-
|
|
69
|
+
getting cvl rules. For EVM, calls Typechecker.jar with the -listRules option.
|
|
70
|
+
For Rust-based apps (Solana, Soroban), reads rules from the conf file (context.rule).
|
|
71
71
|
:param split_rules:
|
|
72
72
|
:return:
|
|
73
73
|
"""
|
|
74
|
+
if issubclass(self.context.app, App.RustAppClass):
|
|
75
|
+
return self._get_rules_from_conf(split_rules)
|
|
76
|
+
return self._get_rules_from_typechecker(split_rules)
|
|
77
|
+
|
|
78
|
+
def _get_rules_from_conf(self, split_rules: bool = False) -> Set[str]:
|
|
79
|
+
all_rules = set(self.context.rule) if self.context.rule else set()
|
|
80
|
+
if split_rules:
|
|
81
|
+
return all_rules & set(self.context.split_rules) if self.context.split_rules else set()
|
|
82
|
+
return all_rules
|
|
83
|
+
|
|
84
|
+
def _get_rules_from_typechecker(self, split_rules: bool = False) -> Set[str]:
|
|
74
85
|
def jar_list_value(list_attr: List[str]) -> str:
|
|
75
86
|
return ','.join(list_attr)
|
|
76
87
|
|
|
@@ -94,15 +105,12 @@ class SplitRulesHandler():
|
|
|
94
105
|
raise Util.CertoraUserInputError(f"Failed to get {'split ' if split_rules else ''}rules\n{e}")
|
|
95
106
|
|
|
96
107
|
def run_commands(self) -> int:
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
attr_class = self.context.app.attr_class
|
|
109
|
+
rule_flag = attr_class.RULE.get_flag()
|
|
110
|
+
split_rules_flag = attr_class.SPLIT_RULES.get_flag()
|
|
99
111
|
msg_flag = Attrs.CommonAttributes.MSG.get_flag()
|
|
100
112
|
|
|
101
|
-
|
|
102
|
-
build_cache_flag = Attrs.EvmProverAttributes.BUILD_CACHE.get_flag()
|
|
103
|
-
|
|
104
|
-
group_id_flag = Attrs.EvmProverAttributes.GROUP_ID.get_flag()
|
|
105
|
-
disable_local_typechecking_flag = Attrs.EvmProverAttributes.DISABLE_LOCAL_TYPECHECKING.get_flag()
|
|
113
|
+
group_id_flag = attr_class.GROUP_ID.get_flag()
|
|
106
114
|
|
|
107
115
|
def remove_rule_flags_from_cli() -> List[str]:
|
|
108
116
|
# any --rule flag should be removed from CLI during splitting, since it is set during the split
|
|
@@ -120,12 +128,13 @@ class SplitRulesHandler():
|
|
|
120
128
|
def get_cmd() -> str:
|
|
121
129
|
"""
|
|
122
130
|
set executable for the split, if called from command line then it is the first string in argv (prover_cmd)
|
|
123
|
-
if called as library then if running in local mode we use
|
|
131
|
+
if called as library then if running in local mode we use the script otherwise the installed package command
|
|
124
132
|
:return:
|
|
125
133
|
"""
|
|
126
|
-
assert self.context.app == App.EvmApp, "Split rules is supported only for EVM apps"
|
|
127
134
|
if hasattr(self.context, 'prover_cmd'):
|
|
128
135
|
return self.context.prover_cmd
|
|
136
|
+
if issubclass(self.context.app, App.SolanaApp):
|
|
137
|
+
return "certoraSolanaProver.py" if self.context.local else "certoraSolanaProver"
|
|
129
138
|
if self.context.local:
|
|
130
139
|
return Util.CERTORA_RUN_SCRIPT
|
|
131
140
|
return Util.CERTORA_RUN_APP
|
|
@@ -135,14 +144,19 @@ class SplitRulesHandler():
|
|
|
135
144
|
# of the rules
|
|
136
145
|
cli_commands = []
|
|
137
146
|
args = remove_rule_flags_from_cli()
|
|
138
|
-
if not self.context
|
|
147
|
+
if not getattr(self.context, 'group_id', None):
|
|
139
148
|
self.context.group_id = str(uuid.uuid4())
|
|
140
149
|
|
|
141
|
-
if not self.context
|
|
150
|
+
if not getattr(self.context, 'msg', None):
|
|
142
151
|
self.context.msg = ''
|
|
143
152
|
|
|
144
|
-
cmd = [get_cmd()] + args + [group_id_flag, self.context.group_id,
|
|
145
|
-
|
|
153
|
+
cmd = [get_cmd()] + args + [group_id_flag, self.context.group_id, split_rules_flag]
|
|
154
|
+
|
|
155
|
+
# EVM-specific flags
|
|
156
|
+
if hasattr(attr_class, 'BUILD_CACHE'):
|
|
157
|
+
cmd.append(attr_class.BUILD_CACHE.get_flag())
|
|
158
|
+
if hasattr(attr_class, 'DISABLE_LOCAL_TYPECHECKING'):
|
|
159
|
+
cmd.append(attr_class.DISABLE_LOCAL_TYPECHECKING.get_flag())
|
|
146
160
|
|
|
147
161
|
if self.split_rules:
|
|
148
162
|
for rule in self.split_rules:
|
|
@@ -154,7 +168,7 @@ class SplitRulesHandler():
|
|
|
154
168
|
# end of run_commands() nested functions
|
|
155
169
|
|
|
156
170
|
prover_calls = generate_prover_calls()
|
|
157
|
-
if self.context
|
|
171
|
+
if getattr(self.context, 'test', None) == str(Util.TestValue.AFTER_RULE_SPLIT):
|
|
158
172
|
raise Util.TestResultsReady(prover_calls)
|
|
159
173
|
|
|
160
174
|
processes = []
|
|
@@ -1383,7 +1383,7 @@ def get_mappings_from_forge_remappings() -> List[str]:
|
|
|
1383
1383
|
new_remapping = line.strip()
|
|
1384
1384
|
if new_remapping not in remappings:
|
|
1385
1385
|
remappings.append(new_remapping)
|
|
1386
|
-
for suffix in ['contracts/', 'src/']:
|
|
1386
|
+
for suffix in ['/contracts/', '/src/']:
|
|
1387
1387
|
if value.endswith(suffix) and not key.endswith(suffix):
|
|
1388
1388
|
new_remapping = f"{key}{suffix}={value}"
|
|
1389
1389
|
if new_remapping not in remappings:
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/certoraValidateFuncs.py
RENAMED
|
@@ -272,6 +272,17 @@ def validate_soroban_extension(filename: str) -> str:
|
|
|
272
272
|
return filename
|
|
273
273
|
|
|
274
274
|
|
|
275
|
+
SOLANA_SBF_ARCH_VALUES = ['sbf', 'v0', 'v1', 'v2', 'v3']
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
def validate_solana_sbf_arch(value: str) -> str:
|
|
279
|
+
if value not in SOLANA_SBF_ARCH_VALUES:
|
|
280
|
+
raise Util.CertoraUserInputError(
|
|
281
|
+
f"Invalid --solana_sbf_arch value '{value}'. Must be one of: {', '.join(SOLANA_SBF_ARCH_VALUES)}"
|
|
282
|
+
)
|
|
283
|
+
return value
|
|
284
|
+
|
|
285
|
+
|
|
275
286
|
def validate_solana_extension(filename: str) -> str:
|
|
276
287
|
if not filename.lower().endswith(Util.SOLANA_EXEC_EXTENSION):
|
|
277
288
|
raise Util.CertoraUserInputError(f"{filename} does not end with {Util.SOLANA_EXEC_EXTENSION}")
|
|
@@ -23,9 +23,11 @@ from pathlib import Path
|
|
|
23
23
|
scripts_dir_path = Path(__file__).parent.resolve() # containing directory
|
|
24
24
|
sys.path.insert(0, str(scripts_dir_path))
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
import CertoraProver.certoraApp as App
|
|
28
27
|
from CertoraProver.certoraBuildRust import build_rust_project
|
|
28
|
+
from CertoraProver.certoraCloudIO import CloudVerification
|
|
29
|
+
from CertoraProver import splitRules
|
|
30
|
+
from Shared import certoraUtils as Util
|
|
29
31
|
from Shared.proverCommon import (
|
|
30
32
|
build_context,
|
|
31
33
|
collect_and_dump_metadata,
|
|
@@ -51,6 +53,7 @@ def run_solana_prover(args: List[str]) -> Optional[CertoraRunResult]:
|
|
|
51
53
|
2. Run the necessary steps (build/ cloud verification/ local verification)
|
|
52
54
|
"""
|
|
53
55
|
context, logging_manager = build_context(args, App.SolanaApp)
|
|
56
|
+
context.prover_cmd = sys.argv[0]
|
|
54
57
|
|
|
55
58
|
timings: Dict[str, float] = {}
|
|
56
59
|
exit_code = 0 # The exit code of the script. 0 means success, any other number is an error.
|
|
@@ -69,12 +72,30 @@ def run_solana_prover(args: List[str]) -> Optional[CertoraRunResult]:
|
|
|
69
72
|
if context.build_only:
|
|
70
73
|
return return_value
|
|
71
74
|
|
|
75
|
+
if context.split_rules:
|
|
76
|
+
rule_handler = splitRules.SplitRulesHandler(context)
|
|
77
|
+
exit_code = rule_handler.generate_runs()
|
|
78
|
+
cv = CloudVerification(context)
|
|
79
|
+
cv.print_group_id_url()
|
|
80
|
+
if exit_code == 0:
|
|
81
|
+
return_value = CertoraRunResult(
|
|
82
|
+
cv.get_group_id_url(),
|
|
83
|
+
False,
|
|
84
|
+
Util.get_certora_sources_dir(),
|
|
85
|
+
cv.get_group_id_url(),
|
|
86
|
+
)
|
|
87
|
+
return handle_exit(exit_code, return_value)
|
|
88
|
+
else:
|
|
89
|
+
raise Util.ExitException("Split rules failed", exit_code)
|
|
90
|
+
|
|
72
91
|
if context.local:
|
|
73
92
|
additional_commands = []
|
|
74
93
|
if context.solana_summaries:
|
|
75
94
|
additional_commands += ["-solanaSummaries", ",".join(context.solana_summaries)]
|
|
76
95
|
if context.solana_inlining:
|
|
77
96
|
additional_commands += ["-solanaInlining", ",".join(context.solana_inlining)]
|
|
97
|
+
if context.assert_on_panic is not None:
|
|
98
|
+
additional_commands += ["-solanaAssertOnPanic", str(context.assert_on_panic).lower()]
|
|
78
99
|
# Run local verification
|
|
79
100
|
exit_code = run_local(context, timings, additional_commands)
|
|
80
101
|
else:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.13.0
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta
|
|
6
6
|
Author: Certora
|
|
@@ -38,4 +38,4 @@ Dynamic: requires-dist
|
|
|
38
38
|
Dynamic: requires-python
|
|
39
39
|
Dynamic: summary
|
|
40
40
|
|
|
41
|
-
Commit
|
|
41
|
+
Commit 3ce73ef. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "certora-cli-beta", "tag": "8.13.0", "branch": "", "commit": "3ce73ef", "timestamp": "20260427.7.49.861183", "version": "8.13.0"}
|
|
Binary file
|
|
@@ -3,11 +3,11 @@ import setuptools
|
|
|
3
3
|
|
|
4
4
|
setuptools.setup(
|
|
5
5
|
name="certora-cli-beta",
|
|
6
|
-
version="8.
|
|
6
|
+
version="8.13.0",
|
|
7
7
|
author="Certora",
|
|
8
8
|
author_email="support@certora.com",
|
|
9
9
|
description="Runner for the Certora Prover",
|
|
10
|
-
long_description="Commit
|
|
10
|
+
long_description="Commit 3ce73ef. 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",
|
|
13
13
|
packages=setuptools.find_packages(),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Commit d4f463a. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name": "certora-cli-beta", "tag": "8.11.3", "branch": "", "commit": "d4f463a", "timestamp": "20260421.18.26.449896", "version": "8.11.3"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/Compiler/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/castingInstrumenter.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuild.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraBuildSui.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraConfigIO.py
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContext.py
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraContextClass.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraJobList.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraNodeFilters.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/certoraType.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/CertoraProver/storageExtension.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_default.conf
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_mc_template.spec
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_sanity.conf
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/Eq_template.spec
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/__init__.py
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/equivCheck.py
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/EquivalenceCheck/sanity.spec
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli/Shared/ExpectedComparator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{certora_cli_beta-8.11.3 → certora_cli_beta-8.13.0}/certora_cli_beta.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|