Skip to content

Commit c04cda0

Browse files
committed
Improve Wording
1 parent fac2b6d commit c04cda0

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

reference/external-refinements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ nav_order: 4
66

77
# External Refinements
88

9-
External refinements let us add refinements to an existing class that we cannot modify.
9+
External refinements let you add refinements to an existing class that you cannot modify.
1010

11-
For this, we use the `@ExternalRefinementsFor` annotation to specify the qualified name of the class we want to refine in a separate interface. This lets us refine external classes from the Java standard library, third-party dependencies, or shared APIs without modifying their source code.
11+
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.
1212

1313
```java
1414
import liquidjava.specification.*;

reference/refinement-aliases.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav_order: 2
66

77
# Refinement Aliases
88

9-
When the same refinement appears repeatedly, we can define it once with `@RefinementAlias` and reuse it inside other refinements.
9+
When the same refinement appears repeatedly, you can define it once with `@RefinementAlias` and reuse it inside other refinements.
1010

1111
```java
1212
import liquidjava.specification.*;

reference/refinements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ nav_order: 1
66

77
# Refinements
88

9-
In LiquidJava, refinements allow us to express restrictions as logical predicates over basic types. They let us restrict the values a variable, field, parameter, or return value can have, which helps catch bugs before the program runs.
9+
In LiquidJava, refinements allow you to express restrictions as logical predicates over basic types. They let you restrict the values a variable, field, parameter, or return value can have, which helps catch bugs before the program runs.
1010

1111
These are written as strings in the `@Refinement` annotation. The predicate must be a boolean expression that refers to the refined value either by its declared name or by `_`.
1212

@@ -33,7 +33,7 @@ public class RefinementExamples {
3333

3434
## Predicate Syntax
3535

36-
Refinement predicates use a language similar to Java, where you can write boolean expressions using comparisons, logical connectives, arithmetic operators, conditional expressions, and calls to ghosts or aliases, which we cover in later sections.
36+
Refinement predicates use a language similar to Java, where you can write boolean expressions using comparisons, logical connectives, arithmetic operators, conditional expressions, and calls to ghosts or aliases, which is covered in later sections.
3737

3838
| Form | Syntax | Example |
3939
| --- | --- | --- |

reference/state-refinements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ If a class follows an implicit protocol that can be described by a DFA, the prot
3939

4040
## Syntax
4141

42-
Note that states are functions. These take a single parameter, which is the object being refined. Since we are describing the state of the current object, we use `this` as the parameter, which is being used implicitly in the example above. Actually, all of these are equivalent: `open()`, `this.open()`, and `open(this)`.
42+
Note that states are functions. These take a single parameter, which is the object being refined, in this case the implicit `this`. All of these are equivalent: `open()`, `this.open()`, and `open(this)`.
4343

4444
## State Initialization
4545

@@ -88,4 +88,4 @@ public class Device {
8888

8989
Each state set is exclusive: at any moment, the object can only be in one state from that specific set. In the example above, the object cannot be both `open` and `closed`, and it cannot be both `clean` and `dirty`.
9090

91-
When a transition affects multiple orthogonal states, the states must be combined with `&&` in the `from` and `to` annotations. In the example above, the `use` method transitions from `open && clean` to `open && dirty`, and the `close` method transitions from `open && clean` to `closed && clean`.
91+
When a transition affects multiple orthogonal states, the states must be combined with `&&` in the `from` and `to` annotations. In the example above, the `use` method transitions from `open && clean` to `open && dirty`, and the `close` method transitions from `open && clean` to `closed && clean`.

0 commit comments

Comments
 (0)