certora-cli-beta-mirror 8.2.1__py3-none-macosx_10_9_universal2.whl → 8.2.2__py3-none-macosx_10_9_universal2.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.
@@ -203,11 +203,18 @@ class PresetImmutableReference(ImmutableReference):
203
203
  # this function is Solidity specific.
204
204
  # todo: create certoraBuildUtilsSol.py file, where such solidity specific functions will be.
205
205
  def generate_finder_body(f: Func, internal_id: int, sym: int, compiler_collector: CompilerCollectorSol,
206
- compressed: bool = False) -> Optional[Tuple[List[int], str]]:
206
+ compressed: bool = False,
207
+ should_generate_inlining: bool = True) -> Optional[Tuple[List[int], str]]:
207
208
  if compressed:
208
209
  return generate_compressed_finder(
209
210
  f, internal_id, sym, compiler_collector
210
211
  )
212
+ elif not should_generate_inlining:
213
+ # We should not generate inlining as reported in CERT-9399, only when compressed=False.
214
+ # used_symbols is being generated the exact same way as in generate_full_finder
215
+ used_symbols = [i for i in range(len(f.fullArgs))]
216
+ return used_symbols, ''
217
+
211
218
  else:
212
219
  return generate_full_finder(
213
220
  f, internal_id, sym, compiler_collector
@@ -403,8 +410,9 @@ def get_modifier_param_type_name(ind: int, def_node: Dict[str, Any], f: Func) ->
403
410
 
404
411
  def generate_modifier_finder(f: Func, internal_id: int, sym: int,
405
412
  compiler_collector: CompilerCollectorSol, def_node: Dict[str, Any],
406
- compress: bool) -> Optional[Tuple[str, str]]:
407
- compressed = generate_finder_body(f, internal_id, sym, compiler_collector, compressed=compress)
413
+ compress: bool, should_generate_inlining: bool) -> Optional[Tuple[str, str]]:
414
+ compressed = generate_finder_body(f, internal_id, sym, compiler_collector, compressed=compress,
415
+ should_generate_inlining=should_generate_inlining)
408
416
  if compressed is None:
409
417
  return None
410
418
  modifier_name = f"logInternal{internal_id}"
@@ -427,9 +435,10 @@ def generate_modifier_finder(f: Func, internal_id: int, sym: int,
427
435
  return f'{modifier_name}({",".join(arg_strings)})', modifier_body
428
436
 
429
437
 
430
- def generate_inline_finder(f: Func, internal_id: int, sym: int,
431
- compiler_collector: CompilerCollectorSol, should_compress: bool) -> Optional[str]:
432
- finder = generate_finder_body(f, internal_id, sym, compiler_collector, compressed=should_compress)
438
+ def generate_inline_finder(f: Func, internal_id: int, sym: int, compiler_collector: CompilerCollectorSol,
439
+ should_compress: bool, should_generate_inlining: bool) -> Optional[str]:
440
+ finder = generate_finder_body(f, internal_id, sym, compiler_collector, compressed=should_compress,
441
+ should_generate_inlining=should_generate_inlining)
433
442
  if finder is None:
434
443
  return None
435
444
  return finder[1]
@@ -2448,6 +2457,19 @@ class CertoraBuildGenerator:
2448
2457
  # (deprecate this option later)
2449
2458
  should_compress = self.context.function_finder_mode == Vf.FunctionFinderMode.DEFAULT.name
2450
2459
 
2460
+ if self.context.solc_optimize and self.get_solc_via_ir_value(Path(contract_file)) and \
2461
+ any(param_name == "" for param_name in f.paramNames):
2462
+ # As reported in CERT-9399, we should not generate function finder for this edge case
2463
+
2464
+ instrumentation_logger.warning(f"Failed to generate auto finder for {f.name} @ {f.where()}.")
2465
+ instrumentation_logger.warning(
2466
+ "Cannot apply summaries for internal functions with unnamed argument when compiling "
2467
+ "using solc_optimize and solc_via_ir"
2468
+ )
2469
+ should_generate_inlining = False
2470
+ else:
2471
+ should_generate_inlining = True
2472
+
2451
2473
  if len(mods) > 0:
2452
2474
  # we need to add the instrumentation in a modifer because solidity modifiers will (potentially)
2453
2475
  # appear before any instrumentation we add to the literal source body, which will tank the detection
@@ -2459,8 +2481,10 @@ class CertoraBuildGenerator:
2459
2481
  # where in the source such modifiers will go. In order to insert a modifier, we have to have at
2460
2482
  # least one modifier already present, and then insert before the first modifier's location in the
2461
2483
  # source code
2462
- mod_inst = generate_modifier_finder(f, internal_id, function_symbol, sdc.compiler_collector,
2463
- def_node, compress=should_compress)
2484
+ mod_inst = generate_modifier_finder(
2485
+ f, internal_id, function_symbol, sdc.compiler_collector, def_node,
2486
+ compress=should_compress, should_generate_inlining=should_generate_inlining
2487
+ )
2464
2488
  if mod_inst is None:
2465
2489
  instrumentation_logger.debug(f"Modifier generation for {f.name} @ {f.where()} failed")
2466
2490
  return None
@@ -2494,8 +2518,8 @@ class CertoraBuildGenerator:
2494
2518
  per_file_inst[first_mod_offset] = Instrumentation(expected=bytes(modifier_name[0:1], "utf-8"),
2495
2519
  to_ins=modifier_invocation, mut=InsertBefore())
2496
2520
  else:
2497
- finder_res = generate_inline_finder(f, internal_id, function_symbol,
2498
- sdc.compiler_collector, should_compress)
2521
+ finder_res = generate_inline_finder(f, internal_id, function_symbol, sdc.compiler_collector,
2522
+ should_compress, should_generate_inlining)
2499
2523
  if finder_res is None:
2500
2524
  instrumentation_logger.debug(f"Generating auto finder for {f.name} @ {f.where()}"
2501
2525
  f" failed, giving up generation")
@@ -2676,7 +2700,7 @@ class CertoraBuildGenerator:
2676
2700
  Ctx.run_local_spec_check(False, context, ["-listCalls", tmp_file.name], print_errors=False)
2677
2701
  spec_calls = tmp_file.read().split("\n")
2678
2702
  except Exception as e:
2679
- instrumentation_logger.warning(f"Failed to get calls from spec\n{e}")
2703
+ instrumentation_logger.debug(f"Failed to get calls from spec\n{e}")
2680
2704
 
2681
2705
  self.context.remappings = []
2682
2706
  for i, build_arg_contract_file in enumerate(sorted(self.input_config.sorted_files)):
@@ -3938,7 +3962,7 @@ def build_from_cache_or_scratch(context: CertoraContext,
3938
3962
  if output:
3939
3963
  internal_calls = output.split("\n")
3940
3964
  except Exception as e:
3941
- instrumentation_logger.warning(f"Failed to get calls from spec\n{e}")
3965
+ instrumentation_logger.debug(f"Failed to get calls from spec\n{e}")
3942
3966
 
3943
3967
  if internal_calls:
3944
3968
  build_logger.info("Found new internal calls in the spec file, need to recompile anyway")
@@ -3989,9 +4013,6 @@ def build(context: CertoraContext, ignore_spec_syntax_check: bool = False) -> No
3989
4013
  if Cv.mode_has_spec_file(context) and not context.build_only and not ignore_spec_syntax_check:
3990
4014
  if Ctx.should_run_local_speck_check(context):
3991
4015
  Ctx.run_local_spec_check(False, context)
3992
- else:
3993
- build_logger.warning(
3994
- "Local checks of CVL specification files disabled. It is recommended to enable the checks.")
3995
4016
 
3996
4017
  should_save_cache, cached_files = build_from_cache_or_scratch(context,
3997
4018
  certora_build_generator,
@@ -523,7 +523,15 @@ def __rename_key(context: CertoraContext, old_key: str, new_key: str) -> None:
523
523
 
524
524
 
525
525
  def should_run_local_speck_check(context: CertoraContext) -> bool:
526
- return not (context.disable_local_typechecking or Util.is_ci_or_git_action())
526
+ output = context.compilation_steps_only or not (context.disable_local_typechecking or Util.is_ci_or_git_action())
527
+ if not output:
528
+ if context.disable_local_typechecking:
529
+ context_logger.warning(
530
+ "Local checks of CVL specification files disabled. It is recommended to enable the checks."
531
+ )
532
+ else:
533
+ context_logger.info("Local checks of CVL specification files skipped in CI and will run remotely.")
534
+ return output
527
535
 
528
536
 
529
537
  def run_typechecker(typechecker_name: str, with_typechecking: bool, args: List[str], print_errors: bool) -> None:
@@ -550,18 +558,13 @@ def run_typechecker(typechecker_name: str, with_typechecking: bool, args: List[s
550
558
  context_logger.debug(f"typechecking cmd: {' '.join(cmd_str_list)}")
551
559
 
552
560
  exit_code = Util.run_jar_cmd(cmd_str_list, False,
553
- custom_error_message="Failed to run Certora Prover locally. Please check the errors "
554
- "below for problems in the specifications (.spec files) or the "
555
- "prover_args defined in the .conf file.",
561
+ custom_error_message="Failed to run Certora Prover typechecker locally.\n"
562
+ "Please check the errors below for problems in the specifications"
563
+ " (.spec files) or the prover_args defined in the .conf file.",
556
564
  logger_topic="type_check",
557
565
  print_err=print_errors)
558
566
  if exit_code != 0:
559
- raise Util.CertoraUserInputError(
560
- "CVL syntax or type check failed.\n Please fix the issue. "
561
- "Using --disable_local_typechecking to skip this check is strongly discouraged, "
562
- "as simple syntax errors will only be detected during the cloud run."
563
- "with --disable_local_typechecking is not recommended is not recommended as "
564
- "simple syntax failures will be visible only on the cloud run.")
567
+ raise Util.CertoraUserInputError("CVL syntax or type check failed, please fix the issue.")
565
568
 
566
569
 
567
570
  def run_local_spec_check(with_typechecking: bool, context: CertoraContext, extra_args: List[str] = list(), print_errors: bool = True) -> None:
certora_cli/certoraRun.py CHANGED
@@ -132,10 +132,6 @@ def run_certora(args: List[str], app: Type[App.CertoraApp] = App.EvmApp,
132
132
  Ctx.run_local_spec_check(True, context)
133
133
  typechecking_end = time.perf_counter()
134
134
  timings['typecheckingTime'] = round(typechecking_end - typechecking_start, 4)
135
- else:
136
- run_logger.warning(
137
- "Local checks of CVL specification files disabled. It is recommended to enable "
138
- "the checks.")
139
135
 
140
136
  # Remove debug logger and run remote verification
141
137
  logging_manager.remove_debug_logger()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-beta-mirror
3
- Version: 8.2.1
3
+ Version: 8.2.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
@@ -39,4 +39,4 @@ Dynamic: requires-dist
39
39
  Dynamic: requires-python
40
40
  Dynamic: summary
41
41
 
42
- Commit a27f12a. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
42
+ Commit 04cd39e. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -7,13 +7,13 @@ certora_cli/certoraEVMProver.py,sha256=AH8ZeWXAs7wK6nNKFANCt6seLf9EaaFXtfpjc3xdI
7
7
  certora_cli/certoraEqCheck.py,sha256=qfZq7bpU1kbAIezC66W61VfKNZz7Uywg2Ygup62qYeo,1069
8
8
  certora_cli/certoraMutate.py,sha256=XhFHyNVP_sk-3XkY6AAV5fVliEFAVRq-JeDGsqE5IQQ,3333
9
9
  certora_cli/certoraRanger.py,sha256=thJ4EKo-MFHklCk-7zJADZ-9SO6eCg1AFv88-QssLj0,1289
10
- certora_cli/certoraRun.py,sha256=11tc3-l_G8cidFNSQfzCmuPbqfF-n_UEIZC4yASLz8g,6561
10
+ certora_cli/certoraRun.py,sha256=3v3o_nMfdVHT-MSqTW0EYqyu2IjKsZvMcXwmfkOQaU8,6371
11
11
  certora_cli/certoraSolanaProver.py,sha256=1R1YnGHCofb05GqFgpxRh3ZmHkmwMm1hPM7rfeiEu7o,3250
12
12
  certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfamOjisk,2840
13
13
  certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
14
14
  certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
15
15
  certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
16
- certora_cli/CertoraProver/certoraBuild.py,sha256=CEavCUO0mBZ74dxR23RRInyDskHAddoX8Ox8-gaqnJk,222188
16
+ certora_cli/CertoraProver/certoraBuild.py,sha256=Yn-J7QKxQvtp1uvs03mOfj2w7N_9XixnDmCgoxM-dWM,223495
17
17
  certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=YnZmBZ_gCIbLwExgK5oxFlVDQGe4_YuGIpDLMy589E0,13318
18
18
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
19
19
  certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
@@ -23,7 +23,7 @@ certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-
23
23
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZtV_b8QI1Egi6cbB5-uuh5beYN0,12630
24
24
  certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
25
25
  certora_cli/CertoraProver/certoraConfigIO.py,sha256=J12jAZ8aKdOQhnMtGUtWmvibjzm_2qlvH6YwI8I4LAc,7483
26
- certora_cli/CertoraProver/certoraContext.py,sha256=l6aXnfe-fdaDacIVFlhwGqfWb5dne69AnqBrck7-3bw,28758
26
+ certora_cli/CertoraProver/certoraContext.py,sha256=OVNACUNj9fGb9He8sGdod2waC0eWE8ZgXNPWjRC1lFg,28817
27
27
  certora_cli/CertoraProver/certoraContextAttributes.py,sha256=O7beTjvk0uBTFyxUaSgdV9Tcg33--G4XA6nnIdX00GU,66778
28
28
  certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
29
29
  certora_cli/CertoraProver/certoraContextValidator.py,sha256=clXwmYHIBUmOJ8ADRUmu9U6_pNe_tXRNawvUPBLlYVY,46490
@@ -68,13 +68,13 @@ certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HC
68
68
  certora_cli/Shared/certoraUtils.py,sha256=buUE95PnbpDEbYEZss_jcP7pWCRJhXnfV-eOA6-zvYM,58407
69
69
  certora_cli/Shared/certoraValidateFuncs.py,sha256=BPLuVsS3yAcYIuCvkXtDuFQKf2qaT74TIddB0lM84yM,42508
70
70
  certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
71
- certora_jars/ASTExtraction.jar,sha256=tRIhYz0x7agtytWLH0ta8zZMR6maGEzM13fOMrRBMMw,17614868
72
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=RHCGld9OX7ZGd559dhshflPnahIJShAHjF8GAaAzl1I,143
73
- certora_jars/Typechecker.jar,sha256=u4KLY6doS3MNtQSPhF6BGgim7RViZ5jfXjSBMC7XVAs,17577025
71
+ certora_jars/ASTExtraction.jar,sha256=HAx5yR4VWRf89cTNLqbTvhWBasvlJ6-QVq8oOmsJTcE,17621131
72
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=ojcDYBFNRvg4kTdYiKJ3aIrL4qP6pe_5B65U207pd-M,144
73
+ certora_jars/Typechecker.jar,sha256=vt_FUhZTnO5aRHXmi46jh0Cb6XUJIEUIMlqoY7Kdgvo,17583288
74
74
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
- certora_cli_beta_mirror-8.2.1.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
76
- certora_cli_beta_mirror-8.2.1.dist-info/METADATA,sha256=sqpw-Q34_jE5LItMjWt-BRiLsYxn7-eKSj9Wgv_2lBs,1286
77
- certora_cli_beta_mirror-8.2.1.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
78
- certora_cli_beta_mirror-8.2.1.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
79
- certora_cli_beta_mirror-8.2.1.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
80
- certora_cli_beta_mirror-8.2.1.dist-info/RECORD,,
75
+ certora_cli_beta_mirror-8.2.2.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
76
+ certora_cli_beta_mirror-8.2.2.dist-info/METADATA,sha256=KGPhyStTLcrr-_ku2jSW-NkytzN8ymPm4UwMH-0zv5c,1286
77
+ certora_cli_beta_mirror-8.2.2.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
78
+ certora_cli_beta_mirror-8.2.2.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
79
+ certora_cli_beta_mirror-8.2.2.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
80
+ certora_cli_beta_mirror-8.2.2.dist-info/RECORD,,
Binary file
@@ -1 +1 @@
1
- {"name": "certora-cli-beta-mirror", "tag": "8.2.1", "branch": "", "commit": "a27f12a", "timestamp": "20250828.9.26.267405", "version": "8.2.1"}
1
+ {"name": "certora-cli-beta-mirror", "tag": "8.2.2", "branch": "", "commit": "04cd39e", "timestamp": "20250904.12.49.982490", "version": "8.2.2"}
Binary file