diff options
author | Morgan Deters <mdeters@gmail.com> | 2012-03-07 21:38:04 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2012-03-07 21:38:04 +0000 |
commit | a9288938b0244551b713bd3687a62a6aa0762b56 (patch) | |
tree | 3730f4c67351e66a37d5750db8217fc2b4e0c949 /src/expr | |
parent | c409b60e8c507997a24ba9ea1c611da9132d1e10 (diff) |
fix some Java compatibility-layer interface problems; also fix some Mac OS X build issues
Diffstat (limited to 'src/expr')
-rw-r--r-- | src/expr/expr_manager_template.cpp | 10 | ||||
-rw-r--r-- | src/expr/expr_manager_template.h | 13 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/expr/expr_manager_template.cpp b/src/expr/expr_manager_template.cpp index 533a4dd7f..8819684fc 100644 --- a/src/expr/expr_manager_template.cpp +++ b/src/expr/expr_manager_template.cpp @@ -463,6 +463,16 @@ Expr ExprManager::mkExpr(Expr opExpr, const std::vector<Expr>& children) { } } +bool ExprManager::hasOperator(Kind k) { + return NodeManager::hasOperator(k); +} + +Expr ExprManager::operatorOf(Kind k) { + NodeManagerScope nms(d_nodeManager); + + return d_nodeManager->operatorOf(k).toExpr(); +} + /** Make a function type from domain to range. */ FunctionType ExprManager::mkFunctionType(Type domain, Type range) { NodeManagerScope nms(d_nodeManager); diff --git a/src/expr/expr_manager_template.h b/src/expr/expr_manager_template.h index bf9bfbb38..9d0b8d34a 100644 --- a/src/expr/expr_manager_template.h +++ b/src/expr/expr_manager_template.h @@ -305,6 +305,19 @@ public: */ Expr mkAssociative(Kind kind, const std::vector<Expr>& children); + /** + * Determine whether Exprs of a particular Kind have operators. + * @returns true if Exprs of Kind k have operators. + */ + static bool hasOperator(Kind k); + + /** + * Get the (singleton) operator of an OPERATOR-kinded kind. The + * returned Expr e will have kind BUILTIN, and calling + * e.getConst<CVC4::Kind>() will yield k. + */ + Expr operatorOf(Kind k); + /** Make a function type from domain to range. */ FunctionType mkFunctionType(Type domain, Type range); |