Skip to content

Commit 8b20cdd

Browse files
committed
Update Quiz
1 parent 5513cc2 commit 8b20cdd

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

docs/index.html

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ <h1>LiquidJava Quiz</h1>
6262
</ul>
6363
</li>
6464
<li>
65-
<p>Liquid types can prevent bugs such as (select multiple):</p>
65+
<p>Liquid types can prevent bugs which of the following? <strong>(Select all that apply)</strong> </p>
6666
<ul class="checklist">
67-
<li><label><input type="checkbox" data-question="0" data-content="1" /> Array index out of bounds</label></li>
67+
<li><label><input type="checkbox" data-question="0" data-content="1" /> Array index out-of-bounds</label></li>
6868
<li><label><input type="checkbox" data-question="0" data-content="1" /> Null pointer exceptions</label></li>
6969
<li><label><input type="checkbox" data-question="1" data-content="0" /> Memory leaks</label></li>
7070
<li><label><input type="checkbox" data-question="0" data-content="1" /> Division by zero</label></li>
@@ -79,11 +79,14 @@ <h1>LiquidJava Quiz</h1>
7979
<li><label><input type="radio" data-question="0" data-content="1" /> All positive values</label></li>
8080
</ul>
8181
</li>
82+
8283
<li>
83-
<p>In LiquidJava, it's possible to refine method parameters and return values.</p>
84-
<ul class="radio-list">
85-
<li><label><input type="radio" data-question="0" data-content="1" /> True</label></li>
86-
<li><label><input type="radio" data-question="1" data-content="0" /> False</label></li>
84+
<p>In LiquidJava, which of the following can be refined? <strong>(Select all that apply)</strong></p>
85+
<ul class="checklist">
86+
<li><label><input type="checkbox" data-question="0" data-content="1" /> Variables</label></li>
87+
<li><label><input type="checkbox" data-question="0" data-content="1" /> Parameters</label></li>
88+
<li><label><input type="checkbox" data-question="0" data-content="1" /> Return values</label></li>
89+
<li><label><input type="checkbox" data-question="1" data-content="0" /> Imports</label></li>
8790
</ul>
8891
</li>
8992
<li>
@@ -107,10 +110,10 @@ <h1>LiquidJava Quiz</h1>
107110
<li>
108111
<p>In LiquidJava, what does the following state refinement mean? <code>@StateRefinement(from="!closed(this)", to="closed(this)")</code></p>
109112
<ul class="radio-list">
110-
<li><label><input type="radio" data-question="1" data-content="0" /> The method can only be called when the object is closed and will leave it closed.</label></li>
111-
<li><label><input type="radio" data-question="1" data-content="0" /> The method can only be called when the object is open and will leave it open.</label></li>
112-
<li><label><input type="radio" data-question="0" data-content="1" /> The method can only be called when the object is not closed and will leave it closed.</label></li>
113-
<li><label><input type="radio" data-question="1" data-content="0" /> The method can be called in any state and will leave it closed.</label></li>
113+
<li><label><input type="radio" data-question="1" data-content="0" /> The method can only be called when the object is closed and will leave it closed</label></li>
114+
<li><label><input type="radio" data-question="1" data-content="0" /> The method can only be called when the object is open and will leave it open</label></li>
115+
<li><label><input type="radio" data-question="0" data-content="1" /> The method can only be called when the object is not closed and will leave it closed</label></li>
116+
<li><label><input type="radio" data-question="1" data-content="0" /> The method can be called in any state and will leave it closed</label></li>
114117
</ul>
115118
</li>
116119
<li>
@@ -125,18 +128,18 @@ <h1>LiquidJava Quiz</h1>
125128
<li>
126129
<p>In LiquidJava, a ghost variable is used to:</p>
127130
<ul class="radio-list">
128-
<li><label><input type="radio" data-question="1" data-content="0" /> Store temporary data during method execution</label></li>
129-
<li><label><input type="radio" data-question="0" data-content="1" /> Represent abstract properties of objects to be used in refinements</label></li>
131+
<li><label><input type="radio" data-question="1" data-content="0" /> Store temporary data during the program execution</label></li>
132+
<li><label><input type="radio" data-question="0" data-content="1" /> Model abstract properties of objects for verification purposes</label></li>
130133
<li><label><input type="radio" data-question="1" data-content="0" /> To track memory usage</label></li>
131134
<li><label><input type="radio" data-question="1" data-content="0" /> To replace regular variables for better performance</label></li>
132135
</ul>
133136
</li>
134137
<li>
135138
<p>In LiquidJava, which of the following refinements updates the ghost variable <code>size</code>?</p>
136139
<ul class="radio-list">
137-
<li><label><input type="radio" data-question="1" data-content="0" /> <code>@Refinement("size = 0")</code></label></li>
140+
<li><label><input type="radio" data-question="1" data-content="0" /> <code>@Refinement("size(this) = 0")</code></label></li>
138141
<li><label><input type="radio" data-question="1" data-content="0" /> <code>@StateRefinement(to="size(this) == size(old(this))")</code></label></li>
139-
<li><label><input type="radio" data-question="1" data-content="0" /> <code>@Refinement("size++")</code></label></li>
142+
<li><label><input type="radio" data-question="1" data-content="0" /> <code>@Refinement("size(this)++")</code></label></li>
140143
<li><label><input type="radio" data-question="0" data-content="1" /> <code>@StateRefinement(to="size(this) == size(old(this)) + 1")</code></label></li>
141144
</ul>
142145
</li>

0 commit comments

Comments
 (0)