16 #ifndef __APXX_TEXPR0_HH 17 #define __APXX_TEXPR0_HH 21 #include "ap_texpr0.h" 22 #include "ap_linearize.h" 102 void init_from(ap_texpr0_t* x);
173 texpr0& operator=(
const const_iterator& x);
176 texpr0& operator=(
const builder& x);
254 ap_texpr_discr_t get_discr()
const;
260 const coeff& get_coeff()
const;
266 ap_dim_t get_dim()
const;
274 ap_texpr_op_t get_op()
const;
282 ap_texpr_rtype_t get_rtype()
const;
289 ap_texpr_rdir_t get_rdir()
const;
337 bool is_zero()
const;
340 size_t depth()
const;
346 ap_dim_t max_dim()
const;
349 bool has_dim(ap_dim_t
d)
const;
354 std::vector<ap_dim_t> dimlist()
const;
357 bool is_interval_cst()
const;
360 bool is_interval_linear()
const;
363 bool is_interval_polynomial()
const;
366 bool is_interval_polyfrac()
const;
369 bool is_scalar()
const;
387 void print(
char** name_of_dim = NULL, FILE* stream=stdout)
const;
399 ap_texpr0_t* get_ap_texpr0_t();
402 const ap_texpr0_t* get_ap_texpr0_t()
const;
467 coeff& get_coeff()
const;
473 ap_dim_t& get_dim()
const;
481 ap_texpr_op_t& get_op()
const;
489 ap_texpr_rtype_t& get_rtype()
const;
496 ap_texpr_rdir_t& get_rdir()
const;
540 ap_texpr0_t* get_ap_texpr0_t();
543 const ap_texpr0_t* get_ap_texpr0_t()
const;
594 void init_from(ap_texpr0_t* x);
647 builder(
const mpq_class& inf,
const mpq_class& sup);
650 builder(mpfr_t inf, mpfr_t sup);
659 builder(
double inf,
double sup);
671 builder(ap_texpr_op_t op,
const builder& argA, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
674 builder(ap_texpr_op_t op,
const builder& argA,
const builder& argB, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
698 ap_texpr0_t* get_ap_texpr0_t();
701 const ap_texpr0_t* get_ap_texpr0_t()
const;
728 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
746 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
750 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
754 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
757 friend builder
mul(
const builder& a,
const builder& b,
758 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
761 friend builder
div(
const builder& a,
const builder& b,
762 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
765 friend builder
mod(
const builder& a,
const builder& b,
766 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
769 friend builder
pow(
const builder& a,
const builder& b,
770 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
773 friend builder
neg(
const builder& a,
774 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
777 friend builder
cast(
const builder& a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
780 friend builder
floor(
const builder& a);
783 friend builder
ceil(
const builder& a);
786 friend builder
trunc(
const builder& a);
789 friend builder
sqrt(
const builder& a,
790 ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir);
796 friend builder
operator-(
const builder& a);
799 friend builder
operator+(
const builder& a,
const builder& b);
802 friend builder
operator-(
const builder& a,
const builder& b);
805 friend builder
operator*(
const builder& a,
const builder& b);
808 friend builder
operator/(
const builder& a,
const builder& b);
811 friend builder
operator%(
const builder& a,
const builder& b);
814 friend builder
operator^(
const builder& a,
const builder& b);
820 bool is_zero()
const;
839 void print(
char** name_of_dim = NULL, FILE* stream=stdout)
const;
855 bool is_zero()
const;
858 size_t depth()
const;
864 ap_dim_t max_dim()
const;
867 bool has_dim(ap_dim_t
d)
const;
872 std::vector<ap_dim_t> dimlist()
const;
875 bool is_interval_cst()
const;
878 bool is_interval_linear()
const;
881 bool is_interval_polynomial()
const;
884 bool is_interval_polyfrac()
const;
887 bool is_scalar()
const;
908 bool* pexact=NULL)
const;
911 bool quasilinearize=
false,
bool* pexact=NULL)
const;
947 ap_texpr0_t* get_ap_texpr0_t();
950 const ap_texpr0_t* get_ap_texpr0_t()
const;
ap_texpr0_t l
Structure managed by APRON.
Definition: apxx_texpr0.hh:96
Iterators to traverse and mutate an expression tree.
Definition: apxx_texpr0.hh:413
bool is_binop(ap_texpr_op_t op)
Whether the operator is binary.
Definition: apxx_texpr0.hh:38
Dimension permutation object (ap_dimperm_t wrapper).
Definition: apxx_dimension.hh:292
Dimension change object (ap_dimchange_t wrapper).
Definition: apxx_dimension.hh:102
texpr0::builder pow(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:807
texpr0::builder ceil(const texpr0::builder &a)
Definition: apxx_texpr0.hh:832
Definition: apxx_abstract0.hh:27
ap_texpr0_t * l
Definition: apxx_texpr0.hh:215
Variable name (ap_var_t wrapper).
Definition: apxx_var.hh:39
texpr0::builder cast(const texpr0::builder &a, ap_texpr_rtype_t rtype, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:821
bool equal(const linexpr0 &x, const linexpr0 &y)
Definition: apxx_linexpr0.hh:294
texpr0::builder sub(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:779
texpr0::builder add(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:772
std::ostream & operator<<(std::ostream &os, const abstract0 &s)
Definition: apxx_abstract0.hh:293
texpr0::builder neg(const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:814
Level 0 abstract value (ap_abstract0_t* wrapper).
Definition: apxx_abstract0.hh:78
texpr0::builder operator%(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0.hh:879
texpr0::builder operator-(const texpr0::builder &a)
Definition: apxx_texpr0.hh:854
dim(ap_dim_t d)
Standard constructor.
Definition: apxx_texpr0.hh:20
bool is_unop(ap_texpr_op_t op)
Whether the operator is unary.
Definition: apxx_texpr0.hh:33
Library manager (ap_manager_t wrapper).
Definition: apxx_manager.hh:137
texpr0::builder operator^(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0.hh:884
texpr0::builder trunc(const texpr0::builder &a)
Definition: apxx_texpr0.hh:837
texpr0::builder binary(ap_texpr_op_t op, const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:764
texpr0::builder div(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:793
abstract0 & add_dimensions(manager &m, abstract0 &dst, const abstract0 &src, const dimchange &d, bool project=false)
Definition: apxx_abstract0.hh:1038
Iterators to traverse a constant expression tree.
Definition: apxx_texpr0.hh:211
texpr0::builder mod(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:800
Level 1 environment (ap_environment_t wrapper).
Definition: apxx_environment.hh:51
ap_texpr0_t * l
Definition: apxx_texpr0.hh:587
ap_dim_t d
Dimension index.
Definition: apxx_texpr0.hh:37
texpr0::builder mul(const texpr0::builder &a, const texpr0::builder &b, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:786
abstract0 & permute_dimensions(manager &m, abstract0 &dst, const abstract0 &src, const dimperm &d)
Definition: apxx_abstract0.hh:1061
texpr0::builder floor(const texpr0::builder &a)
Definition: apxx_texpr0.hh:827
dimperm operator*(const dimperm &x, const dimperm &y)
Definition: apxx_dimension.hh:393
Level 0 arbitrary expression tree (ap_texpr0_t wrapper).
Definition: apxx_texpr0.hh:92
Coefficient (ap_coeff_t wrapper).
Definition: apxx_coeff.hh:36
Full interval (]-oo,+oo[) or domain, to simplify initialisations and assignments. ...
Definition: apxx_interval.hh:27
texpr0::builder sqrt(const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:842
Level 0 arbitrary constraint (ap_tcons0_t wrapper).
Definition: apxx_tcons0.hh:47
Interval (ap_interval_t wrapper).
Definition: apxx_interval.hh:47
Inherited by most wrappers to map new and delete to malloc and free.
Definition: apxx_scalar.hh:69
A fraction with native int coefficients, to simplify initialisations and assignments.
Definition: apxx_scalar.hh:41
abstract0 & substitute(manager &m, abstract0 &dst, const abstract0 &src, ap_dim_t dim, const linexpr0 &l, const abstract0 &inter=abstract0::null)
Definition: apxx_abstract0.hh:860
texpr0::builder operator+(const texpr0::builder &a)
Definition: apxx_texpr0.hh:849
Level 1 arbitrary expression tree (ap_texpr1_t wrapper).
Definition: apxx_texpr1.hh:42
texpr0::builder operator/(const texpr0::builder &a, const texpr0::builder &b)
Definition: apxx_texpr0.hh:874
Level 1 arbitrary constraint (ap_tcons1_t wrapper).
Definition: apxx_tcons1.hh:39
abstract0 & remove_dimensions(manager &m, abstract0 &dst, const abstract0 &src, const dimchange &d)
Definition: apxx_abstract0.hh:1050
Represents a dimension (i.e., variable by index) in an expression tree.
Definition: apxx_texpr0.hh:33
Temporary expression nodes used when constructing a texpr0.
Definition: apxx_texpr0.hh:581
texpr0::builder unary(ap_texpr_op_t op, const texpr0::builder &a, ap_texpr_rtype_t rtype=AP_RTYPE_REAL, ap_texpr_rdir_t rdir=AP_RDIR_NEAREST)
Definition: apxx_texpr0.hh:757
Level 0 linear expression (ap_linexpr0_t wrapper).
Definition: apxx_linexpr0.hh:44
Scalar (ap_scalar_t wrapper).
Definition: apxx_scalar.hh:89