Example #1
0
        public static int ThreadMain(string[] args)
        {
            Contract.Requires(cce.NonNullElements(args));

            ErrorReporter reporter = new ConsoleErrorReporter();

            ExecutionEngine.printer = new DafnyConsolePrinter(); // For boogie errors

            ArmadaOptions.Install(new ArmadaOptions(reporter));

            List <DafnyFile> dafnyFiles;
            List <string>    otherFiles;

            ExitValue exitValue = ProcessCommandLineArguments(args, out dafnyFiles, out otherFiles);

            if (exitValue == ExitValue.VERIFIED)
            {
                exitValue = ProcessFiles(dafnyFiles, otherFiles.AsReadOnly(), reporter);
            }

            if (CommandLineOptions.Clo.XmlSink != null)
            {
                CommandLineOptions.Clo.XmlSink.Close();
            }
            if (CommandLineOptions.Clo.Wait)
            {
                Console.WriteLine("Press Enter to exit.");
                Console.ReadLine();
            }
            if (!ArmadaOptions.O.CountVerificationErrors && exitValue != ExitValue.PREPROCESSING_ERROR)
            {
                return(0);
            }
            //Console.ReadKey();
            return((int)exitValue);
        }
Example #2
0
 public static void Install(ArmadaOptions options)
 {
     Contract.Requires(options != null);
     clo = options;
     Bpl.CommandLineOptions.Install(options);
 }