certora-cli-alpha-master 20250109.12.56.561847__tar.gz → 20250109.15.35.401095__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. {certora_cli_alpha_master-20250109.12.56.561847/certora_cli_alpha_master.egg-info → certora_cli_alpha_master-20250109.15.35.401095}/PKG-INFO +2 -2
  2. certora_cli_alpha_master-20250109.15.35.401095/README.md +1 -0
  3. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraBuild.py +0 -134
  4. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraContextAttributes.py +14 -1
  5. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/certoraValidateFuncs.py +37 -0
  6. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095/certora_cli_alpha_master.egg-info}/PKG-INFO +2 -2
  7. certora_cli_alpha_master-20250109.15.35.401095/certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -0
  8. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_jars/Typechecker.jar +0 -0
  9. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/setup.py +2 -2
  10. certora_cli_alpha_master-20250109.12.56.561847/README.md +0 -1
  11. certora_cli_alpha_master-20250109.12.56.561847/certora_jars/CERTORA-CLI-VERSION-METADATA.json +0 -1
  12. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/LICENSE +0 -0
  13. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/MANIFEST.in +0 -0
  14. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_bins/__init__.py +0 -0
  15. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollector.py +0 -0
  16. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollectorFactory.py +0 -0
  17. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollectorSol.py +0 -0
  18. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollectorSolBased.py +0 -0
  19. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollectorVy.py +0 -0
  20. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/CompilerCollectorYul.py +0 -0
  21. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/Compiler/__init__.py +0 -0
  22. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/__init__.py +0 -0
  23. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraBuildCacheManager.py +0 -0
  24. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraBuildDataClasses.py +0 -0
  25. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraBuildRust.py +0 -0
  26. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraCloudIO.py +0 -0
  27. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraCollectRunMetadata.py +0 -0
  28. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraCompilerParameters.py +0 -0
  29. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraConfigIO.py +0 -0
  30. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraContext.py +0 -0
  31. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraContextClass.py +0 -0
  32. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraContextValidator.py +0 -0
  33. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraContractFuncs.py +0 -0
  34. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraExtensionInfo.py +0 -0
  35. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraJobList.py +0 -0
  36. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraMiniSpecParser.py +0 -0
  37. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraNodeFilters.py +0 -0
  38. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraParseBuildScript.py +0 -0
  39. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraSourceFinders.py +0 -0
  40. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraType.py +0 -0
  41. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EVMVerifier/certoraVerifyGenerator.py +0 -0
  42. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/Eq_default.conf +0 -0
  43. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/Eq_mc_no_out_template.spec +0 -0
  44. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/Eq_mc_template.spec +0 -0
  45. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -0
  46. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/Eq_template.spec +0 -0
  47. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/__init__.py +0 -0
  48. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/equivCheck.py +0 -0
  49. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/EquivalenceCheck/sanity.spec +0 -0
  50. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/__init__.py +0 -0
  51. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/mutateApp.py +0 -0
  52. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/mutateAttributes.py +0 -0
  53. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/mutateConstants.py +0 -0
  54. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/mutateUtil.py +0 -0
  55. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Mutate/mutateValidate.py +0 -0
  56. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/ExpectedComparator.py +0 -0
  57. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/__init__.py +0 -0
  58. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/certoraAttrUtil.py +0 -0
  59. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/certoraLogging.py +0 -0
  60. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/Shared/certoraUtils.py +0 -0
  61. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/__init__.py +0 -0
  62. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraEVMProver.py +0 -0
  63. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraEqCheck.py +0 -0
  64. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraMutate.py +0 -0
  65. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraRun.py +0 -0
  66. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraSolanaProver.py +0 -0
  67. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/certoraSorobanProver.py +0 -0
  68. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli/rustMutator.py +0 -0
  69. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli_alpha_master.egg-info/SOURCES.txt +0 -0
  70. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli_alpha_master.egg-info/dependency_links.txt +0 -0
  71. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli_alpha_master.egg-info/entry_points.txt +0 -0
  72. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli_alpha_master.egg-info/requires.txt +0 -0
  73. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_cli_alpha_master.egg-info/top_level.txt +0 -0
  74. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/certora_jars/__init__.py +0 -0
  75. {certora_cli_alpha_master-20250109.12.56.561847 → certora_cli_alpha_master-20250109.15.35.401095}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: certora-cli-alpha-master
3
- Version: 20250109.12.56.561847
3
+ Version: 20250109.15.35.401095
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-alpha-master
6
6
  Author: Certora
@@ -24,4 +24,4 @@ Requires-Dist: tomli
24
24
  Requires-Dist: universalmutator
25
25
  Requires-Dist: jinja2
26
26
 
27
- Commit a913487. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
27
+ Commit 7ab7df2. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -0,0 +1 @@
1
+ Commit 7ab7df2. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -2458,112 +2458,6 @@ class CertoraBuildGenerator:
2458
2458
  # some referenced function calls could be builtins like require, whose declarations we do not see
2459
2459
  return [node[self.CERTORA_CONTRACT_NAME()] for node in referenced_nodes if self.CERTORA_CONTRACT_NAME() in node]
2460
2460
 
2461
- @staticmethod
2462
- def __find_closest_methods(method_name: str, methods: List[Func]) -> List[str]:
2463
- """
2464
- Gets a name of a method and a list of existing methods. Returns a list of closest matching method signatures.
2465
- The match is performed on the name only, ignoring the parameters in the function.
2466
- :param method_name: Name of a method
2467
- :param methods: A list of possible methods.
2468
- :return: An list of best suggested method signatures as replacement. Ordered by descending relevance.
2469
- """
2470
- # Step 1: find the closest method names
2471
- all_method_names = [method.name for method in methods]
2472
- all_method_names = list(set(all_method_names)) # remove duplicate names
2473
- possible_method_names = Util.get_closest_strings(method_name, all_method_names)
2474
-
2475
- # Step 2: fetch the parameters of the closest matching method names
2476
- possible_methods = list()
2477
- for name in possible_method_names:
2478
- for method in methods:
2479
- if method.name == name:
2480
- possible_methods.append(method.signature())
2481
- return possible_methods
2482
-
2483
- @staticmethod
2484
- def __suggest_methods(wrong_sig: str, suggested_replacements: List[str]) -> None:
2485
- """
2486
- Raises an error suggesting replacement methods for an erroneous signature.
2487
- :param wrong_sig: A method signature as inserted by the user. Had no exact matches in the code.
2488
- :param suggested_replacements: A list of suggested method signatures, ordered by descending relevance
2489
- :raises: AttributeError always
2490
- """
2491
- if len(suggested_replacements) == 0:
2492
- raise Util.CertoraUserInputError(f"Method {wrong_sig} was not found.")
2493
-
2494
- if len(suggested_replacements) == 1:
2495
- options_str = suggested_replacements[0]
2496
- elif len(suggested_replacements) == 2:
2497
- options_str = " or ".join(suggested_replacements)
2498
- elif len(suggested_replacements) > 2:
2499
- # Code below adds or after the last comma if there are multiple options
2500
- options_str = ", ".join(suggested_replacements)
2501
- last_commas_location_regex = r"(?<=,)(?=[^,]*$)"
2502
- options_str = re.sub(last_commas_location_regex, r" or", options_str)
2503
-
2504
- raise Util.CertoraUserInputError(f"Method {wrong_sig} was not found. Maybe you meant {options_str}?")
2505
-
2506
- def __verify_method(self, method_input: str, sdc_pre_finder: SDC) -> None:
2507
- input_method_name = method_input.split('(')[0]
2508
- input_method_sig = method_input.replace(' ', '')
2509
-
2510
- """
2511
- A list of suggested methods, in case the user inserted a wrong method signature. Only public/external methods
2512
- are suggested to the user. The suggestions are ordered by closest match - index zero is the best match, and
2513
- descending.
2514
- """
2515
- possible_methods = list()
2516
-
2517
- # Step #1 - check if an exact match exists. If not, check if only the parameters were wrong in the signature
2518
-
2519
- contract_names = [contract.name for contract in sdc_pre_finder.contracts]
2520
- public_method_sets = [contract.methods for contract in sdc_pre_finder.contracts]
2521
- public_methods = Util.flatten_set_list(public_method_sets)
2522
-
2523
- for method in public_methods:
2524
- if method.name == input_method_name: # Correct name, now we check parameter types
2525
- if method.signature() == input_method_sig: # An exact match was found
2526
- return
2527
-
2528
- # A method with the same name but different parameters exists
2529
- possible_methods.append(method.signature())
2530
-
2531
- for contract_name in contract_names:
2532
- contract_method_name = method.name_for_contract(contract_name)
2533
- if contract_method_name == input_method_name:
2534
- if method.signature_for_contract(contract_name) == input_method_sig:
2535
- return
2536
-
2537
- possible_methods.append(contract_method_name)
2538
-
2539
- # Now we check if the method exists, but is private or external
2540
- private_method_sets = [contract.internal_funcs for contract in sdc_pre_finder.contracts]
2541
- private_methods = Util.flatten_set_list(private_method_sets)
2542
-
2543
- for method in private_methods:
2544
- if method.name == input_method_name: # Correct name, now we check parameter types
2545
- if method.signature() == input_method_sig: # An exact match was found
2546
- raise Util.CertoraUserInputError(
2547
- f"Method {input_method_sig} is {method.visibility}. Please change it to external or public")
2548
-
2549
- for contract_name in contract_names:
2550
- contract_method_name = method.name_for_contract(contract_name)
2551
- if contract_method_name == input_method_name:
2552
- if method.signature_for_contract(contract_name) == input_method_sig:
2553
- raise Util.CertoraUserInputError(
2554
- f"Method {contract_method_name} is {method.visibility}. "
2555
- "Please change it to external or public")
2556
-
2557
- # We suggest a different method name, if we have a good enough suggestion
2558
- # A method with correct name but wrong argument types takes precedence over a method with a different name
2559
- if len(possible_methods) == 0:
2560
- possible_methods = self.__find_closest_methods(input_method_name, public_methods)
2561
-
2562
- if len(possible_methods) > 0: # We have suggestions
2563
- self.__suggest_methods(method_input, possible_methods)
2564
-
2565
- raise Util.CertoraUserInputError(f"Method {method_input} was not found")
2566
-
2567
2461
  @staticmethod
2568
2462
  def get_fresh_backupdir(backupdir: Path) -> Path:
2569
2463
  """
@@ -2595,34 +2489,6 @@ class CertoraBuildGenerator:
2595
2489
  sdc_pre_finders = self.collect_for_file(build_arg_contract_file, i, compiler_lang, Path(os.getcwd()),
2596
2490
  path_for_compiler_collector_file, original_sdc=None)
2597
2491
 
2598
- if context.method and (build_arg_contract_file in context.verified_contract_files):
2599
- # we check the --method flag's argument on compile time only for those modes
2600
- # notice: when the backend will support multiple contracts to be verified/asserted,
2601
- # we will have to be more careful here, since we assume there is only one contract
2602
- # which is verified/asserted. For now, only the CLI support such multiple contracts.
2603
- if context.verify:
2604
- verified_contract_name = context.verify.split(":")[0]
2605
- elif context.assert_contracts:
2606
- verified_contract_name = context.assert_contracts[0]
2607
- else:
2608
- verified_contract_name = None
2609
-
2610
- if verified_contract_name:
2611
- sdc_with_verified_contract_name = next(
2612
- curr_sdc for index, curr_sdc in enumerate(sdc_pre_finders) if
2613
- curr_sdc.primary_contract == verified_contract_name)
2614
- errs = []
2615
- for method in context.method:
2616
- try:
2617
- self.__verify_method(method, sdc_with_verified_contract_name)
2618
- except Util.CertoraUserInputError as e:
2619
- errs.append(e)
2620
- if len(errs) > 0:
2621
- raise Util.CertoraUserInputError(
2622
- "Some methods as specified via the `method` flag could not be found!"
2623
- f"{Util.NEW_LINE}{Util.NEW_LINE.join(str(e) for e in errs)}"
2624
- )
2625
-
2626
2492
  # Build sources tree
2627
2493
  build_logger.debug("Building source tree")
2628
2494
  sources_from_pre_finder_SDCs = set()
@@ -742,10 +742,22 @@ class EvmAttributes(AttrUtil.Attributes):
742
742
  argparse_args={
743
743
  'action': AttrUtil.STORE_TRUE
744
744
  },
745
- affects_build_cache_key=False,
745
+ affects_build_cache_key=True,
746
746
  disables_build_cache=False
747
747
  )
748
748
 
749
+ AUTO_DISPATCHER = AttrUtil.AttributeDefinition(
750
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
751
+ jar_flag='-autoDispatcher',
752
+ argparse_args={
753
+ 'action': AttrUtil.STORE_TRUE
754
+ },
755
+ affects_build_cache_key=True,
756
+ disables_build_cache=False,
757
+ help_msg="automatically add `DISPATCHER(true)` summaries for all calls with unresolved callees",
758
+ default_desc=""
759
+ )
760
+
749
761
  MAX_GRAPH_DEPTH = AttrUtil.AttributeDefinition(
750
762
  attr_validation_func=Vf.validate_non_negative_integer,
751
763
  jar_flag='-graphDrawLimit',
@@ -964,6 +976,7 @@ class BackendAttributes(AttrUtil.Attributes):
964
976
  )
965
977
 
966
978
  METHOD = AttrUtil.AttributeDefinition(
979
+ attr_validation_func=Vf.validate_method_flag,
967
980
  jar_flag='-method',
968
981
  arg_type=AttrUtil.AttrArgType.LIST,
969
982
  help_msg="Filter methods to be verified by their signature",
@@ -707,6 +707,43 @@ def validate_git_hash(git_hash: str) -> str:
707
707
  return git_hash
708
708
 
709
709
 
710
+ def validate_method_flag(method: str) -> str:
711
+ contract_and_method = method.split('.')
712
+ if len(contract_and_method) > 2:
713
+ raise Util.CertoraUserInputError(f"Malformed method '{method}' in `--method` list: a method should be of the form `[ContractName.]functionABISignature(...)`")
714
+ elif (len(contract_and_method) == 2):
715
+ contract = contract_and_method[0]
716
+ validate_contract_name(contract)
717
+ m = contract_and_method[1]
718
+ else:
719
+ m = contract_and_method[0]
720
+
721
+ if ' ' in method:
722
+ raise Util.CertoraUserInputError(f"Malformed method '{method}' in `--method` list: remove all whitespace")
723
+
724
+ if not __validate_matching_parens(m):
725
+ raise Util.CertoraUserInputError(f"Malformed method '{method}' in `--method` list: unmatched parenthesis")
726
+
727
+ return method
728
+
729
+
730
+ def __validate_matching_parens(s: str) -> bool:
731
+ stack = []
732
+ matching_pairs = {")": "(", "]": "["}
733
+
734
+ for char in s:
735
+ if char in "([": # Opening parenthesis
736
+ stack.append(char)
737
+ elif char in ")]": # Closing parenthesis
738
+ if not stack: # Nothing to match with
739
+ return False
740
+ top = stack.pop()
741
+ if matching_pairs[char] != top:
742
+ return False
743
+
744
+ return not stack # Stack should be empty if all matched
745
+
746
+
710
747
  def __validate_solidity_id(string: str, object: str) -> str:
711
748
  """
712
749
  validates that string is a valid Solidity ID i.e. starts with aletter, a dollar sign or an underscore followed by
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: certora-cli-alpha-master
3
- Version: 20250109.12.56.561847
3
+ Version: 20250109.15.35.401095
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-alpha-master
6
6
  Author: Certora
@@ -24,4 +24,4 @@ Requires-Dist: tomli
24
24
  Requires-Dist: universalmutator
25
25
  Requires-Dist: jinja2
26
26
 
27
- Commit a913487. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
27
+ Commit 7ab7df2. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -0,0 +1 @@
1
+ {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "7ab7df2", "timestamp": "20250109.15.35.401095", "version": "20250109.15.35.401095+7ab7df2"}
@@ -3,11 +3,11 @@ import setuptools
3
3
 
4
4
  setuptools.setup(
5
5
  name="certora-cli-alpha-master",
6
- version="20250109.12.56.561847",
6
+ version="20250109.15.35.401095",
7
7
  author="Certora",
8
8
  author_email="support@certora.com",
9
9
  description="Runner for the Certora Prover",
10
- long_description="Commit a913487. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.",
10
+ long_description="Commit 7ab7df2. 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-alpha-master",
13
13
  packages=setuptools.find_packages(),
@@ -1 +0,0 @@
1
- Commit a913487. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -1 +0,0 @@
1
- {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "a913487", "timestamp": "20250109.12.56.561847", "version": "20250109.12.56.561847+a913487"}