1 /******************************************************************************
2 * Top contributors (to current version):
5 * This file is part of the cvc5 project.
7 * Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
8 * in the top-level source directory and their institutional affiliations.
9 * All rights reserved. See the file COPYING in the top-level source
10 * directory for licensing information.
11 * ****************************************************************************
13 * Type for rewrites for bags.
16 #include "cvc5_private.h"
18 #ifndef CVC5__THEORY__BAGS__REWRITES_H
19 #define CVC5__THEORY__BAGS__REWRITES_H
27 /** Types of rewrites used by bags
29 * This rewrites are documented where they are used in the rewriter.
31 enum class Rewrite
: uint32_t
33 NONE
, // no rewrite happened
34 BAG_MAKE_COUNT_NEGATIVE
,
41 DUPLICATE_REMOVAL_BAG_MAKE
,
47 FILTER_UNION_DISJOINT
,
53 INTERSECTION_EMPTY_LEFT
,
54 INTERSECTION_EMPTY_RIGHT
,
56 INTERSECTION_SHARED_LEFT
,
57 INTERSECTION_SHARED_RIGHT
,
58 IS_SINGLETON_BAG_MAKE
,
68 SUBTRACT_DISJOINT_SHARED_LEFT
,
69 SUBTRACT_DISJOINT_SHARED_RIGHT
,
75 UNION_DISJOINT_EMPTY_LEFT
,
76 UNION_DISJOINT_EMPTY_RIGHT
,
77 UNION_DISJOINT_MAX_MIN
,
79 UNION_MAX_SAME_OR_EMPTY
,
85 * Converts an rewrite to a string. Note: This function is also used in
86 * `safe_print()`. Changing this functions name or signature will result in
87 * `safe_print()` printing "<unsupported>" instead of the proper strings for
90 * @param r The rewrite
91 * @return The name of the rewrite
93 const char* toString(Rewrite r
);
96 * Writes an rewrite name to a stream.
98 * @param out The stream to write to
99 * @param r The rewrite to write to the stream
102 std::ostream
& operator<<(std::ostream
& out
, Rewrite r
);
105 } // namespace theory
108 #endif /* CVC5__THEORY__BAGS__REWRITES_H */