Skip to content

Unsat cores empty when using from_string with optimize in Z3Py #7449

Closed
@ZakSingh

Description

When using the Solver's from_string method in z3py to load a SMT2 file, unsat cores are produced correctly for tracked assertions in the smtlib file. However, if I switch from using Solver to Optimize, the unsat core list is always empty.

Also - to produce unsat cores with a Solver when using from_string, I have to include (set-option :produce-unsat-cores true) in the smtlib file as solver.set(unsat_core=True) doesn't seem to affect the from_string call. I'm not sure whether this is expected behavior or not.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions