use of com.dat3m.dartagnan.parsers.program.ProgramParser in project Dat3M by hernanponcedeleon.
the class BranchTest method test.
@Test
public void test() {
try (SolverContext ctx = TestHelper.createContext();
ProverEnvironment prover1 = ctx.newProverEnvironment(ProverOptions.GENERATE_MODELS);
ProverEnvironment prover2 = ctx.newProverEnvironment(ProverOptions.GENERATE_MODELS)) {
Program program = new ProgramParser().parse(new File(path));
VerificationTask task = VerificationTask.builder().withSolverTimeout(60).withTarget(Arch.LKMM).build(program, wmm, EnumSet.of(Property.getDefault()));
assertEquals(expected, TwoSolvers.run(ctx, prover1, prover2, task));
} catch (Exception e) {
fail("Missing resource file");
}
}
use of com.dat3m.dartagnan.parsers.program.ProgramParser in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintLinux3.
@Test()
public void PrintLinux3() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/C/manual/atomic/C-atomic-01.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
use of com.dat3m.dartagnan.parsers.program.ProgramParser in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintLinux.
@Test()
public void PrintLinux() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "litmus/C-rcu-link-after.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
use of com.dat3m.dartagnan.parsers.program.ProgramParser in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintBpl1.
// Test to call toString() of most events
@Test()
public void PrintBpl1() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "boogie/concurrency/fib_bench-1-O0.bpl"));
assertNotNull(new Printer().print(p));
LoopUnrolling.newInstance().run(p);
Compilation.newInstance().run(p);
assertNotNull(new Printer().print(p));
}
use of com.dat3m.dartagnan.parsers.program.ProgramParser in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintAARCH64.
@Test()
public void PrintAARCH64() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "litmus/MP+popl+poap.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
Aggregations