use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class AliasAnalysisTest method analyze.
private AliasAnalysis analyze(ProgramBuilder builder, Alias method) throws InvalidConfigurationException {
Program program = builder.build();
LoopUnrolling.newInstance().run(program);
Compilation.newInstance().run(program);
return AliasAnalysis.fromConfig(program, Configuration.builder().setOption(ALIAS_METHOD, method.asStringOption()).build());
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class ParserBoogie method parse.
@Override
public Program parse(CharStream charStream) {
BoogieLexer lexer = new BoogieLexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
BoogieParser parser = new BoogieParser(tokenStream);
parser.addErrorListener(new ParserErrorListener());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.BOOGIE);
ParserRuleContext parserEntryPoint = parser.main();
VisitorBoogie visitor = new VisitorBoogie(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
return program;
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class ParserLitmusC method parse.
@Override
public Program parse(CharStream charStream) {
LitmusCLexer lexer = new LitmusCLexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
LitmusCParser parser = new LitmusCParser(tokenStream);
parser.setErrorHandler(new BailErrorStrategy());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
ParserRuleContext parserEntryPoint = parser.main();
VisitorLitmusC visitor = new VisitorLitmusC(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
program.setArch(Arch.LKMM);
return program;
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class ParserLitmusLISA method parse.
@Override
public Program parse(CharStream charStream) {
LitmusLISALexer lexer = new LitmusLISALexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
LitmusLISAParser parser = new LitmusLISAParser(tokenStream);
parser.addErrorListener(new DiagnosticErrorListener(true));
parser.addErrorListener(new ParserErrorListener());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
ParserRuleContext parserEntryPoint = parser.main();
VisitorLitmusLISA visitor = new VisitorLitmusLISA(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
return program;
}
use of com.dat3m.dartagnan.program.Program in project Dat3M by hernanponcedeleon.
the class ParserLitmusPPC method parse.
@Override
public Program parse(CharStream charStream) {
LitmusPPCLexer lexer = new LitmusPPCLexer(charStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
LitmusPPCParser parser = new LitmusPPCParser(tokenStream);
parser.addErrorListener(new DiagnosticErrorListener(true));
parser.addErrorListener(new ParserErrorListener());
ProgramBuilder pb = new ProgramBuilder(SourceLanguage.LITMUS);
ParserRuleContext parserEntryPoint = parser.main();
VisitorLitmusPPC visitor = new VisitorLitmusPPC(pb);
Program program = (Program) parserEntryPoint.accept(visitor);
program.setArch(Arch.POWER);
return program;
}
Aggregations