Exemplo n.º 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);
        }
Exemplo n.º 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();
      }
    }
Exemplo n.º 3
0
 protected SMTLibProverContext(SMTLibProverContext par)
   : base(par)
 {
 }
Exemplo n.º 4
0
      public SMTLibInterpolatingProcessTheoremProver(ProverOptions options, VCExpressionGenerator gen,
                                        SMTLibProverContext ctx)
          : base(AddInterpOption(options), gen, ctx)
      {

      }
Exemplo n.º 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();
              }
        }