summaryrefslogtreecommitdiff
path: root/src/util/nary_builder.h
blob: ceaa44e777850ccd54a2d60ee1e2c0403b8c26b8 (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

#include "cvc4_private.h"

#pragma once

#include <vector>
#include "expr/node.h"

namespace CVC4{
namespace util {

class NaryBuilder {
public:
  static Node mkAssoc(Kind k, const std::vector<Node>& children);
  static Node zeroArity(Kind k);
};/* class NaryBuilder */

class RePairAssocCommutativeOperators {
public:
  RePairAssocCommutativeOperators();
  ~RePairAssocCommutativeOperators();

  Node rePairAssocCommutativeOperators(TNode n);

  static bool isAssociateCommutative(Kind k);

  size_t size() const;
  void clear();
private:
  Node case_assoccomm(TNode n);
  Node case_other(TNode n);

  typedef std::hash_map<Node, Node, NodeHashFunction> NodeMap;
  NodeMap d_cache;
};/* class RePairAssocCommutativeOperators */

}/* util namespace */
}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback