public PipelineOutcome VerifyProgram(Dafny.Program program, IList<string> fileNames, string programId, out PipelineStatistics stats, out List<ErrorInformation> errorList, out ErrorInformation errorInfo) { Microsoft.Boogie.Program boogieProgram; Translate(program, Thread.CurrentThread.Name, out boogieProgram); var po = BoogiePipeline(boogieProgram, fileNames, programId, out stats, out errorList); errorInfo = errorList.FirstOrDefault(); return po; }
private static void WriteErrorInformationToXmlSink(ErrorInformation errorInfo, List<Block> trace) { var msg = "assertion violation"; switch (errorInfo.Kind) { case ErrorKind.Precondition: msg = "precondition violation"; break; case ErrorKind.Postcondition: msg = "postcondition violation"; break; case ErrorKind.InvariantEntry: msg = "loop invariant entry violation"; break; case ErrorKind.InvariantMaintainance: msg = "loop invariant maintenance violation"; break; } var relatedError = errorInfo.Aux.FirstOrDefault(); CommandLineOptions.Clo.XmlSink.WriteError(msg, errorInfo.Tok, relatedError.Tok, trace); }
internal static ErrorInformation CreateErrorInformation(IToken tok, string msg, string requestId = null, string originalRequestId = null, string category = null) { var result = new ErrorInformation(tok, msg); result.RequestId = requestId; result.OriginalRequestId = originalRequestId; result.Category = category; return result; }
public void WriteErrorInformation(ErrorInformation errorInfo, TextWriter tw, bool skipExecutionTrace = true) { Contract.Requires(errorInfo != null); ReportBplError(errorInfo.Tok, errorInfo.FullMsg, true, tw); foreach (var e in errorInfo.Aux) { if (!(skipExecutionTrace && e.Category.Contains("Execution trace"))) { ReportBplError(e.Tok, e.FullMsg, false, tw); } } tw.Write(errorInfo.Out.ToString()); tw.Write(errorInfo.Model.ToString()); tw.Flush(); }
public CompoundErrorInformation(Bpl.IToken tok, string msg, Bpl.ErrorInformation e, ProofState s) : base(tok, msg) { E = e; S = s; }
public CompoundErrorInformation(Bpl.IToken tok, string msg, Bpl.ErrorInformation e, Program p) : base(tok, msg) { E = e; P = p; }
public new void WriteErrorInformation(Bpl.ErrorInformation errorInfo, TextWriter tw, bool skipExecutionTrace = true) { }
public void WriteErrorInformation(ErrorInformation errorInfo, TextWriter tw, bool skipExecutionTrace = true) { }