certora-cli-alpha-master 20241225.10.19.754960__py3-none-any.whl → 20241225.17.56.777880__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of certora-cli-alpha-master might be problematic. Click here for more details.
- certora_cli/EVMVerifier/certoraBuildRust.py +7 -7
- certora_cli/EVMVerifier/certoraCloudIO.py +5 -5
- certora_cli/EVMVerifier/certoraConfigIO.py +10 -8
- certora_cli/EVMVerifier/certoraContextAttributes.py +32 -1
- certora_cli/EVMVerifier/certoraParseBuildScript.py +22 -3
- certora_cli/Shared/certoraAttrUtil.py +1 -1
- certora_cli/Shared/certoraValidateFuncs.py +11 -0
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/METADATA +3 -2
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/RECORD +15 -15
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/LICENSE +0 -0
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/WHEEL +0 -0
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/entry_points.txt +0 -0
- {certora_cli_alpha_master-20241225.10.19.754960.dist-info → certora_cli_alpha_master-20241225.17.56.777880.dist-info}/top_level.txt +0 -0
@@ -60,10 +60,10 @@ def copy_files_to_build_dir(context: CertoraContext, root_directory: Path) -> No
|
|
60
60
|
rust_executable = root_directory / context.rust_executables
|
61
61
|
shutil.copyfile(rust_executable, Util.get_build_dir() / rust_executable.name)
|
62
62
|
|
63
|
-
if context.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
if hasattr(context, 'solana_inlining') and context.solana_inlining:
|
64
|
+
solana_inlining = Path(context.solana_inlining).resolve()
|
65
|
+
shutil.copy(solana_inlining, Util.get_build_dir() / solana_inlining.name)
|
66
|
+
|
67
|
+
if hasattr(context, 'solana_summaries') and context.solana_summaries:
|
68
|
+
solana_summaries = Path(context.solana_summaries).resolve()
|
69
|
+
shutil.copy(solana_summaries, Util.get_build_dir() / solana_summaries.name)
|
@@ -749,11 +749,11 @@ class CloudVerification:
|
|
749
749
|
|
750
750
|
files_list.append(Util.get_build_dir() / Path(self.context.rust_executables).name)
|
751
751
|
|
752
|
-
if self.context.
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
752
|
+
if hasattr(self.context, 'solana_inlining') and self.context.solana_inlining:
|
753
|
+
files_list.append(Util.get_build_dir() / Path(self.context.solana_inlining).name)
|
754
|
+
|
755
|
+
if hasattr(self.context, 'solana_summaries') and self.context.solana_summaries:
|
756
|
+
files_list.append(Util.get_build_dir() / Path(self.context.solana_summaries).name)
|
757
757
|
|
758
758
|
result = compress_files(self.ZipFilePath, *files_list,
|
759
759
|
short_output=Ctx.is_minimal_cli_output(self.context))
|
@@ -61,7 +61,7 @@ def read_from_conf_file(context: CertoraContext) -> None:
|
|
61
61
|
try:
|
62
62
|
check_conf_content(configuration, context)
|
63
63
|
except Util.CertoraUserInputError as e:
|
64
|
-
raise Util.CertoraUserInputError(f"Error when reading {conf_file_path}", e) from None
|
64
|
+
raise Util.CertoraUserInputError(f"Error when reading {conf_file_path}: {str(e)}", e) from None
|
65
65
|
context.conf_file = str(conf_file_path)
|
66
66
|
|
67
67
|
|
@@ -86,10 +86,12 @@ def check_conf_content(conf: Dict[str, Any], context: CertoraContext) -> None:
|
|
86
86
|
else:
|
87
87
|
raise Util.CertoraUserInputError(f"{option} appears in the conf file but is not a known attribute. ")
|
88
88
|
|
89
|
-
if 'files' not in conf:
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
89
|
+
if Attrs.is_evm_app() and 'files' not in conf:
|
90
|
+
raise Util.CertoraUserInputError("Mandatory 'files' attribute is missing from the configuration")
|
91
|
+
|
92
|
+
if Attrs.is_rust_app():
|
93
|
+
has_build_script = getattr(context, 'build_script', False)
|
94
|
+
if not has_build_script and 'files' not in conf:
|
95
|
+
raise Util.CertoraUserInputError("Mandatory 'build_script' or 'files' attribute is missing from the configuration")
|
96
|
+
|
97
|
+
context.files = conf.get('files')
|
@@ -1389,7 +1389,8 @@ class BackendAttributes(AttrUtil.Attributes):
|
|
1389
1389
|
class RustAttributes(AttrUtil.Attributes):
|
1390
1390
|
|
1391
1391
|
BUILD_SCRIPT = AttrUtil.AttributeDefinition(
|
1392
|
-
|
1392
|
+
attr_validation_func=Vf.validate_exec_file,
|
1393
|
+
help_msg="script to build a rust project",
|
1393
1394
|
default_desc="Using default building command",
|
1394
1395
|
argparse_args={
|
1395
1396
|
'action': AttrUtil.UniqueStore
|
@@ -1398,6 +1399,16 @@ class RustAttributes(AttrUtil.Attributes):
|
|
1398
1399
|
disables_build_cache=False
|
1399
1400
|
)
|
1400
1401
|
|
1402
|
+
CARGO_FEATURES = AttrUtil.AttributeDefinition(
|
1403
|
+
attr_validation_func=Vf.validate_non_empty_string,
|
1404
|
+
help_msg="a white space separated list of strings that are extra features passed to the build_script",
|
1405
|
+
argparse_args={
|
1406
|
+
'action': AttrUtil.UniqueStore
|
1407
|
+
},
|
1408
|
+
affects_build_cache_key=False,
|
1409
|
+
disables_build_cache=False
|
1410
|
+
)
|
1411
|
+
|
1401
1412
|
|
1402
1413
|
class EvmProverAttributes(CommonAttributes, DeprecatedAttributes, EvmAttributes, InternalUseAttributes,
|
1403
1414
|
BackendAttributes):
|
@@ -1442,6 +1453,26 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
|
|
1442
1453
|
disables_build_cache=False
|
1443
1454
|
)
|
1444
1455
|
|
1456
|
+
SOLANA_INLINING = AttrUtil.AttributeDefinition(
|
1457
|
+
attr_validation_func=Vf.validate_readable_file,
|
1458
|
+
help_msg="a path for the inlining file for Solana contract",
|
1459
|
+
argparse_args={
|
1460
|
+
'action': AttrUtil.UniqueStore
|
1461
|
+
},
|
1462
|
+
affects_build_cache_key=False,
|
1463
|
+
disables_build_cache=False
|
1464
|
+
)
|
1465
|
+
|
1466
|
+
SOLANA_SUMMARIES = AttrUtil.AttributeDefinition(
|
1467
|
+
attr_validation_func=Vf.validate_readable_file,
|
1468
|
+
help_msg="a path for the summaries file for Solana contract",
|
1469
|
+
argparse_args={
|
1470
|
+
'action': AttrUtil.UniqueStore
|
1471
|
+
},
|
1472
|
+
affects_build_cache_key=False,
|
1473
|
+
disables_build_cache=False
|
1474
|
+
)
|
1475
|
+
|
1445
1476
|
|
1446
1477
|
ATTRIBUTES_CLASS: Optional[Type[AttrUtil.Attributes]] = None
|
1447
1478
|
|
@@ -13,7 +13,12 @@ def run_script_and_parse_json(context: CertoraContext) -> None:
|
|
13
13
|
return
|
14
14
|
try:
|
15
15
|
build_script_logger.info(f"Building from script {context.build_script}")
|
16
|
-
|
16
|
+
run_cmd = [context.build_script, '--json']
|
17
|
+
if context.cargo_features is not None:
|
18
|
+
run_cmd.append('--cargo_features')
|
19
|
+
for feature in context.cargo_features.split(' '):
|
20
|
+
run_cmd.append(feature)
|
21
|
+
result = subprocess.run(run_cmd, capture_output=True, text=True)
|
17
22
|
|
18
23
|
# Check if the script executed successfully
|
19
24
|
if result.returncode != 0:
|
@@ -21,13 +26,27 @@ def run_script_and_parse_json(context: CertoraContext) -> None:
|
|
21
26
|
|
22
27
|
json_obj = json.loads(result.stdout)
|
23
28
|
|
24
|
-
if not json_obj
|
25
|
-
raise Util.CertoraUserInputError(f"
|
29
|
+
if not json_obj:
|
30
|
+
raise Util.CertoraUserInputError(f"No JSON output from build script {context.build_script}")
|
31
|
+
|
32
|
+
if missing_keys := [key for key in ["success", "project_directory", "sources", "executables"] if key not in json_obj]:
|
33
|
+
raise Util.CertoraUserInputError(f"Missing required keys in build script response: {', '.join(missing_keys)}")
|
34
|
+
|
35
|
+
if not json_obj.get("success"):
|
36
|
+
raise Util.CertoraUserInputError(
|
37
|
+
f"Compilation failed using build script: {context.build_script}\n"
|
38
|
+
f"Success value in JSON response is False."
|
39
|
+
)
|
26
40
|
|
27
41
|
context.rust_project_directory = json_obj.get("project_directory")
|
28
42
|
context.rust_sources = json_obj.get("sources")
|
29
43
|
context.rust_executables = json_obj.get("executables")
|
30
44
|
|
45
|
+
if context.test == str(Util.TestValue.AFTER_BUILD_RUST):
|
46
|
+
raise Util.TestResultsReady(None)
|
47
|
+
|
48
|
+
except Util.TestResultsReady as e:
|
49
|
+
raise e
|
31
50
|
except FileNotFoundError as e:
|
32
51
|
raise Util.CertoraUserInputError(f"File not found: {e}")
|
33
52
|
except json.JSONDecodeError as e:
|
@@ -100,7 +100,7 @@ class AttributeDefinition:
|
|
100
100
|
self.attr_validation_func(value)
|
101
101
|
except Util.CertoraUserInputError as e:
|
102
102
|
msg = f"attribute/flag '{self.name.lower()}': {e}"
|
103
|
-
if cli_flag and isinstance(value, str) and value.strip()[0] == '-':
|
103
|
+
if cli_flag and isinstance(value, str) and value and value.strip()[0] == '-':
|
104
104
|
flag_error = f'{value}: Please remember, CLI flags should be preceded with double dashes. ' \
|
105
105
|
f'{Util.NEW_LINE}For more help run the tool with the option --help'
|
106
106
|
msg = flag_error + msg
|
@@ -152,6 +152,17 @@ def validate_non_negative_integer(string: str) -> str:
|
|
152
152
|
return string
|
153
153
|
|
154
154
|
|
155
|
+
def validate_non_empty_string(value: str) -> str:
|
156
|
+
"""
|
157
|
+
:param value: A string
|
158
|
+
:return: The same string, if the string represents a non-empty string
|
159
|
+
:raises CertoraUserInputError if the string is empty
|
160
|
+
"""
|
161
|
+
if not value:
|
162
|
+
raise Util.CertoraUserInputError('expected a non-empty string')
|
163
|
+
return value
|
164
|
+
|
165
|
+
|
155
166
|
def validate_manual_mutants(value: Any) -> Any:
|
156
167
|
return validate_mutant_attributes(value, Constants.MANUAL_MUTANTS)
|
157
168
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version: 20241225.
|
3
|
+
Version: 20241225.17.56.777880
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
6
6
|
Author: Certora
|
@@ -22,5 +22,6 @@ Requires-Dist: tqdm
|
|
22
22
|
Requires-Dist: StrEnum
|
23
23
|
Requires-Dist: tomli
|
24
24
|
Requires-Dist: universalmutator
|
25
|
+
Requires-Dist: jinja2
|
25
26
|
|
26
|
-
Commit
|
27
|
+
Commit b803960. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -11,13 +11,13 @@ certora_cli/EVMVerifier/__init__.py,sha256=AJxj90KAGh1JqAsxKqDBTL2rFbqgtkhDfW_Xm
|
|
11
11
|
certora_cli/EVMVerifier/certoraBuild.py,sha256=SNpafLfTRInMrns6OuI9WUrJXP7Yt4Fv53pUnpI_j60,203520
|
12
12
|
certora_cli/EVMVerifier/certoraBuildCacheManager.py,sha256=ZSVCsdTkFFtawuNJ8VK3wJOb01Uyu5e8viPQ8wTziSQ,12563
|
13
13
|
certora_cli/EVMVerifier/certoraBuildDataClasses.py,sha256=4IhvOA_fg-ij5RM9RRlvDDoS7imfp4Zru-AgHhxcHc0,13314
|
14
|
-
certora_cli/EVMVerifier/certoraBuildRust.py,sha256=
|
15
|
-
certora_cli/EVMVerifier/certoraCloudIO.py,sha256=
|
14
|
+
certora_cli/EVMVerifier/certoraBuildRust.py,sha256=5cMp9goJ2tGpi0stDmPZaV0hOxm_NSllJQ3YO_QvOc4,3008
|
15
|
+
certora_cli/EVMVerifier/certoraCloudIO.py,sha256=JJlXoej6jLFEZs9CAl1YghRNd9EQw9_lreS1_EnSP-k,53453
|
16
16
|
certora_cli/EVMVerifier/certoraCollectRunMetadata.py,sha256=selEf-p7UW8_70-AbPfa5659ki6WcGrBwfPkUQWKhFU,10322
|
17
17
|
certora_cli/EVMVerifier/certoraCompilerParameters.py,sha256=PDKW3K_lNeRNPHisW0e5hYtfu6unDRjJUop-yItGHO0,762
|
18
|
-
certora_cli/EVMVerifier/certoraConfigIO.py,sha256=
|
18
|
+
certora_cli/EVMVerifier/certoraConfigIO.py,sha256=zlXcSAXPXQEhCdOqbogNLgIRSURFQgArYjFKd3VMkfg,4693
|
19
19
|
certora_cli/EVMVerifier/certoraContext.py,sha256=52YMEYYm67F_AsDZoIFjgcR34gQQDTnlmhiH9VrLCYE,21649
|
20
|
-
certora_cli/EVMVerifier/certoraContextAttributes.py,sha256=
|
20
|
+
certora_cli/EVMVerifier/certoraContextAttributes.py,sha256=sg2IOEV4tdubHkRdmEWDY8bAHVAZLh6iWSgSK3OjecY,56738
|
21
21
|
certora_cli/EVMVerifier/certoraContextClass.py,sha256=qdHYmrzI4zeQaAaMnonw4C-h1PFrPEhI84trrgvxFj0,210
|
22
22
|
certora_cli/EVMVerifier/certoraContextValidator.py,sha256=_vS3CDY8cJRqxtujwiz7rwRFVgDVxNb40YgUU4t4BPM,37585
|
23
23
|
certora_cli/EVMVerifier/certoraContractFuncs.py,sha256=W3lAvKotGKK7ZGJLg4yYh0FzTwwSQJbZMpizyGaYXZo,6229
|
@@ -25,7 +25,7 @@ certora_cli/EVMVerifier/certoraExtensionInfo.py,sha256=bHjEBKg3qQ1lS419KSU6v6HKb
|
|
25
25
|
certora_cli/EVMVerifier/certoraJobList.py,sha256=JlPOANEzNHP6cDrM5UKfO314pmWYokuhAPTkH3ezNb4,10768
|
26
26
|
certora_cli/EVMVerifier/certoraMiniSpecParser.py,sha256=Thtcr1BLmCz9xOiOkaP04mSnrDaqIUOUSCM81TrqD_s,8970
|
27
27
|
certora_cli/EVMVerifier/certoraNodeFilters.py,sha256=0e8iPdj4cWjwReaAhfJhpdnSUYc8gephmKQzOOP5X_g,2140
|
28
|
-
certora_cli/EVMVerifier/certoraParseBuildScript.py,sha256=
|
28
|
+
certora_cli/EVMVerifier/certoraParseBuildScript.py,sha256=e_rvwH4dh0XvO2khGy2EW7x9aqf4G3R7glJ1_AXt-M0,2276
|
29
29
|
certora_cli/EVMVerifier/certoraSourceFinders.py,sha256=fZLYGjNgntIySnG76DwsjRZ-UHiy0zEkM6xNP7cYpDE,18342
|
30
30
|
certora_cli/EVMVerifier/certoraType.py,sha256=TPrgRwUnY-krN1SxpCHGB0zwN-TR1bxb-NFdnaigA-k,28626
|
31
31
|
certora_cli/EVMVerifier/certoraVerifyGenerator.py,sha256=OT5zrtQMXDoaVdGfQ4_gbAnITin3nlXgXTgw3msqlNQ,9452
|
@@ -52,16 +52,16 @@ certora_cli/Mutate/mutateUtil.py,sha256=O3ub9gJe6LWQTDPbWyDqdfBhupwYl0ZrlfRX4kSn
|
|
52
52
|
certora_cli/Mutate/mutateValidate.py,sha256=mCLxAyrzXEp3UFQpr1NGrC3zmJ5Y_WQRmV5jebLkYQ0,6745
|
53
53
|
certora_cli/Shared/ExpectedComparator.py,sha256=rDDY3-FaE3OS_ZjZ-nOyvUTlUp8eQCHwryJMAefxIeo,17767
|
54
54
|
certora_cli/Shared/__init__.py,sha256=QGoFb_Uu87tWp4E4L6C_VtzdG-sfNrzdNtRK79h5_Lw,333
|
55
|
-
certora_cli/Shared/certoraAttrUtil.py,sha256=
|
55
|
+
certora_cli/Shared/certoraAttrUtil.py,sha256=hUi1ye5kIAHGZqCR1YbXayn5-ToZi3WAa4MwkI_jdzc,6761
|
56
56
|
certora_cli/Shared/certoraLogging.py,sha256=5Lx-XWKl7GnwnWi7KlwTLIfsEvUvCTZ8KeyfNyi_6RU,13323
|
57
57
|
certora_cli/Shared/certoraUtils.py,sha256=WmVX8Hz5wMZ7WI2JhYavAilH1kO3fwKLUBsf4hQ4b-o,53676
|
58
|
-
certora_cli/Shared/certoraValidateFuncs.py,sha256=
|
59
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
60
|
-
certora_jars/Typechecker.jar,sha256=
|
58
|
+
certora_cli/Shared/certoraValidateFuncs.py,sha256=qbN2h6MApnLucKvzfJ_dnBa135lLLTGE9Q7MlCBP3Fc,37204
|
59
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=i7ctp7fXwYYpJgbuENh7Jr9BEWGtUYJPHSwPxyHumas,170
|
60
|
+
certora_jars/Typechecker.jar,sha256=7X1kCEhj3M0n9jReooloRUJ3PCFJbRgUIlLBptMapEk,16816756
|
61
61
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
|
-
certora_cli_alpha_master-20241225.
|
63
|
-
certora_cli_alpha_master-20241225.
|
64
|
-
certora_cli_alpha_master-20241225.
|
65
|
-
certora_cli_alpha_master-20241225.
|
66
|
-
certora_cli_alpha_master-20241225.
|
67
|
-
certora_cli_alpha_master-20241225.
|
62
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/LICENSE,sha256=VeEBJLgfzZqyAUfjLoKUztf7KJBBUjtZ1ap99eQubOo,1065
|
63
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/METADATA,sha256=6jOvTyrbcwWV7ucxMKHJSPummbzlVkT0HL9QvhmTzzk,860
|
64
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
65
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/entry_points.txt,sha256=x2dyit80wAtF72k5CQj9F5lnWZEmP9ioseqvrEGWyFc,389
|
66
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
67
|
+
certora_cli_alpha_master-20241225.17.56.777880.dist-info/RECORD,,
|
@@ -1 +1 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "b803960", "timestamp": "20241225.17.56.777880", "version": "20241225.17.56.777880+b803960"}
|
certora_jars/Typechecker.jar
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|