summaryrefslogtreecommitdiff
path: root/src/expr/array_store_all.h
blob: 65385b0c442043e69928c8682f145d4b30775746 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*********************                                                        */
/*! \file array_store_all.h
 ** \verbatim
 ** Top contributors (to current version):
 **   Tim King, Andres Noetzli, Morgan Deters
 ** This file is part of the CVC4 project.
 ** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 ** in the top-level source directory and their institutional affiliations.
 ** All rights reserved.  See the file COPYING in the top-level source
 ** directory for licensing information.\endverbatim
 **
 ** \brief Representation of a constant array (an array in which the
 ** element is the same for all indices)
 **
 ** Representation of a constant array (an array in which the element is
 ** the same for all indices).
 **/

#include "cvc4_public.h"

#ifndef CVC4__ARRAY_STORE_ALL_H
#define CVC4__ARRAY_STORE_ALL_H

#include <iosfwd>
#include <memory>

namespace cvc5 {

template <bool ref_count>
class NodeTemplate;
typedef NodeTemplate<true> Node;
class TypeNode;

class ArrayStoreAll
{
 public:
  /**
   * @throws IllegalArgumentException if `type` is not an array or if `expr` is
   * not a constant of type `type`.
   */
  ArrayStoreAll(const TypeNode& type, const Node& value);
  ~ArrayStoreAll();

  ArrayStoreAll(const ArrayStoreAll& other);
  ArrayStoreAll& operator=(const ArrayStoreAll& other);

  const TypeNode& getType() const;
  const Node& getValue() const;

  bool operator==(const ArrayStoreAll& asa) const;
  bool operator!=(const ArrayStoreAll& asa) const;
  bool operator<(const ArrayStoreAll& asa) const;
  bool operator<=(const ArrayStoreAll& asa) const;
  bool operator>(const ArrayStoreAll& asa) const;
  bool operator>=(const ArrayStoreAll& asa) const;

 private:
  std::unique_ptr<TypeNode> d_type;
  std::unique_ptr<Node> d_value;
}; /* class ArrayStoreAll */

std::ostream& operator<<(std::ostream& out, const ArrayStoreAll& asa);

/**
 * Hash function for the ArrayStoreAll constants.
 */
struct ArrayStoreAllHashFunction
{
  size_t operator()(const ArrayStoreAll& asa) const;
}; /* struct ArrayStoreAllHashFunction */

}  // namespace cvc5

#endif /* CVC4__ARRAY_STORE_ALL_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback