简体   繁体   中英

z3: How to identify conflicts in an unsat model?

In an interactive scenario, user actions cause constraints to be created. These constraints are then evaluated using the Microsoft z3 solver. When all the constraints are good, I can extract the resolved values using (get-model) and all is good.

When user actions result in an over-constrained model (ie conflicting constraints), is there a way how to identify which of the input asserts actually cause the conflict that leads to the unsat result? I'd like to use this information to provide UI to users that guides them to choose among conflicting demands they have made in their model.

You're looking for unsatisfiable cores, which Z3 supports; see smtc_core for an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM