certora-cli-beta-mirror 7.28.0__py3-none-any.whl → 8.5.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 (54) hide show
  1. certora_cli/CertoraProver/Compiler/CompilerCollectorFactory.py +10 -3
  2. certora_cli/CertoraProver/Compiler/CompilerCollectorVy.py +51 -16
  3. certora_cli/CertoraProver/Compiler/CompilerCollectorYul.py +3 -0
  4. certora_cli/CertoraProver/castingInstrumenter.py +192 -0
  5. certora_cli/CertoraProver/certoraApp.py +52 -0
  6. certora_cli/CertoraProver/certoraBuild.py +694 -207
  7. certora_cli/CertoraProver/certoraBuildCacheManager.py +21 -17
  8. certora_cli/CertoraProver/certoraBuildDataClasses.py +8 -2
  9. certora_cli/CertoraProver/certoraBuildRust.py +88 -54
  10. certora_cli/CertoraProver/certoraBuildSui.py +112 -0
  11. certora_cli/CertoraProver/certoraCloudIO.py +97 -96
  12. certora_cli/CertoraProver/certoraCollectConfigurationLayout.py +230 -84
  13. certora_cli/CertoraProver/certoraCollectRunMetadata.py +52 -6
  14. certora_cli/CertoraProver/certoraCompilerParameters.py +11 -0
  15. certora_cli/CertoraProver/certoraConfigIO.py +43 -35
  16. certora_cli/CertoraProver/certoraContext.py +128 -54
  17. certora_cli/CertoraProver/certoraContextAttributes.py +415 -234
  18. certora_cli/CertoraProver/certoraContextValidator.py +152 -105
  19. certora_cli/CertoraProver/certoraContractFuncs.py +34 -1
  20. certora_cli/CertoraProver/certoraParseBuildScript.py +8 -10
  21. certora_cli/CertoraProver/certoraType.py +10 -1
  22. certora_cli/CertoraProver/certoraVerifyGenerator.py +22 -4
  23. certora_cli/CertoraProver/erc7201.py +45 -0
  24. certora_cli/CertoraProver/splitRules.py +23 -18
  25. certora_cli/CertoraProver/storageExtension.py +351 -0
  26. certora_cli/EquivalenceCheck/Eq_default.conf +0 -1
  27. certora_cli/EquivalenceCheck/Eq_sanity.conf +0 -1
  28. certora_cli/EquivalenceCheck/equivCheck.py +2 -1
  29. certora_cli/Mutate/mutateApp.py +41 -22
  30. certora_cli/Mutate/mutateAttributes.py +11 -0
  31. certora_cli/Mutate/mutateValidate.py +42 -2
  32. certora_cli/Shared/certoraAttrUtil.py +21 -5
  33. certora_cli/Shared/certoraUtils.py +180 -60
  34. certora_cli/Shared/certoraValidateFuncs.py +68 -26
  35. certora_cli/Shared/proverCommon.py +308 -0
  36. certora_cli/certoraCVLFormatter.py +76 -0
  37. certora_cli/certoraConcord.py +39 -0
  38. certora_cli/certoraEVMProver.py +4 -3
  39. certora_cli/certoraRanger.py +39 -0
  40. certora_cli/certoraRun.py +83 -223
  41. certora_cli/certoraSolanaProver.py +40 -128
  42. certora_cli/certoraSorobanProver.py +59 -4
  43. certora_cli/certoraSuiProver.py +93 -0
  44. certora_cli_beta_mirror-8.5.0.dist-info/LICENSE +15 -0
  45. {certora_cli_beta_mirror-7.28.0.dist-info → certora_cli_beta_mirror-8.5.0.dist-info}/METADATA +21 -5
  46. certora_cli_beta_mirror-8.5.0.dist-info/RECORD +81 -0
  47. {certora_cli_beta_mirror-7.28.0.dist-info → certora_cli_beta_mirror-8.5.0.dist-info}/WHEEL +1 -1
  48. {certora_cli_beta_mirror-7.28.0.dist-info → certora_cli_beta_mirror-8.5.0.dist-info}/entry_points.txt +3 -0
  49. certora_jars/ASTExtraction.jar +0 -0
  50. certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
  51. certora_jars/Typechecker.jar +0 -0
  52. certora_cli_beta_mirror-7.28.0.dist-info/LICENSE +0 -22
  53. certora_cli_beta_mirror-7.28.0.dist-info/RECORD +0 -70
  54. {certora_cli_beta_mirror-7.28.0.dist-info → certora_cli_beta_mirror-8.5.0.dist-info}/top_level.txt +0 -0
@@ -15,7 +15,6 @@
15
15
 
16
16
  import logging
17
17
 
18
- import json5
19
18
  import sys
20
19
  from pathlib import Path
21
20
  from typing import Type, List, Optional
@@ -30,6 +29,8 @@ from CertoraProver.certoraCollectConfigurationLayout import AttributeJobConfigDa
30
29
 
31
30
  attributes_logger = logging.getLogger("attributes")
32
31
 
32
+ FORBIDDEN_PROVER_ARGS = ['-solanaInlining', '-solanaSummaries']
33
+
33
34
 
34
35
  def validate_prover_args(value: str) -> str:
35
36
 
@@ -50,6 +51,11 @@ def validate_prover_args(value: str) -> str:
50
51
  if not attr.temporary_jar_invocation_allowed:
51
52
  raise Util.CertoraUserInputError(
52
53
  f"Use CLI flag '{flag_name}' instead of 'prover_attrs' with {string} as value")
54
+
55
+ for string in strings:
56
+ if string in FORBIDDEN_PROVER_ARGS:
57
+ raise Util.CertoraUserInputError(
58
+ f"Use a Prover option instead of 'prover_attrs' with {string} as value")
53
59
  return value
54
60
 
55
61
 
@@ -156,7 +162,9 @@ class CommonAttributes(AttrUtil.Attributes):
156
162
  'action': AttrUtil.NotAllowed
157
163
  },
158
164
  affects_build_cache_key=False,
159
- disables_build_cache=False
165
+ disables_build_cache=False,
166
+ # Avoiding presentation of this attribute in Config Tab
167
+ config_data=None
160
168
  )
161
169
 
162
170
  RUN_SOURCE = AttrUtil.AttributeDefinition(
@@ -208,87 +216,58 @@ class CommonAttributes(AttrUtil.Attributes):
208
216
  disables_build_cache=False
209
217
  )
210
218
 
211
-
212
- class DeprecatedAttributes(AttrUtil.Attributes):
213
- AUTO_NONDET_DIFFICULT_INTERNAL_FUNCS = AttrUtil.AttributeDefinition(
214
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
215
- deprecation_msg="`auto_nondet_difficult_internal_funcs` is deprecated, use `nondet_difficult_funcs` instead",
219
+ URL_VISIBILITY = AttrUtil.AttributeDefinition(
220
+ attr_validation_func=Vf.validate_url_visibility,
221
+ help_msg="Sets the visibility of the generated report link",
222
+ default_desc="Generate a Private report link",
216
223
  argparse_args={
217
- 'action': AttrUtil.STORE_TRUE
218
- },
219
- affects_build_cache_key=False,
220
- disables_build_cache=False
221
- )
222
- AUTO_NONDET_MINIMAL_DIFFICULTY = AttrUtil.AttributeDefinition(
223
- attr_validation_func=Vf.validate_non_negative_integer,
224
- deprecation_msg="`auto_nondet_minimal_difficulty` is deprecated, use `nondet_minimal_difficulty` instead",
225
- argparse_args={
226
- 'action': AttrUtil.UniqueStore
224
+ 'nargs': AttrUtil.SINGLE_OR_NONE_OCCURRENCES,
225
+ 'action': AttrUtil.UniqueStore,
226
+ 'default': None, # 'default': when --url_visibility was not used
227
+ # when --url_visibility was used without an argument its probably because the link should be public
228
+ 'const': str(Vf.UrlVisibilityOptions.PUBLIC)
227
229
  },
228
230
  affects_build_cache_key=False,
229
- disables_build_cache=False
230
- )
231
- CONTRACT_COMPILER_SKIP_SEVERE_WARNING_AS_ERROR = AttrUtil.AttributeDefinition(
232
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
233
- deprecation_msg="`contract_compiler_skip_severe_warning_as_error` is deprecated. "
234
- "Use `ignore_solidity_warnings` instead",
235
- affects_build_cache_key=True,
236
231
  disables_build_cache=False,
237
- argparse_args={
238
- 'action': AttrUtil.STORE_TRUE
239
- }
240
- )
241
-
242
- SEND_ONLY = AttrUtil.AttributeDefinition(
243
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
244
- deprecation_msg="'send_only' is deprecated and is now the default. In CI, use 'wait_for_results none' instead",
245
- argparse_args={
246
- 'action': AttrUtil.STORE_TRUE
247
- },
248
- affects_build_cache_key=False,
249
- disables_build_cache=False
232
+ # Avoiding presentation of this attribute in Config Tab
233
+ config_data=None
250
234
  )
251
235
 
252
- USE_MEMORY_SAFE_AUTOFINDERS = AttrUtil.AttributeDefinition(
253
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
254
- deprecation_msg="`use_memory_safe_autofinders` is deprecated and is turned on by default. To disable it"
255
- " use `no_memory_safe_autofinders`",
256
- argparse_args={
257
- 'action': AttrUtil.STORE_TRUE
258
- },
259
- affects_build_cache_key=True,
260
- disables_build_cache=False
261
- )
262
236
 
263
- DISABLE_FINDER_FRIENDLY_OPTIMIZER = AttrUtil.AttributeDefinition(
264
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
265
- deprecation_msg="`disable_finder_friendly_optimizer` is deprecated, use `strict_solc_optimizer` instead",
266
- argparse_args={
267
- 'action': AttrUtil.STORE_TRUE
268
- },
269
- affects_build_cache_key=True,
270
- disables_build_cache=False
271
- )
237
+ class DeprecatedAttributes(AttrUtil.Attributes):
238
+ pass
272
239
 
273
- DO_NOT_USE_MEMORY_SAFE_AUTOFINDERS = AttrUtil.AttributeDefinition(
274
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
275
- deprecation_msg="`do_not_use_memory_safe_autofinders` is deprecated, use `no_memory_safe_autofinders` instead",
240
+ PROCESS = AttrUtil.AttributeDefinition(
276
241
  argparse_args={
277
- 'action': AttrUtil.STORE_TRUE
242
+ 'action': AttrUtil.UniqueStore,
278
243
  },
279
- affects_build_cache_key=True,
244
+ deprecation_msg="`process` is deprecated and will be removed in a future release.",
245
+ affects_build_cache_key=False,
280
246
  disables_build_cache=False
281
247
  )
282
248
 
283
- FINDER_FRIENDLY_OPTIMIZER = AttrUtil.AttributeDefinition(
284
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
285
- deprecation_msg="`finder_friendly_optimizer` is deprecated and is turned on by default. To disable it"
286
- " use `strict_solc_optimizer`",
249
+ SOLC_MAP = AttrUtil.AttributeDefinition(
250
+ attr_validation_func=Vf.validate_compiler_map,
251
+ arg_type=AttrUtil.AttrArgType.MAP,
252
+ deprecation_msg="`solc_map` is deprecated, use `compiler_map` instead",
253
+ help_msg='Map contracts to the appropriate Solidity compiler in case not all contract files are compiled '
254
+ 'with the same Solidity compiler version. \n\nCLI Example: '
255
+ '\n --solc_map A=solc8.11,B=solc8.9,C=solc7.5\n\nJSON Example: '
256
+ '\n "solc_map: {"'
257
+ '\n "A": "solc8.11",'
258
+ '\n "B": "solc8.9",'
259
+ '\n "C": "solc7.5"'
260
+ '\n }',
261
+ default_desc="Uses the same Solidity compiler version for all contracts",
287
262
  argparse_args={
288
- 'action': AttrUtil.STORE_TRUE
263
+ 'action': AttrUtil.UniqueStore,
264
+ 'type': lambda value: Vf.parse_ordered_dict('solc_map', value)
289
265
  },
290
266
  affects_build_cache_key=True,
291
- disables_build_cache=False
267
+ disables_build_cache=False,
268
+ config_data=AttributeJobConfigData(
269
+ main_section=MainSection.SOLIDITY_COMPILER
270
+ )
292
271
  )
293
272
 
294
273
 
@@ -319,6 +298,34 @@ class EvmAttributes(AttrUtil.Attributes):
319
298
  disables_build_cache=False
320
299
  )
321
300
 
301
+ VYPER_VENOM_MAP = AttrUtil.AttributeDefinition(
302
+ attr_validation_func=Vf.validate_vyper_venom_map,
303
+ arg_type=AttrUtil.AttrArgType.MAP,
304
+ help_msg="Map contracts to the appropriate experimental-codegen option (Vyper >= 4 only)",
305
+ default_desc="All contracts are compiled without experimental codegen",
306
+ argparse_args={
307
+ "action": AttrUtil.UniqueStore,
308
+ "type": lambda value: Vf.parse_ordered_dict("vyper_venom_map", value, bool)
309
+ },
310
+ affects_build_cache_key=True,
311
+ disables_build_cache=False,
312
+ config_data=AttributeJobConfigData(main_section=MainSection.SOLIDITY_COMPILER)
313
+ )
314
+
315
+ VYPER_VENOM = AttrUtil.AttributeDefinition(
316
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
317
+ help_msg="Whether to use experimental-codegen (Vyper >= 4 only)",
318
+ default_desc="All contracts are compiled without experimental codegen",
319
+ argparse_args={
320
+ "action": AttrUtil.STORE_TRUE
321
+ },
322
+ affects_build_cache_key=True,
323
+ disables_build_cache=False,
324
+ config_data=AttributeJobConfigData(
325
+ main_section=MainSection.SOLIDITY_COMPILER
326
+ )
327
+ )
328
+
322
329
  SOLC_VIA_IR = AttrUtil.AttributeDefinition(
323
330
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
324
331
  help_msg="Pass the `--via-ir` flag to the Solidity compiler",
@@ -340,7 +347,7 @@ class EvmAttributes(AttrUtil.Attributes):
340
347
  default_desc="do not set via_ir during compilation unless solc_via_ir is set",
341
348
  argparse_args={
342
349
  'action': AttrUtil.UniqueStore,
343
- 'type': lambda value: Vf.parse_dict('solc_via_ir_map', value, bool)
350
+ 'type': lambda value: Vf.parse_ordered_dict('solc_via_ir_map', value, bool)
344
351
  },
345
352
  affects_build_cache_key=True,
346
353
  disables_build_cache=False,
@@ -351,7 +358,6 @@ class EvmAttributes(AttrUtil.Attributes):
351
358
 
352
359
  SOLC_EXPERIMENTAL_VIA_IR = AttrUtil.AttributeDefinition(
353
360
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
354
- help_msg="Pass the `--experimental-via-ir` flag to the Solidity compiler",
355
361
  default_desc="",
356
362
  argparse_args={
357
363
  'action': AttrUtil.STORE_TRUE
@@ -383,30 +389,7 @@ class EvmAttributes(AttrUtil.Attributes):
383
389
  default_desc="Uses the same Solidity EVM version for all contracts",
384
390
  argparse_args={
385
391
  'action': AttrUtil.UniqueStore,
386
- 'type': lambda value: Vf.parse_dict('solc_evm_version_map', value)
387
- },
388
- affects_build_cache_key=True,
389
- disables_build_cache=False,
390
- config_data=AttributeJobConfigData(
391
- main_section=MainSection.SOLIDITY_COMPILER
392
- )
393
- )
394
-
395
- SOLC_MAP = AttrUtil.AttributeDefinition(
396
- attr_validation_func=Vf.validate_compiler_map,
397
- arg_type=AttrUtil.AttrArgType.MAP,
398
- help_msg='Map contracts to the appropriate Solidity compiler in case not all contract files are compiled '
399
- 'with the same Solidity compiler version. \n\nCLI Example: '
400
- '\n --solc_map A=solc8.11,B=solc8.9,C=solc7.5\n\nJSON Example: '
401
- '\n "solc_map: {"'
402
- '\n "A": "solc8.11",'
403
- '\n "B": "solc8.9",'
404
- '\n "C": "solc7.5"'
405
- '\n }',
406
- default_desc="Uses the same Solidity compiler version for all contracts",
407
- argparse_args={
408
- 'action': AttrUtil.UniqueStore,
409
- 'type': lambda value: Vf.parse_dict('solc_map', value)
392
+ 'type': lambda value: Vf.parse_ordered_dict('solc_evm_version_map', value)
410
393
  },
411
394
  affects_build_cache_key=True,
412
395
  disables_build_cache=False,
@@ -429,7 +412,7 @@ class EvmAttributes(AttrUtil.Attributes):
429
412
  default_desc="Uses the same compiler version for all contracts",
430
413
  argparse_args={
431
414
  'action': AttrUtil.UniqueStore,
432
- 'type': lambda value: Vf.parse_dict('compiler_map', value)
415
+ 'type': lambda value: Vf.parse_ordered_dict('compiler_map', value)
433
416
  },
434
417
  affects_build_cache_key=True,
435
418
  disables_build_cache=False,
@@ -482,7 +465,7 @@ class EvmAttributes(AttrUtil.Attributes):
482
465
  default_desc="Compiles all contracts with the same optimization settings",
483
466
  argparse_args={
484
467
  'action': AttrUtil.UniqueStore,
485
- 'type': lambda value: Vf.parse_dict('solc_optimize_map', value)
468
+ 'type': lambda value: Vf.parse_ordered_dict('solc_optimize_map', value)
486
469
  },
487
470
  affects_build_cache_key=True,
488
471
  disables_build_cache=False,
@@ -527,7 +510,7 @@ class EvmAttributes(AttrUtil.Attributes):
527
510
  affects_build_cache_key=True,
528
511
  disables_build_cache=False,
529
512
  config_data=AttributeJobConfigData(
530
- main_section=MainSection.PACKAGES
513
+ main_section=MainSection.NEW_SECTION
531
514
  )
532
515
  )
533
516
 
@@ -545,9 +528,10 @@ class EvmAttributes(AttrUtil.Attributes):
545
528
 
546
529
  STRICT_SOLC_OPTIMIZER = AttrUtil.AttributeDefinition(
547
530
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
548
- help_msg="Allow Solidity compiler optimizations that can interfere with internal function finders",
549
- default_desc="Disables optimizations that may invalidate the bytecode annotations that identify "
550
- "internal functions",
531
+ # This is a hidden flag, the following two attributes are left intentionally as comments to help devs
532
+ # help_msg="Allow Solidity compiler optimizations that can interfere with internal function finders",
533
+ # default_desc="Disables optimizations that may invalidate the bytecode annotations that identify "
534
+ # "internal functions",
551
535
  argparse_args={
552
536
  'action': AttrUtil.STORE_TRUE
553
537
  },
@@ -573,7 +557,8 @@ class EvmAttributes(AttrUtil.Attributes):
573
557
 
574
558
  YUL_ABI = AttrUtil.AttributeDefinition(
575
559
  attr_validation_func=Vf.validate_json_file,
576
- help_msg="An auxiliary ABI file for yul contracts",
560
+ # This is a hidden flag, the following two attributes are left intentionally as comments to help devs
561
+ # help_msg="An auxiliary ABI file for yul contracts",
577
562
  default_desc="",
578
563
  argparse_args={
579
564
  'action': AttrUtil.UniqueStore
@@ -581,6 +566,16 @@ class EvmAttributes(AttrUtil.Attributes):
581
566
  affects_build_cache_key=True,
582
567
  disables_build_cache=True
583
568
  )
569
+
570
+ YUL_OPTIMIZER_STEPS = AttrUtil.AttributeDefinition(
571
+ # overrides the hardcoded yul optimizer steps, set in certoraBuild.py
572
+ argparse_args={
573
+ 'action': AttrUtil.UniqueStore
574
+ },
575
+ affects_build_cache_key=True,
576
+ disables_build_cache=False
577
+ )
578
+
584
579
  CACHE = AttrUtil.AttributeDefinition(
585
580
  argparse_args={
586
581
  'action': AttrUtil.UniqueStore
@@ -604,7 +599,7 @@ class EvmAttributes(AttrUtil.Attributes):
604
599
  affects_build_cache_key=True, # not sure, better be careful
605
600
  disables_build_cache=False,
606
601
  config_data=AttributeJobConfigData(
607
- main_section=MainSection.LINKS
602
+ main_section=MainSection.NEW_SECTION
608
603
  )
609
604
  )
610
605
 
@@ -640,9 +635,10 @@ class EvmAttributes(AttrUtil.Attributes):
640
635
 
641
636
  STORAGE_EXTENSION_HARNESSES = AttrUtil.AttributeDefinition(
642
637
  attr_validation_func=Vf.validate_storage_extension_harness_attr,
643
- help_msg="List of ContractA=ContractB where ContractB is the name of a 'storage extension prototype`. "
644
- "See the documentation for details",
645
- default_desc="",
638
+ # The docs aren't ready yet. The flag is hidden; the lines below are commented to help us devs
639
+ # help_msg="List of ContractA=ContractB where ContractB is the name of a 'storage extension prototype`. "
640
+ # "See the documentation for details",
641
+ # default_desc="",
646
642
  disables_build_cache=False,
647
643
  affects_build_cache_key=True,
648
644
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -702,7 +698,7 @@ class EvmAttributes(AttrUtil.Attributes):
702
698
 
703
699
  EXCLUDE_RULE = AttrUtil.AttributeDefinition(
704
700
  arg_type=AttrUtil.AttrArgType.LIST,
705
- attr_validation_func=Vf.validate_rule_name,
701
+ attr_validation_func=Vf.validate_evm_rule_name,
706
702
  jar_flag='-excludeRule',
707
703
  help_msg="Filter out the list of rules/invariants to verify. Asterisks are interpreted as wildcards",
708
704
  default_desc="Verifies all rules and invariants",
@@ -716,7 +712,7 @@ class EvmAttributes(AttrUtil.Attributes):
716
712
 
717
713
  SPLIT_RULES = AttrUtil.AttributeDefinition(
718
714
  arg_type=AttrUtil.AttrArgType.LIST,
719
- attr_validation_func=Vf.validate_rule_name,
715
+ attr_validation_func=Vf.validate_evm_rule_name,
720
716
  help_msg="List of rules to be sent to Prover each on a separate run",
721
717
  default_desc="Verifies all rules and invariants in a single run",
722
718
  argparse_args={
@@ -751,11 +747,13 @@ class EvmAttributes(AttrUtil.Attributes):
751
747
  affects_build_cache_key=False,
752
748
  disables_build_cache=False
753
749
  )
750
+
754
751
  FUNCTION_FINDER_MODE = AttrUtil.AttributeDefinition(
755
752
  attr_validation_func=Vf.validate_function_finder_mode,
756
- help_msg="Use `relaxed` mode to increase internal function finders precision, "
757
- "but may cause `stack too deep` errors unless using `via-ir`",
758
- default_desc="Takes less stack space but internal functions may be missed",
753
+ # This is a hidden flag, the following two attributes are left intentionally as comments to help devs
754
+ # help_msg="Use `relaxed` mode to increase internal function finders precision, "
755
+ # "but may cause `stack too deep` errors unless using `via-ir`",
756
+ # default_desc="Takes less stack space but internal functions may be missed",
759
757
  argparse_args={
760
758
  'nargs': AttrUtil.SINGLE_OR_NONE_OCCURRENCES,
761
759
  'action': AttrUtil.UniqueStore,
@@ -783,6 +781,17 @@ class EvmAttributes(AttrUtil.Attributes):
783
781
  disables_build_cache=True # prefer to be extra careful with this rare option
784
782
  )
785
783
 
784
+ USE_RELPATHS_FOR_SOLC_JSON = AttrUtil.AttributeDefinition(
785
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
786
+ help_msg="Uses relative paths when constructing json keys for solc's standard-json input",
787
+ default_desc="By using relative paths for the standard json, some rare compilation errors can be prevented",
788
+ argparse_args={
789
+ 'action': AttrUtil.STORE_TRUE
790
+ },
791
+ affects_build_cache_key=True,
792
+ disables_build_cache=False
793
+ )
794
+
786
795
  IGNORE_SOLIDITY_WARNINGS = AttrUtil.AttributeDefinition(
787
796
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
788
797
  help_msg="Ignore all Solidity compiler warnings",
@@ -808,13 +817,9 @@ class EvmAttributes(AttrUtil.Attributes):
808
817
  disables_build_cache=False
809
818
  )
810
819
 
811
- ASSERT_CONTRACTS = AttrUtil.AttributeDefinition(
812
- attr_validation_func=Vf.validate_assert_contracts,
813
- arg_type=AttrUtil.AttrArgType.LIST,
814
- argparse_args={
815
- 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
816
- 'action': AttrUtil.APPEND,
817
- },
820
+ EQUIVALENCE_CONTRACTS = AttrUtil.AttributeDefinition(
821
+ attr_validation_func=Vf.validate_equivalence_contracts,
822
+ arg_type=AttrUtil.AttrArgType.STRING,
818
823
  affects_build_cache_key=False,
819
824
  disables_build_cache=False
820
825
  )
@@ -823,7 +828,6 @@ class EvmAttributes(AttrUtil.Attributes):
823
828
  attr_validation_func=Vf.validate_json_file,
824
829
  arg_type=AttrUtil.AttrArgType.LIST,
825
830
  jar_flag='-bytecode',
826
- help_msg="List of EVM bytecode JSON descriptors",
827
831
  default_desc="",
828
832
  argparse_args={
829
833
  'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
@@ -836,7 +840,6 @@ class EvmAttributes(AttrUtil.Attributes):
836
840
  BYTECODE_SPEC = AttrUtil.AttributeDefinition(
837
841
  attr_validation_func=Vf.validate_spec_file,
838
842
  jar_flag='-spec',
839
- help_msg="Spec to use for the provided bytecodes",
840
843
  default_desc="",
841
844
  argparse_args={
842
845
  'action': AttrUtil.UniqueStore
@@ -948,7 +951,7 @@ class EvmAttributes(AttrUtil.Attributes):
948
951
  )
949
952
 
950
953
  METHOD = AttrUtil.AttributeDefinition(
951
- attr_validation_func=Vf.validate_method_flag,
954
+ attr_validation_func=Vf.validate_evm_method_flag,
952
955
  jar_flag='-method',
953
956
  arg_type=AttrUtil.AttrArgType.LIST,
954
957
  help_msg="Filter methods to be verified by their signature",
@@ -961,6 +964,48 @@ class EvmAttributes(AttrUtil.Attributes):
961
964
  disables_build_cache=False
962
965
  )
963
966
 
967
+ EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
968
+ attr_validation_func=Vf.validate_evm_method_flag,
969
+ jar_flag='-excludeMethod',
970
+ arg_type=AttrUtil.AttrArgType.LIST,
971
+ help_msg="Filter out methods to be verified by their signature",
972
+ default_desc="Verifies all public or external methods. In invariants pure and view functions are ignored",
973
+ argparse_args={
974
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
975
+ 'action': AttrUtil.APPEND
976
+ },
977
+ affects_build_cache_key=False,
978
+ disables_build_cache=False
979
+ )
980
+
981
+ RANGER_INCLUDE_METHOD = AttrUtil.AttributeDefinition(
982
+ attr_validation_func=Vf.validate_evm_method_flag,
983
+ jar_flag='-rangerMethod',
984
+ arg_type=AttrUtil.AttrArgType.LIST,
985
+ help_msg="Filter methods to be included in ranger sequences by their signature",
986
+ default_desc="All methods are considered in constructing ranger sequences",
987
+ argparse_args={
988
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
989
+ 'action': AttrUtil.APPEND
990
+ },
991
+ affects_build_cache_key=False,
992
+ disables_build_cache=False
993
+ )
994
+
995
+ RANGER_EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
996
+ attr_validation_func=Vf.validate_evm_method_flag,
997
+ jar_flag='-rangerExcludeMethod',
998
+ arg_type=AttrUtil.AttrArgType.LIST,
999
+ help_msg="Filter out methods to be included in ranger sequences by their signature",
1000
+ default_desc="All methods are considered in constructing ranger sequences",
1001
+ argparse_args={
1002
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1003
+ 'action': AttrUtil.APPEND
1004
+ },
1005
+ affects_build_cache_key=False,
1006
+ disables_build_cache=False
1007
+ )
1008
+
964
1009
  OPTIMISTIC_CONTRACT_RECURSION = AttrUtil.AttributeDefinition(
965
1010
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
966
1011
  help_msg="Assume the recursion limit is never reached in cases of "
@@ -974,6 +1019,24 @@ class EvmAttributes(AttrUtil.Attributes):
974
1019
  disables_build_cache=False
975
1020
  )
976
1021
 
1022
+ STORAGE_EXTENSION_ANNOTATION = AttrUtil.AttributeDefinition(
1023
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
1024
+ argparse_args={
1025
+ 'action': AttrUtil.STORE_TRUE
1026
+ },
1027
+ affects_build_cache_key=True,
1028
+ disables_build_cache=False
1029
+ )
1030
+
1031
+ EXTRACT_STORAGE_EXTENSION_ANNOTATION = AttrUtil.AttributeDefinition(
1032
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
1033
+ argparse_args={
1034
+ 'action': AttrUtil.STORE_TRUE
1035
+ },
1036
+ affects_build_cache_key=False,
1037
+ disables_build_cache=False
1038
+ )
1039
+
977
1040
  OPTIMISTIC_HASHING = AttrUtil.AttributeDefinition(
978
1041
  arg_type=AttrUtil.AttrArgType.BOOLEAN,
979
1042
  help_msg="Bound the length of data (with potentially unbounded length) to the value given in "
@@ -1076,30 +1139,74 @@ class EvmAttributes(AttrUtil.Attributes):
1076
1139
  },
1077
1140
  affects_build_cache_key=True,
1078
1141
  disables_build_cache=False,
1079
- help_msg="Verify all foundry fuzz test in the current project",
1142
+ help_msg="Verify all Foundry fuzz tests in the current project",
1080
1143
  default_desc="",
1081
1144
  )
1082
1145
 
1083
- BMC = AttrUtil.AttributeDefinition(
1146
+ RANGE = AttrUtil.AttributeDefinition(
1084
1147
  attr_validation_func=Vf.validate_non_negative_integer,
1085
1148
  argparse_args={
1086
1149
  'action': AttrUtil.UniqueStore
1087
1150
  },
1151
+ help_msg="The maximal length of function call sequences Ranger checks",
1152
+ default_desc=f"The default value ('{Util.DEFAULT_RANGER_RANGE}') is used",
1088
1153
  jar_flag="-boundedModelChecking",
1089
1154
  affects_build_cache_key=False,
1090
1155
  disables_build_cache=False,
1091
1156
  )
1092
1157
 
1093
- BMC_FAILURE_LIMIT = AttrUtil.AttributeDefinition(
1158
+ RANGER_FAILURE_LIMIT = AttrUtil.AttributeDefinition(
1094
1159
  attr_validation_func=Vf.validate_non_negative_integer,
1095
1160
  argparse_args={
1096
1161
  'action': AttrUtil.UniqueStore
1097
1162
  },
1163
+ help_msg="Once this number of violations are found, no new Ranger call sequence checks will be started. Checks already in progress will continue.",
1164
+ default_desc=f"Once {Util.DEFAULT_RANGER_FAILURE_LIMIT} violations are found, no new Ranger call sequence checks will be started.",
1098
1165
  jar_flag="-boundedModelCheckingFailureLimit",
1099
1166
  affects_build_cache_key=False,
1100
1167
  disables_build_cache=False,
1101
1168
  )
1102
1169
 
1170
+ MAX_CONCURRENT_RULES = AttrUtil.AttributeDefinition(
1171
+ attr_validation_func=Vf.validate_non_negative_integer,
1172
+ argparse_args={
1173
+ 'action': AttrUtil.UniqueStore
1174
+ },
1175
+ help_msg="Set the maximum number of parallel rule evaluations. "
1176
+ "Lower values (e.g., 1, 2, or 4) may reduce memory usage in large runs. "
1177
+ "This can sometimes help to mitigate out of memory problems.",
1178
+ default_desc="Number of available CPU cores.",
1179
+ temporary_jar_invocation_allowed=True,
1180
+ jar_flag="-maxConcurrentRules",
1181
+ affects_build_cache_key=False,
1182
+ disables_build_cache=False,
1183
+ )
1184
+
1185
+ DISALLOW_INTERNAL_FUNCTION_CALLS = AttrUtil.AttributeDefinition(
1186
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
1187
+ argparse_args={
1188
+ 'action': AttrUtil.STORE_TRUE
1189
+ },
1190
+ affects_build_cache_key=True,
1191
+ disables_build_cache=False,
1192
+ )
1193
+
1194
+ DUMP_ASTS = AttrUtil.AttributeDefinition(
1195
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
1196
+ help_msg="dump all solidity files' asts to asts.json in the build directory",
1197
+ default_desc="asts are not saved",
1198
+ argparse_args={
1199
+ 'action': AttrUtil.STORE_TRUE
1200
+ },
1201
+ affects_build_cache_key=False,
1202
+ disables_build_cache=False,
1203
+ )
1204
+
1205
+ @classmethod
1206
+ def hide_attributes(cls) -> List[str]:
1207
+ # do not show these attributes in the help message
1208
+ return [cls.RANGER_FAILURE_LIMIT.name, cls.RANGE.name]
1209
+
1103
1210
 
1104
1211
  class InternalUseAttributes(AttrUtil.Attributes):
1105
1212
  '''
@@ -1144,20 +1251,6 @@ class InternalUseAttributes(AttrUtil.Attributes):
1144
1251
 
1145
1252
  class BackendAttributes(AttrUtil.Attributes):
1146
1253
 
1147
- RULE = AttrUtil.AttributeDefinition(
1148
- arg_type=AttrUtil.AttrArgType.LIST,
1149
- attr_validation_func=Vf.validate_rule_name,
1150
- jar_flag='-rule',
1151
- help_msg="Verify only the given list of rules/invariants. Asterisks are interpreted as wildcards",
1152
- default_desc="Verifies all rules and invariants",
1153
- argparse_args={
1154
- 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1155
- 'action': AttrUtil.APPEND
1156
- },
1157
- affects_build_cache_key=False,
1158
- disables_build_cache=False
1159
- )
1160
-
1161
1254
  UNUSED_SUMMARY_HARD_FAIL = AttrUtil.AttributeDefinition(
1162
1255
  attr_validation_func=Vf.validate_on_off,
1163
1256
  jar_flag='-unusedSummaryHardFail',
@@ -1280,12 +1373,10 @@ class BackendAttributes(AttrUtil.Attributes):
1280
1373
  attr_validation_func=Vf.validate_sanity_value,
1281
1374
  help_msg="Select the type of sanity check that will be performed during execution",
1282
1375
  jar_flag='-ruleSanityChecks',
1283
- default_desc="No sanity checks",
1376
+ default_desc="Basic sanity checks (Vacuity and trivial invariant check)",
1284
1377
  argparse_args={
1285
- 'nargs': AttrUtil.SINGLE_OR_NONE_OCCURRENCES,
1286
1378
  'action': AttrUtil.UniqueStore,
1287
1379
  'default': None, # 'default': when no --rule_sanity given
1288
- 'const': Vf.RuleSanityValue.BASIC.name.lower() # 'default': when empty --rule_sanity is given
1289
1380
  },
1290
1381
  affects_build_cache_key=False,
1291
1382
  disables_build_cache=False
@@ -1397,17 +1488,6 @@ class BackendAttributes(AttrUtil.Attributes):
1397
1488
  disables_build_cache=False
1398
1489
  )
1399
1490
 
1400
- PROCESS = AttrUtil.AttributeDefinition(
1401
- argparse_args={
1402
- 'action': AttrUtil.UniqueStore,
1403
- 'default': 'emv'
1404
- },
1405
- affects_build_cache_key=False,
1406
- disables_build_cache=False,
1407
- # Avoiding presentation of this attribute in Config Tab
1408
- config_data=None
1409
- )
1410
-
1411
1491
  PROVER_ARGS = AttrUtil.AttributeDefinition(
1412
1492
  arg_type=AttrUtil.AttrArgType.LIST,
1413
1493
  attr_validation_func=validate_prover_args,
@@ -1451,6 +1531,16 @@ class BackendAttributes(AttrUtil.Attributes):
1451
1531
  disables_build_cache=False
1452
1532
  )
1453
1533
 
1534
+ ENFORCE_REQUIRE_REASON = AttrUtil.AttributeDefinition(
1535
+ arg_type=AttrUtil.AttrArgType.BOOLEAN,
1536
+ jar_flag='-enforceRequireReasonInCVL',
1537
+ argparse_args={
1538
+ 'action': AttrUtil.STORE_TRUE
1539
+ },
1540
+ affects_build_cache_key=False,
1541
+ disables_build_cache=False
1542
+ )
1543
+
1454
1544
  # resource files are string of the form <label>:<path> the client will add the file to .certora_sources
1455
1545
  # and will change the path from relative/absolute path to
1456
1546
  PROVER_RESOURCE_FILES = AttrUtil.AttributeDefinition(
@@ -1576,16 +1666,6 @@ class BackendAttributes(AttrUtil.Attributes):
1576
1666
  disables_build_cache=False
1577
1667
  )
1578
1668
 
1579
- ALLOW_SOLIDITY_CALLS_IN_QUANTIFIERS = AttrUtil.AttributeDefinition(
1580
- arg_type=AttrUtil.AttrArgType.BOOLEAN,
1581
- jar_flag='-allowSolidityQuantifierCalls',
1582
- argparse_args={
1583
- 'action': AttrUtil.STORE_TRUE
1584
- },
1585
- affects_build_cache_key=False,
1586
- disables_build_cache=False
1587
- )
1588
-
1589
1669
 
1590
1670
  class RustAttributes(AttrUtil.Attributes):
1591
1671
 
@@ -1611,11 +1691,37 @@ class RustAttributes(AttrUtil.Attributes):
1611
1691
  disables_build_cache=False
1612
1692
  )
1613
1693
 
1694
+ CARGO_TOOLS_VERSION = AttrUtil.AttributeDefinition(
1695
+ help_msg="Platform tools version to use",
1696
+ default_desc="Platform tools version is chosen automatically",
1697
+ argparse_args={
1698
+ 'action': AttrUtil.UniqueStore
1699
+ },
1700
+ affects_build_cache_key=False,
1701
+ disables_build_cache=False
1702
+ )
1703
+
1704
+
1705
+ class EvmRuleAttribute(AttrUtil.Attributes):
1706
+ RULE = AttrUtil.AttributeDefinition(
1707
+ arg_type=AttrUtil.AttrArgType.LIST,
1708
+ attr_validation_func=Vf.validate_evm_rule_name,
1709
+ jar_flag='-rule',
1710
+ help_msg="Verify only the given list of rules/invariants. Asterisks are interpreted as wildcards",
1711
+ default_desc="Verifies all rules and invariants",
1712
+ argparse_args={
1713
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1714
+ 'action': AttrUtil.APPEND
1715
+ },
1716
+ affects_build_cache_key=False,
1717
+ disables_build_cache=False
1718
+ )
1719
+
1614
1720
 
1615
1721
  class EvmProverAttributes(CommonAttributes, DeprecatedAttributes, EvmAttributes, InternalUseAttributes,
1616
- BackendAttributes):
1722
+ BackendAttributes, EvmRuleAttribute):
1617
1723
  FILES = AttrUtil.AttributeDefinition(
1618
- attr_validation_func=Vf.validate_input_file,
1724
+ attr_validation_func=Vf.validate_evm_input_file,
1619
1725
  arg_type=AttrUtil.AttrArgType.LIST,
1620
1726
  help_msg="Solidity or Vyper contract files for analysis or a conf file",
1621
1727
  default_desc="",
@@ -1625,12 +1731,53 @@ class EvmProverAttributes(CommonAttributes, DeprecatedAttributes, EvmAttributes,
1625
1731
  affects_build_cache_key=True,
1626
1732
  disables_build_cache=False,
1627
1733
  config_data=AttributeJobConfigData(
1628
- main_section=MainSection.FILES
1734
+ main_section=MainSection.NEW_SECTION
1629
1735
  )
1630
1736
  )
1631
1737
 
1632
1738
 
1633
- class SorobanProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, RustAttributes):
1739
+ class ConcordAttributes(EvmProverAttributes):
1740
+ CHECK_METHOD = AttrUtil.AttributeDefinition(
1741
+ attr_validation_func=Vf.validate_check_method_flag,
1742
+ help_msg="the method to be checked by Concord equivalent checker",
1743
+ default_desc="Mandatory for Concord",
1744
+ jar_flag='-method',
1745
+ argparse_args={
1746
+ 'action': AttrUtil.UniqueStore
1747
+ },
1748
+ affects_build_cache_key=False,
1749
+ disables_build_cache=False
1750
+ )
1751
+
1752
+ @classmethod
1753
+ def unsupported_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
1754
+ return [cls.VERIFY, cls.MSG, cls.PROTOCOL_NAME, cls.PROTOCOL_AUTHOR, cls.RULE, cls.EXCLUDE_RULE,
1755
+ cls.SPLIT_RULES, cls.EXCLUDE_METHOD, cls.PARAMETRIC_CONTRACTS, cls.COVERAGE_INFO, cls.FOUNDRY,
1756
+ cls.INDEPENDENT_SATISFY, cls.MULTI_ASSERT_CHECK, cls.MULTI_EXAMPLE, cls.PROJECT_SANITY,
1757
+ cls.RULE_SANITY, cls.ADDRESS, cls.CONTRACT_EXTENSIONS, cls.CONTRACT_RECURSION_LIMIT, cls.LINK,
1758
+ cls.OPTIMISTIC_CONTRACT_RECURSION, cls.STRUCT_LINK, cls.DYNAMIC_BOUND, cls.DYNAMIC_DISPATCH,
1759
+ cls.PROTOTYPE, cls.METHOD]
1760
+
1761
+
1762
+ class RangerAttributes(EvmProverAttributes):
1763
+ @classmethod
1764
+ def unsupported_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
1765
+ return [cls.PROJECT_SANITY, cls.RULE_SANITY, cls.COVERAGE_INFO, cls.FOUNDRY, cls.INDEPENDENT_SATISFY,
1766
+ cls.MULTI_ASSERT_CHECK, cls.MULTI_EXAMPLE, cls.VYPER]
1767
+
1768
+ @classmethod
1769
+ def true_by_default_attributes(cls) -> List[AttrUtil.AttributeDefinition]:
1770
+ return [cls.OPTIMISTIC_LOOP, cls.OPTIMISTIC_FALLBACK, cls.AUTO_DISPATCHER, cls.OPTIMISTIC_HASHING]
1771
+
1772
+ @classmethod
1773
+ def hide_attributes(cls) -> List[str]:
1774
+ # do not show these attributes in the help message
1775
+ combined_list = cls.unsupported_attributes() + cls.true_by_default_attributes()
1776
+ return [attr.name for attr in combined_list] + [cls.LOOP_ITER.name, cls.RANGER_FAILURE_LIMIT.name]
1777
+
1778
+
1779
+ class SorobanProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, EvmRuleAttribute,
1780
+ RustAttributes):
1634
1781
  FILES = AttrUtil.AttributeDefinition(
1635
1782
  attr_validation_func=Vf.validate_soroban_extension,
1636
1783
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -1642,12 +1789,99 @@ class SorobanProverAttributes(CommonAttributes, InternalUseAttributes, BackendAt
1642
1789
  affects_build_cache_key=True,
1643
1790
  disables_build_cache=False,
1644
1791
  config_data=AttributeJobConfigData(
1645
- main_section=MainSection.FILES
1792
+ main_section=MainSection.NEW_SECTION
1646
1793
  )
1647
1794
  )
1648
1795
 
1649
1796
 
1650
- class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, RustAttributes):
1797
+ class SuiProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes):
1798
+ FILES = AttrUtil.AttributeDefinition(
1799
+ attr_validation_func=Vf.validate_dir,
1800
+ arg_type=AttrUtil.AttrArgType.LIST,
1801
+ argparse_args={
1802
+ 'nargs': AttrUtil.MULTIPLE_OCCURRENCES
1803
+ },
1804
+ affects_build_cache_key=True,
1805
+ disables_build_cache=False,
1806
+ config_data=AttributeJobConfigData(
1807
+ main_section=MainSection.NEW_SECTION
1808
+ )
1809
+ )
1810
+
1811
+ MOVE_PATH = AttrUtil.AttributeDefinition(
1812
+ attr_validation_func=Vf.validate_dir,
1813
+ arg_type=AttrUtil.AttrArgType.STRING,
1814
+ help_msg="path to a directory which includes all binary .mv files for the Prover",
1815
+ default_desc="",
1816
+ argparse_args={
1817
+ 'action': AttrUtil.UniqueStore
1818
+ },
1819
+ affects_build_cache_key=True,
1820
+ disables_build_cache=False,
1821
+ config_data=AttributeJobConfigData(
1822
+ main_section=MainSection.NEW_SECTION
1823
+ )
1824
+ )
1825
+
1826
+ RULE = AttrUtil.AttributeDefinition(
1827
+ arg_type=AttrUtil.AttrArgType.LIST,
1828
+ attr_validation_func=Vf.validate_move_rule_name,
1829
+ jar_flag='-rule',
1830
+ help_msg="Verify only the given list of rules. Asterisks are interpreted as wildcards",
1831
+ default_desc="Verifies all rules",
1832
+ argparse_args={
1833
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1834
+ 'action': AttrUtil.APPEND
1835
+ },
1836
+ affects_build_cache_key=False,
1837
+ disables_build_cache=False
1838
+ )
1839
+
1840
+ EXCLUDE_RULE = AttrUtil.AttributeDefinition(
1841
+ arg_type=AttrUtil.AttrArgType.LIST,
1842
+ attr_validation_func=Vf.validate_move_rule_name,
1843
+ jar_flag='-excludeRule',
1844
+ help_msg="Filter out the list of rules to verify. Asterisks are interpreted as wildcards",
1845
+ default_desc="Verifies all rules",
1846
+ argparse_args={
1847
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1848
+ 'action': AttrUtil.APPEND
1849
+ },
1850
+ affects_build_cache_key=False,
1851
+ disables_build_cache=False
1852
+ )
1853
+
1854
+ METHOD = AttrUtil.AttributeDefinition(
1855
+ attr_validation_func=Vf.validate_move_method_flag,
1856
+ jar_flag='-method',
1857
+ arg_type=AttrUtil.AttrArgType.LIST,
1858
+ help_msg="Filter functions to be verified by their name",
1859
+ default_desc="Verifies all target functions.",
1860
+ argparse_args={
1861
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1862
+ 'action': AttrUtil.APPEND
1863
+ },
1864
+ affects_build_cache_key=False,
1865
+ disables_build_cache=False
1866
+ )
1867
+
1868
+ EXCLUDE_METHOD = AttrUtil.AttributeDefinition(
1869
+ attr_validation_func=Vf.validate_move_method_flag,
1870
+ jar_flag='-excludeMethod',
1871
+ arg_type=AttrUtil.AttrArgType.LIST,
1872
+ help_msg="Filter out functions to be verified by their name",
1873
+ default_desc="Verifies all target functions.",
1874
+ argparse_args={
1875
+ 'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
1876
+ 'action': AttrUtil.APPEND
1877
+ },
1878
+ affects_build_cache_key=False,
1879
+ disables_build_cache=False
1880
+ )
1881
+
1882
+
1883
+ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAttributes, EvmRuleAttribute,
1884
+ RustAttributes):
1651
1885
  FILES = AttrUtil.AttributeDefinition(
1652
1886
  attr_validation_func=Vf.validate_solana_extension,
1653
1887
  arg_type=AttrUtil.AttrArgType.LIST,
@@ -1660,14 +1894,13 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
1660
1894
  affects_build_cache_key=True,
1661
1895
  disables_build_cache=False,
1662
1896
  config_data=AttributeJobConfigData(
1663
- main_section=MainSection.FILES
1897
+ main_section=MainSection.NEW_SECTION
1664
1898
  )
1665
1899
  )
1666
1900
 
1667
1901
  SOLANA_INLINING = AttrUtil.AttributeDefinition(
1668
1902
  attr_validation_func=Vf.validate_readable_file,
1669
1903
  arg_type=AttrUtil.AttrArgType.LIST,
1670
- jar_flag='-solanaInlining',
1671
1904
  help_msg="a list of paths for the inlining files of Solana contracts",
1672
1905
  argparse_args={
1673
1906
  'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
@@ -1680,7 +1913,6 @@ class SolanaProverAttributes(CommonAttributes, InternalUseAttributes, BackendAtt
1680
1913
  SOLANA_SUMMARIES = AttrUtil.AttributeDefinition(
1681
1914
  attr_validation_func=Vf.validate_readable_file,
1682
1915
  arg_type=AttrUtil.AttrArgType.LIST,
1683
- jar_flag='-solanaSummaries',
1684
1916
  help_msg="a list of paths for the summaries files of Solana contracts",
1685
1917
  argparse_args={
1686
1918
  'nargs': AttrUtil.ONE_OR_MORE_OCCURRENCES,
@@ -1707,70 +1939,6 @@ def set_attribute_class(cls: Type[AttrUtil.Attributes]) -> None:
1707
1939
  cls.set_attribute_list()
1708
1940
 
1709
1941
 
1710
- def detect_application_class(args: List[str]) -> Type[AttrUtil.Attributes]:
1711
-
1712
- attributes_logger.debug("calling detect_application_class")
1713
-
1714
- def application_by_suffix(file: str) -> Type[AttrUtil.Attributes]:
1715
- if file.endswith(Util.EVM_EXTENSIONS):
1716
- return EvmProverAttributes
1717
- elif file.endswith(Util.SOROBAN_EXEC_EXTENSION):
1718
- return SorobanProverAttributes
1719
- elif file.endswith(Util.SOLANA_EXEC_EXTENSION):
1720
- return SolanaProverAttributes
1721
- elif file.endswith('.conf'):
1722
- raise Util.CertoraUserInputError(f"Cannot use conf files inside a conf file: {file}")
1723
- else:
1724
- raise Util.CertoraUserInputError(f"Unsupported file type: {file}")
1725
-
1726
- cli_files = []
1727
- cli_conf_files = []
1728
- files = []
1729
- build_script = None
1730
- for arg in args:
1731
- if arg.startswith('-'):
1732
- break # Stop processing when a flag is detected
1733
- cli_files.append(arg)
1734
- if arg.endswith('.conf'):
1735
- cli_conf_files.append(arg)
1736
-
1737
- if len(cli_conf_files) == 1:
1738
- conf_file_path = Path(cli_conf_files[0])
1739
-
1740
- with conf_file_path.open() as conf_file:
1741
- configuration = json5.load(conf_file, allow_duplicate_keys=False)
1742
- files = configuration.get('files', [])
1743
- build_script = configuration.get('build_script')
1744
-
1745
- if build_script:
1746
- return SorobanProverAttributes
1747
-
1748
- if len(cli_conf_files) == 0:
1749
- files = cli_files
1750
-
1751
- if len(cli_conf_files) > 1:
1752
- raise Util.CertoraUserInputError(f"multiple conf files: {cli_conf_files})")
1753
-
1754
- candidate = None
1755
-
1756
- for file in files:
1757
- file = file.split(':')[0] # remove contract part if exist
1758
- app = application_by_suffix(file)
1759
- if not candidate:
1760
- candidate = app
1761
- elif candidate == app:
1762
- continue
1763
- else:
1764
- raise Util.CertoraUserInputError(f"Illegal files combination: {files})")
1765
-
1766
- if candidate:
1767
- attributes_logger.debug(f"detect_application_class returns {candidate}")
1768
- return candidate
1769
- else:
1770
- attributes_logger.debug(f"detect_application_class returns {EvmProverAttributes}")
1771
- return EvmProverAttributes
1772
-
1773
-
1774
1942
  def is_solana_app() -> bool:
1775
1943
  return get_attribute_class() == SolanaProverAttributes
1776
1944
 
@@ -1783,5 +1951,18 @@ def is_rust_app() -> bool:
1783
1951
  return is_soroban_app() or is_solana_app()
1784
1952
 
1785
1953
 
1954
+ # Ranger and Concord will also return true for this function
1786
1955
  def is_evm_app() -> bool:
1787
- return get_attribute_class() == EvmProverAttributes
1956
+ return issubclass(get_attribute_class(), EvmProverAttributes)
1957
+
1958
+
1959
+ def is_ranger_app() -> bool:
1960
+ return get_attribute_class() == RangerAttributes
1961
+
1962
+
1963
+ def is_concord_app() -> bool:
1964
+ return get_attribute_class() == ConcordAttributes
1965
+
1966
+
1967
+ def is_sui_app() -> bool:
1968
+ return get_attribute_class() == SuiProverAttributes