ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
arith_tools.h
Go to the documentation of this file.
1#ifndef CPROVER_ARITH_TOOLS_H
2#define CPROVER_ARITH_TOOLS_H
3
4#include <util/irep/expr.h>
5#include <irep2/irep2.h>
7
8bool to_integer(const exprt &expr, BigInt &int_value);
9
18bool to_integer(const expr2tc &expr, BigInt &int_value);
19
20exprt from_integer(const BigInt &int_value, const typet &type);
21expr2tc from_integer(const BigInt &int_value, const type2tc &type);
22exprt from_double(double val, const typet &type);
23
24BigInt power(const BigInt &base, const BigInt &exponent);
25
26// ceil(log2(size))
27BigInt address_bits(const BigInt &size);
28
29#endif
exprt from_integer(const BigInt &int_value, const typet &type)
Definition arith_tools.cpp:73
bool to_integer(const exprt &expr, BigInt &int_value)
Definition arith_tools.cpp:7
BigInt address_bits(const BigInt &size)
ceil(log2(size))
Definition arith_tools.cpp:181
exprt from_double(double val, const typet &type)
Definition arith_tools.cpp:147
BigInt power(const BigInt &base, const BigInt &exponent)
Definition arith_tools.cpp:161
static const twodig_t base
Definition bigint.cpp:28
Definition bigint.hh:58
Definition expr.h:34
Definition type.h:9
Classes and definitions for non-stringy internal representation.
irep_container< type2t > type2tc
Definition irep2.h:430
irep_container< expr2t > expr2tc
Definition irep2.h:431