summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorajreynol <andrew.j.reynolds@gmail.com>2015-06-02 19:17:53 +0200
committerajreynol <andrew.j.reynolds@gmail.com>2015-06-02 19:17:53 +0200
commitfb092ea99c7a670e78dfdd442a19986fdbdab93f (patch)
treead52de511073d9fbc368d9ea1636c827c69dbb85 /src/expr
parent7222fd13c68ee1352dabbe3791fae0ee13d689d1 (diff)
Flatten sygus grammars during parsing. Remove duplicate operators from grammars.
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/expr_manager_template.cpp6
-rw-r--r--src/expr/expr_manager_template.h5
2 files changed, 10 insertions, 1 deletions
diff --git a/src/expr/expr_manager_template.cpp b/src/expr/expr_manager_template.cpp
index 7eb93b8ff..91387bc41 100644
--- a/src/expr/expr_manager_template.cpp
+++ b/src/expr/expr_manager_template.cpp
@@ -519,6 +519,12 @@ Expr ExprManager::operatorOf(Kind k) {
return d_nodeManager->operatorOf(k).toExpr();
}
+Kind ExprManager::operatorToKind(Expr e) {
+ NodeManagerScope nms(d_nodeManager);
+
+ return d_nodeManager->operatorToKind( e.getNode() );
+}
+
/** 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 8acb7489f..d7c89ecdc 100644
--- a/src/expr/expr_manager_template.h
+++ b/src/expr/expr_manager_template.h
@@ -319,7 +319,10 @@ public:
* e.getConst<CVC4::Kind>() will yield k.
*/
Expr operatorOf(Kind k);
-
+
+ /** Get a Kind from an operator expression */
+ Kind operatorToKind(Expr e);
+
/** Make a function type from domain to range. */
FunctionType mkFunctionType(Type domain, Type range);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback