@@ -333,7 +333,7 @@ def print_statements(
333
333
html_parts .append (f"<code>{ code } </code>" )
334
334
html_parts .append ("</p>" )
335
335
val = cost_val or cost_stmt .validation
336
- if val .satisfiable is not None and val .message is not None :
336
+ if val and val .satisfiable is not None and val .message is not None :
337
337
html_parts .append (f'<p><span class="label">Satisfiable:</span> { val .satisfiable } </p>' )
338
338
html_parts .append (f'<p><span class="label">Reason:</span> { val .message } </p>' )
339
339
html_parts .append ("</div>" )
@@ -345,7 +345,7 @@ def print_statements(
345
345
if (param_stmt .formalization is None or param_stmt .formalization .mapping is None ) and only_formalized :
346
346
continue
347
347
val = param_val or param_stmt .validation
348
- if val .holds is not None :
348
+ if val and val .holds is not None :
349
349
holds_tag = "holds" if val .holds else "not-hold"
350
350
else :
351
351
holds_tag = ''
@@ -367,7 +367,7 @@ def print_statements(
367
367
code = code .replace (var_name , f"{ computation .name } ({ args_str } )" )
368
368
html_parts .append (f"<code>{ code } </code>" )
369
369
html_parts .append ("</p>" )
370
- if val .satisfiable is not None and val .message is not None and val .holds is not None :
370
+ if val and val .satisfiable is not None and val .message is not None and val .holds is not None :
371
371
html_parts .append (f'<p><span class="label">Satisfiable:</span> { val .satisfiable } </p>' )
372
372
html_parts .append (f'<p><span class="label">Holds:</span> { val .holds } </p>' )
373
373
html_parts .append (f'<p><span class="label">Reason:</span> { val .message } </p>' )
@@ -416,7 +416,7 @@ def print_statements(
416
416
code = code .replace (var_name , f"{ computation .name } ({ args_str } )" )
417
417
print (code )
418
418
val = cost_val or cost_stmt .validation
419
- if val .satisfiable is not None and val .message is not None :
419
+ if val and val .satisfiable is not None and val .message is not None :
420
420
print (f"Satisfiable: { val .satisfiable } " )
421
421
print (val .message )
422
422
print ("\n -----------------------------------\n " )
@@ -444,7 +444,7 @@ def print_statements(
444
444
code = code .replace (var_name , f"{ computation .name } ({ args_str } )" )
445
445
print (code )
446
446
val = param_val or param_stmt .validation
447
- if val .satisfiable is not None and val .message is not None and val .holds is not None :
447
+ if val and val .satisfiable is not None and val .message is not None and val .holds is not None :
448
448
print (f"Satisfiable: { val .satisfiable } " )
449
449
print (f"Holds: { val .holds } ({ val .message } )" )
450
450
print ("\n -----------------------------------\n " )
0 commit comments