use of jkind.SolverOption in project AGREE by loonwerks.
the class PreferencesUtil method getSolverOption.
public static SolverOption getSolverOption() {
IPreferenceStore prefs = getPreferenceStore();
String solverString = prefs.getString(PreferenceConstants.PREF_SOLVER).toUpperCase().replaceAll(" ", "");
SolverOption solver = SolverOption.valueOf(solverString);
return solver;
}
use of jkind.SolverOption in project AMASE by loonwerks.
the class PreferencesUtil method getJKindApi.
private static JKindApi getJKindApi() {
IPreferenceStore prefs = getPreferenceStore();
JKindApi api = new JKindApi();
api.setJKindJar(getJKindJar());
try {
api.setEnvironment("Z3_HOME", Z3Plugin.getZ3Directory());
} catch (NoClassDefFoundError e) {
e.printStackTrace();
// Z3Plugin not present
} catch (Exception e) {
// Some unknown exception finding Z3
e.printStackTrace();
}
String solverString = prefs.getString(PreferenceConstants.PREF_SOLVER).toUpperCase().replaceAll(" ", "");
SolverOption solver = SolverOption.valueOf(solverString);
api.setSolver(solver);
if (prefs.getBoolean(PreferenceConstants.PREF_INDUCT_CEX)) {
api.setInductiveCounterexamples();
}
if (prefs.getBoolean(PreferenceConstants.PREF_SMOOTH_CEX) && solver == SolverOption.YICES) {
api.setSmoothCounterexamples();
}
if (prefs.getBoolean(PreferenceConstants.PREF_SUPPORT)) {
api.setIvcReduction();
}
api.setN(prefs.getInt(PreferenceConstants.PREF_DEPTH));
api.setTimeout(prefs.getInt(PreferenceConstants.PREF_TIMEOUT));
api.setPdrMax(prefs.getInt(PreferenceConstants.PREF_PDR_MAX));
// api.setPdrInvariants();
if (prefs.getBoolean(PreferenceConstants.PREF_NO_KINDUCTION)) {
api.disableKInduction();
}
return api;
}
use of jkind.SolverOption in project AMASE by loonwerks.
the class PreferencesUtil method getSolverOption.
public static SolverOption getSolverOption() {
IPreferenceStore prefs = getPreferenceStore();
String solverString = prefs.getString(PreferenceConstants.PREF_SOLVER).toUpperCase().replaceAll(" ", "");
SolverOption solver = SolverOption.valueOf(solverString);
return solver;
}
use of jkind.SolverOption in project AGREE by loonwerks.
the class PreferencesUtil method getJKindApi.
private static JKindApi getJKindApi() {
IPreferenceStore prefs = getPreferenceStore();
JKindApi api = new JKindApi();
api.setJKindJar(getJKindJar());
try {
api.setEnvironment("Z3_HOME", Z3Plugin.getZ3Directory());
} catch (NoClassDefFoundError e) {
e.printStackTrace();
// Z3Plugin not present
} catch (Exception e) {
// Some unknown exception finding Z3
e.printStackTrace();
}
String solverString = prefs.getString(PreferenceConstants.PREF_SOLVER).toUpperCase().replaceAll(" ", "");
SolverOption solver = SolverOption.valueOf(solverString);
api.setSolver(solver);
if (prefs.getBoolean(PreferenceConstants.PREF_INDUCT_CEX)) {
api.setInductiveCounterexamples();
}
if (prefs.getBoolean(PreferenceConstants.PREF_SMOOTH_CEX) && solver == SolverOption.YICES) {
api.setSmoothCounterexamples();
}
if (prefs.getBoolean(PreferenceConstants.PREF_SUPPORT)) {
api.setIvcReduction();
}
api.setN(prefs.getInt(PreferenceConstants.PREF_DEPTH));
api.setTimeout(prefs.getInt(PreferenceConstants.PREF_TIMEOUT));
api.setPdrMax(prefs.getInt(PreferenceConstants.PREF_PDR_MAX));
// api.setPdrInvariants();
if (prefs.getBoolean(PreferenceConstants.PREF_NO_KINDUCTION)) {
api.disableKInduction();
}
return api;
}
Aggregations