Exemplo n.º 1
0
        public override void ApplyDefaultOptions()
        {
            base.ApplyDefaultOptions();

            if (VerificationLoggerConfig != null)
            {
                if (XmlSink != null)
                {
                    throw new Exception("The /verificationLogger and /xml options cannot be used at the same time.");
                }
                BoogieXmlFilename = Path.GetTempFileName();
                XmlSink           = new Bpl.XmlSink(BoogieXmlFilename);
            }

            // expand macros in filenames, now that LogPrefix is fully determined
            ExpandFilename(ref DafnyPrelude, LogPrefix, FileTimestamp);
            ExpandFilename(ref DafnyPrintFile, LogPrefix, FileTimestamp);

            SetZ3ExecutablePath();
            SetZ3Options();

            // Ask Boogie to perform abstract interpretation
            UseAbstractInterpretation = true;
            Ai.J_Intervals            = true;
        }
Exemplo n.º 2
0
 public XmlFileScope(XmlSink sink, string filename)
 {
     Contract.Requires(filename != null);
     Contract.Requires(sink == null || sink.IsOpen);
     //modifies sink.*;
     if (sink != null)
     {
         sink.WriteStartFile(filename); // invoke this method while "sink" is still peer consistent
         cce.Owner.AssignSame(this, sink);
         this.sink = sink;
     }
 }
Exemplo n.º 3
0
 public XmlFileScope(XmlSink sink, string filename) {
   Contract.Requires(filename != null);
   Contract.Requires(sink == null || sink.IsOpen);
   //modifies sink.*;
   if (sink != null) {
     sink.WriteStartFile(filename);  // invoke this method while "sink" is still peer consistent
     cce.Owner.AssignSame(this, sink);
     this.sink = sink;
   }
 }
Exemplo n.º 4
0
        public override void ApplyDefaultOptions()
        {
            Contract.Ensures(TheProverFactory != null);
              Contract.Ensures(vcVariety != VCVariety.Unspecified);

              base.ApplyDefaultOptions();

              // expand macros in filenames, now that LogPrefix is fully determined
              ExpandFilename(ref XmlSinkFilename, LogPrefix, FileTimestamp);
              ExpandFilename(ref PrintFile, LogPrefix, FileTimestamp);
              ExpandFilename(ref SimplifyLogFilePath, LogPrefix, FileTimestamp);
              ExpandFilename(ref PrintErrorModelFile, LogPrefix, FileTimestamp);

              Contract.Assume(XmlSink == null);  // XmlSink is to be set here
              if (XmlSinkFilename != null) {
            XmlSink = new XmlSink(XmlSinkFilename);
              }

              if (TheProverFactory == null) {
            TheProverFactory = ProverFactory.Load("SMTLib");
            ProverName = "SMTLib".ToUpper();
              }

              var proverOpts = TheProverFactory.BlankProverOptions();
              proverOpts.Parse(ProverOptions);
              if (!TheProverFactory.SupportsLabels(proverOpts)) {
            UseLabels = false;
              }

              if (vcVariety == VCVariety.Unspecified) {
            vcVariety = TheProverFactory.DefaultVCVariety;
              }

              if (UseArrayTheory) {
            Monomorphize = true;
              }

              if (inferLeastForUnsat != null) {
            StratifiedInlining = 1;
              }

              if (StratifiedInlining > 0) {
            TypeEncodingMethod = TypeEncoding.Monomorphic;
            UseArrayTheory = true;
            UseAbstractInterpretation = false;
            MaxProverMemory = 0; // no max: avoids restarts
            if (ProverName == "Z3API" || ProverName == "SMTLIB") {
              ProverCCLimit = 1;
            }
            if (UseProverEvaluate)
            StratifiedInliningWithoutModels = true;
              }

              if (Trace) {
            BoogieDebug.DoPrinting = true;  // reuse the -trace option for debug printing
              }
        }