Search in sources :

Example 16 with ProgramParser

use of com.dat3m.dartagnan.parsers.program.ProgramParser 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 17 with ProgramParser

use of com.dat3m.dartagnan.parsers.program.ProgramParser 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 18 with ProgramParser

use of com.dat3m.dartagnan.parsers.program.ProgramParser 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 19 with ProgramParser

use of com.dat3m.dartagnan.parsers.program.ProgramParser 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)

Example 20 with ProgramParser

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

the class WrongTargetTest method X86CompiledToARM8.

@Test(expected = IllegalArgumentException.class)
public void X86CompiledToARM8() 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.ARM8);
    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

ProgramParser (com.dat3m.dartagnan.parsers.program.ProgramParser)20 Program (com.dat3m.dartagnan.program.Program)20 File (java.io.File)19 Test (org.junit.Test)18 Printer (com.dat3m.dartagnan.utils.printer.Printer)8 Compilation (com.dat3m.dartagnan.program.processing.compilation.Compilation)6 VerificationTask (com.dat3m.dartagnan.verification.VerificationTask)4 ProverEnvironment (org.sosy_lab.java_smt.api.ProverEnvironment)4 SolverContext (org.sosy_lab.java_smt.api.SolverContext)4 ParserCat (com.dat3m.dartagnan.parsers.cat.ParserCat)3 Wmm (com.dat3m.dartagnan.wmm.Wmm)3 Result (com.dat3m.dartagnan.utils.Result)2 IOException (java.io.IOException)2 Configuration (org.sosy_lab.common.configuration.Configuration)2 OptionInfo.collectOptions (com.dat3m.dartagnan.configuration.OptionInfo.collectOptions)1 PHANTOM_REFERENCES (com.dat3m.dartagnan.configuration.OptionNames.PHANTOM_REFERENCES)1 Property (com.dat3m.dartagnan.configuration.Property)1 ParserWitness (com.dat3m.dartagnan.parsers.witness.ParserWitness)1 SourceLanguage (com.dat3m.dartagnan.program.Program.SourceLanguage)1 CreateGitInfo (com.dat3m.dartagnan.utils.GitInfo.CreateGitInfo)1