mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 09:35:32 +00:00
add demodulator tactic based on demodulator-simplifier
- some handling for commutative operators - fix bug in demodulator_index where fwd and bwd are swapped
This commit is contained in:
parent
87095950cb
commit
de916f50d6
5 changed files with 123 additions and 37 deletions
|
@ -32,6 +32,7 @@ z3_add_component(core_tactics
|
|||
cofactor_term_ite_tactic.h
|
||||
collect_statistics_tactic.h
|
||||
ctx_simplify_tactic.h
|
||||
demodulator_tactic.h
|
||||
der_tactic.h
|
||||
distribute_forall_tactic.h
|
||||
dom_simplify_tactic.h
|
||||
|
|
40
src/tactic/core/demodulator_tactic.h
Normal file
40
src/tactic/core/demodulator_tactic.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*++
|
||||
Copyright (c) 2022 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
demodulator_tactic.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic for solving variables
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2022-10-30
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/dependent_expr_state_tactic.h"
|
||||
#include "ast/simplifiers/demodulator_simplifier.h"
|
||||
|
||||
|
||||
class demodulator_tactic_factory : public dependent_expr_simplifier_factory {
|
||||
public:
|
||||
dependent_expr_simplifier* mk(ast_manager& m, params_ref const& p, dependent_expr_state& s) override {
|
||||
return alloc(demodulator_simplifier, m, p, s);
|
||||
}
|
||||
};
|
||||
|
||||
inline tactic * mk_demodulator_tactic(ast_manager& m, params_ref const& p = params_ref()) {
|
||||
return alloc(dependent_expr_state_tactic, m, p, alloc(demodulator_tactic_factory));
|
||||
}
|
||||
|
||||
/*
|
||||
ADD_TACTIC("demodulator", "solve for variables.", "mk_demodulator_tactic(m, p)")
|
||||
*/
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue