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
This is the Java Bytecode Symbolic Executor's Run Tool (Assembles a jar archive containing the classes of the 'main' feature. v.0.11.0-SNAPSHOT).Connecting to Z3 at /path/z3.Starting symbolic execution of method Testee:()V:assertNullOrEmpty at Wed Mar 27 15:13:53 CST 2024..1[22] 0,24 LEAF .1[22] path violates an assertion.Symbolic execution finished at Wed Mar 27 15:14:03 CST 2024.Analyzed states: 5497781, Analyzed pre-initial states: 5497759, Analyzed paths: 1, Safe: 0, Unsafe: 1, Out of scope: 0, Violating assumptions: 0, Unmanageable: 0.Elapsed time: 10 sec 267 msec, Elapsed pre-initial phase time: 10 sec 262 msec, Average speed: 535480 states/sec, Average post-initial phase speed: 4400 states/sec, Elapsed time in decision procedure: 173 msec (1.69% of total).
The JBSE results show that there is an Unsafe path, which means that the return of availableLocaleList method can be non-empty.
However, After modifying the class into the following one with an inner class:
publicclassTesteeWithInnerClass {
staticclassSyncAvoid {
/** * Unmodifiable list of available locales. */privatestaticfinalList<Locale> AVAILABLE_LOCALE_LIST;
/** * Unmodifiable set of available locales. */static {
// extra safefinalList<Locale> list = newArrayList<Locale>(Arrays.asList(Locale.getAvailableLocales()));
AVAILABLE_LOCALE_LIST = Collections.unmodifiableList(list);
}
}
publicstaticList<Locale> availableLocaleList() {
returnSyncAvoid.AVAILABLE_LOCALE_LIST;
}
staticpublicvoidassertNullOrEmpty() {
List<Locale> ret = availableLocaleList();
ass3rt(ret == null || ret.isEmpty());
}
}
This is the Java Bytecode Symbolic Executor's Run Tool (Assembles a jar archive containing the classes of the 'main' feature. v.0.11.0-SNAPSHOT).Connecting to Z3 at /path/z3.Starting symbolic execution of method TesteeWithInnerClass:()V:assertNullOrEmpty at Wed Mar 27 15:24:17 CST 2024..1[3] [TesteeWithInnerClass$SyncAvoid].TesteeWithInnerClass$SyncAvoid:AVAILABLE_LOCALE_LIST not expanded, because no concrete, compatible, pre-initialized class was found..1[15] 1,13 LEAF .1[15] path is safe.Symbolic execution finished at Wed Mar 27 15:24:20 CST 2024.Analyzed states: 717531, Analyzed pre-initial states: 717516, Analyzed paths: 1, Safe: 1, Unsafe: 0, Out of scope: 0, Violating assumptions: 0, Unmanageable: 0.Elapsed time: 2 sec 419 msec, Elapsed pre-initial phase time: 2 sec 403 msec, Average speed: 296622 states/sec, Average post-initial phase speed: 937 states/sec, Elapsed time in decision procedure: 23 msec (0.95% of total).
It cannot find the Unsafe path.
Meanwhile, when I uncomment p.setMakePreInitClassesSymbolic(true);, the results are not changed.
The text was updated successfully, but these errors were encountered:
The first class with expected results is as follows:
When I run the following main method:
JBSE gives me the correct results:
The JBSE results show that there is an Unsafe path, which means that the return of
availableLocaleList
method can be non-empty.However, After modifying the class into the following one with an inner class:
When I run the following main method:
JBSE gives me the incorrect results:
It cannot find the Unsafe path.
Meanwhile, when I uncomment
p.setMakePreInitClassesSymbolic(true);
, the results are not changed.The text was updated successfully, but these errors were encountered: