mirror of
https://github.com/Z3Prover/z3
synced 2025-05-09 00:35:47 +00:00
Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3f9edad676
commit
e9eab22e5c
1186 changed files with 381859 additions and 0 deletions
52
lib/numeral_factory.cpp
Normal file
52
lib/numeral_factory.cpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
numeral_factory.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2008-10-28.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#include"numeral_factory.h"
|
||||
#include"ast_pp.h"
|
||||
|
||||
app * arith_factory::mk_value_core(rational const & val, sort * s) {
|
||||
return m_util.mk_numeral(val, s);
|
||||
}
|
||||
|
||||
arith_factory::arith_factory(ast_manager & m):
|
||||
numeral_factory(m, m.get_family_id("arith")),
|
||||
m_util(m) {
|
||||
}
|
||||
|
||||
arith_factory::~arith_factory() {
|
||||
}
|
||||
|
||||
app * arith_factory::mk_value(rational const & val, bool is_int) {
|
||||
return numeral_factory::mk_value(val, is_int ? m_util.mk_int() : m_util.mk_real());
|
||||
}
|
||||
|
||||
bv_factory::bv_factory(ast_manager & m):
|
||||
numeral_factory(m, m.get_family_id("bv")),
|
||||
m_util(m) {
|
||||
}
|
||||
|
||||
bv_factory::~bv_factory() {
|
||||
}
|
||||
|
||||
app * bv_factory::mk_value_core(rational const & val, sort * s) {
|
||||
return m_util.mk_numeral(val, s);
|
||||
}
|
||||
|
||||
app * bv_factory::mk_value(rational const & val, unsigned bv_size) {
|
||||
return numeral_factory::mk_value(val, m_util.mk_sort(bv_size));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue