Skip to content

Commit a63412a

Browse files
committed
Update Understanding Refinement Errors Section
1 parent ec746eb commit a63412a

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

diagnostics/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ nav_order: 3
44
has_children: true
55
has_toc: false
66
permalink: /diagnostics/
7-
description: Understand LiquidJava errors, warnings, diagnostic structure, and custom diagnostic messages.
7+
description: Understand LiquidJava errors and warnings.
88
cards:
99
- title: Errors
1010
url: /diagnostics/errors/
@@ -15,13 +15,13 @@ cards:
1515
- title: Custom Messages
1616
url: /diagnostics/custom-messages/
1717
description: Learn how to provide clearer diagnostic messages using the `msg` parameter.
18-
- title: Diagnostic Structure
19-
url: /diagnostics/diagnostic-structure/
20-
description: Learn how to understand a diagnostic message.
18+
- title: Understanding Refinement Errors
19+
url: /diagnostics/understanding-refinement-errors/
20+
description: Learn how to read and interpret LiquidJava refinement errors.
2121
---
2222

2323
# Diagnostics
2424

25-
Learn how to understand LiquidJava diagnostics, from verification errors and warnings to the structure of a full diagnostic message.
25+
Learn how to understand LiquidJava errors and warnings.
2626

2727
{% include card_grid.html cards=page.cards %}

diagnostics/diagnostic-structure.md renamed to diagnostics/understanding-refinement-errors.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Diagnostic Structure
2+
title: Understanding Refinement Errors
33
parent: Diagnostics
44
nav_order: 4
55
---
66

7-
# Diagnostic Structure
7+
# Understanding Refinement Errors
88

99
Consider the following refinement error:
1010

@@ -26,7 +26,11 @@ Each part gives a different piece of information:
2626

2727
The error message also includes the absolute path of the file and line where the error was reported, which can be clicked to jump the source code location in the editor.
2828

29-
## Understanding the Error
29+
## Subtyping
30+
31+
To verify if a refinement holds, LiquidJava checks if the inferred refinement is a subtype of the expected one. This means that every value that satisfies the inferred refinement must also satisfy the expected one. For example, the predicate `x > 0` is a subtype of `x >= 0`, since the set of positive integers is contained within the set of non-negative integers. However, `x > 0` is not a subtype of `x > 1`, since the value `x == 1` satisfies the first predicate but not the second.
32+
33+
## Counterexamples
3034

3135
Refinement errors may provide a counterexample, which is a concrete assignment of values that makes the verification fail.
3236

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cards:
1313
description: Look up LiquidJava concepts, annotations, and protocol rules in a more formal, detailed format.
1414
- title: Diagnostics
1515
url: /diagnostics/
16-
description: Understand LiquidJava errors, warnings, diagnostic structure, and custom diagnostic messages.
16+
description: Understand LiquidJava errors and warnings.
1717
- title: VS Code Extension
1818
url: /vscode/
1919
description: Find out about real-time diagnostics, syntax highlighting, and more in the editor.

0 commit comments

Comments
 (0)