Skip to content

Commit 5a07125

Browse files
committed
Update Tutorial
1 parent 962a88b commit 5a07125

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

README.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ To follow along with this tutorial, make sure you have the following installed:
5656

5757
> Don't forget to star [LiquidJava](https://github.com/liquid-java/liquidjava) and its [extension](https://github.com/liquid-java/vscode-liquidjava) on GitHub! ⭐
5858
59-
### Important!
60-
61-
- Currently, **only one error is reported at a time**, so an error might not be reported if another one is present! In each part of the tutorial, **make sure to fix all errors before moving on to the next one**.
62-
- It is recommended to enable **auto-save** in VS Code to ensure that the LiquidJava extension always checks the latest version of the code. You can enable it by going to `File > Auto Save`.
63-
- It is also highly recommended to disable **GitHub Copilot** while following this tutorial, as it might give you the answers to the exercises before you even can think about them.
64-
- The extension might take a few seconds to verify the code after each change, so be patient while it checks for errors.
65-
- Lastly, if you think the extension isn't working correctly, try restarting the extension with the command palette (`Cmd+Shift+P` or `Ctrl+Shift+P`) and selecting `Developer: Restart Extension Host` or `Developer: Reload Window`.
66-
6759
---
6860

6961
## Tutorial
@@ -86,7 +78,7 @@ As demonstrated previously, we can also refine method parameters and return valu
8678
8779
Here, the method `divide` is refined to ensure that the parameter `b` is never zero.
8880

89-
> Try changing the value of the second argument in the `divide` method call to zero and observe the error reported by LiquidJava. Now change it back to a non-zero value.
81+
> Try changing the value of the second argument in the `divide` method call to zero and observe the error reported by LiquidJava.
9082
9183
But wait, we can also refine the return value of the method! Let's introduce a bug.
9284

@@ -102,8 +94,6 @@ No error! Let's fix this.
10294

10395
Now we get an error! LiquidJava is telling us that the implementation of the method does not satisfy the refinement specified for the return value. This way, we can catch errors not only in the inputs of the methods, but also in their outputs.
10496

105-
> Fix the implementation of the method to return `a / b` again to make the error disappear.
106-
10797
#### Exercise
10898

10999
> Open [Bank.java](./src/main/java/com/tutorial/part1/exercise/Bank.java).
@@ -148,7 +138,7 @@ This object has two methods, `turnOn` and `turnOff`. From the state refinements,
148138

149139
![Light Bulb DFA](./docs/images/light_bulb_dfa.png)
150140

151-
> Uncomment line 22 to observe the error and then comment it back again.
141+
> Uncomment line 22 to observe the error.
152142
153143
#### Exercise
154144

@@ -165,7 +155,7 @@ If you get stuck, here are some **hints**:
165155
- If a method is allowed from multiple source states, use the `||` operator to combine them
166156
- Don't forget the `(this)` after each state name, since states are always associated with an object instance
167157

168-
With the correct implementation, LiquidJava will report an error in line 30, since we are trying to resume playback when the player is stopped. Fix the error before proceeding.
158+
With the correct implementation, LiquidJava will report an error in line 30, since we are trying to resume playback when the player is stopped.
169159

170160
### 3. External Refinements
171161

@@ -191,7 +181,7 @@ We want to ensure that the `lock` method can only be called in the `unlocked` st
191181

192182
![ReentrantLock DFA](./docs/images/reentrant_lock_dfa.png)
193183

194-
With the correct implementation, LiquidJava will report an error in line 10 of [ReentrantLockExample.java](./src/main/java/com/tutorial/part3/exercise/ReentrantLockExample.java), since we are trying to unlock a lock that is not locked. Remember to fix the error before moving on.
184+
With the correct implementation, LiquidJava will report an error in line 10 of [ReentrantLockExample.java](./src/main/java/com/tutorial/part3/exercise/ReentrantLockExample.java), since we are trying to unlock a lock that is not locked.
195185

196186
### 4. Ghost Variables
197187

0 commit comments

Comments
 (0)