Skip to content

Commit e1c2657

Browse files
committed
Update Docs
1 parent eba0289 commit e1c2657

6 files changed

Lines changed: 7 additions & 9 deletions

File tree

pages/annotations/external-refinements-for.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ description: Learn how to refine external libraries that cannot be annotated dir
88

99
# @ExternalRefinementsFor
1010

11-
External refinements let you add refinements to an existing class that you cannot modify.
12-
13-
For this, the `@ExternalRefinementsFor` annotation is used to specify the qualified name of the class you want to refine in a separate interface. This makes it possible to refine external classes from the Java standard library, third-party dependencies, or shared APIs without modifying their source code.
11+
External refinements let you add refinements to existing classes and interfaces that you cannot directly annotate, such as ones from the Java standard library, third-party dependencies, or shared APIs, without actually modifying their source code.
12+
For this, the `@ExternalRefinementsFor` annotation is used to specify the qualified name of the class or interface you want to refine in a separate interface.
1413

1514
```java
1615
import liquidjava.specification.*;

pages/annotations/refinement-alias.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ public class MyClass {
2424
}
2525
```
2626

27-
This helps keep contracts shorter and easier to maintain by giving common constraints a domain-specific name.
27+
This helps keep contracts shorter and easier to maintain by giving common constraints a domain-specific name and reusing them in.

pages/annotations/refinements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Refinement predicates use a language similar to Java, where you can write boolea
4646
| Ghosts | `ghost(...args)` | `@Refinement("0 <= _ < size(this)") int index` |
4747
| Aliases | `Alias(...args)` | `@Refinement("Positive(_)") int c = 10` |
4848
| Literals | `true` `false` `0` `1.5` | `@Refinement("true") void print()` |
49-
| Enums | `EnumType.VAlue` | `@Refinement("_ == Status.Open") Status status` |
49+
| Enums | `EnumType.Value` | `@Refinement("_ == Status.Open") Status status` |
5050
| Static final fields | `Type.FIELD` | `@Refinement("_ <= Integer.MAX_VALUE") int value` |
5151

5252
LiquidJava currently supports a small set of types in refinements:

pages/vscode-extension/status-bar-indicator.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ description: Check out the indicator that shows the current state of LiquidJava.
88

99
# Status Bar Indicator
1010

11-
The extension displays an indicator in the status bar in the bottom-left of the editor that shows the current LiquidJava state inside VS Code, with four possible states:
11+
The extension displays an indicator in the status bar in the bottom-left of the editor that shows the current LiquidJava state inside VS Code, with five possible states:
1212

1313
| Status | Description |
1414
| --- | --- |
1515
| `loading` | The verification is in progress |
1616
| `passed` | The verification succeeded |
1717
| `failed` | The verification failed with one or more errors |
18+
| `crashed` | The verification crashed with an unexpected error |
1819
| `stopped` | The extension was stopped, failed to connect, or lost connection with the language server |
1920

2021
![Status Bar Indicator]({{ 'assets/images/status-bar-indicator.gif' | relative_url }})

pages/vscode-extension/webview/context-debugger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ Clicking a variable in the context debugger highlights that variable in the edit
3232

3333
## Failed Refinements
3434

35-
When a refinement or state refinement fails, the context debugger also shows the expected type in red after the turnstile (``). Hovering that expected type reveals the corresponding error message and clicking on it highlights the failure in the editor.
35+
When a refinement or state refinement fails, the context debugger also shows the expected type in red after the turnstile (``). Clicking this expected type makes the webview navigate to the corresponding error in the diagnostic explorer.

pages/vscode-extension/webview/diagnostic-explorer.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ The diagnostic explorer provides an interactive view of LiquidJava diagnostics w
1313
For refinement errors, LiquidJava performs expression simplification with traceable simplification steps. This makes it possible to progressively expand simplifications. Clicking a value can expand it into its origin expression, and clicking a variable can jump to its location in the editor. This makes simplification traceable instead of showing only the final reduced expression.
1414

1515
![Diagnostic Explorer]({{ 'assets/images/diagnostic-explorer.gif' | relative_url }})
16-
17-
In refinement and state refinement errors, an expandable section displays the context variables (also called translation table). This table maps the internal variable names created during the typechecking to the original source code variables and placement in the code. When clicked, each entry highlights the corresponding part of the source code that corresponds to that variable.

0 commit comments

Comments
 (0)