use of com.dat3m.ui.utils.UiOptions in project Dat3M by hernanponcedeleon.
the class Dat3M method runTest.
private void runTest() {
UiOptions options = optionsPane.getOptions();
testResult = null;
try {
Editor programEditor = editorsPane.getEditor(EditorCode.PROGRAM);
Program program = new ProgramParser().parse(programEditor.getEditorPane().getText(), programEditor.getLoadedFormat());
try {
Wmm targetModel = new ParserCat().parse(editorsPane.getEditor(EditorCode.TARGET_MM).getEditorPane().getText());
testResult = new ReachabilityResult(program, targetModel, options);
} catch (Exception e) {
String msg = e.getMessage() == null ? "Memory model cannot be parsed" : e.getMessage();
showError(msg, "Target memory model error");
}
} catch (Exception e) {
String msg = e.getMessage() == null ? "Program cannot be parsed" : e.getMessage();
Throwable cause = e.getCause();
if (cause instanceof InputMismatchException) {
Token token = ((InputMismatchException) cause).getOffendingToken();
msg = "Problem with \"" + token.getText() + "\" at line " + token.getLine();
}
showError(msg, "Program error");
}
}
use of com.dat3m.ui.utils.UiOptions in project Dat3M by hernanponcedeleon.
the class OptionsPane method getOptions.
public UiOptions getOptions() {
int bound = Integer.parseInt(boundField.getText());
int timeout = Integer.parseInt(timeoutField.getText());
Arch target = (Arch) targetPane.getSelectedItem();
Method method = (Method) methodPane.getSelectedItem();
Solvers solver = (Solvers) solverPane.getSelectedItem();
return new UiOptions(target, method, bound, solver, timeout);
}
Aggregations