mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
add more simplifiers, fix model reconstruction order for elim_unconstrained
- enable sat.smt in smt_tactic that is invoked by default on first goals add flatten-clauses add push-ite have tptp5 front-end pretty print SMT2 formulas a little nicer.
This commit is contained in:
parent
edb0fc394b
commit
cfc8e19baf
10 changed files with 271 additions and 54 deletions
|
@ -2305,12 +2305,25 @@ static void display_smt2(std::ostream& out) {
|
|||
return;
|
||||
}
|
||||
|
||||
z3::expr_vector asms(ctx);
|
||||
size_t num_assumptions = fmls.m_formulas.size();
|
||||
for (size_t i = 0; i < num_assumptions; ++i)
|
||||
asms.push_back(fmls.m_formulas[i]);
|
||||
|
||||
Z3_ast* assumptions = new Z3_ast[num_assumptions];
|
||||
for (size_t i = 0; i < num_assumptions; ++i) {
|
||||
assumptions[i] = fmls.m_formulas[i];
|
||||
for (size_t i = 0; i < asms.size(); ++i) {
|
||||
z3::expr fml = asms[i];
|
||||
if (fml.is_and()) {
|
||||
asms.set(i, fml.arg(0));
|
||||
for (unsigned j = 1; j < fml.num_args(); ++j)
|
||||
asms.push_back(fml.arg(j));
|
||||
--i;
|
||||
}
|
||||
}
|
||||
|
||||
Z3_ast* assumptions = new Z3_ast[asms.size()];
|
||||
for (size_t i = 0; i < asms.size(); ++i)
|
||||
assumptions[i] = asms[i];
|
||||
Z3_set_ast_print_mode(ctx, Z3_PRINT_SMTLIB_FULL);
|
||||
Z3_string s =
|
||||
Z3_benchmark_to_smtlib_string(
|
||||
ctx,
|
||||
|
@ -2318,7 +2331,7 @@ static void display_smt2(std::ostream& out) {
|
|||
0, // no logic is set
|
||||
"unknown", // no status annotation
|
||||
"", // attributes
|
||||
static_cast<unsigned>(num_assumptions),
|
||||
static_cast<unsigned>(asms.size()),
|
||||
assumptions,
|
||||
ctx.bool_val(true));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue