Code Monkey home page Code Monkey logo

Comments (5)

ganler avatar ganler commented on September 24, 2024

It is always frequent to get no valid range found, though we don't desire huge models at this point, which is a place demanding improvement.

from nnsmith.

lazycal avatar lazycal commented on September 24, 2024

Since we use sub-processes to control the timeout, why do we still need...

Without the z3 timeout, everytime z3 hangs, the generation process will timeout as well. So I set the timeout for z3 to be 3x smaller: https://github.com/ise-uiuc/nnsmith/blob/main/nnsmith/graph_gen.py#L265, allowing z3 to hang at most 3 times without making the process timeout. I didn't test to see if this does improve fail rate. If you didn't see much change (in large graph with 30 nodes or more in particular) then sure please disable it.

BTW did you confirm that unknown is really caused by timeout? That is, if without timeout, will z3 returns sat within time limit? I am having a hard time convincing myself timeout makes z3 buggy. Could you give me some reference on that?

It is always frequent to get no valid range found, though we don't desire huge models at this point, which is a place demanding improvement.

Good point, need to track this if we are going to have graphs of 30 nodes or more. On my end 30% of then give no valid range found for 30-node graph. Let me open a new issue to track.

from nnsmith.

ganler avatar ganler commented on September 24, 2024

BTW did you confirm that unknown is really caused by timeout?

@lazycal

https://github.com/Z3Prover/z3/blob/master/src/cmd_context/cmd_context.cpp#L1704

from nnsmith.

lazycal avatar lazycal commented on September 24, 2024

My question is

if without timeout, will z3 returns sat within time limit?

Why is the link related to that?

Or you mean the link is answering my latter question:

I am having a hard time convincing myself timeout makes z3 buggy. Could you give me some reference on that?

But I don't see the connection either. Sorry I don't know much about z3 internals.

from nnsmith.

ganler avatar ganler commented on September 24, 2024

solver.check() returns:

  1. sat
  2. unsat
  3. unknown

See: https://stackoverflow.com/questions/11197344/z3-produces-unknown-for-assertions-without-quantifiers

timeout will give you unknown. There could be other reasons for unknown. To debug and understand why:

print( solver.statistics() )
# Traversing statistics
for k, v in solver.statistics():
    print( "%s : %s" % (k, v) )

Another things I noticed is to not use / but div. See Z3Prover/z3#756

from nnsmith.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.