7

The .net API has the following constructor for a Context:

Context (Dictionary< string, string > settings)

how to get a list of all the possible settings?

Specifically, I am interested in how to ask Z3 to produce an unsat core, ie the equivalent of the SMT lib produce-unsat-cores.

Motorhead
  • 928
  • 6
  • 16

1 Answers1

5

You make a good point. The parameters that you can send to the .NET API are not described together with the .NET code. However, they are calling the C-based API and the comments for the C-based API (https://github.com/Z3Prover/z3/blob/master/src/api/z3_api.h) lists the set of configuration parameters you can pass to the context. They are:

      - proof  (Boolean)           Enable proof generation
      - debug_ref_count (Boolean)  Enable debug support for Z3_ast reference counting 
      - trace  (Boolean)           Tracing support for VCC
      - trace_file_name (String)   Trace out file for VCC traces
      - timeout (unsigned)         default timeout (in milliseconds) used for solvers
      - well_sorted_check          type checker
      - auto_config                use heuristics to automatically select solver and configure it
      - model                      model generation for solvers, this parameter can be overwritten when creating a solver
      - model_validate             validate models produced by solvers
      - unsat_core                 unsat-core generation for solvers, this parameter can be overwritten when creating a solver
Sam Chats
  • 2,271
  • 1
  • 12
  • 34
Nikolaj Bjorner
  • 8,229
  • 14
  • 15
  • Thanks for pointing this out and also thanks to Nikolaj for answering this quickly. I've added this information to the .NET and Java APIs/Docs as well now. – Christoph Wintersteiger May 17 '13 at 12:42
  • @Christoph could you tell me where you added this documentation of the options? I don't see them at http://research.microsoft.com/en-us/um/redmond/projects/z3/class_microsoft_1_1_z3_1_1_context.html#ae996a436d55a3e34afe5971705ff9699. – Motorhead May 30 '13 at 02:18
  • Also, if i try `("UNSAT_CORE", "true")` as a dictionary option I get `Error setting UNSAT_CORE, unknown option`. `unsat_core` is also not recognized. Would you please tell me what the option name is FROM THE .NET API – Motorhead May 30 '13 at 02:21
  • 1
    The documentation on the web will only be updated once a new version of Z3 is released. Currently all changes are in the unstable branch. To get those, download the latest "planned" release from codeplex or compile the unstable branch (see also http://stackoverflow.com/questions/13106042/error-when-building-z3-on-unix-cannot-find-lrt/13106109#13106109) – Christoph Wintersteiger May 31 '13 at 00:47
  • OK but would you (or someone) please let me know how to actually turn on "unsat core" from the .Net API. I am prepared to wait for the next release of Z3 for new features, but my understanding is that this is a currently available feature, but i can't for the life of me figure out what the option name is. Thanks! – Motorhead May 31 '13 at 16:00
  • As I've not received any reply to my question, I have filed this as bug in the Z3 bug db. – Motorhead Jun 18 '13 at 05:09
  • 1
    The option name should be unsat_core as mentioned before. Did you update your version of Z3, or are you running an old one (in that case it may still have a different name). – Christoph Wintersteiger Dec 16 '13 at 13:31