Search in sources :

Example 36 with Program

use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.

the class ExceptionsTest method unrollBeforeReorderException.

@Test(expected = IllegalArgumentException.class)
public void unrollBeforeReorderException() throws Exception {
    ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
    pb.initThread(0);
    Program p = pb.build();
    LoopUnrolling.newInstance().run(p);
    // Reordering cannot be called after unrolling
    BranchReordering.newInstance().run(p);
}
Also used : Program(com.dat3m.dartagnan.program.Program) ProgramBuilder(com.dat3m.dartagnan.parsers.program.utils.ProgramBuilder) Test(org.junit.Test)

Example 37 with Program

use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.

the class WrongTargetTest method ARMCompiledToNone.

@Test(expected = IllegalArgumentException.class)
public void ARMCompiledToNone() throws Exception {
    Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/AARCH64/ATOM/2+2W+poxxs.litmus"));
    LoopUnrolling.newInstance().run(p);
    Compilation comp = Compilation.newInstance();
    comp.setTarget(Arch.C11);
    comp.run(p);
}
Also used : Program(com.dat3m.dartagnan.program.Program) Compilation(com.dat3m.dartagnan.program.processing.compilation.Compilation) ProgramParser(com.dat3m.dartagnan.parsers.program.ProgramParser) File(java.io.File) Test(org.junit.Test)

Example 38 with Program

use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.

the class WrongTargetTest method X86CompiledToNone.

@Test(expected = IllegalArgumentException.class)
public void X86CompiledToNone() 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.C11);
    comp.run(p);
}
Also used : Program(com.dat3m.dartagnan.program.Program) Compilation(com.dat3m.dartagnan.program.processing.compilation.Compilation) ProgramParser(com.dat3m.dartagnan.parsers.program.ProgramParser) File(java.io.File) Test(org.junit.Test)

Example 39 with Program

use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.

the class WrongTargetTest method ARMCompiledToPower.

@Test(expected = IllegalArgumentException.class)
public void ARMCompiledToPower() throws Exception {
    Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/AARCH64/ATOM/2+2W+poxxs.litmus"));
    LoopUnrolling.newInstance().run(p);
    Compilation comp = Compilation.newInstance();
    comp.setTarget(Arch.POWER);
    comp.run(p);
}
Also used : Program(com.dat3m.dartagnan.program.Program) Compilation(com.dat3m.dartagnan.program.processing.compilation.Compilation) ProgramParser(com.dat3m.dartagnan.parsers.program.ProgramParser) File(java.io.File) Test(org.junit.Test)

Example 40 with Program

use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.

the class WrongTargetTest method ARMCompiledToTSO.

@Test(expected = IllegalArgumentException.class)
public void ARMCompiledToTSO() throws Exception {
    Program p = new ProgramParser().parse(new File(ResourceHelper.LITMUS_RESOURCE_PATH + "litmus/AARCH64/ATOM/2+2W+poxxs.litmus"));
    LoopUnrolling.newInstance().run(p);
    Compilation comp = Compilation.newInstance();
    comp.setTarget(Arch.TSO);
    comp.run(p);
}
Also used : Program(com.dat3m.dartagnan.program.Program) Compilation(com.dat3m.dartagnan.program.processing.compilation.Compilation) ProgramParser(com.dat3m.dartagnan.parsers.program.ProgramParser) File(java.io.File) Test(org.junit.Test)

Aggregations

Program (com.dat3m.dartagnan.program.Program)41 Test (org.junit.Test)22 File (java.io.File)21 ProgramParser (com.dat3m.dartagnan.parsers.program.ProgramParser)20 ProgramBuilder (com.dat3m.dartagnan.parsers.program.utils.ProgramBuilder)10 Printer (com.dat3m.dartagnan.utils.printer.Printer)8 VerificationTask (com.dat3m.dartagnan.verification.VerificationTask)6 Configuration (org.sosy_lab.common.configuration.Configuration)6 ParserErrorListener (com.dat3m.dartagnan.exception.ParserErrorListener)5 Compilation (com.dat3m.dartagnan.program.processing.compilation.Compilation)5 Collectors (java.util.stream.Collectors)5 SolverContext (org.sosy_lab.java_smt.api.SolverContext)5 ParserCat (com.dat3m.dartagnan.parsers.cat.ParserCat)4 Tag (com.dat3m.dartagnan.program.event.Tag)4 Event (com.dat3m.dartagnan.program.event.core.Event)4 Result (com.dat3m.dartagnan.utils.Result)4 Wmm (com.dat3m.dartagnan.wmm.Wmm)4 InvalidConfigurationException (org.sosy_lab.common.configuration.InvalidConfigurationException)4 ProverEnvironment (org.sosy_lab.java_smt.api.ProverEnvironment)4 FilterBasic (com.dat3m.dartagnan.program.filter.FilterBasic)3