Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8542171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:59:46+00:00 2026-06-11T11:59:46+00:00

I need a solver for a specific logic that supports push and pop .

  • 0

I need a solver for a specific logic that supports push and pop. So I generate a one using the SolverFor() function. Since some of the assertions are just constant assertions, like a == 2, I’d like to use the propagate-values tactic to simplify before I call solver.check(). So my question is:

is there a way to apply a tactic on a solver?

I know that I can do that for a Goal. But it seems to me that Goal does not support push and pop.

Any comment is appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:59:48+00:00Added an answer on June 11, 2026 at 11:59 am

    Tactic objects only support non-incremental solving. They also do not provide push and pop methods. They are mainly intended for solving non-trivial problems. For convenience, we provide an API that wraps a tactic object as a solver object. The wrapping is very basic, the wrapper object keeps a stack of assertions, and every check is solved from scratch using the wrapped tactic.

    The default Solver object in Z3 is a general purpose solver. By default, it performs constant propagation. We can control the behavior of this solver setting parameters. In future versions, we will provide additional control to solver objects. We will be able to use a subset of the available tactics to customize solver objects.

    That being said, you are correct, the Goal object does not support push and pop.
    Internally, Goal objects support a copy operation that runs in constant time. Internally, shared data-structures are used to save memory. I will explicitly expose this functionality in future versions. Note that, this functionality is just saving space/memory. The effort to solve each goal will not be saved.
    I said “explicitly expose” because the functionality can be simulated with the following trick:

    def copy_goal(g):
      return Tactic('skip')(g)[0]
    
    x = Int('x')
    g = Goal()
    g.add(x < 10)
    g.add(x > 0)
    g1 = copy_goal(g)
    g1.add(x != 5)
    print g
    print g1
    

    The example above is available at: http://rise4fun.com/Z3Py/O3RO

    Remark: the tactic smt implements the general purpose solver I mentioned above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to implement a cursor with some very specific features: it has to
i'm developing cakephp application. i need some specific characters in url, like & (ampersand),
I'm using urllib2 to interact with a webserver. For the specific problem I need
When the user single taps my view, i need one specific method to run.
I need to sort my view by a specific field that is actually a
I have a list of specific objects(meetings) which I need to group using a
I need to test if some objects inside a database fill a specific range,
To make it more specific, I need an algorithm (recursive or not) that, given
I'm doing video processing tasks and one of the problems I need to solve
i have some specific question to solve but i can not think. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.