1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*++
Copyright (c) 2013 Microsoft Corporation
Module Name:
dl_mk_scale.h
Abstract:
Add scale factor to linear (Real) arithmetic 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:
--*/
#pragma once
#include "muz/base/dl_rule_transformer.h"
#include "ast/arith_decl_plugin.h"
namespace datalog {
class mk_scale : public rule_transformer::plugin {
class scale_model_converter;
ast_manager& m;
context& m_ctx;
arith_util a;
expr_ref_vector m_trail;
app_ref_vector m_eqs;
obj_map<expr, expr*> m_cache;
scale_model_converter* m_mc;
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);
rule_set * operator()(rule_set const & source) override;
};
}