certora-cli-beta-mirror 7.30.0__py3-none-any.whl → 7.31.0__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.
Files changed (26) hide show
  1. certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py +11 -2
  2. certora_cli/CertoraProver/certoraBuild.py +50 -45
  3. certora_cli/CertoraProver/certoraBuildCacheManager.py +15 -16
  4. certora_cli/CertoraProver/certoraBuildRust.py +2 -1
  5. certora_cli/CertoraProver/certoraCloudIO.py +7 -27
  6. certora_cli/CertoraProver/certoraCollectConfigurationLayout.py +62 -51
  7. certora_cli/CertoraProver/certoraConfigIO.py +2 -1
  8. certora_cli/CertoraProver/certoraContext.py +29 -2
  9. certora_cli/CertoraProver/certoraContextAttributes.py +20 -9
  10. certora_cli/CertoraProver/certoraContextValidator.py +39 -61
  11. certora_cli/CertoraProver/certoraParseBuildScript.py +4 -3
  12. certora_cli/EquivalenceCheck/Eq_default.conf +0 -1
  13. certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -1
  14. certora_cli/Mutate/mutateApp.py +3 -1
  15. certora_cli/Shared/certoraUtils.py +21 -19
  16. certora_cli/Shared/certoraValidateFuncs.py +5 -3
  17. certora_cli/Shared/proverCommon.py +2 -0
  18. certora_cli/certoraRun.py +2 -0
  19. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/METADATA +3 -2
  20. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/RECORD +26 -26
  21. certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
  22. certora_jars/Typechecker.jar +0 -0
  23. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/LICENSE +0 -0
  24. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/WHEEL +0 -0
  25. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/entry_points.txt +0 -0
  26. {certora_cli_beta_mirror-7.30.0.dist-info → certora_cli_beta_mirror-7.31.0.dist-info}/top_level.txt +0 -0
@@ -20,6 +20,8 @@ import os
20
20
  import re
21
21
  import sys
22
22
  import logging
23
+ import fnmatch
24
+ from wcmatch import glob
23
25
 
24
26
 
25
27
  from pathlib import Path
@@ -150,8 +152,6 @@ def get_local_run_cmd(context: CertoraContext) -> List[str]:
150
152
  java_cmd.extend(context.java_args.strip().split(' '))
151
153
 
152
154
  cmd = java_cmd + ["-jar", jar_path] + run_args
153
- if context.test == str(Util.TestValue.LOCAL_JAR):
154
- raise Util.TestResultsReady(' '.join(cmd))
155
155
  return cmd
156
156
 
157
157
 
@@ -615,3 +615,30 @@ def attrs_to_relative(context: CertoraContext) -> None:
615
615
  packages_to_relative()
616
616
  prover_resource_file_to_relative()
617
617
  verify_to_relative()
618
+
619
+ def get_map_attribute_value(context: CertoraContext, path: Path, attr_name: str) -> Optional[Union[str, bool]]:
620
+
621
+ value = getattr(context, attr_name, None)
622
+ if value:
623
+ return value
624
+
625
+ map_value = getattr(context, f"{attr_name}_map", None)
626
+ if not map_value:
627
+ return None # No map value defined
628
+ for key, entry_value in map_value.items():
629
+ # Split key to handle contract:field syntax
630
+ key_parts = key.split(':')
631
+ pattern = key_parts[0]
632
+
633
+ if Path(pattern).suffix == "": # This is a contract pattern
634
+ # Find contracts that match the pattern
635
+ for contract_name, contract_file_path in context.contract_to_file.items():
636
+ if fnmatch.fnmatch(contract_name, pattern):
637
+ # Check if this contract's file matches our target path
638
+ if Path(contract_file_path) == path:
639
+ return entry_value
640
+ else: # This is a file pattern
641
+ # Match the file pattern against the path
642
+ if glob.globmatch(str(path), pattern, flags=glob.GLOBSTAR):
643
+ return entry_value
644
+ return None # No match
@@ -156,7 +156,9 @@ class CommonAttributes(AttrUtil.Attributes):
156
156
  'action': AttrUtil.NotAllowed
157
157
  },
158
158
  affects_build_cache_key=False,
159
- disables_build_cache=False
159
+ disables_build_cache=False,
160
+ # Avoiding presentation of this attribute in Config Tab
161
+ config_data=None
160
162
  )
161
163
 
162
164
  RUN_SOURCE = AttrUtil.AttributeDefinition(
@@ -340,7 +342,7 @@ class EvmAttributes(AttrUtil.Attributes):
340
342
  default_desc="do not set via_ir during compilation unless solc_via_ir is set",
341
343
  argparse_args={
342
344
  'action': AttrUtil.UniqueStore,
343
- 'type': lambda value: Vf.parse_dict('solc_via_ir_map', value, bool)
345
+ 'type': lambda value: Vf.parse_ordered_dict('solc_via_ir_map', value, bool)
344
346
  },
345
347
  affects_build_cache_key=True,
346
348
  disables_build_cache=False,
@@ -382,7 +384,7 @@ class EvmAttributes(AttrUtil.Attributes):
382
384
  default_desc="Uses the same Solidity EVM version for all contracts",
383
385
  argparse_args={
384
386
  'action': AttrUtil.UniqueStore,
385
- 'type': lambda value: Vf.parse_dict('solc_evm_version_map', value)
387
+ 'type': lambda value: Vf.parse_ordered_dict('solc_evm_version_map', value)
386
388
  },
387
389
  affects_build_cache_key=True,
388
390
  disables_build_cache=False,
@@ -405,7 +407,7 @@ class EvmAttributes(AttrUtil.Attributes):
405
407
  default_desc="Uses the same Solidity compiler version for all contracts",
406
408
  argparse_args={
407
409
  'action': AttrUtil.UniqueStore,
408
- 'type': lambda value: Vf.parse_dict('solc_map', value)
410
+ 'type': lambda value: Vf.parse_ordered_dict('solc_map', value)
409
411
  },
410
412
  affects_build_cache_key=True,
411
413
  disables_build_cache=False,
@@ -428,7 +430,7 @@ class EvmAttributes(AttrUtil.Attributes):
428
430
  default_desc="Uses the same compiler version for all contracts",
429
431
  argparse_args={
430
432
  'action': AttrUtil.UniqueStore,
431
- 'type': lambda value: Vf.parse_dict('compiler_map', value)
433
+ 'type': lambda value: Vf.parse_ordered_dict('compiler_map', value)
432
434
  },
433
435
  affects_build_cache_key=True,
434
436
  disables_build_cache=False,
@@ -481,7 +483,7 @@ class EvmAttributes(AttrUtil.Attributes):
481
483
  default_desc="Compiles all contracts with the same optimization settings",
482
484
  argparse_args={
483
485
  'action': AttrUtil.UniqueStore,
484
- 'type': lambda value: Vf.parse_dict('solc_optimize_map', value)
486
+ 'type': lambda value: Vf.parse_ordered_dict('solc_optimize_map', value)
485
487
  },
486
488
  affects_build_cache_key=True,
487
489
  disables_build_cache=False,
@@ -582,6 +584,16 @@ class EvmAttributes(AttrUtil.Attributes):
582
584
  affects_build_cache_key=True,
583
585
  disables_build_cache=True
584
586
  )
587
+
588
+ YUL_OPTIMIZER_STEPS = AttrUtil.AttributeDefinition(
589
+ # overrides the hardcoded yul optimizer steps, set in certoraBuild.py
590
+ argparse_args={
591
+ 'action': AttrUtil.UniqueStore
592
+ },
593
+ affects_build_cache_key=True,
594
+ disables_build_cache=False
595
+ )
596
+
585
597
  CACHE = AttrUtil.AttributeDefinition(
586
598
  argparse_args={
587
599
  'action': AttrUtil.UniqueStore
@@ -740,8 +752,7 @@ class EvmAttributes(AttrUtil.Attributes):
740
752
  'action': AttrUtil.UniqueStore
741
753
  },
742
754
  affects_build_cache_key=False,
743
- disables_build_cache=False,
744
- config_data=None
755
+ disables_build_cache=False
745
756
  )
746
757
 
747
758
  BUILD_CACHE = AttrUtil.AttributeDefinition(
@@ -1719,7 +1730,7 @@ class RangerAttributes(EvmProverAttributes):
1719
1730
  @classmethod
1720
1731
  def ranger_unsupported_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
1721
1732
  return [cls.PROJECT_SANITY, cls.RULE_SANITY, cls.COVERAGE_INFO, cls.FOUNDRY, cls.INDEPENDENT_SATISFY,
1722
- cls.MULTI_ASSERT_CHECK, cls.MULTI_EXAMPLE]
1733
+ cls.MULTI_ASSERT_CHECK, cls.MULTI_EXAMPLE, cls.VYPER]
1723
1734
 
1724
1735
  @classmethod
1725
1736
  def ranger_true_by_default_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
@@ -21,7 +21,8 @@ import itertools
21
21
  import tempfile
22
22
  import fnmatch
23
23
  from pathlib import Path
24
- from typing import Dict, List, Tuple, Set, Any, Union, Optional
24
+ from wcmatch import glob
25
+ from typing import Dict, List, Tuple, Set, Any, Union, OrderedDict
25
26
 
26
27
  import CertoraProver.certoraContext as Ctx
27
28
  import CertoraProver.certoraContextAttributes as Attrs
@@ -31,6 +32,7 @@ from Shared import certoraUtils as Util
31
32
  from Shared import certoraAttrUtil as AttrUtil
32
33
  from CertoraProver.certoraProjectScanner import scan_project
33
34
 
35
+
34
36
  scripts_dir_path = Path(__file__).parent.resolve() # containing directory
35
37
  sys.path.insert(0, str(scripts_dir_path))
36
38
 
@@ -70,10 +72,10 @@ class CertoraContextValidator:
70
72
 
71
73
  else:
72
74
  if self.context.range:
73
- # self.context.range = None
75
+ self.context.range = None
74
76
  validation_logger.info("the 'range' attribute is ignored when not running from the Ranger App")
75
77
  if self.context.ranger_failure_limit:
76
- # self.context.ranger_failure_limit = None
78
+ self.context.ranger_failure_limit = None
77
79
  validation_logger.info("the 'ranger_failure_limit' is ignored when not running from the Ranger App")
78
80
 
79
81
  def validate(self) -> None:
@@ -375,19 +377,15 @@ def convert_to_compiler_map(context: CertoraContext) -> None:
375
377
  if context.solc_map:
376
378
  context.compiler_map = context.solc_map
377
379
  context.solc_map = None
378
- if context.solc:
379
- context.compiler_map = {'*.sol': f'{context.solc}'}
380
- if context.vyper:
381
- context.compiler_map = {'*.vy': f'{context.vyper}'}
380
+
382
381
 
383
382
  def check_vyper_flag(context: CertoraContext) -> None:
384
383
  if context.vyper:
385
- non_vy_paths = [path for path in context.files if not path.endswith(".vy")]
386
- if non_vy_paths:
387
- raise Util.CertoraUserInputError(f"vyper attribute can only be set for Vyper files: {non_vy_paths}")
384
+ vy_paths = [path for path in context.files if path.endswith(".vy")]
385
+ if not vy_paths:
386
+ validation_logger.warning("vyper attribute was set but no Vyper files were set")
388
387
  if context.solc:
389
388
  raise Util.CertoraUserInputError("cannot set both vyper attribute and solc attribute")
390
- context.solc = context.vyper
391
389
 
392
390
  def check_contract_name_arg_inputs(context: CertoraContext) -> None:
393
391
  """
@@ -670,37 +668,20 @@ def check_mode_of_operation(context: CertoraContext) -> None:
670
668
  special_file_type]) and not context.build_only:
671
669
  raise Util.CertoraUserInputError("You must use 'verify' when running the Certora Prover")
672
670
 
671
+ def find_matching_contracts(context: CertoraContext, pattern: str) -> List[str]:
672
+ result = []
673
+ for contract in context.contract_to_file:
674
+ if fnmatch.fnmatch(contract, pattern):
675
+ result.append(context.contract_to_file[contract])
676
+ return result
673
677
 
674
- def _normalize_maps(context: CertoraContext, map_attr_name: str, map_attr: Dict) -> Dict[str, str]:
675
- """
676
-
677
- :param context:
678
- :param map_attr_name: name of the attribute e.g. solc_optimize_map
679
- :param map_attr: the value of the map attribute, a dictionary mapping contract/file to a value
680
- :return:
681
-
682
- all solc_XXX_map attributes are used to set attributes for the Solidity compiler. The value is based on the
683
- Solidity file to be compiled, therefore it translates all keys to a relative path to a file
684
- """
685
-
686
- def find_matching_files(context: CertoraContext, pattern: str) -> List[str]:
687
- file_part = pattern.split(':')[0]
688
- if Path(file_part).suffix == "": # no suffix means the key is a contract
689
- matching_contracts = fnmatch.filter(context.contracts, pattern) # find matching contracts
690
- return [context.contract_to_file[contract] for contract in matching_contracts]
691
- else:
692
- return [file_part]
693
-
694
- new_map_attr: Dict[str, str] = {}
695
- for (pattern, value) in map_attr.copy().items():
696
- matching_files = find_matching_files(context, pattern)
697
- for file in matching_files:
698
- file = str(Path(file).resolve(strict=False).relative_to(Path.cwd()))
699
- attr_value = new_map_attr.get(file)
700
- if attr_value is None: # key in file paths but no mapping yet
701
- new_map_attr[file] = value
702
- return new_map_attr
678
+ def find_matching_files(context: CertoraContext, pattern: str) -> List[str]:
679
+ result = []
703
680
 
681
+ for path in context.file_paths:
682
+ if glob.globmatch(path, pattern, flags=glob.GLOBSTAR):
683
+ result.append(path)
684
+ return result
704
685
 
705
686
  def check_map_attributes(context: CertoraContext) -> None:
706
687
 
@@ -718,27 +699,24 @@ def check_map_attributes(context: CertoraContext) -> None:
718
699
  # we also check the map value was not set to False explicitly in the conf file
719
700
  if base_attr and map_attr and not (base_attr is False and context.conf_options.get(base_attr) is not None):
720
701
  raise Util.CertoraUserInputError(f"You cannot use both '{attr_prefix}' and '{map_attr_name}' arguments")
721
- if not isinstance(map_attr, dict):
722
- raise RuntimeError(f"map_attr is not dictionary, got {map_attr}")
723
- map_attr = _normalize_maps(context, map_attr_name, map_attr)
724
- setattr(context, f"{map_attr_name}", map_attr)
725
-
726
- sources_mappings: Dict[str, Optional[str]] = {file_path: None for file_path in context.file_paths} # initially mapping files to None
727
- for file in sources_mappings.keys():
728
- match: Optional[str] = None
729
- for (pattern, value) in map_attr.items():
730
- if fnmatch.fnmatch(file, pattern):
731
- match = pattern
732
- break
733
- if not match:
734
- raise Util.CertoraUserInputError(f"No matching for {file} in {map_attr_name}. Pattens: {map_attr}")
735
- elif not sources_mappings.get(file): # key in file paths but no mapping yet
736
- sources_mappings[file] = match
737
-
738
- # Now we check if all sources were mapped
739
- paths_not_set = [path for path, value in sources_mappings.items() if value is None]
740
- if paths_not_set:
741
- raise Util.CertoraUserInputError(f"{' '.join(paths_not_set)} was not set in {map_attr_name}")
702
+ if not isinstance(map_attr, OrderedDict):
703
+ raise RuntimeError(f"`map_attr` is not an ordered dictionary, got {map_attr}")
704
+
705
+ # will check that all the contract files are matched
706
+ file_list: Dict[str, bool] = {path: False for path in context.file_paths}
707
+
708
+ for key, value in map_attr.items():
709
+ pattern = key.split(':')[0] # ignore the contract part
710
+ if Path(pattern).suffix == "":
711
+ for path in find_matching_contracts(context, pattern):
712
+ file_list[path] = True
713
+ else:
714
+ for path in find_matching_files(context, pattern):
715
+ file_list[path] = True
716
+
717
+ none_keys = [k for k, v in file_list.items() if v is False]
718
+ if none_keys:
719
+ raise Util.CertoraUserInputError(f"The following files are not matched in {map_attr_name}: {none_keys}")
742
720
 
743
721
 
744
722
  def check_parametric_contracts(context: CertoraContext) -> None:
@@ -60,7 +60,7 @@ def add_solana_files_to_context(context: CertoraContext, json_obj: dict) -> None
60
60
  def run_rust_build(context: CertoraContext, build_cmd: List[str]) -> None:
61
61
 
62
62
  try:
63
- build_script_logger.info(f"Building by calling {build_cmd}")
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
66
  # Check if the script executed successfully
@@ -90,11 +90,12 @@ def run_rust_build(context: CertoraContext, build_cmd: List[str]) -> None:
90
90
 
91
91
  add_solana_files_to_context(context, json_obj)
92
92
 
93
- if context.test == str(Util.TestValue.AFTER_BUILD_RUST):
94
- raise Util.TestResultsReady(context)
95
93
  assert not context.files, f"run_rust_build: expecting files to be empty, got: {context.files}"
96
94
  context.files = [os.path.join(context.rust_project_directory, context.rust_executables)]
97
95
 
96
+ if context.test == str(Util.TestValue.AFTER_BUILD_RUST):
97
+ raise Util.TestResultsReady(context)
98
+
98
99
  except Util.TestResultsReady as e:
99
100
  raise e
100
101
  except FileNotFoundError as e:
@@ -3,7 +3,6 @@
3
3
  "msg": "Equivalence Check",
4
4
  "optimistic_loop": true,
5
5
  "loop_iter": "4",
6
- "process": "emv",
7
6
  "rule_sanity": "basic",
8
7
  "verify": "",
9
8
  "msg": ""
@@ -4,6 +4,5 @@
4
4
  "msg": "Equivalence Check",
5
5
  "optimistic_loop": true,
6
6
  "loop_iter": "4",
7
- "process": "emv",
8
7
  "verify": ""
9
8
  }
@@ -1387,6 +1387,8 @@ class MutateApp:
1387
1387
  args = ["--compilation_steps_only"]
1388
1388
  if self.prover_version:
1389
1389
  args += ['--prover_version', self.prover_version]
1390
+ if self.server:
1391
+ args += ['--server', self.server]
1390
1392
  run_certora([str(self.conf)] + args)
1391
1393
  except CertoraFoundViolations: # violations should not stop execution
1392
1394
  pass
@@ -1898,7 +1900,7 @@ class MutateApp:
1898
1900
  common_flags.extend(['--optimize'])
1899
1901
 
1900
1902
  if hasattr(self.prover_context, MConstants.SOLC_ALLOW_PATH):
1901
- common_flags.extend([f'--allow-paths, {self.prover_context.solc_allow_path}'])
1903
+ common_flags.extend(['--allow-paths', '/'])
1902
1904
 
1903
1905
  if hasattr(self.prover_context, MConstants.SOLC_EVM_VERSION):
1904
1906
  common_flags.extend(['--evm-version', self.prover_context.solc_evm_version])
@@ -14,7 +14,6 @@
14
14
  # along with this program. If not, see <https://www.gnu.org/licenses/>.
15
15
 
16
16
  import csv
17
- import fnmatch
18
17
  import json
19
18
  import os
20
19
  import subprocess
@@ -97,6 +96,7 @@ EMV_JAR = Path("emv.jar")
97
96
  CERTORA_SOURCES = Path(".certora_sources")
98
97
  SOLANA_INLINING = "solana_inlining"
99
98
  SOLANA_SUMMARIES = "solana_summaries"
99
+ CARGO_TOML_FILE = "cargo.toml"
100
100
 
101
101
  ALPHA_PACKAGE_NAME = 'certora-cli-alpha'
102
102
  ALPHA_PACKAGE_MASTER_NAME = ALPHA_PACKAGE_NAME + '-master'
@@ -1171,26 +1171,9 @@ class Singleton(type):
1171
1171
  cls.__instancesinstances[cls] = super(Singleton, cls).__call__(*args, **kwargs)
1172
1172
  return cls.__instancesinstances[cls]
1173
1173
 
1174
-
1175
1174
  class AbstractAndSingleton(Singleton, ABCMeta):
1176
1175
  pass
1177
1176
 
1178
-
1179
- def match_path_to_mapping_key(path: Path, m: Dict[str, str]) -> Optional[str]:
1180
- """
1181
- Matches the path to the best match in the dictionary's keys.
1182
- For example, given an absolute path `/Users/JohnDoe/Path/ToSolc/a.sol`, if the map contains
1183
- `b/a.sol` and `ToSolc/a.sol`, it will match on `ToSolc/a.sol`.
1184
- @param path: the path to match against
1185
- @param m: the map whose keys we're searching
1186
- @return: the value from the map that best matches the path, None if not found.
1187
- """
1188
- for k, v in m.items():
1189
- if fnmatch.fnmatch(str(path), k):
1190
- return v
1191
- return None
1192
-
1193
-
1194
1177
  def find_in(dir_path: Path, file_to_find: Path) -> Optional[Path]:
1195
1178
  """
1196
1179
  Given a directory dir_path and a file we wish to find within that directory,
@@ -1262,7 +1245,7 @@ class TestValue(NoValEnum):
1262
1245
  determines the chekpoint where the execution will halt. The exception TestResultsReady will be thrown. The value
1263
1246
  will also determine what object will be attached to the exception for inspection by the caller
1264
1247
  """
1265
- LOCAL_JAR = auto()
1248
+ BEFORE_LOCAL_PROVER_CALL = auto()
1266
1249
  CHECK_ARGS = auto()
1267
1250
  AFTER_BUILD = auto()
1268
1251
  CHECK_SOLC_OPTIONS = auto()
@@ -1452,3 +1435,22 @@ def eq_by(f: Callable[[T, T], bool], a: Sequence[T], b: Sequence[T]) -> bool:
1452
1435
  check if Sequences a and b are equal according to function f.
1453
1436
  """
1454
1437
  return len(a) == len(b) and all(map(f, a, b))
1438
+
1439
+ def find_nearest_cargo_toml() -> Optional[Path]:
1440
+ current = Path.cwd()
1441
+ for parent in [current] + list(current.parents):
1442
+ candidate = parent / CARGO_TOML_FILE
1443
+ if candidate.is_file():
1444
+ return candidate
1445
+ return None
1446
+
1447
+ def file_in_source_tree(file_path: Path) -> bool:
1448
+ # if the file is under .certora_source, return True
1449
+ file_path = Path(file_path).absolute()
1450
+ parent_dir = get_certora_sources_dir().absolute()
1451
+
1452
+ try:
1453
+ file_path.relative_to(parent_dir)
1454
+ return True
1455
+ except ValueError:
1456
+ return False
@@ -18,6 +18,8 @@ import sys
18
18
  import argparse
19
19
  import json
20
20
  import logging
21
+ from collections import OrderedDict
22
+
21
23
  import json5
22
24
  import re
23
25
  import urllib3.util
@@ -684,7 +686,7 @@ def validate_solc_via_ir_map(args: Dict[str, bool]) -> None:
684
686
  if first:
685
687
  validation_logger.warning("all via_ir values are set to True '--solc_via_ir' can be used instead")
686
688
  else:
687
- validation_logger.warning("all via_ir values are set to False, this flag/attribute can be omitted")
689
+ validation_logger.warning("all via_ir values are set to False, this flag/attribute can be omitted")
688
690
 
689
691
  def validate_solc_evm_version_map(args: Dict[str, str]) -> None:
690
692
  if not isinstance(args, dict):
@@ -938,7 +940,7 @@ def validate_on_off(value: str) -> str:
938
940
  return __validate_enum_value(value, OnOffValue)
939
941
 
940
942
 
941
- def parse_dict(conf_key: str, input_string: str, value_type: Type = str) -> Dict[str, Union[str, bool]]:
943
+ def parse_ordered_dict(conf_key: str, input_string: str, value_type: Type = str) -> OrderedDict[str, Union[str, bool]]:
942
944
  """
943
945
  convert CLI flag value string of the form <key>=<value>,<key>=<value>,.. to a Dict.
944
946
  Keys with different values raise an exception
@@ -971,7 +973,7 @@ def parse_dict(conf_key: str, input_string: str, value_type: Type = str) -> Dict
971
973
  raise argparse.ArgumentTypeError(f"{conf_key} argument {input_string} is of wrong format. Must be of format:"
972
974
  f"<key>=<value>[,..]")
973
975
 
974
- return_dict = {} # type: Dict[str, Union[str, bool]]
976
+ return_dict = OrderedDict() # type: OrderedDict[str, Union[str, bool]]
975
977
 
976
978
  for match in input_string.split(','):
977
979
  key, value = match.split('=')
@@ -176,6 +176,8 @@ def run_local(context: CertoraContext, timings: Dict, additional_commands: Optio
176
176
  cmd.extend(additional_commands)
177
177
 
178
178
  print(f'Verifier run command:\n {" ".join(cmd)}')
179
+ if context.test == str(Util.TestValue.BEFORE_LOCAL_PROVER_CALL):
180
+ raise Util.TestResultsReady(' '.join(cmd))
179
181
  rc = Util.run_jar_cmd(
180
182
  cmd,
181
183
  override_exit_code=compare_with_expected_file,
certora_cli/certoraRun.py CHANGED
@@ -99,6 +99,8 @@ def run_certora(args: List[str], attrs_class: Optional[Type[AttrUtil.Attributes]
99
99
  print(f"Verifier run command:\n {check_cmd_string}", flush=True)
100
100
 
101
101
  compare_with_tool_output = False
102
+ if context.test == str(Util.TestValue.BEFORE_LOCAL_PROVER_CALL):
103
+ raise Util.TestResultsReady(' '.join(check_cmd))
102
104
  run_result = Util.run_jar_cmd(check_cmd, compare_with_tool_output, logger_topic="verification",
103
105
  print_output=True)
104
106
  # For solana and wasm, we don't check types so build time is zero.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-beta-mirror
3
- Version: 7.30.0
3
+ Version: 7.31.0
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-beta-mirror
6
6
  Author: Certora
@@ -25,6 +25,7 @@ Requires-Dist: tqdm
25
25
  Requires-Dist: StrEnum
26
26
  Requires-Dist: universalmutator
27
27
  Requires-Dist: jinja2
28
+ Requires-Dist: wcmatch
28
29
  Dynamic: author
29
30
  Dynamic: author-email
30
31
  Dynamic: classifier
@@ -37,4 +38,4 @@ Dynamic: requires-dist
37
38
  Dynamic: requires-python
38
39
  Dynamic: summary
39
40
 
40
- Commit adec240. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
41
+ Commit 89159ec. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -4,30 +4,30 @@ certora_cli/certoraEVMProver.py,sha256=gLxqPXG9jKlCdLdgfo0aNjvp09vbHGSs8wghY6RH0
4
4
  certora_cli/certoraEqCheck.py,sha256=qfZq7bpU1kbAIezC66W61VfKNZz7Uywg2Ygup62qYeo,1069
5
5
  certora_cli/certoraMutate.py,sha256=XhFHyNVP_sk-3XkY6AAV5fVliEFAVRq-JeDGsqE5IQQ,3333
6
6
  certora_cli/certoraRanger.py,sha256=cwejxWTNlHsbwtu6Lew0SNsynSeq_ZKJu1Cr9uu0DhE,1314
7
- certora_cli/certoraRun.py,sha256=IIPykXqarflxubpd7zJomoBMcCcj7-uLXIPiv7nrL_k,8675
7
+ certora_cli/certoraRun.py,sha256=mTBAi-SVCApy8BvfvKAL8Z4PdGcaBV3G5vNXPrFdgTI,8817
8
8
  certora_cli/certoraSolanaProver.py,sha256=7hu-YJJNA_P5eAJq_jYh6IGjiUf0PegGUBRCJ5AhE7s,3274
9
9
  certora_cli/certoraSorobanProver.py,sha256=qE6b_vicC8KgOvUz7UTOaDuXT3UW0MMhq3keQgUVvzs,2865
10
10
  certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
11
11
  certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
12
- certora_cli/CertoraProver/certoraBuild.py,sha256=WMaRg4VNdH_1k-GTfv-0USfIkQ7Gtdg3Y23bZHQVLVQ,212071
13
- certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=dzXC8A-V9gr1GGsPYglQLlFLoR2Tk4dTJuMHaxXBfgw,13257
12
+ certora_cli/CertoraProver/certoraBuild.py,sha256=eAAaRcyF16XNjr9Es54cQPutErqjW6j8VUefrGAxumc,212517
13
+ certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=I60x0ykMFPzciD193cPXihsHh0fdV--UOmNKbIZW6Rc,13238
14
14
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=8tPny9-pasC7CCRKQclaVQ3qcEDNa6EdOUu1ZWh0MZY,14704
15
- certora_cli/CertoraProver/certoraBuildRust.py,sha256=l81mZHGOhfSL8jme6I_O_aAiu3wxdHAg-jPEFQvFFdg,5936
16
- certora_cli/CertoraProver/certoraCloudIO.py,sha256=oYhNAcyhQa97_5OrpFsewcD6sksoKD8aJz_Iw1-ihg8,53980
17
- certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=waMo5_nzirDaK7aoPCfoS7jOqqi_6huRc-_jTrDcZO8,14252
15
+ certora_cli/CertoraProver/certoraBuildRust.py,sha256=ofKvmtqzUGTrgVm5crcybV7gbElbjiUc6Z4FphPEjz0,6016
16
+ certora_cli/CertoraProver/certoraCloudIO.py,sha256=w3mqA5ANgIX6dsb6Nxg4jl9zBRdAX5kw9xLeYmA-iHc,53062
17
+ certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=6aHEGrhT_Y9aYfM5n_Mk--awgcQfdtc-chBPRl7FU4E,14095
18
18
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=n67E7hjVdPlBXMh1FMzcWSgu3v5SfFM_HOO2JpbCeY0,11787
19
19
  certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
20
- certora_cli/CertoraProver/certoraConfigIO.py,sha256=H3ebbIBO8xXTf8ArBPnZV1TmDBExQVDF2zc9Yu1v0Xo,7493
21
- certora_cli/CertoraProver/certoraContext.py,sha256=0AihMYuUAGHWjbiSOMiDM6FVW5OyvEAxE51GPnMxSKg,25821
22
- certora_cli/CertoraProver/certoraContextAttributes.py,sha256=IhzGm46ToCIps-Eg04V90G4OUDcTm0dQqmtWr3rn-N4,69055
20
+ certora_cli/CertoraProver/certoraConfigIO.py,sha256=uq-uNnjVBzg9Kh41fDqn-lnwSJXe4k2_iy5GTnQIDa8,7560
21
+ certora_cli/CertoraProver/certoraContext.py,sha256=HyYQlzIEk3gzzEH2ilTC_Qxw1zXvsKU3IJuCLiV2Sro,26916
22
+ certora_cli/CertoraProver/certoraContextAttributes.py,sha256=d8ywqZrWfhzwS8w3VSduwIqwgSASML7k_guXzsoxIdU,69463
23
23
  certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
24
- certora_cli/CertoraProver/certoraContextValidator.py,sha256=iSB2byuHmi1G4xG-ViVvBrZv7e1mdxPmlWdV3AaN_l4,46492
24
+ certora_cli/CertoraProver/certoraContextValidator.py,sha256=SgdtQJFimBi51c9SUnpgEYow9FBEYU_7LUdZhISBxpo,45064
25
25
  certora_cli/CertoraProver/certoraContractFuncs.py,sha256=ipSwge5QQzp8qhUavY44bZ-eCR6szK_HWwSIWqQyuR0,6921
26
26
  certora_cli/CertoraProver/certoraExtensionInfo.py,sha256=YlShzdoqJQgXXj3r0TJ3fir1KntIR99Rk8JN5qii2lk,2026
27
27
  certora_cli/CertoraProver/certoraJobList.py,sha256=FBIYgJ60I0Ok7vchfTbcuJJbiXgnfAhrONoVeZoHti4,11464
28
28
  certora_cli/CertoraProver/certoraMiniSpecParser.py,sha256=NjjMwf5Rav3YWpoOJh4PZ-QOS8exC2cg4yIBSbZA6l0,9660
29
29
  certora_cli/CertoraProver/certoraNodeFilters.py,sha256=5Uk2mixZKeis_JVd3HkLgoEVklkAYBXAZiNHRlXOIfY,2830
30
- certora_cli/CertoraProver/certoraParseBuildScript.py,sha256=V_2lqlDnwdkXJzpdvXiMuOyupdrDTZnOyHKshm-_3rQ,4850
30
+ certora_cli/CertoraProver/certoraParseBuildScript.py,sha256=l7KQA1poEjmbmuYbMskz0jOQg6cW0lM3vk5ruAGPjPI,4863
31
31
  certora_cli/CertoraProver/certoraProjectScanner.py,sha256=jT7FeWzcy8o83LrZRwsg_L4x6im6Fm_0LZFKVbKr3Jk,6862
32
32
  certora_cli/CertoraProver/certoraSourceFinders.py,sha256=qwJtwrQq3NUNYmdmn1UmANN4lmJFIUh4M-St2x1FJ2Y,19038
33
33
  certora_cli/CertoraProver/certoraType.py,sha256=wD-Sr3xk_dJGtbvw33oIGu_lf15NCZuKWjUb4HlVcUM,29318
@@ -36,22 +36,22 @@ certora_cli/CertoraProver/erc7201.py,sha256=BME5kBZsDx6lgqLn7EE91I1cEOZtsnZ8BlRV
36
36
  certora_cli/CertoraProver/splitRules.py,sha256=HfSqsKeeLZDeOnv8TGgpPDHoaXgdVc0HOrLcGk-cU1Q,7681
37
37
  certora_cli/CertoraProver/storageExtension.py,sha256=BZC9HJygeLxqS5TmhNxbIrVNfH3kLEPjN1VjsWQi8s8,15922
38
38
  certora_cli/CertoraProver/Compiler/CompilerCollector.py,sha256=cr-PIl7LY9VfNs4s4H3-EnSnomPiCgXudfwP9-KenMk,6740
39
- certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py,sha256=L-LAH0UU7gB7wYvCcXrwdtLGpBI8MX3rPts0ufQ-X9s,8157
39
+ certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py,sha256=TOpHMSYGhfSmVQwJYZMVOI_Ws03k6cTffzaQUmhnNUo,8761
40
40
  certora_cli/CertoraProver/Compiler/CompilerCollectorSol.py,sha256=7nAY2FLMUlGJn4f_YoZMqpa3rf7THqhJVjLwTaChcBc,5027
41
41
  certora_cli/CertoraProver/Compiler/CompilerCollectorSolBased.py,sha256=UasYWyu8Of6R84vXsqRNGpscYcFQghmSIY_dyaAWDYA,1350
42
42
  certora_cli/CertoraProver/Compiler/CompilerCollectorVy.py,sha256=e95xOHK5Bz8BbzjbCVLCrGSutVs8ejqOImh5wH9o3Jk,69918
43
43
  certora_cli/CertoraProver/Compiler/CompilerCollectorYul.py,sha256=El4WYJZVp3DpXQMZ53yVDPKOWPda5oLs3yD1qhb7dAE,5177
44
44
  certora_cli/CertoraProver/Compiler/__init__.py,sha256=tEFAmNyx9WL0kzpp_-4s7b6pLvxHmBWz6pQAq0yeROM,789
45
- certora_cli/EquivalenceCheck/Eq_default.conf,sha256=p9b8_cPnU41dVBrd8ry16H4x75TNp16HdJdmQeMuVxw,186
45
+ certora_cli/EquivalenceCheck/Eq_default.conf,sha256=J-tMFzIuQa1NcklOh-wv2bpnikfAxFogpRFOl3qoSwM,164
46
46
  certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec,sha256=HC3Zhpp9ePV10ClZE09Ah7h84O-BTNIUH6w0aA-qIOQ,2286
47
47
  certora_cli/EquivalenceCheck/Eq_mc_template.spec,sha256=pbRhwqw0a_KHQ6W3biJeGS9otNJCnw7gPo1Fb6ROwik,2633
48
- certora_cli/EquivalenceCheck/Eq_sanity.conf,sha256=j1Rm9dXNiQT4ULc3jmn4OxhsG1UgiTyoGsnrIHMQDBk,183
48
+ certora_cli/EquivalenceCheck/Eq_sanity.conf,sha256=BuBI5YNg25b--iQxpNxBzb4v-q-HByObCx7R5Uy1jRw,161
49
49
  certora_cli/EquivalenceCheck/Eq_template.spec,sha256=YGaG5KxSOhelDiBd1oxDnVC8VhPl6coaxHiY4lXVf6o,823
50
50
  certora_cli/EquivalenceCheck/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  certora_cli/EquivalenceCheck/equivCheck.py,sha256=D3TA1DRppaXpEcVW_smqMQzeUle0jPu0wIXXEd5un0U,20620
52
52
  certora_cli/EquivalenceCheck/sanity.spec,sha256=tWmE9z2Sq3_SWaqKDRQaNajRrw94maUrirvoUmX89LE,103
53
53
  certora_cli/Mutate/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
54
- certora_cli/Mutate/mutateApp.py,sha256=bLBZeaVdK3kQ8u96wMoxNJhSKiQhRAlcv775QVKGMwU,87844
54
+ certora_cli/Mutate/mutateApp.py,sha256=vLLTokkVs-dSyOPSymMZRGj_MmVxwdogTJgS_8LqPXI,87887
55
55
  certora_cli/Mutate/mutateAttributes.py,sha256=brsoisPowxpxQxN_-y0NDvsv8feoHONhtlOayXaLDdk,10092
56
56
  certora_cli/Mutate/mutateConstants.py,sha256=LRrz3wMM8WpPYSshkc-PLYqT0nexcWQeBNsehip-LOE,3945
57
57
  certora_cli/Mutate/mutateUtil.py,sha256=B7MCIFtZBetjR4MMxU6F5ikYsaot1wTG7XYMjgVXl4k,2287
@@ -60,16 +60,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
60
60
  certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
61
61
  certora_cli/Shared/certoraAttrUtil.py,sha256=ZsoS6xbSZnAjEoPEcfiJi6CvHU-1ySBKubvVKh78ohs,8373
62
62
  certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
63
- certora_cli/Shared/certoraUtils.py,sha256=fWb0-zZMCT_lRvhaPhf8GeXUySW6I0enChv1aOYhoOY,55185
64
- certora_cli/Shared/certoraValidateFuncs.py,sha256=WG4UiyES8u49o3XmuRIvNf79rcpWFuCKtV__QUptOEQ,41852
65
- certora_cli/Shared/proverCommon.py,sha256=-Lw6_zEIlPA7i_n6xOUsmJeUKjqYWAnGW9GKWBB_GC0,11171
63
+ certora_cli/Shared/certoraUtils.py,sha256=5uxgeGyfq8jw4w9l7fxiyMsgw74GpEtS8Wy8u5MNBHs,55178
64
+ certora_cli/Shared/certoraValidateFuncs.py,sha256=Fn6GN_LEwlMjBdTiVO6WzCg8P5F6DhwkvP9Xl-XiQ6o,41921
65
+ certora_cli/Shared/proverCommon.py,sha256=PqkjycZ3TdZr0RNWoPuA_VZ5b7EAAsu9ewymNH6kIm4,11291
66
66
  certora_cli/Shared/rustProverCommon.py,sha256=NIZ5ECbhuiMegyRAl07CV3r68MFG2tBNKgUAQoV4uLI,2049
67
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=lM5cIB3mHhyoz0qppqjKzc0yK64Ff8o94ullruu2POM,146
68
- certora_jars/Typechecker.jar,sha256=VWcMMxSoxREOiKm-x5719hlCGIDfq4as_XhfgeVOLDQ,17137909
67
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=YT2XfCbYZ3cwuV-9FyvRVu5GrruMtCHqT0n1kvOSlGY,145
68
+ certora_jars/Typechecker.jar,sha256=NmnUZaxhNvRthGr1tEh9FVlT0wEO8A-jj9J22gOtngY,17143207
69
69
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- certora_cli_beta_mirror-7.30.0.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
71
- certora_cli_beta_mirror-7.30.0.dist-info/METADATA,sha256=ComSNgUDL-0XSXaWXa6IYip99Ryt05AwDlek5AHgFbo,1231
72
- certora_cli_beta_mirror-7.30.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
73
- certora_cli_beta_mirror-7.30.0.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
74
- certora_cli_beta_mirror-7.30.0.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
75
- certora_cli_beta_mirror-7.30.0.dist-info/RECORD,,
70
+ certora_cli_beta_mirror-7.31.0.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
71
+ certora_cli_beta_mirror-7.31.0.dist-info/METADATA,sha256=OGfFfEjLrMpnJSD69pQjP_yH9-2Jfvh1GviqnGpZTN0,1254
72
+ certora_cli_beta_mirror-7.31.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
73
+ certora_cli_beta_mirror-7.31.0.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
74
+ certora_cli_beta_mirror-7.31.0.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
75
+ certora_cli_beta_mirror-7.31.0.dist-info/RECORD,,
@@ -1 +1 @@
1
- {"name": "certora-cli-beta-mirror", "tag": "7.30.0", "branch": "", "commit": "adec240", "timestamp": "20250527.16.14.821753", "version": "7.30.0"}
1
+ {"name": "certora-cli-beta-mirror", "tag": "7.31.0", "branch": "", "commit": "89159ec", "timestamp": "20250624.9.18.557504", "version": "7.31.0"}
Binary file