You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
False error: in main, an early return on the args array makes a later state-refined call report "Variable 'args' could not be found" #465
In a method named main, an early return guarded by the array parameter's length makes a later call with a @StateRefinement fail with Not Found Error: Variable 'xs' could not be found. The same body in a method with any other name verifies.
importjava.util.zip.ZipFile;
publicclassClient {
publicstaticvoidmain(String[] xs) throwsjava.io.IOException {
if (xs.length < 1) {
return;
}
ZipFilez = newZipFile("a.zip");
z.close(); // Not Found Error: Variable 'xs' could not be found
}
}
Expected: Correct! Passed Verification.
What changes the result (all with the spec above):
variant
result
as above
Variable 'xs' could not be found at z.close()
static void main(String[] xs) (not public)
same error
renamed to public static void f(String[] xs)
passes
no early return (if (...) System.out.println(...))
Activity