summaryrefslogtreecommitdiff
path: root/src/theory/sets/expr_patterns.h
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2013-09-09 14:47:53 -0400
committerKshitij Bansal <kshitij@cs.nyu.edu>2014-02-21 07:25:13 -0500
commit50c26544c83a71e87efa487e4af063b1b5647c0f (patch)
tree82d4f3b2632a2cf06aff70550f37f80dc80d9543 /src/theory/sets/expr_patterns.h
parent53b8499f48a00dc876d56c76fbc79aafe5803529 (diff)
add new theory (sets)
Specification (smt2) -- as per this commit, subject to change - Parameterized sort Set, e.g. (Set Int) - Empty set constant (typed), use with "as" to specify the type, e.g. (as emptyset (Set Int)) - Create a singleton set (setenum X (Set X)) : creates singleton set - Functions/operators (union (Set X) (Set X) (Set X)) (intersection (Set X) (Set X) (Set X)) (setminus (Set X) (Set X) (Set X)) - Predicates (in X (Set X) Bool) : membership (subseteq (Set X) (Set X) Bool) : set containment
Diffstat (limited to 'src/theory/sets/expr_patterns.h')
-rw-r--r--src/theory/sets/expr_patterns.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/theory/sets/expr_patterns.h b/src/theory/sets/expr_patterns.h
new file mode 100644
index 000000000..089549457
--- /dev/null
+++ b/src/theory/sets/expr_patterns.h
@@ -0,0 +1,51 @@
+/********************* */
+/*! \file expr_patterns.h
+ ** \verbatim
+ ** Original author: Kshitij Bansal
+ ** Major contributors: none
+ ** Minor contributors (to current version): none
+ ** This file is part of the CVC4 project.
+ ** Copyright (c) 2013-2014 New York University and The University of Iowa
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.\endverbatim
+ **
+ ** \brief Expr patterns.
+ **
+ ** Expr patterns.
+ **/
+
+#include "cvc4_private.h"
+
+#pragma once
+
+namespace CVC4 {
+namespace expr {
+namespace pattern {
+
+static Node AND(TNode a, TNode b) {
+ return NodeManager::currentNM()->mkNode(kind::AND, a, b);
+}
+
+static Node OR(TNode a, TNode b) {
+ return NodeManager::currentNM()->mkNode(kind::OR, a, b);
+}
+
+static Node OR(TNode a, TNode b, TNode c) {
+ return NodeManager::currentNM()->mkNode(kind::OR, a, b, c);
+}
+
+static Node IN(TNode a, TNode b) {
+ return NodeManager::currentNM()->mkNode(kind::IN, a, b);
+}
+
+static Node EQUAL(TNode a, TNode b) {
+ return NodeManager::currentNM()->mkNode(kind::EQUAL, a, b);
+}
+
+static Node NOT(TNode a) {
+ return NodeManager::currentNM()->mkNode(kind::NOT, a);
+}
+
+}/* CVC4::expr::pattern namespace */
+}/* CVC4::expr namespace */
+}/* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback