-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
opt_preprocess.h
43 lines (28 loc) · 1.02 KB
/
opt_preprocess.h
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
/*++
Copyright (c) 2021 Microsoft Corporation
Module Name:
opt_preprocess.h
Abstract:
Pre-processing for MaxSMT
Find mutexes - at most 1 constraints and modify soft constraints and bounds.
Author:
Nikolaj Bjorner (nbjorner) 2022-04-11
--*/
#pragma once
#include "opt/maxsmt.h"
namespace opt {
class preprocess {
ast_manager& m;
solver& s;
expr_ref_vector m_trail;
expr_ref_vector propagate(expr* f, lbool& is_sat);
obj_map<expr, rational> soft2map(vector<soft> const& softs, expr_ref_vector& fmls);
bool find_mutexes(vector<soft>& softs, rational& lower);
bool prop_mutexes(vector<soft>& softs, rational& lower);
void process_mutex(expr_ref_vector& mutex, obj_map<expr, rational>& new_soft, rational& lower);
obj_map<expr, rational> dualize(obj_map<expr, rational> const& soft, expr_ref_vector& fmls);
public:
preprocess(solver& s);
bool operator()(vector<soft>& soft, rational& lower);
};
};