3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-17 14:21:45 +00:00

separate pre-processing, add callback parameter to push/pop in python API

This commit is contained in:
Nikolaj Bjorner 2022-04-11 17:05:49 +02:00
parent f43d9d00d4
commit c996a66da0
16 changed files with 287 additions and 200 deletions

38
src/opt/opt_preprocess.h Normal file
View file

@ -0,0 +1,38 @@
/*++
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;
bool find_mutexes(vector<soft>& softs, rational& lower);
void process_mutex(expr_ref_vector& mutex, obj_map<expr, rational>& new_soft, rational& lower);
public:
preprocess(solver& s);
bool operator()(vector<soft>& soft, rational& lower);
};
};