static ResultCounter VerifyFiles(List <string> fileNames) { Contract.Requires(cce.NonNullElements(fileNames)); Program program = GVUtil.IO.ParseBoogieProgram(fileNames, false); if (program == null) { return(ResultCounter.GetNewCounterWithInputError()); } KernelAnalyser.PipelineOutcome oc = KernelAnalyser.ResolveAndTypecheck(program, fileNames[fileNames.Count - 1]); if (oc != KernelAnalyser.PipelineOutcome.ResolvedAndTypeChecked) { return(ResultCounter.GetNewCounterWithInputError()); } KernelAnalyser.EliminateDeadVariables(program); KernelAnalyser.Inline(program); KernelAnalyser.CheckForQuantifiersAndSpecifyLogic(program); CommandLineOptions.Clo.PrintUnstructured = 2; if (CommandLineOptions.Clo.LoopUnrollCount != -1) { Debug.Assert(!CommandLineOptions.Clo.ContractInfer); program.UnrollLoops(CommandLineOptions.Clo.LoopUnrollCount, CommandLineOptions.Clo.SoundLoopUnrolling); } return(VerifyProgram(program)); }
/// <summary> /// Initialize the variables. /// </summary> /// <param name="program">The source Boogie program.</param> /// <param name="assignments">The current assignments to the variables.</param> public Verifier(Microsoft.Boogie.Program program, Dictionary <string, bool> assignments) { this.program = program; this.assignments = assignments; KernelAnalyser.EliminateDeadVariables(this.program); KernelAnalyser.Inline(this.program); KernelAnalyser.CheckForQuantifiersAndSpecifyLogic(this.program); }