mirror of
https://github.com/Z3Prover/z3
synced 2025-08-07 19:51:22 +00:00
fix #1828, add self-contained utility to extract arithmetical values for use in theory_seq and theory_str and other theories that access current values assigned to numeric variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2b35f1a924
commit
286126dde9
4 changed files with 139 additions and 2 deletions
37
src/smt/smt_arith_value.h
Normal file
37
src/smt/smt_arith_value.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
|
||||
/*++
|
||||
Copyright (c) 2018 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_arith_value.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Utility to extract arithmetic values from context.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2018-12-08.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#pragma once;
|
||||
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "smt/smt_context.h"
|
||||
|
||||
|
||||
namespace smt {
|
||||
class arith_value {
|
||||
context& m_ctx;
|
||||
ast_manager& m;
|
||||
arith_util a;
|
||||
public:
|
||||
arith_value(context& ctx);
|
||||
bool get_lo(expr* e, rational& lo, bool& strict);
|
||||
bool get_up(expr* e, rational& up, bool& strict);
|
||||
bool get_value(expr* e, rational& value);
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue