certora-cli-alpha-master 20250619.9.22.643691__py3-none-macosx_10_9_universal2.whl → 20250619.14.5.808490__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.
@@ -25,12 +25,13 @@ sys.path.insert(0, str(scripts_dir_path))
25
25
  import CertoraProver.certoraContextAttributes as Attrs
26
26
  from CertoraProver.certoraCollectRunMetadata import RunMetaData, MetadataEncoder
27
27
  import Shared.certoraUtils as Utils
28
+ from typing import List
28
29
 
29
30
 
30
31
  class MainSection(Enum):
31
32
  GENERAL = "GENERAL"
33
+ OPTIONS = "OPTIONS"
32
34
  SOLIDITY_COMPILER = "SOLIDITY_COMPILER"
33
- GIT = "GIT"
34
35
  NEW_SECTION = "NEW_SECTION"
35
36
 
36
37
 
@@ -47,13 +48,11 @@ class InnerContent:
47
48
  content: Any
48
49
  doc_link: str = ''
49
50
  tooltip: str = ''
50
- unsound: str = 'false'
51
+ unsound: bool = False
51
52
 
52
53
  def __post_init__(self) -> None:
53
54
  if isinstance(self.content, bool):
54
55
  self.content = 'true' if self.content else 'false'
55
- if isinstance(self.unsound, bool):
56
- self.unsound = 'true' if self.unsound else 'false'
57
56
 
58
57
 
59
58
  @dataclasses.dataclass
@@ -65,6 +64,7 @@ class CardContent:
65
64
 
66
65
  DOC_LINK_PREFIX = 'https://docs.certora.com/en/latest/docs/'
67
66
  GIT_ATTRIBUTES = ['origin', 'revision', 'branch', 'dirty']
67
+ ARG_LIST_ATTRIBUTES = ['prover_args', 'java_args']
68
68
 
69
69
 
70
70
  class AttributeJobConfigData:
@@ -73,13 +73,13 @@ class AttributeJobConfigData:
73
73
  This should be added to the AttributeDefinition and configured for every new attribute
74
74
  presented in the Rule report.
75
75
 
76
- Note: Attributes which do not contain specific information will be assigned as a Flag in the General main section!
76
+ Note: Attributes that do not contain specific information will be presented in the OPTIONS main section!
77
77
 
78
78
  arguments:
79
79
  - main_section : MainSection -- the main section inside the config tab
80
- default: MainSection.GENERAL
81
- - subsection : str -- the subsection within the main_section (e.g Flags)
82
- default: Flags
80
+ default: MainSection.OPTIONS
81
+ - subsection : str -- the subsection within the main_section
82
+ default: None - they will be presented inside the OPTIONS card
83
83
  - doc_link : Optional[str] -- a link to the Documentation page of this attribute (if exists)
84
84
  default: 'https://docs.certora.com/en/latest/docs/' + Solana/EVM path + #<attribute_name>
85
85
  - tooltip : Optional[str] -- a description of this attribute to present in the config tab
@@ -88,7 +88,7 @@ class AttributeJobConfigData:
88
88
  default: False
89
89
  """
90
90
 
91
- def __init__(self, main_section: MainSection = MainSection.GENERAL, subsection: str = '',
91
+ def __init__(self, main_section: MainSection = MainSection.OPTIONS, subsection: str = '',
92
92
  doc_link: Optional[str] = '', tooltip: Optional[str] = '', unsound: bool = False):
93
93
  self.main_section = main_section
94
94
  self.subsection = subsection
@@ -201,6 +201,40 @@ def create_or_get_card_content(output: list[CardContent], name: str) -> CardCont
201
201
  return main_section
202
202
 
203
203
 
204
+ def split_and_sort_arg_list_value(args_list: List[str]) -> List[str]:
205
+ """
206
+ Splits a unified CLI argument list of strings into a sorted list of flag+value groups.
207
+ This is useful mainly for --prover_args and --java_args.
208
+
209
+ For example:
210
+ "-depth 15 -adaptiveSolverConfig false" → ["-adaptiveSolverConfig false", "-depth 15"]
211
+
212
+ Assumes each flag starts with '-' and its value follows immediately, if exists.
213
+ Lines are sorted alphabetically.
214
+ """
215
+ unified_args = ''.join(args_list)
216
+
217
+ if not unified_args.strip():
218
+ return []
219
+
220
+ lines: List[str] = []
221
+ tokens = unified_args.split()
222
+ curr_line = ""
223
+
224
+ for token in tokens:
225
+ if token.startswith('-'):
226
+ if curr_line:
227
+ lines.append(curr_line)
228
+ curr_line = token
229
+ else:
230
+ curr_line += f" {token}"
231
+
232
+ if curr_line:
233
+ lines.append(curr_line)
234
+
235
+ return sorted(lines)
236
+
237
+
204
238
  def create_inner_content(name: str, content_type: ContentType, value: Any, doc_link: str,
205
239
  config_data: AttributeJobConfigData) -> InnerContent:
206
240
  return InnerContent(
@@ -209,7 +243,7 @@ def create_inner_content(name: str, content_type: ContentType, value: Any, doc_l
209
243
  content=value,
210
244
  doc_link=doc_link,
211
245
  tooltip=config_data.tooltip or '',
212
- unsound='true' if config_data.unsound else 'false'
246
+ unsound=config_data.unsound
213
247
  )
214
248
 
215
249
 
@@ -260,35 +294,23 @@ def collect_attribute_configs(metadata: dict) -> list[CardContent]:
260
294
  )
261
295
  continue
262
296
 
263
- # Find or create the subsection (if it exists)
297
+ # Find or create the subsection (if it doesn't exist)
264
298
  if isinstance(attr_value, list):
265
- current_section: Any = main_section
266
299
  content_type = ContentType.SIMPLE
300
+ if attr_name in ARG_LIST_ATTRIBUTES:
301
+ attr_value = split_and_sort_arg_list_value(attr_value)
267
302
 
268
303
  elif isinstance(attr_value, dict):
269
- current_section = main_section
270
304
  content_type = ContentType.COMPLEX
271
305
  attr_value = [
272
306
  create_inner_content(key, ContentType.FLAG, value, doc_link, config_data)
273
307
  for key, value in attr_value.items()
274
308
  ]
275
309
  else:
276
- # this attribute is a value attribute without a subsection, it will be placed in flags.
277
- subsection_key = config_data.subsection.lower() if config_data.subsection else 'flags'
278
- current_section = next((section for section in main_section.content
279
- if section.inner_title == subsection_key), None)
280
- if current_section is None:
281
- current_section = InnerContent(
282
- inner_title=subsection_key,
283
- content_type=ContentType.COMPLEX.value,
284
- content=[]
285
- )
286
- main_section.content.append(current_section)
287
-
288
310
  content_type = ContentType.FLAG
289
311
 
290
312
  # Update the current section with attribute details
291
- current_section.content.append(
313
+ main_section.content.append(
292
314
  create_inner_content(attr_name, content_type, attr_value, doc_link, config_data)
293
315
  )
294
316
 
@@ -300,37 +322,23 @@ def collect_run_config_from_metadata(attributes_configs: list[CardContent], meta
300
322
  Adding CLI and Git configuration from metadata
301
323
  """
302
324
 
303
- # Define a mapping of metadata attributes to their keys in general_section
304
- metadata_mappings = {
305
- 'CLI Version': metadata.get('CLI_version'),
306
- 'Verify': metadata.get('conf', {}).get('verify'),
307
- }
308
-
309
325
  general_section = create_or_get_card_content(attributes_configs, MainSection.GENERAL.value.lower())
310
326
 
311
- # Add metadata attributes dynamically if they exist
312
- for key, value in metadata_mappings.items():
313
- if value:
314
- general_section.content.append(InnerContent(
315
- inner_title=key,
316
- content_type=ContentType.FLAG.value,
317
- content=value,
318
- ))
327
+ if cli_version := metadata.get('CLI_version'):
328
+ general_section.content.append(InnerContent(
329
+ inner_title='CLI Version',
330
+ content_type=ContentType.FLAG.value,
331
+ content=cli_version,
332
+ ))
319
333
 
320
- # Adding GIT configuration from metadata only if attributes are found
321
- git_content = []
322
334
  for attr in GIT_ATTRIBUTES:
323
335
  if attr_value := metadata.get(attr):
324
- git_content.append(InnerContent(
336
+ general_section.content.append(InnerContent(
325
337
  inner_title=attr,
326
338
  content_type=ContentType.FLAG.value,
327
339
  content=attr_value,
328
340
  ))
329
341
 
330
- if git_content:
331
- git_section = create_or_get_card_content(attributes_configs, MainSection.GIT.value.lower())
332
- git_section.content = git_content
333
-
334
342
  return attributes_configs
335
343
 
336
344
 
@@ -338,14 +346,17 @@ def sort_configuration_layout(data: list[CardContent]) -> list[CardContent]:
338
346
  """
339
347
  Sorts a configuration layout:
340
348
  - Top-level sorted by 'card_title'
341
- - Nested content sorted by 'inner_title', with 'Verify' first
349
+ - Nested content sorted by 'inner_title', with 'verify' first
342
350
  """
343
351
  priority = {
344
- "Verify": 0,
352
+ # Priorities for top-level cards
345
353
  "general": 0,
354
+ "files": 1,
355
+ "options": 2,
356
+ # Top level items inside their respective cards
357
+ "verify": 0,
346
358
  "solc": 0,
347
- "CLI Version": 1,
348
- "flags": 2
359
+ "CLI Version": 0
349
360
  }
350
361
 
351
362
  def inner_sort_key(item: Any) -> Any:
@@ -740,8 +740,7 @@ class EvmAttributes(AttrUtil.Attributes):
740
740
  'action': AttrUtil.UniqueStore
741
741
  },
742
742
  affects_build_cache_key=False,
743
- disables_build_cache=False,
744
- config_data=None
743
+ disables_build_cache=False
745
744
  )
746
745
 
747
746
  BUILD_CACHE = AttrUtil.AttributeDefinition(
@@ -686,7 +686,7 @@ def validate_solc_via_ir_map(args: Dict[str, bool]) -> None:
686
686
  if first:
687
687
  validation_logger.warning("all via_ir values are set to True '--solc_via_ir' can be used instead")
688
688
  else:
689
- 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")
690
690
 
691
691
  def validate_solc_evm_version_map(args: Dict[str, str]) -> None:
692
692
  if not isinstance(args, dict):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-alpha-master
3
- Version: 20250619.9.22.643691
3
+ Version: 20250619.14.5.808490
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-alpha-master
6
6
  Author: Certora
@@ -38,4 +38,4 @@ Dynamic: requires-dist
38
38
  Dynamic: requires-python
39
39
  Dynamic: summary
40
40
 
41
- Commit 16ddcce. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
41
+ Commit d0b812b. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -15,12 +15,12 @@ certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=I60x0ykMFPzciD193cP
15
15
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=8tPny9-pasC7CCRKQclaVQ3qcEDNa6EdOUu1ZWh0MZY,14704
16
16
  certora_cli/CertoraProver/certoraBuildRust.py,sha256=ofKvmtqzUGTrgVm5crcybV7gbElbjiUc6Z4FphPEjz0,6016
17
17
  certora_cli/CertoraProver/certoraCloudIO.py,sha256=w3mqA5ANgIX6dsb6Nxg4jl9zBRdAX5kw9xLeYmA-iHc,53062
18
- certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=waMo5_nzirDaK7aoPCfoS7jOqqi_6huRc-_jTrDcZO8,14252
18
+ certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=6aHEGrhT_Y9aYfM5n_Mk--awgcQfdtc-chBPRl7FU4E,14095
19
19
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=n67E7hjVdPlBXMh1FMzcWSgu3v5SfFM_HOO2JpbCeY0,11787
20
20
  certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
21
21
  certora_cli/CertoraProver/certoraConfigIO.py,sha256=uq-uNnjVBzg9Kh41fDqn-lnwSJXe4k2_iy5GTnQIDa8,7560
22
22
  certora_cli/CertoraProver/certoraContext.py,sha256=A4RZMEd7Slx8dt_zEyohfA22wnwE8uw1cyc5ln3BE4k,25716
23
- certora_cli/CertoraProver/certoraContextAttributes.py,sha256=tc5ieED4H1TaCG4FfEJmdx9b7NDyJzC3qlGfUbIFetg,69106
23
+ certora_cli/CertoraProver/certoraContextAttributes.py,sha256=zg_AmotgzlklxIkj6h7G5mPvRWuMHEYw04eEKsO2u64,69080
24
24
  certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
25
25
  certora_cli/CertoraProver/certoraContextValidator.py,sha256=A7blCXdJTnxTh5x1w1fADinWtRUPJoAZC3bfPj3W3Hs,45333
26
26
  certora_cli/CertoraProver/certoraContractFuncs.py,sha256=ipSwge5QQzp8qhUavY44bZ-eCR6szK_HWwSIWqQyuR0,6921
@@ -62,15 +62,15 @@ certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY4
62
62
  certora_cli/Shared/certoraAttrUtil.py,sha256=ZsoS6xbSZnAjEoPEcfiJi6CvHU-1ySBKubvVKh78ohs,8373
63
63
  certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
64
64
  certora_cli/Shared/certoraUtils.py,sha256=xTVCh7bWdMDQR37SA6jLUHSelxsk3mbSYi26XKb4MZQ,56006
65
- certora_cli/Shared/certoraValidateFuncs.py,sha256=EGoCGTtGMRzWdN-T5GducwkYbyqZBcSjQZHpau0fWnQ,41922
65
+ certora_cli/Shared/certoraValidateFuncs.py,sha256=Fn6GN_LEwlMjBdTiVO6WzCg8P5F6DhwkvP9Xl-XiQ6o,41921
66
66
  certora_cli/Shared/proverCommon.py,sha256=PqkjycZ3TdZr0RNWoPuA_VZ5b7EAAsu9ewymNH6kIm4,11291
67
67
  certora_cli/Shared/rustProverCommon.py,sha256=NIZ5ECbhuiMegyRAl07CV3r68MFG2tBNKgUAQoV4uLI,2049
68
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=J6NAfN13iz8E7kNRExKxbT7cEYuScEo8Uq250V8B7NY,168
69
- certora_jars/Typechecker.jar,sha256=81d20jExSt4EgLswUZf35JkfhiPva9oCTsAuzDKpftc,17142966
68
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=zy91-tq2O8gVujWcQQT_AaetMInqpmFdOPEIla6PbAs,168
69
+ certora_jars/Typechecker.jar,sha256=f_N3qu5QQ38hJCq7hM0vU97sqYU0ps5uLQXlbVud4fA,17142966
70
70
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
72
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/METADATA,sha256=oQqg7Ag66xH9bd_mOTyNT8K5OKKiI5KfWlXmSBT8leQ,1270
73
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
74
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
75
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
76
- certora_cli_alpha_master-20250619.9.22.643691.dist-info/RECORD,,
71
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
72
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/METADATA,sha256=Tf7o7nk0XiSzM7-tdd1QKR4HR5ebuDcPfGSfrpTw2FQ,1270
73
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
74
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
75
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
76
+ certora_cli_alpha_master-20250619.14.5.808490.dist-info/RECORD,,
@@ -1 +1 @@
1
- {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "16ddcce", "timestamp": "20250619.9.22.643691", "version": "20250619.9.22.643691+16ddcce"}
1
+ {"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "d0b812b", "timestamp": "20250619.14.5.808490", "version": "20250619.14.5.808490+d0b812b"}
Binary file