コード例 #1
0
 public ExpressionManagerWithEncoder(TimeOutChecker timeout, IExpressionDecoder <Variable, Expression> decoder, IExpressionEncoder <Variable, Expression> encoder, Logger log = null)
     : base(timeout, decoder, encoder)
 {
     Contract.Requires(timeout != null);
     Contract.Requires(decoder != null);
     Contract.Requires(encoder != null);
 }
コード例 #2
0
 public SearchWitnesses
 (
     IFactQuery <BoxedExpression, Variable> facts,
     IMethodDriver <Local, Parameter, Method, Field, Property, Event, Type, Attribute, Assembly, Expression, Variable, LogOptions> mdriver,
     TimeOutChecker timeout)
     : base(mdriver.CFG.NormalExit, facts, mdriver, timeout)
 {
     this.Found  = false;
     this.Result = Witness.None;
 }
コード例 #3
0
        public bool TryGetAWitness(APC pc, TimeOutChecker timeout, out bool mayReturnNull /* TODO make this more expressive*/)
        {
            mayReturnNull = false;
            if (timeout.HasAlreadyTimeOut)
            {
                return(false);
            }

            var searchForAWitness = new SearchWitnesses(this.facts, this.mdriver, timeout);

            return(searchForAWitness.TryCollectWitnesses(out mayReturnNull));
        }
コード例 #4
0
        public ExpressionManager(TimeOutChecker timeout, IExpressionDecoder <Variable, Expression> decoder, IExpressionEncoder <Variable, Expression> encoder = null, Logger log = null)
        {
            Contract.Requires(decoder != null);

            Contract.Ensures(this.decoder == decoder);
            Contract.Ensures(this.encoder == encoder);
            Contract.Ensures(this.TimeOut != null);

            this.TimeOut = timeout ?? DFARoot.TimeOut;

            Contract.Assume(this.TimeOut != null, "weakeness with ?? ?");

            this.decoder = decoder;
            this.encoder = encoder;
            this.Log     = log == null ? VoidLogger.Log : log;
        }
コード例 #5
0
ファイル: Postconditions.cs プロジェクト: nbulp/CodeContracts
 public bool MayReturnNull(IFact facts, TimeOutChecker timeout)
 {
   return RecordProfilingInformation(this.inner.MayReturnNull(facts, timeout));
 }
コード例 #6
0
ファイル: Postconditions.cs プロジェクト: nbulp/CodeContracts
 public bool MayReturnNull(IFact facts, TimeOutChecker timeout)
 {
   Contract.Requires(facts != null);
   throw new NotImplementedException();
 }