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
|
/********************* -*- C++ -*- */
/** expr_manager.cpp
** This file is part of the CVC4 prototype.
** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
** Courant Institute of Mathematical Sciences
** New York University
** See the file COPYING in the top-level source directory for licensing
** information.
**
** Expression manager implementation.
**/
#include "core/expr_builder.h"
#include "core/expr_manager.h"
#include "core/cvc4_expr.h"
namespace CVC4 {
__thread ExprManager* ExprManager::s_current = 0;
// general expression-builders
Expr ExprManager::mkExpr(Kind kind) {
return ExprBuilder(this, kind);
}
Expr ExprManager::mkExpr(Kind kind, Expr child1) {
return ExprBuilder(this, kind) << child1;
}
Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2) {
return ExprBuilder(this, kind) << child1 << child2;
}
Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3) {
return ExprBuilder(this, kind) << child1 << child2 << child3;
}
Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4) {
return ExprBuilder(this, kind) << child1 << child2 << child3 << child4;
}
Expr ExprManager::mkExpr(Kind kind, Expr child1, Expr child2, Expr child3, Expr child4, Expr child5) {
return ExprBuilder(this, kind) << child1 << child2 << child3 << child4 << child5;
}
// N-ary version
Expr ExprManager::mkExpr(Kind kind, std::vector<Expr> children) {
return ExprBuilder(this, kind).append(children);
}
} /* CVC4 namespace */
|