/// <summary> /// Parses the analysis context from the file with the /// given analysis context and suffix. /// </summary> /// <param name="suffix">Suffix</param> /// <returns>AnalysisContext</returns> protected AnalysisContext ParseContextFromFile(AnalysisContext ac, string suffix) { return(AnalysisContextParser.ParseWithContext(ac, this.Program.FileList[this.Program .FileList.Count - 1], "bpl", new List <string> { suffix })); }
/// <summary> /// Parses the analysis context from the given file. /// </summary> /// <param name="file">File</param> /// <param name="extension">Extension</param> /// <param name="additional">Additional files</param> internal static AnalysisContext Parse(string file, string extension, List <string> additional = null) { Microsoft.Boogie.Program program = null; ResolutionContext rc = null; var filesToParse = AnalysisContextParser.GetFilesToParse(file, extension, additional); AnalysisContextParser.CreateProgramFromFiles(filesToParse, out program, out rc); var parsedAc = AnalysisContext.Create(program, rc); if (parsedAc == null) { Environment.Exit((int)Outcome.ParsingError); } return(parsedAc); }
/// <summary> /// Parses the analysis context from the input file. /// </summary> /// <returns>AnalysisContext</returns> protected AnalysisContext ParseContextFromInputFile() { return(AnalysisContextParser.Parse(this.Program.FileList[this.Program .FileList.Count - 1], "bpl")); }