APRONXX 0.9.15
/home/mine/apron/apronxx/apxx_abstract0.hh
Go to the documentation of this file.
1/* -*- C++ -*-
2 * apxx_abstract0.hh
3 *
4 * APRON Library / C++ class wrappers
5 *
6 * Copyright (C) Antoine Mine' 2007
7 *
8 */
9/* This file is part of the APRON Library, released under LGPL license
10 with an exception allowing the redistribution of statically linked
11 executables.
12
13 Please read the COPYING file packaged in the distribution.
14*/
15
16#ifndef __APXX_ABSTRACT0_HH
17#define __APXX_ABSTRACT0_HH
18
19#include <string>
20#include "ap_abstract0.h"
21#include "apxx_linexpr0.hh"
22#include "apxx_lincons0.hh"
23#include "apxx_generator0.hh"
24#include "apxx_manager.hh"
25
26
27namespace apron {
29
30/* ================================= */
31/* abstract0 */
32/* ================================= */
33
37
38 * real-valued dimensions.
39 *
40 * \warning all the abstract operators are guaranteed to be sound, but not complete, that is:
41 * - returned abstract elements and intervals are over-approximations of the actual result on sets,
42 * - returned constraint conjunction may satisfy more points than the original abstract element,
43 * - returned generators may span more points than the original abstract element,
44 * - predicates return \c true if the predicate is definitively true,
45 * and \c false if either the predicate is false (flag_exact is then true), or
46 * due to abstraction, the domain cannot conclude (flag_exact is then false).
47 *
48 * An abstract0 is always created with a manager that indicates the underlying library. This
49 * defines its internal representation and algorithms, which in turns defines the expressiveness and
50 * cost vs. precision trade-off.
51 * Most operations to manipulate an abstract0 also take a manager as first argument.
52 * This must be a manager compatible with the one of all abstract0 arguments (including this),
53 * that is, a manger created by the same library (e.g., NewPolka polyhedra) and using the same
54 * parameter values, if any (e.g., strictness).
55 * It need not be the very same manager the abstract0 was created with.
56 *
57 * Overloaded arithmetic, assignment and copy operators that cannot take an extra manager
58 * argument will implicitly use the manager used to create the first argument.
59 *
60 * Additionally, for binary or n-aray operators, all abstract0 must have the same number of
61 * integer and real dimensions.
62 *
63 * Many operations exist in two kinds:
64 * - an imperative class function that modifies the this abstract0,
65 * - a more "functional" global function that takes as argument both one or several constant
66 * source abstract0 and one destination abstract0 that will be overridden with the result.
67 *
68 * Both kinds will return a reference to the abstract0 that holds the result.
69 *
70 * Most functions can throw a variety of exceptions:
71 * - std::invalid_argument, when arguments have incompatible managers, types, or dimensions,
72 * - std::length_error, when running out of memory or exceeding the \c max_object_size
73 * value set by the user in the manager,
74 * - std::overflow_error, when a numerical overflow occurs,
75 * - not_implemented, when some function is not available,
76 * - timeout, when exceeding the \c timout value set by the user in the manager.
77 */
78class abstract0 : public use_malloc {
79
80protected:
81
82 ap_abstract0_t* a;
83
84 //! Internal use only. Wraps an abstract0 around the pointer x, taking ownership of the object.
85 abstract0(ap_abstract0_t* x);
86
88 static const abstract0 null;
89
90 friend class manager;
91
92public:
93
94
95 /* constructors */
96 /* ============ */
97
102 abstract0(manager &m, size_t intdim, size_t realdim, top x);
103
105 abstract0(manager &m, size_t intdim, size_t realdim, bottom x);
106
108 abstract0(manager &m, const abstract0& t);
109
110
112 * \throw std::invalid_argument if x has less than intdim+realdim dimensions.
113 */
114 abstract0(manager &m, size_t intdim, size_t realdim, const interval_array& x);
115
117 abstract0(manager &m, size_t intdim, size_t realdim, const lincons0_array& x);
118
120 abstract0(manager &m, size_t intdim, size_t realdim, const tcons0_array& x);
126 abstract0(const abstract0& t);
127
129
130
131 /* destructor */
132 /* ========== */
133
136
141 ~abstract0();
142
143
145 * The abstract element cannot be used after being freed.
146 * However, the standard destructor can be safely be called (resulting in a no-op).
147 */
148 void free(manager& m);
149
151
152
153 /* assignments */
154 /* =========== */
155
156 /** @name Copies and conversions to abstract elements */
158
163 abstract0& operator=(const abstract0& t);
164
167
168 */
170
176
178
179 * Implicitly uses the manager used to create *this.
180 *
181 * \throw std::invalid_argument if the array has insufficient size.
182 */
184
190
191 /*! \brief Assigns a conjunction of arbitrary constraints to *this.
192 *
193 * Implicitly uses the manager used to create *this.
194 */
196
201 abstract0& set(manager& m, const abstract0& x);
202
203 /*! \brief Replaces *this with the full space.
204 *
205 * You can either specify new intdim and realdim values or keep those of *this
206 * (if unspecified, i.e., left to \c AP_DIM_MAX).
207 *
208 * \return a reference to *this.
209 */
210 abstract0& set(manager& m, top t, size_t intdim = AP_DIM_MAX, size_t realdim = AP_DIM_MAX);
211
217
218 */
219 abstract0& set(manager& m, bottom t, size_t intdim = AP_DIM_MAX, size_t realdim = AP_DIM_MAX);
220
228 abstract0& set(manager& m, const interval_array& x, size_t intdim = AP_DIM_MAX, size_t realdim = AP_DIM_MAX);
229
231
232 * You can either specify new intdim and realdim values or keep those of *this
233 * (if unspecified, i.e., left to \c AP_DIM_MAX).
234 *
235 * \return a reference to *this.
236 */
237 abstract0& set(manager& m, const lincons0_array& x, size_t intdim = AP_DIM_MAX, size_t realdim = AP_DIM_MAX);
238
245
246 abstract0& set(manager& m, const tcons0_array& x, size_t intdim = AP_DIM_MAX, size_t realdim = AP_DIM_MAX);
247
248
251
252 /* representation */
253 /* ============== */
254
256
263
264 /*! \brief Puts the abstract element in canonical form (if such a notion exists).
265 *
266 * \return a reference to *this.
267 */
269
270
274 abstract0& approximate(manager& m, int algorithm);
277
278
279 /* printing */
280 /* ======== */
284
286 void print(manager& m, char** name_of_dim=NULL, FILE* stream=stdout) const;
289 friend void printdiff(manager& m, const abstract0& x, const abstract0& y, char** name_of_dim, FILE* stream);
290
292 void dump(manager& m, FILE* stream=stdout) const;
295 friend std::ostream& operator<< (std::ostream& os, const abstract0& s);
296
298
299
300 /* serialisation */
301 /* ============= */
302
313 std::string* serialize(manager& m) const;
324 friend abstract0& deserialize(manager& m, abstract0& dst, const std::string& s, size_t* eaten);
325
327
328
329 /* access */
330 /* ====== */
331
333
336 manager get_manager() const;
337
339 ap_dimension_t get_dimension(manager& m) const;
340
341 /*! \brief Returns the (abstract) size of the abstract element.
342 *
343 * The unit in which size is computed is library-specific.
344 * It is guaranteed to be the same as the unit for the \c max_object_size field of
345 * the ap_funopt_t structure.
346 */
347 size_t size(manager& m) const;
348
350
351
352 /* predicates */
353 /* ========== */
354
357
359 bool is_bottom(manager& m) const;
362 bool is_top(manager& m) const;
363
365 bool is_eq(manager& m, const abstract0& x) const;
366
367 //! Whether *this is included in x (set-wise).
368 bool is_leq(manager& m, const abstract0& x) const;
369
371 bool sat(manager& m, const lincons0& l) const;
372
373
374 bool sat(manager& m, const tcons0& l) const;
375
379 bool sat(manager& m, ap_dim_t dim, const interval& i) const;
380
381 //! \brief Whether the points in *this are unbounded in the given dimension.
382 bool is_dimension_unconstrained(manager& m, ap_dim_t dim) const;
383
387
388 friend bool operator== (const abstract0& x, const abstract0& y);
389
394 friend bool operator!= (const abstract0& x, const abstract0& y);
400 friend bool operator<= (const abstract0& x, const abstract0& y);
401
402 /*! \brief Whether x contains y (set-wise).
403 *
404 * The manager for the left argument is used implicitly.
405 */
406 friend bool operator>= (const abstract0& x, const abstract0& y);
407
408
410 * The manager for the left argument is used implicitly.
411 */
412 friend bool operator> (const abstract0& x, const abstract0& y);
413
416
417 */
418 friend bool operator< (const abstract0& x, const abstract0& y);
419
420
421
422 /* Properties */
423 /* ========== */
424
427
428
429 interval bound(manager& m, const linexpr0& l) const;
430
432 interval bound(manager& m, const texpr0& l) const;
433
434 //! Returns some bounds for the given coordinate on all points in the abstract element.
435 interval bound(manager& m, ap_dim_t d) const;
436
438 interval_array to_box(manager& m) const;
444
457
458 /* Meet */
459 /* ==== */
460
463
467
469
474 friend abstract0& meet(manager& m, abstract0& dst, const abstract0& x, const abstract0& y);
475
476 /*! \brief Replaces dst with the meet of all abstract elements in x.
477 *
478 * \return a reference to dst.
479 */
480 friend abstract0& meet(manager& m, abstract0& dst, const std::vector<const abstract0*>& x);
481
483
484 * \return a reference to dst.
485 */
486 friend abstract0& meet(manager& m, abstract0& dst, size_t size, const abstract0 * const x[]);
487
491
493
498 friend abstract0& meet(manager& m, abstract0& dst, const abstract0& x, const lincons0_array& y);
499
500 /*! \brief Adds some arbitrary constraints to *this (modified in-place).
501 *
502 * \return a reference to *this.
503 */
504 abstract0& meet(manager& m, const tcons0_array& y);
505
507
510 friend abstract0& meet(manager& m, abstract0& dst, const abstract0& x, const tcons0_array& y);
511
518
520
521
527
529
537
539
540
542
543 /* Join */
544 /* ==== */
545
548
553 abstract0& join(manager& m, const abstract0& y);
559 friend abstract0& join(manager& m, abstract0& dst, const abstract0& x, const abstract0& y);
560
561 /*! \brief Replaces dst with the join of all abstract elements in x.
562 *
563 * \return a reference to dst.
564 */
565 friend abstract0& join(manager& m, abstract0& dst, const std::vector<const abstract0*>& x);
566
569
570 */
571 friend abstract0& join(manager& m, abstract0& dst, size_t size, const abstract0 * const x[]);
572
580
582
583 * \arg \c y can only contain rays and lines, not vertexes.
584 *
585 * \return a reference to *this.
586 */
587 friend abstract0& add_rays(manager& m, abstract0& dst, const abstract0& x, const generator0_array& y);
588
595 abstract0& operator+=(const abstract0& y);
603
604 */
606
608
609
610 /* Assignments */
611 /* =========== */
612
614
615
616 /*! \brief In-place assignment of linear expression.
617 *
618 * *this is modified in-place to reflect the effect of assigning l to dimension dim.
619 * If inter is specified, *this is then intersected with it.
620 *
621 * \return a reference to *this.
622 */
623 abstract0& assign(manager& m, ap_dim_t dim, const linexpr0& l, const abstract0& inter = null);
634 abstract0& assign(manager& m, size_t size, const ap_dim_t dim[], const linexpr0 * const l[], const abstract0& inter = null);
635
636
637 /*! \brief In-place parallel assignment of linear expressions.
638 *
639 * *this is modified in-place to reflect the effect of assigning l[i] to dimension dim[i].
640 * Assignments are performed in parallel.
641 * If inter is specified, *this is then intersected with it.
642 *
643 * \return a reference to *this.
644 *
645 * \throw std::invalid_argument if the vectors have different size.
646 */
647 abstract0& assign(manager& m, const std::vector<ap_dim_t>& dim, const std::vector<const linexpr0*>& l, const abstract0& inter = null);
648
655
656 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, const linexpr0& l, const abstract0& inter);
657
658 /*! \brief Parallel assignment of linear expressions.
659 *
660 * dst is replaced with the effect of assigning l[i] to dimension dim[i] in src,
661 * for i from 0 to size-1.
662 * Assignments are performed in parallel.
663 * If inter is specified, dst is then intersected with it.
664 *
665 * \return a reference to dst.
666 */
667 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[], const linexpr0 * const l[], const abstract0& inter);
668
671
672 * Assignments are performed in parallel.
673 * If inter is specified, dst is then intersected with it.
674 *
675 * \return a reference to dst.
676 *
677 * \throw std::invalid_argument if the vectors have different size.
678 */
679 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t>& dim, const std::vector<const linexpr0*>& l, const abstract0& inter);
681
682
683
687
689 * \return a reference to *this.
690 */
691 abstract0& assign(manager& m, ap_dim_t dim, const texpr0& l, const abstract0& inter = null);
692
695
700 * \return a reference to *this.
701 */
702 abstract0& assign(manager& m, size_t size, const ap_dim_t dim[], const texpr0 * const l[], const abstract0& inter = null);
703
704
705
707 * *this is modified in-place to reflect the effect of assigning l[i] to dimension dim[i].
708 * Assignments are performed in parallel.
709 * If inter is specified, *this is then intersected with it.
710 *
711 * \return a reference to *this.
712 *
713 * \throw std::invalid_argument if the vectors have different size.
714 */
715 abstract0& assign(manager& m, const std::vector<ap_dim_t>& dim, const std::vector<const texpr0*>& l, const abstract0& inter = null);
724 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, const texpr0& l, const abstract0& inter);
725
728
729 * for i from 0 to size-1.
730 * Assignments are performed in parallel.
731 * If inter is specified, dst is then intersected with it.
732 *
733 * \return a reference to dst.
734 */
735 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[], const texpr0 * const l[], const abstract0& inter);
736
747 friend abstract0& assign(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t>& dim, const std::vector<const texpr0*>& l, const abstract0& inter);
750
751
752 /* Substitutions */
753 /* ============== */
754
757
760
765 abstract0& substitute(manager& m, ap_dim_t dim, const linexpr0& l, const abstract0& inter = null);
766
770
771 * Substitutions are performed in parallel.
772 * If inter is specified, *this is then intersected with it.
773 *
774 * \return a reference to *this.
775 */
776 abstract0& substitute(manager& m, size_t size, const ap_dim_t dim[], const linexpr0 * const l[], const abstract0& inter = null);
777
778
780
781 * *this is modified in-place to reflect the effect of substituting l[i] to dimension dim[i].
782 * Substitutions are performed in parallel.
783 * If inter is specified, *this is then intersected with it.
784 *
785 * \return a reference to *this.
786 *
787 * \throw std::invalid_argument if the vectors have different size.
788 */
789 abstract0& substitute(manager& m, const std::vector<ap_dim_t>& dim, const std::vector<const linexpr0*>& l, const abstract0& inter = null);
790
793
794 * If inter is specified, dst is then intersected with it.
795 *
796 * \return a reference to dst.
797 */
798 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, const linexpr0& l, const abstract0& inter);
799
800 /*! \brief Parallel substitution (backward assignment) of linear expressions.
801 *
802 * dst is replaced with the effect of substituting l[i] to dimension dim[i] in src,
803 * for i from 0 to size-1.
804 * Substitutions are performed in parallel.
805 * If inter is specified, dst is then intersected with it.
806 *
807 * \return a reference to dst.
808 */
809 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[], const linexpr0 * const l[], const abstract0& inter);
810
812
813 * dst is replaced with the effect of substituting l[i] to dimension dim[i] in src.
814 * Substitutions are performed in parallel.
815 * If inter is specified, dst is then intersected with it.
816 *
817 * \return a reference to dst.
818 *
819 * \throw std::invalid_argument if the vectors have different size.
820 */
821 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t>& dim, const std::vector<const linexpr0*>& l, const abstract0& inter);
822
823
824
825
831 * \return a reference to *this.
832 */
833 abstract0& substitute(manager& m, ap_dim_t dim, const texpr0& l, const abstract0& inter = null);
834
836
837 * *this is modified in-place to reflect the effect of substituting l[i] to dimension dim[i], for
838 * i from 0 to size-1.
839 * Substitutions are performed in parallel.
840 * If inter is specified, *this is then intersected with it.
841 *
842 * \return a reference to *this.
843 */
844 abstract0& substitute(manager& m, size_t size, const ap_dim_t dim[], const texpr0 * const l[], const abstract0& inter = null);
845
846
847 /*! \brief In-place parallel substitution (backward assignment) of arbitrary expressions.
848 *
849 * *this is modified in-place to reflect the effect of substituting l[i] to dimension dim[i].
850 * Substitutions are performed in parallel.
851 * If inter is specified, *this is then intersected with it.
852 *
853 * \return a reference to *this.
854 *
855 * \throw std::invalid_argument if the vectors have different size.
856 */
857 abstract0& substitute(manager& m, const std::vector<ap_dim_t>& dim, const std::vector<const texpr0*>& l, const abstract0& inter = null);
858
859
861 * dst is replaced with the effect of substituting l to dimension dim in src.
862 * If inter is specified, dst is then intersected with it.
863 *
864 * \return a reference to dst.
865 */
866 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, const texpr0& l, const abstract0& inter);
867
877 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[], const texpr0 * const l[], const abstract0& inter);
878
879 /*! \brief Parallel substitution (backward assignment) of arbitrary expressions.
880 *
881 * dst is replaced with the effect of substituting l[i] to dimension dim[i] in src.
882 * Substitutions are performed in parallel.
883 * If inter is specified, dst is then intersected with it.
884 *
885 * \return a reference to dst.
886 *
887 * \throw std::invalid_argument if the vectors have different size.
888 */
889 friend abstract0& substitute(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t>& dim, const std::vector<const texpr0*>& l, const abstract0& inter);
890
891
892
893
894
895 /* Projection */
896 /* ========== */
897
900
901
903 * \arg \c project whether to reset the dimension to 0 (if true), or leave it undefined (if false).
904 *
905 * \return a reference to *this.
906 */
907 abstract0& forget(manager& m, ap_dim_t dim, bool project = false);
908
911
913 * \return a reference to *this.
914 */
915 abstract0& forget(manager& m, size_t size, const ap_dim_t dim[], bool project = false);
916
923 abstract0& forget(manager& m, const std::vector<ap_dim_t> dim, bool project = false);
924
925 /*! \brief Stores in dst the result of forgetting the value of dimension dim in src.
926 *
927 * \arg \c project if true, resets the dimension to 0 (if true).
928 *
929 * \return a reference to dst.
930 */
931 friend abstract0& forget(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, bool project);
932
940 friend abstract0& forget(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[], bool project);
941
943
944 * \arg \c project whether to reset the dimensions to 0 (if true), or leave them undefined (if false).
945 *
946 * \return a reference to dst.
947 */
948 friend abstract0& forget(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t> dim, bool project);
949
951
952
953 /* Change of dimension */
954 /* =================== */
955
956
958
959
964 * \return a reference to *this.
965 */
966 abstract0& add_dimensions(manager& m, const dimchange& d, bool project = false);
967
968 /*! \brief Removes some dimensions from *this.
969 *
970 * \return a reference to *this.
971 */
973
976
977 */
979
980
983
985 * \return a reference to dst.
986 */
987 friend abstract0& add_dimensions(manager& m, abstract0& dst, const abstract0& src, const dimchange& d, bool project);
988
989 /*! \brief Copies src into dst and removes some dimensions.
990 *
991 * \return a reference to dst.
992 */
993 friend abstract0& remove_dimensions(manager& m, abstract0& dst, const abstract0& src, const dimchange& d);
994
999 friend abstract0& permute_dimensions(manager& m, abstract0& dst, const abstract0& src, const dimperm& d);
1000
1001 //@}
1002
1003
1004 /* Expansion and folding */
1005 /* ===================== */
1006
1007
1009
1012 * New dimensions are appended after the last integer or real dimension of *this.
1013 *
1014 * \return a reference to *this.
1015 */
1016 abstract0& expand(manager& m, ap_dim_t dim, size_t n = 1);
1017
1020
1022 * \return a reference to dst.
1023 */
1024 friend abstract0& expand(manager& m, abstract0& dst, const abstract0& src, ap_dim_t dim, size_t n);
1025
1029
1031 * \return a reference to *this.
1032 */
1033 abstract0& fold(manager& m, size_t size, const ap_dim_t dim[]);
1034
1037
1038 * After folding, only dim[0] is kept and other dimensions are removed.
1039 *
1040 * \return a reference to *this.
1041 */
1042 abstract0& fold(manager& m, const std::vector<ap_dim_t>& dim);
1043
1049
1051 friend abstract0& fold(manager& m, abstract0& dst, const abstract0& src, size_t size, const ap_dim_t dim[]);
1052
1060 friend abstract0& fold(manager& m, abstract0& dst, const abstract0& src, const std::vector<ap_dim_t>& dim);
1063
1064
1065 /* Widenings */
1066 /* ========= */
1067
1070
1071
1077 friend abstract0& widening(manager& m, abstract0& dst, const abstract0& x, const abstract0& y);
1078
1083
1085 friend abstract0& widening(manager& m, abstract0& dst, const abstract0& x, const abstract0& y, const lincons0_array& l);
1086
1088
1089
1090 /* Closure */
1091 /* ======= */
1092
1093 /** @name Closure */
1095
1096
1099
1102
1106
1107 friend abstract0& closure(manager& m, abstract0& dst, const abstract0& src);
1108
1110
1111
1112
1113 /* C-level compatibility */
1114 /* ===================== */
1115
1116
1117 //@{
1118
1120 ap_abstract0_t* get_ap_abstract0_t();
1121
1123 const ap_abstract0_t* get_ap_abstract0_t() const;
1124
1126
1127};
1129#include "apxx_abstract0_inline.hh"
1130
1131}
1132
1133#endif /* __APXX_ABSTRACT0_HH */
friend bool operator==(const abstract0 &x, const abstract0 &y)
Whether x and y represent the same set.
Definition apxx_abstract0.hh:410
interval_array to_box(manager &m) const
Returns a bounding box for the set represented by the abstract element.
Definition apxx_abstract0.hh:476
abstract0 & operator+=(const abstract0 &y)
Replaces *this with the join of *this and the abstract element y.
Definition apxx_abstract0.hh:665
abstract0 & set(manager &m, const abstract0 &x)
Replaces *this with a copy of x.
Definition apxx_abstract0.hh:168
friend void printdiff(manager &m, const abstract0 &x, const abstract0 &y, char **name_of_dim, FILE *stream)
Pretty-printing the difference between x and y to a C stream.
Definition apxx_abstract0.hh:281
abstract0 & permute_dimensions(manager &m, const dimperm &d)
Permutes some dimensions in *this.
Definition apxx_abstract0.hh:1030
abstract0 & forget(manager &m, ap_dim_t dim, bool project=false)
Forgets about the value of dimension dim in *this.
Definition apxx_abstract0.hh:963
lincons0_array to_lincons_array(manager &m) const
Returns a linear constraint representation of (an over-approximation of) the set represented by the a...
Definition apxx_abstract0.hh:484
friend abstract0 & join(manager &m, abstract0 &dst, size_t size, const abstract0 *const x[])
Replaces dst with the join of all size abstract elements in x.
Definition apxx_abstract0.hh:570
void free(manager &m)
Destroys the abstract element using the given manager.
Definition apxx_abstract0.hh:90
friend bool operator<=(const abstract0 &x, const abstract0 &y)
Whether x is included within y (set-wise).
Definition apxx_abstract0.hh:422
abstract0 & join(manager &m, const abstract0 &y)
Replaces *this with the join of *this and the abstract element y.
Definition apxx_abstract0.hh:554
friend bool operator>(const abstract0 &x, const abstract0 &y)
Whether x strictly contains y (set-wise).
Definition apxx_abstract0.hh:434
friend bool operator<(const abstract0 &x, const abstract0 &y)
Whether x is strictly included within y (set-wise).
Definition apxx_abstract0.hh:439
static const abstract0 null
NULL abstract element, to be used only as default argument in assign and substitute.
Definition apxx_abstract0.hh:88
abstract0(ap_abstract0_t *x)
Internal use only. Wraps an abstract0 around the pointer x, taking ownership of the object.
Definition apxx_abstract0.hh:28
abstract0 & fold(manager &m, size_t size, const ap_dim_t dim[])
Folds dimensions dim[0] to dim[size-1] in *this (modified in-place).
Definition apxx_abstract0.hh:1093
tcons0_array to_tcons_array(manager &m) const
Returns a constraint representation of (an over-approximation of) the set represented by the abstract...
Definition apxx_abstract0.hh:492
abstract0 & meet(manager &m, const abstract0 &y)
Replaces *this with the meet of *this and the abstract element y.
Definition apxx_abstract0.hh:512
abstract0 & set(manager &m, const tcons0_array &x, size_t intdim=AP_DIM_MAX, size_t realdim=AP_DIM_MAX)
Replaces *this with a conjunction of arbitrary constraints.
Definition apxx_abstract0.hh:232
abstract0 & assign(manager &m, ap_dim_t dim, const linexpr0 &l, const abstract0 &inter=null)
In-place assignment of linear expression.
Definition apxx_abstract0.hh:700
abstract0 & approximate(manager &m, int algorithm)
Simplifies the abstract element, potentially loosing precision.
Definition apxx_abstract0.hh:264
friend class manager
Definition apxx_abstract0.hh:90
ap_abstract0_t * a
Pointer managed by APRON.
Definition apxx_abstract0.hh:82
bool is_eq(manager &m, const abstract0 &x) const
Whether *this and x represent the same set.
Definition apxx_abstract0.hh:367
manager get_manager() const
Returns the manager the abstract element was created with (with reference count incremented).
Definition apxx_abstract0.hh:329
ap_abstract0_t * get_ap_abstract0_t()
Returns a pointer to the internal APRON object stored in *this.
Definition apxx_abstract0.hh:1173
void dump(manager &m, FILE *stream=stdout) const
Raw printing to a C stream (mainly for debug purposes).
Definition apxx_abstract0.hh:287
abstract0 & remove_dimensions(manager &m, const dimchange &d)
Removes some dimensions from *this.
Definition apxx_abstract0.hh:1022
abstract0 & substitute(manager &m, ap_dim_t dim, const linexpr0 &l, const abstract0 &inter=null)
In-place substitution (backward assignment) of linear expression.
Definition apxx_abstract0.hh:831
abstract0 & add_dimensions(manager &m, const dimchange &d, bool project=false)
Adds some dimensions to *this.
Definition apxx_abstract0.hh:1012
abstract0 & canonicalize(manager &m)
Puts the abstract element in canonical form (if such a notion exists).
Definition apxx_abstract0.hh:257
abstract0 & minimize(manager &m)
Minimizes the size of the representation, to save memory.
Definition apxx_abstract0.hh:250
bool is_leq(manager &m, const abstract0 &x) const
Whether *this is included in x (set-wise).
Definition apxx_abstract0.hh:374
abstract0 & operator=(const abstract0 &t)
Assigns a copy of t to *this.
Definition apxx_abstract0.hh:100
abstract0 & closure(manager &m)
Replaces *this with its topological closure.
Definition apxx_abstract0.hh:1152
friend bool operator>=(const abstract0 &x, const abstract0 &y)
Whether x contains y (set-wise).
Definition apxx_abstract0.hh:429
friend abstract0 & deserialize(manager &m, abstract0 &dst, const std::string &s, size_t *eaten)
Reconstruct an abstract element form a serialized byte-stream and put it into dst.
Definition apxx_abstract0.hh:314
generator0_array to_generator_array(manager &m) const
Returns a generator representation of (an over-approximation of) the set represented by the abstract ...
Definition apxx_abstract0.hh:500
friend bool operator!=(const abstract0 &x, const abstract0 &y)
Whether x and y represent different sets.
Definition apxx_abstract0.hh:417
abstract0 & add_rays(manager &m, const generator0_array &y)
Adds some rays to *this (modified in-place).
Definition apxx_abstract0.hh:637
abstract0 & expand(manager &m, ap_dim_t dim, size_t n=1)
Duplicates dimension dim into n copies in *this (modified in-place).
Definition apxx_abstract0.hh:1077
friend std::ostream & operator<<(std::ostream &os, const abstract0 &s)
Prints in constraint form.
Definition apxx_abstract0.hh:293
std::string * serialize(manager &m) const
Serializes an abstract element.
Definition apxx_abstract0.hh:305
size_t size(manager &m) const
Returns the (abstract) size of the abstract element.
Definition apxx_abstract0.hh:341
friend abstract0 & widening(manager &m, abstract0 &dst, const abstract0 &x, const abstract0 &y)
Stores in dst the result of x widened with y.
Definition apxx_abstract0.hh:1128
bool sat(manager &m, const lincons0 &l) const
Whether all points in *this satisfy a linear constraint.
Definition apxx_abstract0.hh:381
bool is_top(manager &m) const
Whether *this represents the full space.
Definition apxx_abstract0.hh:360
interval bound(manager &m, const linexpr0 &l) const
Returns some bounds for a linear expression evaluated in all points in the abstract element.
Definition apxx_abstract0.hh:448
bool is_dimension_unconstrained(manager &m, ap_dim_t dim) const
Whether the points in *this are unbounded in the given dimension.
Definition apxx_abstract0.hh:402
void print(manager &m, char **name_of_dim=NULL, FILE *stream=stdout) const
Pretty-printing to a C stream.
Definition apxx_abstract0.hh:275
~abstract0()
Destroys the abstract element.
Definition apxx_abstract0.hh:84
abstract0 & operator*=(const abstract0 &y)
Replaces *this with the meet of *this and the abstract element y.
Definition apxx_abstract0.hh:658
ap_dimension_t get_dimension(manager &m) const
Returns the number of integer and real dimensions in the abstract element.
Definition apxx_abstract0.hh:334
bool is_bottom(manager &m) const
Whether *this represents the empty set.
Definition apxx_abstract0.hh:353
Represents a dimension (i.e., variable by index) in an expression tree.
Definition apxx_texpr0.hh:33
Dimension change object (ap_dimchange_t wrapper).
Definition apxx_dimension.hh:102
Dimension permutation object (ap_dimperm_t wrapper).
Definition apxx_dimension.hh:292
Array of generators (ap_generator0_array_t wrapper).
Definition apxx_generator0.hh:214
array of interval(s).
Definition apxx_interval.hh:302
Interval (ap_interval_t wrapper).
Definition apxx_interval.hh:47
Array of linear constraints (ap_lincons0_array_t wrapper).
Definition apxx_lincons0.hh:341
Level 0 linear constraint (ap_lincons0_t wrapper).
Definition apxx_lincons0.hh:43
Level 0 linear expression (ap_linexpr0_t wrapper).
Definition apxx_linexpr0.hh:44
Array of arbitrary constraints (ap_tcons0_array_t wrapper).
Definition apxx_tcons0.hh:350
Level 0 arbitrary constraint (ap_tcons0_t wrapper).
Definition apxx_tcons0.hh:47
Level 0 arbitrary expression tree (ap_texpr0_t wrapper).
Definition apxx_texpr0.hh:92
Definition apxx_abstract0.hh:27
Empty interval or domain, to simplify initialisations and assignments.
Definition apxx_interval.hh:33
Full interval (]-oo,+oo[) or domain, to simplify initialisations and assignments.
Definition apxx_interval.hh:27
Inherited by most wrappers to map new and delete to malloc and free.
Definition apxx_scalar.hh:69