mirror of
https://github.com/Z3Prover/z3
synced 2026-02-18 14:44:21 +00:00
add fold-unfold simplification
this substitutes solve-eqs by including fold-unfold reductions.
This commit is contained in:
parent
5d36f53cd3
commit
f4c5e14b6b
6 changed files with 553 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ z3_add_component(core_tactics
|
|||
elim_uncnstr_tactic.h
|
||||
elim_uncnstr2_tactic.h
|
||||
eliminate_predicates_tactic.h
|
||||
fold_unfold_tactic.h
|
||||
injectivity_tactic.h
|
||||
nnf_tactic.h
|
||||
occf_tactic.h
|
||||
|
|
|
|||
43
src/tactic/core/fold_unfold_tactic.h
Normal file
43
src/tactic/core/fold_unfold_tactic.h
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*++
|
||||
Copyright (c) 2025 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
fold_unfold_tactic.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic for solving variables using fold/unfold transformations.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2025-11-05
|
||||
|
||||
Tactic Documentation:
|
||||
|
||||
## Tactic fold-unfold
|
||||
|
||||
### Short Description
|
||||
|
||||
Apply fold-unfold simplifications to solve for equalities
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
#include "util/params.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/dependent_expr_state_tactic.h"
|
||||
#include "ast/simplifiers/fold_unfold.h"
|
||||
|
||||
inline tactic *mk_fold_unfold_tactic(ast_manager &m, params_ref const &p = params_ref()) {
|
||||
return alloc(dependent_expr_state_tactic, m, p,
|
||||
[](auto &m, auto &p, auto &s) -> dependent_expr_simplifier * { return alloc(euf::fold_unfold, m, s); });
|
||||
}
|
||||
|
||||
/*
|
||||
ADD_TACTIC("fold-unfold", "solve for variables.", "mk_fold_unfold_tactic(m, p)")
|
||||
ADD_SIMPLIFIER("fold-unfold", "solve for variables.", "alloc(euf::fold_unfold, m, s)")
|
||||
*/
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue