| [ Web Proxy ] |
| Viewing: https://liquid-java.github.io/liquidjava-tutorial/ | [Back] [Original] |
Test your knowledge about LiquidJava concepts including refinements, object state modeling and ghost variables!
[LiquidJava Banner]
Liquid types allow developers to catch bugs at:
Liquid types can prevent which of the following bugs? (Select all that apply)
In LiquidJava, what integer values for x are allowed with this refinement? @Refinement("x > 0")
In LiquidJava, which of the following can be refined? (Select all that apply)
In LiquidJava, which of the following is not a valid refinement?
@Refinement("x == 1 || x == -1")@Refinement("x > 0")@Refinement("x % 2 == 0")@Refinement("x + 1")In LiquidJava, to specify that a method should only be called when the object is in a certain state, we should use a:
@StateRefinement@Refinement@RefinementAlias@RefinementPredicateIn LiquidJava, what does the following state refinement mean? @StateRefinement(from="!closed(this)", to="closed(this)")
In LiquidJava, the @ExternalRefinementsFor annotation is used to:
In LiquidJava, a ghost variable is used to:
In LiquidJava, which of the following refinements updates the ghost variable size?
@Refinement("size = 0")@StateRefinement(from="size(this) > 0")@Refinement("size == 0")@StateRefinement(to="size(this) == size(old(this)) + 1")| Web Proxy Viewer | New URL | Original Page |