Esempio n. 1
0
        protected DeclFreeProverContext(DeclFreeProverContext ctxt)
        {
            Contract.Requires(ctxt != null);
            this.gen        = ctxt.gen;
            this.genOptions = ctxt.genOptions;
            Boogie2VCExprTranslator t = (Boogie2VCExprTranslator)ctxt.translator.Clone();

            Contract.Assert(t != null);
            this.translator           = t;
            this.orderingAxiomBuilder = new OrderingAxiomBuilder(ctxt.gen, t, ctxt.orderingAxiomBuilder);

            StringBuilder cmds = new StringBuilder();

            distincts      = new List <Variable>(ctxt.distincts);
            axiomConjuncts = new List <VCExpr>(ctxt.axiomConjuncts);

            if (ctxt.exprTranslator == null)
            {
                exprTranslator = null;
            }
            else
            {
                exprTranslator = (VCExprTranslator)cce.NonNull(ctxt.exprTranslator.Clone());
            }
        }
Esempio n. 2
0
    public TPTPProcessTheoremProver(ProverOptions options, VCExpressionGenerator gen,
                                      DeclFreeProverContext ctx)
      : base(options, "", "", "", "", gen)
    {
      Contract.Requires(options != null);
      Contract.Requires(gen != null);
      Contract.Requires(ctx != null);

      // No bg predicate at the moment
      // InitializeGlobalInformation("UnivBackPred.tptp");

      this.ctx = ctx;
      this.Gen = gen;

      TypeAxiomBuilder axBuilder;
      switch (CommandLineOptions.Clo.TypeEncodingMethod) {
        case CommandLineOptions.TypeEncoding.Arguments:
          axBuilder = new TypeAxiomBuilderArguments(gen);
          axBuilder.Setup();
          break;
        case CommandLineOptions.TypeEncoding.Monomorphic:
          axBuilder = new TypeAxiomBuilderPremisses(gen);
          break;
        default:
          axBuilder = new TypeAxiomBuilderPremisses(gen);
          axBuilder.Setup();
          break;
      }
      AxBuilder = axBuilder;
      UniqueNamer namer = new UniqueNamer();      
      Namer = namer;
      Namer.Spacer = "__";
      this.DeclCollector = new TypeDeclCollector(namer);

    }
Esempio n. 3
0
        protected DeclFreeProverContext(DeclFreeProverContext ctxt)
        {
            Contract.Requires(ctxt != null);
              this.gen = ctxt.gen;
              this.genOptions = ctxt.genOptions;
              Boogie2VCExprTranslator t = (Boogie2VCExprTranslator)ctxt.translator.Clone();
              Contract.Assert(t != null);
              this.translator = t;
              this.orderingAxiomBuilder = new OrderingAxiomBuilder(ctxt.gen, t, ctxt.orderingAxiomBuilder);

              StringBuilder cmds = new StringBuilder ();

              distincts = new List<Variable>(ctxt.distincts);
              axiomConjuncts = new List<VCExpr>(ctxt.axiomConjuncts);

              if (ctxt.exprTranslator == null)
            exprTranslator = null;
              else
            exprTranslator = (VCExprTranslator)cce.NonNull(ctxt.exprTranslator.Clone());
        }
Esempio n. 4
0
    protected virtual TPTPProcessTheoremProver SpawnProver(ProverOptions options,
                                                              VCExpressionGenerator gen,
                                                              DeclFreeProverContext ctx)
    {
      Contract.Requires(options != null);
      Contract.Requires(gen != null);
      Contract.Requires(ctx != null);
      Contract.Ensures(Contract.Result<TPTPProcessTheoremProver>() != null);

      return new TPTPProcessTheoremProver(options, gen, ctx);
    }
Esempio n. 5
0
 public Z3apiProcessTheoremProver(Z3InstanceOptions opts, DeclFreeProverContext ctxt)
 {
     this.options = opts;
     this.context = (Z3apiProverContext) ctxt;
     this.numAxiomsPushed = 0;
 }