예제 #1
0
        protected virtual SMTLibProcessTheoremProver SpawnProver(ProverOptions options,
            VCExpressionGenerator gen,
            SMTLibProverContext ctx)
        {
            Contract.Requires(options != null);
              Contract.Requires(gen != null);
              Contract.Requires(ctx != null);
              Contract.Ensures(Contract.Result<SMTLibProcessTheoremProver>() != null);

              return new SMTLibProcessTheoremProver(options, gen, ctx);
        }
예제 #2
0
    public SMTLibProcessTheoremProver(ProverOptions options, VCExpressionGenerator gen,
                                      SMTLibProverContext ctx)
    {
      Contract.Requires(options != null);
      Contract.Requires(gen != null);
      Contract.Requires(ctx != null);
      
      InitializeGlobalInformation();
      
      this.options = (SMTLibProverOptions)options;
      this.ctx = ctx;
      this.gen = gen;
      this.usingUnsatCore = false;

      SetupAxiomBuilder(gen);

      Namer = new SMTLibNamer();
      ctx.parent = this;
      this.DeclCollector = new TypeDeclCollector((SMTLibProverOptions)options, Namer);

      if (CommandLineOptions.Clo.PrintFixedPoint != null || CommandLineOptions.Clo.PrintConjectures != null)
      {
          declHandler = new MyDeclHandler();
          DeclCollector.SetDeclHandler(declHandler);
      }

      SetupProcess();

      if (CommandLineOptions.Clo.StratifiedInlining > 0 || CommandLineOptions.Clo.ContractInfer
          || CommandLineOptions.Clo.SecureVcGen != null)
      {
          // Prepare for ApiChecker usage
          if (options.LogFilename != null && currentLogFile == null)
          {
              currentLogFile = OpenOutputFile("");
          }
          PrepareCommon();
      }
    }
예제 #3
0
 protected SMTLibProverContext(SMTLibProverContext par)
   : base(par)
 {
 }
예제 #4
0
      public SMTLibInterpolatingProcessTheoremProver(ProverOptions options, VCExpressionGenerator gen,
                                        SMTLibProverContext ctx)
          : base(AddInterpOption(options), gen, ctx)
      {

      }
예제 #5
0
        public SMTLibProcessTheoremProver(ProverOptions options, VCExpressionGenerator gen,
            SMTLibProverContext ctx)
        {
            Contract.Requires(options != null);
              Contract.Requires(gen != null);
              Contract.Requires(ctx != null);

              InitializeGlobalInformation();

              this.options = (SMTLibProverOptions)options;
              this.ctx = ctx;
              this.gen = gen;
              this.usingUnsatCore = false;

              SetupAxiomBuilder(gen);

              Namer = new SMTLibNamer();
              ctx.parent = this;
              this.DeclCollector = new TypeDeclCollector((SMTLibProverOptions)options, Namer);

              SetupProcess();

              if (CommandLineOptions.Clo.StratifiedInlining > 0 || CommandLineOptions.Clo.ContractInfer)
              {
              // Prepare for ApiChecker usage
              if (options.LogFilename != null && currentLogFile == null)
              {
              currentLogFile = OpenOutputFile("");
              }
              if (CommandLineOptions.Clo.ContractInfer)
              {
              SendThisVC("(set-option :produce-unsat-cores true)");
              this.usingUnsatCore = true;
              }
              PrepareCommon();
              }
        }