public Disposition complete(ProcessInvokeAsyncWorker worker) { if (worker.pinv.disposition is Fresh) { BeatExtensions.propagatePrivateImports(contextVerb, beatobj, outputFile()); //- And then propagate the NuBuild annotations, too. AnnotationScanner.transferAnnotations( beatobj, outputFile(), BoogieAsmDepBase.CommentSymbol); } return(worker.pinv.disposition); }
public Disposition Complete(WorkingDirectory workingDirectory, double cpuTimeSeconds, string stdout, string stderr, Disposition disposition) { if (disposition is Fresh) { BeatExtensions.propagatePrivateImports(workingDirectory, this.contextVerb, this.beatobj, this.outputFile()); // And then propagate the NuBuild annotations, too. AnnotationScanner.transferAnnotations( workingDirectory, this.beatobj, this.outputFile(), BoogieAsmDepBase.CommentSymbol); } return(disposition); }
IEnumerable <SourcePath> getTrustedBoogieAxioms() { OrderPreservingSet <SourcePath> result = new OrderPreservingSet <SourcePath>(); AnnotationScanner anns = new AnnotationScanner(basmInput); foreach (string[] annotation in anns.getAnnotations(AddBoogieAxiomAnnotation)) { string module = annotation[1]; SourcePath trustedPath = new SourcePath(Path.Combine( BuildEngine.theEngine.getSrcRoot(), BuildEngine.VerveTrustedSpecDir, module + BoogieVerb.BPL_EXTN)); result.Add(trustedPath); } return(result); }
public static bool needs_symdiff(BuildObject basm) { AnnotationScanner annotations = new AnnotationScanner(basm); bool symdiff = false; foreach (string[] ann in annotations.getAnnotations(BasmEnableSymdiffAnnotation)) { if (ann.Length != 2 || !ann[1].Equals("true")) { throw new SourceConfigurationError("Expected " + BasmEnableSymdiffAnnotation + " to have argument 'true'."); } symdiff = true; } return(symdiff); }
public static bool needs_symdiff(BuildObject basm) { AnnotationScanner annotations = new AnnotationScanner(basm); bool symdiff = false; foreach (string[] ann in annotations.getAnnotations(BasmEnableSymdiffAnnotation)) { if (ann.Length != 2 || !ann[1].Equals("true")) { throw new SourceConfigurationError("Expected " + BasmEnableSymdiffAnnotation + " to have argument 'true'."); } symdiff = true; } return symdiff; }
public Disposition Complete(WorkingDirectory workingDirectory, double cpuTimeSeconds, string stdout, string stderr, Disposition disposition) { if (disposition is Failed) { return(disposition); } HashSet <string> createdFiles = new HashSet <string>(Directory.GetFiles(workingDirectory.PathTo(this.getAbsDestPath())).Select(path => Path.GetFileName(path))); HashSet <string> expectedFiles = new HashSet <string>(this.getOutputs().Select(obj => obj.getFileName())); // DafnyCC/DafnySpec process a big batch of files together. Did we correctly understand what it did? if (!createdFiles.SetEquals(expectedFiles)) { // REVIEW: These are never used by anything. Remove? bool dummy = createdFiles.SetEquals(expectedFiles); int missing = expectedFiles.Except(createdFiles).Count(); int extra = createdFiles.Except(expectedFiles).Count(); string msg = "Missing files: " + string.Join(",", expectedFiles.Except(createdFiles)) + "\n" + " Extra files: " + string.Join(",", createdFiles.Except(expectedFiles)); return(new Failed(msg)); } // Propagate the NuBuild annotations. foreach (InOutMapping mapping in this.getInOutMappings()) { if (mapping.dfysource != null && this.transformFilterAccepts(mapping.dfysource)) { AnnotationScanner.transferAnnotations( workingDirectory, mapping.dfysource, mapping.basmIfc, BoogieAsmDepBase.CommentSymbol); AnnotationScanner.transferAnnotations( workingDirectory, mapping.dfysource, mapping.basmImp, BoogieAsmDepBase.CommentSymbol); } } return(new Fresh()); }
public Disposition complete(ProcessInvokeAsyncWorker worker) { if (worker.pinv.disposition is Failed) { return(worker.pinv.disposition); } HashSet <string> createdFiles = new HashSet <string>(Directory.GetFiles(getAbsDestPath()).Select(path => Path.GetFileName(path))); HashSet <string> expectedFiles = new HashSet <string>(getOutputs().Select(obj => obj.getFileName())); //- DafnyCC/DafnySpec process a big batch of files together. Verify that we correctly modeled what it did. if (!createdFiles.SetEquals(expectedFiles)) { bool dummy = createdFiles.SetEquals(expectedFiles); int missing = expectedFiles.Except(createdFiles).Count(); int extra = createdFiles.Except(expectedFiles).Count(); string msg = "Missing files: " + String.Join(",", expectedFiles.Except(createdFiles)) + "\n" + " Extra files: " + String.Join(",", createdFiles.Except(expectedFiles)); return(new Failed(msg)); } //- Propagate the NuBuild annotations. foreach (InOutMapping mapping in getInOutMappings()) { if (mapping.dfysource != null && transformFilterAccepts(mapping.dfysource)) { AnnotationScanner.transferAnnotations( mapping.dfysource, mapping.basmIfc, BoogieAsmDepBase.CommentSymbol); AnnotationScanner.transferAnnotations( mapping.dfysource, mapping.basmImp, BoogieAsmDepBase.CommentSymbol); } } return(new Fresh());; }
protected override void postprocess(WorkingDirectory workingDirectory) { AnnotationScanner.transferAnnotations(workingDirectory, basmInput, outputFile(), BoogieVerb.CommentSymbol); }
protected override void postprocess() { AnnotationScanner.transferAnnotations(basmInput, outputFile(), BoogieVerb.CommentSymbol); }
private IEnumerable<SourcePath> getTrustedBoogieAxioms() { OrderPreservingSet<SourcePath> result = new OrderPreservingSet<SourcePath>(); AnnotationScanner anns = new AnnotationScanner(basmInput); foreach (string[] annotation in anns.getAnnotations(AddBoogieAxiomAnnotation)) { string module = annotation[1]; SourcePath trustedPath = new SourcePath(Path.Combine( BuildEngine.theEngine.getSrcRoot(), BuildEngine.VerveTrustedSpecDir, module + BoogieVerb.BPL_EXTN)); result.Add(trustedPath); } return result; }