use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class ExceptionsTest method unrollBeforeDCEException.
@Test(expected = IllegalArgumentException.class)
public void unrollBeforeDCEException() throws Exception {
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
pb.initThread(0);
Program p = pb.build();
LoopUnrolling.newInstance().run(p);
// DCE cannot be called after unrolling
DeadCodeElimination.newInstance().run(p);
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class WrongTargetTest method X86CompiledToPower.
@Test(expected = IllegalArgumentException.class)
public void X86CompiledToPower() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/X86/2+2W+mfence-rmws.litmus"));
LoopUnrolling.newInstance().run(p);
Compilation comp = Compilation.newInstance();
comp.setTarget(Arch.POWER);
comp.run(p);
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintX86.
@Test()
public void PrintX86() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "litmus/MP+mfence-rmw+rmw-mfence.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintPPC.
@Test()
public void PrintPPC() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "litmus/MP+lwsync+data-wsi-rfi-ctrlisync.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintLinux2.
@Test()
public void PrintLinux2() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/C/dart/C-atomic-fetch-simple-01.litmus"));
assertNotNull(new Printer().print(p));
assertNotNull(p.getAss().toString());
}
Aggregations