certora-cli-beta-mirror 8.6.0__tar.gz → 8.6.2__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_mirror-8.6.0/certora_cli_beta_mirror.egg-info → certora_cli_beta_mirror-8.6.2}/PKG-INFO +2 -2
- certora_cli_beta_mirror-8.6.2/README.md +1 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraBuildDataClasses.py +1 -1
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraCollectConfigurationLayout.py +1 -2
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraContext.py +6 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraContextAttributes.py +13 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraContextValidator.py +8 -1
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/equivCheck.py +23 -6
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraUtils.py +42 -34
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraRun.py +18 -9
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2/certora_cli_beta_mirror.egg-info}/PKG-INFO +2 -2
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_jars/ASTExtraction.jar +0 -0
- certora_cli_beta_mirror-8.6.2/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_jars/Typechecker.jar +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/setup.py +2 -2
- certora_cli_beta_mirror-8.6.0/README.md +0 -1
- certora_cli_beta_mirror-8.6.0/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/LICENSE +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/MANIFEST.in +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_bins/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollector.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollectorSol.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollectorSolBased.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollectorVy.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/CompilerCollectorYul.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/Compiler/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/castingInstrumenter.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraApp.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraBuild.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraBuildCacheManager.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraBuildRust.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraBuildSui.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraCloudIO.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraCollectRunMetadata.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraCompilerParameters.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraConfigIO.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraContextClass.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraContractFuncs.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraExtensionInfo.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraJobList.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraMiniSpecParser.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraNodeFilters.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraParseBuildScript.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraProjectScanner.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraSourceFinders.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraType.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/certoraVerifyGenerator.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/erc7201.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/splitRules.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/storageExtension.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateApp.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateAttributes.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateConstants.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateUtil.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateValidate.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/ExpectedComparator.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraAttrUtil.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraLogging.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraValidateFuncs.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/proverCommon.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraCVLFormatter.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraConcord.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraEVMProver.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraEqCheck.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraMutate.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraRanger.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSolanaProver.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSorobanProver.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSuiProver.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/rustMutator.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli_beta_mirror.egg-info/SOURCES.txt +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli_beta_mirror.egg-info/dependency_links.txt +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli_beta_mirror.egg-info/entry_points.txt +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli_beta_mirror.egg-info/requires.txt +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli_beta_mirror.egg-info/top_level.txt +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_jars/__init__.py +0 -0
- {certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta-mirror
|
|
3
|
-
Version: 8.6.
|
|
3
|
+
Version: 8.6.2
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta-mirror
|
|
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 5e8518f. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Commit 5e8518f. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -171,7 +171,7 @@ class ContractInSDC:
|
|
|
171
171
|
"""
|
|
172
172
|
return {
|
|
173
173
|
"name": self.name,
|
|
174
|
-
"original_file": Util.find_filename_in(Util.get_certora_sources_dir(), self.original_file),
|
|
174
|
+
"original_file": Util.find_filename_in(Util.get_certora_sources_dir(), self.original_file) or self.original_file,
|
|
175
175
|
"lang": self.lang,
|
|
176
176
|
"file": self.report_source_file,
|
|
177
177
|
"address": self.address,
|
|
@@ -64,7 +64,6 @@ class CardContent:
|
|
|
64
64
|
|
|
65
65
|
DOC_LINK_PREFIX = 'https://docs.certora.com/en/latest/docs/'
|
|
66
66
|
GIT_ATTRIBUTES = ['origin', 'revision', 'branch', 'dirty']
|
|
67
|
-
ARG_LIST_ATTRIBUTES = ['prover_args', 'java_args']
|
|
68
67
|
|
|
69
68
|
|
|
70
69
|
class AttributeJobConfigData:
|
|
@@ -297,7 +296,7 @@ def collect_attribute_configs(metadata: dict) -> list[CardContent]:
|
|
|
297
296
|
# Find or create the subsection (if it doesn't exist)
|
|
298
297
|
if isinstance(attr_value, list):
|
|
299
298
|
content_type = ContentType.SIMPLE
|
|
300
|
-
if attr_name in
|
|
299
|
+
if attr_name in Attrs.ARG_FLAG_LIST_ATTRIBUTES:
|
|
301
300
|
attr_value = split_and_sort_arg_list_value(attr_value)
|
|
302
301
|
|
|
303
302
|
elif isinstance(attr_value, dict):
|
|
@@ -582,6 +582,12 @@ def run_local_spec_check(with_typechecking: bool, context: CertoraContext, extra
|
|
|
582
582
|
"""
|
|
583
583
|
|
|
584
584
|
args = collect_jar_args(context)
|
|
585
|
+
|
|
586
|
+
# Add -printAst flag if dump_cvl_ast option is set
|
|
587
|
+
# We only want the elementary typecheck run to produce a file, not any of the auxiliary ones
|
|
588
|
+
if hasattr(context, 'dump_cvl_ast') and context.dump_cvl_ast and not extra_args and with_typechecking:
|
|
589
|
+
args.extend(['-printAst', context.dump_cvl_ast])
|
|
590
|
+
|
|
585
591
|
if Util.is_java_installed(context.java_version):
|
|
586
592
|
run_typechecker("Typechecker.jar", with_typechecking, args + extra_args, print_errors)
|
|
587
593
|
else:
|
|
@@ -1202,6 +1202,17 @@ class EvmAttributes(AttrUtil.Attributes):
|
|
|
1202
1202
|
disables_build_cache=False,
|
|
1203
1203
|
)
|
|
1204
1204
|
|
|
1205
|
+
DUMP_CVL_AST = AttrUtil.AttributeDefinition(
|
|
1206
|
+
arg_type=AttrUtil.AttrArgType.STRING,
|
|
1207
|
+
help_msg="Path to output file where the CVL AST will be printed during typechecking",
|
|
1208
|
+
default_desc="",
|
|
1209
|
+
argparse_args={
|
|
1210
|
+
'action': AttrUtil.UniqueStore
|
|
1211
|
+
},
|
|
1212
|
+
affects_build_cache_key=False,
|
|
1213
|
+
disables_build_cache=False
|
|
1214
|
+
)
|
|
1215
|
+
|
|
1205
1216
|
SAFE_CASTING_BUILTIN = AttrUtil.AttributeDefinition(
|
|
1206
1217
|
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
|
1207
1218
|
help_msg="This needs to be set to true for the safeCasting builtin to work",
|
|
@@ -1938,6 +1949,8 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
|
|
|
1938
1949
|
|
|
1939
1950
|
ATTRIBUTES_CLASS: Optional[Type[AttrUtil.Attributes]] = None
|
|
1940
1951
|
|
|
1952
|
+
ARG_FLAG_LIST_ATTRIBUTES = ['prover_args', 'java_args']
|
|
1953
|
+
|
|
1941
1954
|
|
|
1942
1955
|
def get_attribute_class() -> Type[AttrUtil.Attributes]:
|
|
1943
1956
|
if not ATTRIBUTES_CLASS:
|
|
@@ -41,7 +41,6 @@ validation_logger = logging.getLogger("validation")
|
|
|
41
41
|
|
|
42
42
|
KEY_ENV_VAR = "CERTORAKEY"
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
class CertoraContextValidator:
|
|
46
45
|
def __init__(self, context: CertoraContext):
|
|
47
46
|
self.context = context
|
|
@@ -143,6 +142,14 @@ class CertoraContextValidator:
|
|
|
143
142
|
f'"{conf_key}": [<comma separated list of values>]{Util.NEW_LINE}{Util.NEW_LINE}'
|
|
144
143
|
raise Util.CertoraUserInputError(f"The value of attribute '{conf_key}' ('{value}')' is not a "
|
|
145
144
|
f"list {syntax_suggestion}")
|
|
145
|
+
|
|
146
|
+
# Check for duplicates, we exclude ARG_FLAG_LIST_ATTRIBUTES as those can have duplicates e.g.
|
|
147
|
+
# prover_args value of “-rule rule1 -rule rule2" is valid, although the -rule string appears more than once.
|
|
148
|
+
|
|
149
|
+
if conf_key not in Attrs.ARG_FLAG_LIST_ATTRIBUTES:
|
|
150
|
+
if len(value) != len(set(value)):
|
|
151
|
+
raise Util.CertoraUserInputError(f"The value of attribute '{conf_key}' contains duplicate entries: {value}")
|
|
152
|
+
|
|
146
153
|
for v in value:
|
|
147
154
|
if not isinstance(v, str):
|
|
148
155
|
raise Util.CertoraUserInputError(f"value in {conf_key} {v} in {value} is not a string")
|
|
@@ -20,7 +20,8 @@ import sys
|
|
|
20
20
|
import json
|
|
21
21
|
from pathlib import Path
|
|
22
22
|
from argparse import Namespace, ArgumentParser
|
|
23
|
-
from typing import List, Optional
|
|
23
|
+
from typing import List, TypeVar, Union, Optional
|
|
24
|
+
|
|
24
25
|
|
|
25
26
|
# Credit for this work goes to Nick and Netanel.
|
|
26
27
|
|
|
@@ -51,6 +52,22 @@ CONTRACTS = "contracts"
|
|
|
51
52
|
PROVER_ARGS = "prover_args"
|
|
52
53
|
OPTIMISTIC_FALLBACK_SETTING = "optimistic_fallback"
|
|
53
54
|
|
|
55
|
+
T = TypeVar("T", str, Path)
|
|
56
|
+
|
|
57
|
+
def append_unique(lst: List[T], item: Union[str, Path]) -> None:
|
|
58
|
+
"""
|
|
59
|
+
Append item to lst:
|
|
60
|
+
- If lst is List[Path] and item is str → convert to Path.
|
|
61
|
+
- If lst is List[str] → leave item as str.
|
|
62
|
+
"""
|
|
63
|
+
if lst and isinstance(lst[0], Path) and isinstance(item, str):
|
|
64
|
+
if Path(item) in lst:
|
|
65
|
+
return
|
|
66
|
+
lst.append(Path(item)) # type: ignore[arg-type]
|
|
67
|
+
else:
|
|
68
|
+
if item in lst:
|
|
69
|
+
return
|
|
70
|
+
lst.append(item) # type: ignore[arg-type]
|
|
54
71
|
|
|
55
72
|
class EquivalenceChecker:
|
|
56
73
|
|
|
@@ -134,7 +151,7 @@ class EquivalenceChecker:
|
|
|
134
151
|
solc_i = self.solcs[i]
|
|
135
152
|
with (self.path / SANITY_CONF_PATH).open() as sanity_conf:
|
|
136
153
|
contents = json.load(sanity_conf)
|
|
137
|
-
contents[FILES]
|
|
154
|
+
append_unique(contents[FILES], str(file_i))
|
|
138
155
|
contents[SOLC] = solc_i
|
|
139
156
|
contents[VERIFY] = f'{contract_i}:{self.path / SANITY_PATH}'
|
|
140
157
|
contents["build_only"] = True
|
|
@@ -165,10 +182,10 @@ class EquivalenceChecker:
|
|
|
165
182
|
for file in files:
|
|
166
183
|
# if the conf file contains absolute path already then we use it
|
|
167
184
|
if Path(file).exists():
|
|
168
|
-
self.files
|
|
185
|
+
append_unique(self.files, file)
|
|
169
186
|
# otherwise append the relative path to the conf file location to create absolute path
|
|
170
187
|
else:
|
|
171
|
-
self.files
|
|
188
|
+
append_unique(self.files, resolve_file(self.conf_path.parent / file))
|
|
172
189
|
# case where either or both of these will be in the conf file
|
|
173
190
|
if not self.functions and FUNCTIONS in contents:
|
|
174
191
|
# if the user has functions in the conf file but manually inputs different ones
|
|
@@ -307,13 +324,13 @@ class EquivalenceChecker:
|
|
|
307
324
|
contents['rule_sanity'] = "basic"
|
|
308
325
|
contents[FILES] = list()
|
|
309
326
|
for file in self.files:
|
|
310
|
-
contents['files']
|
|
327
|
+
append_unique(contents['files'], str(file))
|
|
311
328
|
else:
|
|
312
329
|
# update default conf_file for running
|
|
313
330
|
with (self.path / DEFAULT_CONF_PATH).open() as conf_file:
|
|
314
331
|
contents = json.load(conf_file)
|
|
315
332
|
for file in self.files:
|
|
316
|
-
contents[FILES]
|
|
333
|
+
append_unique(contents[FILES], str(file))
|
|
317
334
|
if self.args.bitvector is True:
|
|
318
335
|
contents.setdefault(PROVER_ARGS, []).append(["-smt_bitVectorTheory true"])
|
|
319
336
|
if self.args.test_mode is True:
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraUtils.py
RENAMED
|
@@ -310,6 +310,7 @@ class ExitException(Exception):
|
|
|
310
310
|
self.exit_code = exit_code # Store the integer data
|
|
311
311
|
|
|
312
312
|
MIN_JAVA_VERSION = 19 # minimal java version to run the local type checker jar
|
|
313
|
+
RECOMMENDED_JAVA_VERSION = 21 # recommended java version to run the local type checker jar
|
|
313
314
|
|
|
314
315
|
|
|
315
316
|
def text_style(txt: str, style: str) -> str:
|
|
@@ -626,20 +627,6 @@ def get_certora_root_directory() -> Path:
|
|
|
626
627
|
def get_certora_envvar() -> str:
|
|
627
628
|
return os.getenv(ENVVAR_CERTORA, "")
|
|
628
629
|
|
|
629
|
-
|
|
630
|
-
def which(filename: str) -> Optional[str]:
|
|
631
|
-
if is_windows() and not filename.endswith(".exe"):
|
|
632
|
-
filename += ".exe"
|
|
633
|
-
|
|
634
|
-
# TODO: find a better way to iterate over all directories in $Path
|
|
635
|
-
for dirname in os.environ['PATH'].split(os.pathsep) + [os.getcwd()]:
|
|
636
|
-
candidate = os.path.join(dirname, filename)
|
|
637
|
-
if os.path.isfile(candidate) and os.access(candidate, os.X_OK):
|
|
638
|
-
return filename
|
|
639
|
-
|
|
640
|
-
return None
|
|
641
|
-
|
|
642
|
-
|
|
643
630
|
def read_json_file(file_name: Path) -> Dict[str, Any]:
|
|
644
631
|
with file_name.open() as json_file:
|
|
645
632
|
json_obj = json.load(json_file)
|
|
@@ -1006,7 +993,7 @@ def get_java_version() -> str:
|
|
|
1006
993
|
@return installed java version on success or empty string
|
|
1007
994
|
"""
|
|
1008
995
|
# Check if java exists on the machine
|
|
1009
|
-
java = which("java")
|
|
996
|
+
java = shutil.which("java")
|
|
1010
997
|
if java is None:
|
|
1011
998
|
return ''
|
|
1012
999
|
|
|
@@ -1028,17 +1015,23 @@ def is_java_installed(java_version: str) -> bool:
|
|
|
1028
1015
|
if not java_version:
|
|
1029
1016
|
typecheck_logger.warning(
|
|
1030
1017
|
f"`java` is not installed. Installing Java version {MIN_JAVA_VERSION} or later will enable faster "
|
|
1031
|
-
f"CVL specification syntax checking before uploading to the cloud
|
|
1018
|
+
f"CVL specification syntax checking before uploading to the cloud.\n"
|
|
1019
|
+
f"The recommended LTS version is {RECOMMENDED_JAVA_VERSION}.")
|
|
1032
1020
|
return False
|
|
1033
1021
|
|
|
1034
1022
|
else:
|
|
1035
1023
|
major_java_version = java_version.split('.')[0]
|
|
1036
1024
|
if int(major_java_version) < MIN_JAVA_VERSION:
|
|
1037
1025
|
typecheck_logger.warning("Installed Java version is too old to check CVL specification files locally. "
|
|
1038
|
-
f"
|
|
1039
|
-
"type checking"
|
|
1026
|
+
f"Java version should be at least {MIN_JAVA_VERSION} to allow local java-based "
|
|
1027
|
+
"type checking\n"
|
|
1028
|
+
f"The recommended LTS version is {RECOMMENDED_JAVA_VERSION}.")
|
|
1040
1029
|
|
|
1041
1030
|
return False
|
|
1031
|
+
elif int(major_java_version) < RECOMMENDED_JAVA_VERSION:
|
|
1032
|
+
typecheck_logger.warning(f"Installed Java version ({int(major_java_version)}) is not an LTS release. "
|
|
1033
|
+
f"Upgrading is recommended.\n"
|
|
1034
|
+
f"The recommended LTS version is {RECOMMENDED_JAVA_VERSION}.")
|
|
1042
1035
|
|
|
1043
1036
|
return True
|
|
1044
1037
|
|
|
@@ -1319,6 +1312,7 @@ def check_packages_arguments(context: SimpleNamespace) -> None:
|
|
|
1319
1312
|
package = package_str.split("=")[0]
|
|
1320
1313
|
path = package_str.split("=")[1]
|
|
1321
1314
|
if package in context.package_name_to_path:
|
|
1315
|
+
|
|
1322
1316
|
raise CertoraUserInputError(
|
|
1323
1317
|
f"package {package} was given two paths: {context.package_name_to_path[package]}, {path}")
|
|
1324
1318
|
if path.endswith("/"):
|
|
@@ -1334,7 +1328,11 @@ def check_packages_arguments(context: SimpleNamespace) -> None:
|
|
|
1334
1328
|
if PACKAGE_FILE.exists():
|
|
1335
1329
|
try:
|
|
1336
1330
|
with PACKAGE_FILE.open() as package_json_file:
|
|
1337
|
-
|
|
1331
|
+
try:
|
|
1332
|
+
package_json = json.load(package_json_file)
|
|
1333
|
+
except json.JSONDecodeError as e:
|
|
1334
|
+
raise CertoraUserInputError(f"Invalid JSON in package file: {PACKAGE_FILE}", e)
|
|
1335
|
+
|
|
1338
1336
|
dict1 = package_json.get("dependencies", {})
|
|
1339
1337
|
dict2 = package_json.get("devDependencies", {})
|
|
1340
1338
|
dep_conflicts = {key: value for key, value in dict1.items() if key in dict2 and dict2[key] != value}
|
|
@@ -1352,7 +1350,7 @@ def check_packages_arguments(context: SimpleNamespace) -> None:
|
|
|
1352
1350
|
|
|
1353
1351
|
packages_to_path_list += handle_remappings_file(context)
|
|
1354
1352
|
if len(packages_to_path_list) > 0:
|
|
1355
|
-
keys = [s.split('=')[0] for s in packages_to_path_list]
|
|
1353
|
+
keys = [s.split('=')[0].rstrip('/') for s in packages_to_path_list] # XXX and XXX/ are the same key
|
|
1356
1354
|
if len(set(keys)) < len(keys):
|
|
1357
1355
|
raise CertoraUserInputError(f"package.json and remappings.txt include duplicated keys in: {keys}")
|
|
1358
1356
|
context.packages = sorted(packages_to_path_list, key=str.lower)
|
|
@@ -1380,7 +1378,9 @@ def get_mappings_from_forge_remappings() -> List[str]:
|
|
|
1380
1378
|
for line in remappings_output.strip().split('\n'):
|
|
1381
1379
|
key, value = line.split('=', 1)
|
|
1382
1380
|
if key and value:
|
|
1383
|
-
|
|
1381
|
+
new_remapping = line.strip()
|
|
1382
|
+
if new_remapping not in remappings:
|
|
1383
|
+
remappings.append(new_remapping)
|
|
1384
1384
|
for suffix in ['contracts/', 'src/']:
|
|
1385
1385
|
if value.endswith(suffix) and not key.endswith(suffix):
|
|
1386
1386
|
new_remapping = f"{key}{suffix}={value}"
|
|
@@ -1415,30 +1415,38 @@ def check_remapping_file() -> None:
|
|
|
1415
1415
|
|
|
1416
1416
|
|
|
1417
1417
|
def handle_remappings_file(context: SimpleNamespace) -> List[str]:
|
|
1418
|
-
""""
|
|
1419
|
-
Tries to reach packages from remappings.txt.
|
|
1420
|
-
If the file exists in cwd and foundry.toml does not exist in cwd we return the mappings in
|
|
1421
|
-
the file (legacy implementation).
|
|
1422
|
-
In all other cases we add the remappings returned from running the "forge remappings" command. Forge remappings
|
|
1423
|
-
takes into consideration mappings in remappings.txt but also mappings in foundry.toml and mappings from auto scan
|
|
1424
|
-
:return:
|
|
1425
1418
|
"""
|
|
1426
|
-
remappings
|
|
1427
|
-
|
|
1428
|
-
|
|
1419
|
+
Tries to fetch packages from remappings.txt. This function should not be called if the packages attribute
|
|
1420
|
+
was set in conf file on in CLI.
|
|
1421
|
+
If forge is installed and foundry.toml is found we run 'forge remappings' to get the package mappings (including possible auto scan).
|
|
1422
|
+
If the remappings.txt exists in cwd and foundry is not installed we parse the file (legacy behavior).
|
|
1423
|
+
"""
|
|
1424
|
+
|
|
1425
|
+
def parse_remappings_file() -> List[str]:
|
|
1429
1426
|
try:
|
|
1430
1427
|
with REMAPPINGS_FILE.open() as remappings_file:
|
|
1431
1428
|
remappings_set = set(filter(lambda x: x != "", map(lambda x: x.strip(), remappings_file.readlines())))
|
|
1432
|
-
|
|
1429
|
+
return list(remappings_set)
|
|
1433
1430
|
except CertoraUserInputError as e:
|
|
1434
1431
|
raise e from None
|
|
1435
1432
|
except Exception as e:
|
|
1436
1433
|
# create CertoraUserInputError from other exceptions
|
|
1437
1434
|
raise CertoraUserInputError(f"Invalid remappings file: {REMAPPINGS_FILE}", e)
|
|
1438
|
-
|
|
1435
|
+
|
|
1436
|
+
check_remapping_file()
|
|
1437
|
+
foundry_toml_exist = find_nearest_foundry_toml()
|
|
1438
|
+
remappings_text_exist_in_cwd = REMAPPINGS_FILE.exists()
|
|
1439
|
+
foundry_installed = shutil.which("forge") is not None
|
|
1440
|
+
remappings = []
|
|
1441
|
+
if foundry_installed and foundry_toml_exist:
|
|
1439
1442
|
remappings = get_mappings_from_forge_remappings()
|
|
1443
|
+
elif remappings_text_exist_in_cwd:
|
|
1444
|
+
remappings = parse_remappings_file()
|
|
1440
1445
|
|
|
1441
|
-
|
|
1446
|
+
if foundry_toml_exist and not foundry_installed:
|
|
1447
|
+
context_logger.warning("foundry.toml was found but `forge` command not found. To add support for foundry "
|
|
1448
|
+
"please install `foundry` following instructions at "
|
|
1449
|
+
"https://book.getfoundry.sh/getting-started/installation")
|
|
1442
1450
|
|
|
1443
1451
|
return remappings
|
|
1444
1452
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import sys
|
|
18
18
|
import time
|
|
19
19
|
import logging
|
|
20
|
-
from typing import List, Optional, Type
|
|
20
|
+
from typing import List, Optional, Type, Any
|
|
21
21
|
from pathlib import Path
|
|
22
22
|
|
|
23
23
|
scripts_dir_path = Path(__file__).parent.resolve() # containing directory
|
|
@@ -27,6 +27,7 @@ from Shared import certoraUtils as Util
|
|
|
27
27
|
from CertoraProver.certoraCloudIO import CloudVerification
|
|
28
28
|
|
|
29
29
|
from CertoraProver.certoraBuild import build
|
|
30
|
+
from CertoraProver.certoraContextClass import CertoraContext
|
|
30
31
|
import CertoraProver.certoraContext as Ctx
|
|
31
32
|
import CertoraProver.certoraApp as App
|
|
32
33
|
|
|
@@ -110,7 +111,11 @@ def run_certora(args: List[str], app: Type[App.CertoraApp] = App.EvmApp,
|
|
|
110
111
|
if context.test == str(Util.TestValue.AFTER_BUILD):
|
|
111
112
|
raise Util.TestResultsReady(context)
|
|
112
113
|
|
|
113
|
-
if context.build_only:
|
|
114
|
+
if context.build_only or context.compilation_steps_only:
|
|
115
|
+
# build_only does not perform CVL typechecking, just Solidity/Vyper building.
|
|
116
|
+
# compilation_steps_only includes the CVL typechecking
|
|
117
|
+
if context.compilation_steps_only:
|
|
118
|
+
run_syntax_and_typechecking_with_timings(context, timings)
|
|
114
119
|
return return_value
|
|
115
120
|
|
|
116
121
|
# either we skipped building (TAC MODE) or build succeeded
|
|
@@ -133,13 +138,7 @@ def run_certora(args: List[str], app: Type[App.CertoraApp] = App.EvmApp,
|
|
|
133
138
|
if not result:
|
|
134
139
|
exit_code = 1
|
|
135
140
|
else: # Remote run
|
|
136
|
-
|
|
137
|
-
if Cv.mode_has_spec_file(context):
|
|
138
|
-
if Ctx.should_run_local_speck_check(context):
|
|
139
|
-
typechecking_start = time.perf_counter()
|
|
140
|
-
Ctx.run_local_spec_check(True, context)
|
|
141
|
-
typechecking_end = time.perf_counter()
|
|
142
|
-
timings['typecheckingTime'] = round(typechecking_end - typechecking_start, 4)
|
|
141
|
+
run_syntax_and_typechecking_with_timings(context, timings)
|
|
143
142
|
|
|
144
143
|
# Remove debug logger and run remote verification
|
|
145
144
|
logging_manager.remove_debug_logger()
|
|
@@ -149,6 +148,16 @@ def run_certora(args: List[str], app: Type[App.CertoraApp] = App.EvmApp,
|
|
|
149
148
|
return handle_exit(exit_code, return_value)
|
|
150
149
|
|
|
151
150
|
|
|
151
|
+
def run_syntax_and_typechecking_with_timings(context: CertoraContext, timings: dict[Any, Any]) -> None:
|
|
152
|
+
# Syntax checking and typechecking
|
|
153
|
+
if Cv.mode_has_spec_file(context):
|
|
154
|
+
if Ctx.should_run_local_speck_check(context):
|
|
155
|
+
typechecking_start = time.perf_counter()
|
|
156
|
+
Ctx.run_local_spec_check(True, context)
|
|
157
|
+
typechecking_end = time.perf_counter()
|
|
158
|
+
timings['typecheckingTime'] = round(typechecking_end - typechecking_start, 4)
|
|
159
|
+
|
|
160
|
+
|
|
152
161
|
def latest_emv_dir() -> Optional[Path]:
|
|
153
162
|
"""
|
|
154
163
|
Returns the latest emv-... directory.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta-mirror
|
|
3
|
-
Version: 8.6.
|
|
3
|
+
Version: 8.6.2
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta-mirror
|
|
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 5e8518f. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_jars/ASTExtraction.jar
RENAMED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name": "certora-cli-beta-mirror", "tag": "8.6.2", "branch": "", "commit": "5e8518f", "timestamp": "20251215.5.17.070907", "version": "8.6.2"}
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_jars/Typechecker.jar
RENAMED
|
Binary file
|
|
@@ -3,11 +3,11 @@ import setuptools
|
|
|
3
3
|
|
|
4
4
|
setuptools.setup(
|
|
5
5
|
name="certora-cli-beta-mirror",
|
|
6
|
-
version="8.6.
|
|
6
|
+
version="8.6.2",
|
|
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 5e8518f. 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 92412cc. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"name": "certora-cli-beta-mirror", "tag": "8.6.0", "branch": "", "commit": "92412cc", "timestamp": "20251127.6.22.749789", "version": "8.6.0"}
|
|
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
|
|
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_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/CertoraProver/erc7201.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
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/__init__.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateApp.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateUtil.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Mutate/mutateValidate.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/certoraLogging.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/Shared/proverCommon.py
RENAMED
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraCVLFormatter.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraConcord.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraEVMProver.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraEqCheck.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraMutate.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraRanger.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSolanaProver.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSorobanProver.py
RENAMED
|
File without changes
|
{certora_cli_beta_mirror-8.6.0 → certora_cli_beta_mirror-8.6.2}/certora_cli/certoraSuiProver.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
|