3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-08 12:11:23 +00:00

working on scale transformation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-08-19 11:53:35 -07:00
parent 6c5f7741b2
commit 3b1344f681
3 changed files with 176 additions and 0 deletions

47
src/muz_qe/dl_mk_scale.h Normal file
View file

@ -0,0 +1,47 @@
/*++
Copyright (c) 2013 Microsoft Corporation
Module Name:
dl_mk_scale.h
Abstract:
Add scale factor to linear (Real) arithemetic Horn clauses.
The transformation replaces occurrences of isolated constants by
a scale multiplied to each constant.
Author:
Nikolaj Bjorner (nbjorner) 2013-08-19
Revision History:
--*/
#ifndef _DL_MK_SCALE_H_
#define _DL_MK_SCALE_H_
#include"dl_rule_transformer.h"
#include"arith_decl_plugin.h"
namespace datalog {
class mk_scale : public rule_transformer::plugin {
ast_manager& m;
context& m_ctx;
arith_util a;
expr_ref_vector m_trail;
obj_map<expr, expr*> m_cache;
expr* linearize(unsigned num_vars, expr* e);
app_ref mk_pred(unsigned num_vars, app* q);
app_ref mk_constraint(unsigned num_vars, app* q);
public:
mk_scale(context & ctx, unsigned priority = 33039);
~mk_scale();
rule_set * operator()(rule_set const & source);
};
};
#endif /* _DL_MK_SCALE_H_ */