public void BeginCheck(string descriptiveName, VCExpr vc, ProverInterface.ErrorHandler handler, int timeout, int rlimit, int?randomSeed) { Contract.Requires(descriptiveName != null); Contract.Requires(vc != null); Contract.Requires(handler != null); Contract.Requires(IsReady); status = CheckerStatus.Busy; hasOutput = false; outputExn = null; this.handler = handler; thmProver.Reset(gen); if (0 < rlimit) { timeout = 0; } SetTimeout(timeout); SetRlimit(rlimit); SetRandomSeed(randomSeed); proverStart = DateTime.UtcNow; thmProver.BeginCheck(descriptiveName, vc, handler); // gen.ClearSharedFormulas(); PR: don't know yet what to do with this guy ProverTask = Task.Factory.StartNew(() => { WaitForOutput(null); }, TaskCreationOptions.LongRunning); }
private void WaitForOutput(object dummy) { lock (this) { try { outcome = thmProver.CheckOutcome(cce.NonNull(handler)); } catch (UnexpectedProverOutputException e) { outputExn = e; } switch (outcome) { case ProverInterface.Outcome.Valid: thmProver.LogComment("Valid"); break; case ProverInterface.Outcome.Invalid: thmProver.LogComment("Invalid"); break; case ProverInterface.Outcome.TimeOut: thmProver.LogComment("Timed out"); break; case ProverInterface.Outcome.OutOfMemory: thmProver.LogComment("Out of memory"); break; case ProverInterface.Outcome.Undetermined: thmProver.LogComment("Undetermined"); break; } hasOutput = true; proverRunTime = DateTime.UtcNow - proverStart; } }
public void Retarget(Program prog, ProverContext ctx) { lock (this) { hasOutput = default(bool); outcome = default(ProverInterface.Outcome); outputExn = default(UnexpectedProverOutputException); handler = default(ProverInterface.ErrorHandler); TheoremProver.FullReset(gen); ctx.Reset(); Setup(prog, ctx); } }
public void Retarget(Program prog, ProverContext ctx, int timeout = 0) { lock (this) { hasOutput = default(bool); outcome = default(ProverInterface.Outcome); outputExn = default(UnexpectedProverOutputException); handler = default(ProverInterface.ErrorHandler); TheoremProver.FullReset(gen); ctx.Reset(); Setup(prog, ctx); this.timeout = timeout; SetTimeout(); } }
public void BeginCheck(string descriptiveName, VCExpr vc, ProverInterface.ErrorHandler handler) { Contract.Requires(descriptiveName != null); Contract.Requires(vc != null); Contract.Requires(handler != null); Contract.Requires(IsReady); status = CheckerStatus.Busy; hasOutput = false; outputExn = null; this.handler = handler; thmProver.Reset(gen); SetTimeout(); proverStart = DateTime.UtcNow; thmProver.BeginCheck(descriptiveName, vc, handler); // gen.ClearSharedFormulas(); PR: don't know yet what to do with this guy ProverTask = Task.Factory.StartNew(() => { WaitForOutput(null); }, TaskCreationOptions.LongRunning); }