*/
protected void addBuildRules(StdProject project) {
if(whileyDir != null) {
// whileydir can be null if a subclass of this task doesn't
// necessarily require it.
Pipeline wyilPipeline = initialisePipeline();
if(pipelineModifiers != null) {
wyilPipeline.apply(pipelineModifiers);
}
// ========================================================
// Whiley => Wyil Compilation Rule
// ========================================================
WhileyBuilder wyilBuilder = new WhileyBuilder(project,wyilPipeline);
if(verbose) {
wyilBuilder.setLogger(new Logger.Default(System.err));
}
project.add(new StdBuildRule(wyilBuilder, whileyDir,
whileyIncludes, whileyExcludes, wyilDir));
// ========================================================
// Wyil => Wycs Compilation Rule
// ========================================================
if(verification || smtVerification) {
// First, handle the conversion of wyil to wyal
Wyil2WyalBuilder wyalBuilder = new Wyil2WyalBuilder(project);
if(verbose) {
wyalBuilder.setLogger(new Logger.Default(System.err));
}
project.add(new StdBuildRule(wyalBuilder, wyilDir,
wyilIncludes, wyilExcludes, wyalDir));
// Second, handle the conversion of wyal to wycs
Pipeline<WycsFile> wycsPipeline = new Pipeline(WycsBuildTask.defaultPipeline);
wycsPipeline.setOption(VerificationCheck.class,"enable",verification);
wycsPipeline.setOption(SmtVerificationCheck.class,"enable",smtVerification);
Wyal2WycsBuilder wycsBuilder = new Wyal2WycsBuilder(project,wycsPipeline);
if(verbose) {
wycsBuilder.setLogger(new Logger.Default(System.err));
}