public Z3apiProverContext(Context ctx, VCExpressionGenerator gen) : base(gen, new VCGenerationOptions(new List <string>())) { z3 = ctx; this.z3log = null; this.tm = new Z3TypeCachedBuilder(this); this.namer = new UniqueNamer(); // For external constants_inv = new BacktrackDictionary <Term, VCExpr>(); functions_inv = new BacktrackDictionary <FuncDecl, Function>(); }
public Z3apiProverContext(Z3InstanceOptions opts, VCExpressionGenerator gen) : base(gen, new VCGenerationOptions(new List <string>())) { int timeout = opts.Timeout * 1000; config = new Config(); config.SetParamValue("MODEL", "true"); config.SetParamValue("MODEL_V2", "true"); config.SetParamValue("MODEL_COMPLETION", "true"); config.SetParamValue("MBQI", "false"); config.SetParamValue("TYPE_CHECK", "true"); if (0 <= timeout) { config.SetParamValue("SOFT_TIMEOUT", timeout.ToString()); } if (0 <= CommandLineOptions.Clo.ProverCCLimit) { this.counterexamples = CommandLineOptions.Clo.ProverCCLimit; } if (CommandLineOptions.Clo.SimplifyLogFilePath != null) { logFilename = CommandLineOptions.Clo.SimplifyLogFilePath; } this.debugTraces = new List <string>(); z3 = new Context(config); z3.SetPrintMode(PrintMode.Smtlib2Compliant); if (logFilename != null) { #if true z3log = new StreamWriter(logFilename); //Z3Log.Open(logFilename); #else z3.OpenLog(logFilename); #endif } foreach (string tag in debugTraces) { z3.EnableDebugTrace(tag); } //this.z3log = null; this.tm = new Z3TypeCachedBuilder(this); this.namer = new UniqueNamer(); }