Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 4
0
        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();
        }
Exemplo n.º 5
0
Arquivo: Util.cs Projeto: ggrov/tacny
 public CompoundErrorInformation(Bpl.IToken tok, string msg, Bpl.ErrorInformation e, ProofState s) : base(tok, msg)
 {
     E = e;
     S = s;
 }
Exemplo n.º 6
0
Arquivo: Util.cs Projeto: ggrov/tacny
 public CompoundErrorInformation(Bpl.IToken tok, string msg, Bpl.ErrorInformation e, Program p) : base(tok, msg)
 {
     E = e;
     P = p;
 }
Exemplo n.º 7
0
 public new void WriteErrorInformation(Bpl.ErrorInformation errorInfo, TextWriter tw, bool skipExecutionTrace = true)
 {
 }
Exemplo n.º 8
0
 public void WriteErrorInformation(ErrorInformation errorInfo, TextWriter tw, bool skipExecutionTrace = true)
 {
 }