z3py - z3.prove is much faster than solver and check -


I am using the latest z3 master code from codeplex, tagged as v4.3.1.

I want a function such as proven which has a useful return value and does not print. So, I have written that what was visible:

  def prov2 (claim): s = solver () s.add (not (claims)) if s.check () == However, this code runs dramatically with the default  proven  function.  

is the code for proven (slimmed) in src / api / python / z3.py :

  Def proven (claim, keyword **): S = Solver () s.set (** keyword) s.add (not (claims)) if keywords.get ('show', false): print sr = s.check () If r == unsat: print "proved" aliff R == unknown: print "failed to prove" print s.model () Other: print "counterexample" print s.model ()   

When I S.set () in my code, it's fast and finds the same counterexample.

What's going on here?

  • Is this empty call
  • something else?
  • I tried to figure out what default was the solver option, but str (s) repr (s) , s. __ , and Google really did not help.

    Any advice is appreciated! The best estimate is that the default option was my special case, maybe a random number difference or

    Due to some other non-deterministic internal condition.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -