From d652155ae013f36a1ee17653a8e458baad2d9c2c Mon Sep 17 00:00:00 2001 From: Checkmate50 Date: Mon, 6 Jun 2016 23:14:18 -0600 Subject: Merging complete. Everything looks good *crosses fingers* --- Source/Doomed/DoomErrorHandler.cs | 170 +++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 85 deletions(-) (limited to 'Source/Doomed/DoomErrorHandler.cs') diff --git a/Source/Doomed/DoomErrorHandler.cs b/Source/Doomed/DoomErrorHandler.cs index 8d89bae3..ce14ff73 100644 --- a/Source/Doomed/DoomErrorHandler.cs +++ b/Source/Doomed/DoomErrorHandler.cs @@ -1,86 +1,86 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.IO; -using Microsoft.Boogie; -using Microsoft.Boogie.GraphUtil; -using System.Diagnostics.Contracts; -using Microsoft.Basetypes; -using Microsoft.Boogie.VCExprAST; - -namespace VC -{ - internal class DoomErrorHandler : ProverInterface.ErrorHandler - { - - protected Dictionary label2Absy; - protected VerifierCallback callback; - private List m_CurrentTrace = new List(); - - [ContractInvariantMethod] - void ObjectInvariant() - { - Contract.Invariant(label2Absy != null); - Contract.Invariant(callback != null); - Contract.Invariant(cce.NonNullElements(m_CurrentTrace)); - } - - - public DoomErrorHandler(Dictionary label2Absy, VerifierCallback callback) - { - Contract.Requires(label2Absy != null); - Contract.Requires(callback != null); - this.label2Absy = label2Absy; - this.callback = callback; - } - - public override Absy Label2Absy(string label) - { - //Contract.Requires(label != null); - Contract.Ensures(Contract.Result() != null); - - int id = int.Parse(label); - return cce.NonNull((Absy)label2Absy[id]); - } - - public override void OnProverWarning(string msg) - { - //Contract.Requires(msg != null); - this.callback.OnWarning(msg); - } - - - public List/*!>!*/ TraceNodes - { - get - { - Contract.Ensures(cce.NonNullElements(Contract.Result>())); - - return m_CurrentTrace; - } - } - - public override void OnModel(IList/*!>!*/ labels, Model model, ProverInterface.Outcome proverOutcome) - { - // TODO: it would be better to check which reachability variables are actually set to one! - List traceNodes = new List(); - List assertNodes = new List(); - foreach (string s in labels) - { - Contract.Assert(s != null); - Absy node = Label2Absy(s); - if (node is Block) - { - Block b = (Block)node; - traceNodes.Add(b); - //Console.Write("{0}, ", b.Label); - } - } - m_CurrentTrace.AddRange(traceNodes); - } - - } - +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.IO; +using Microsoft.Boogie; +using Microsoft.Boogie.GraphUtil; +using System.Diagnostics.Contracts; +using Microsoft.Basetypes; +using Microsoft.Boogie.VCExprAST; + +namespace VC +{ + internal class DoomErrorHandler : ProverInterface.ErrorHandler + { + + protected Dictionary label2Absy; + protected VerifierCallback callback; + private List m_CurrentTrace = new List(); + + [ContractInvariantMethod] + void ObjectInvariant() + { + Contract.Invariant(label2Absy != null); + Contract.Invariant(callback != null); + Contract.Invariant(cce.NonNullElements(m_CurrentTrace)); + } + + + public DoomErrorHandler(Dictionary label2Absy, VerifierCallback callback) + { + Contract.Requires(label2Absy != null); + Contract.Requires(callback != null); + this.label2Absy = label2Absy; + this.callback = callback; + } + + public override Absy Label2Absy(string label) + { + //Contract.Requires(label != null); + Contract.Ensures(Contract.Result() != null); + + int id = int.Parse(label); + return cce.NonNull((Absy)label2Absy[id]); + } + + public override void OnProverWarning(string msg) + { + //Contract.Requires(msg != null); + this.callback.OnWarning(msg); + } + + + public List/*!>!*/ TraceNodes + { + get + { + Contract.Ensures(cce.NonNullElements(Contract.Result>())); + + return m_CurrentTrace; + } + } + + public override void OnModel(IList/*!>!*/ labels, Model model, ProverInterface.Outcome proverOutcome) + { + // TODO: it would be better to check which reachability variables are actually set to one! + List traceNodes = new List(); + List assertNodes = new List(); + foreach (string s in labels) + { + Contract.Assert(s != null); + Absy node = Label2Absy(s); + if (node is Block) + { + Block b = (Block)node; + traceNodes.Add(b); + //Console.Write("{0}, ", b.Label); + } + } + m_CurrentTrace.AddRange(traceNodes); + } + + } + } \ No newline at end of file -- cgit v1.2.3