blob: c98e01b1b9c1456ba97158c99bb3b2e5af7e997e (
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
|
/********************* */
/*! \file nary_builder.h
** \verbatim
** Original author: Tim King
** Major contributors: none
** Minor contributors (to current version): none
** This file is part of the CVC4 project.
** Copyright (c) 2009-2014 New York University and The University of Iowa
** See the file COPYING in the top-level source directory for licensing
** information.\endverbatim
**
** \brief [[ Add one-line brief description here ]]
**
** [[ Add lengthier description here ]]
** \todo document this file
**/
#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 */
|