use of com.dat3m.dartagnan.utils.printer.Printer 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.utils.printer.Printer 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.utils.printer.Printer 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());
}
use of com.dat3m.dartagnan.utils.printer.Printer in project Dat3M by hernanponcedeleon.
the class PrinterTest method PrintBpl2.
@Test()
public void PrintBpl2() throws Exception {
Program p = new ProgramParser().parse(new File(ResourceHelper.TEST_RESOURCE_PATH + "locks/linuxrwlock-3.bpl"));
assertNotNull(new Printer().print(p));
LoopUnrolling.newInstance().run(p);
Compilation.newInstance().run(p);
assertNotNull(new Printer().print(p));
}
use of com.dat3m.dartagnan.utils.printer.Printer in project Dat3M by hernanponcedeleon.
the class LoopUnrolling method run.
@Override
public void run(Program program) {
if (program.isUnrolled()) {
logger.warn("Skipped unrolling: Program is already unrolled.");
return;
}
int nextId = 0;
for (Thread thread : program.getThreads()) {
nextId = unrollThreadAndUpdate(thread, bound, nextId);
}
program.clearCache(false);
program.markAsUnrolled(bound);
logger.info("Program unrolled {} times", bound);
if (print) {
System.out.println("===== Program after unrolling =====");
System.out.println(new Printer().print(program));
System.out.println("===================================");
}
}
Aggregations