%template(getConstRational) CVC4::Expr::getConst<CVC4::Rational>;
%template(getConstBitVector) CVC4::Expr::getConst<CVC4::BitVector>;
%template(getConstString) CVC4::Expr::getConst<CVC4::String>;
-%template(getConstRegExp) CVC4::Expr::getConst<CVC4::RegExp>;
%template(getConstEmptySet) CVC4::Expr::getConst<CVC4::EmptySet>;
%template(getConstBoolean) CVC4::Expr::getConst<bool>;
%template(mkConst) CVC4::ExprManager::mkConst<CVC4::BitVector>;
%template(mkConst) CVC4::ExprManager::mkConst<CVC4::EmptySet>;
%template(mkConst) CVC4::ExprManager::mkConst<CVC4::String>;
-%template(mkConst) CVC4::ExprManager::mkConst<CVC4::RegExp>;
#ifdef SWIGPYTHON
/* The python bindings cannot differentiate between bool and other basic
* types like enum and int. Therefore, we rename mkConst for the bool
sort REGEXP_TYPE \
Cardinality::INTEGERS \
well-founded \
- "NodeManager::currentNM()->mkConst(::CVC4::RegExp())" \
+ "NodeManager::currentNM()->mkNode(REGEXP_EMPTY, std::vector<Node>() )" \
"util/regexp.h" \
"RegExp type"
"util/regexp.h" \
"a string of characters"
-constant CONST_REGEXP \
- ::CVC4::RegExp \
- ::CVC4::RegExpHashFunction \
- "util/regexp.h" \
- "a regular expression"
-
typerule CONST_STRING ::CVC4::theory::strings::StringConstantTypeRule
-typerule CONST_REGEXP ::CVC4::theory::strings::RegExpConstantTypeRule
# equal equal / less than / output
operator STRING_TO_REGEXP 1 "convert string to regexp"
}
};
-class RegExpConstantTypeRule {
-public:
- inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
- {
- return nodeManager->regExpType();
- }
-};
-
class RegExpConcatTypeRule {
public:
inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check)
return os << "\"" << s.toString(true) << "\"";
}
-std::ostream &operator<<(std::ostream &out, const RegExp &s) {
- return out << "regexp(" << s.getType() << ')';
-}
-
} // namespace CVC4
std::ostream& operator<<(std::ostream& os, const String& s) CVC4_PUBLIC;
-class CVC4_PUBLIC RegExp {
- public:
- RegExp() : d_type(1) {}
- explicit RegExp(const int t) : d_type(t) {}
-
- bool operator==(const RegExp& y) const { return d_type == y.d_type; }
- bool operator!=(const RegExp& y) const { return d_type != y.d_type; }
- bool operator<(const RegExp& y) const { return d_type < y.d_type; }
- bool operator>(const RegExp& y) const { return d_type > y.d_type; }
- bool operator<=(const RegExp& y) const { return d_type <= y.d_type; }
- bool operator>=(const RegExp& y) const { return d_type >= y.d_type; }
-
- int getType() const { return d_type; }
-
- private:
- int d_type;
-}; /* class RegExp */
-
-/**
- * Hash function for the RegExp constants.
- */
-struct CVC4_PUBLIC RegExpHashFunction {
- inline size_t operator()(const RegExp& s) const {
- return (size_t)s.getType();
- }
-}; /* struct RegExpHashFunction */
-
-std::ostream& operator<<(std::ostream& os, const RegExp& s) CVC4_PUBLIC;
-
} // namespace CVC4
#endif /* __CVC4__REGEXP_H */
%rename(greater) CVC4::String::operator>(const String&) const;
%rename(greaterEqual) CVC4::String::operator>=(const String&) const;
-%rename(assign) CVC4::RegExp::operator=(const RegExp&);
-%rename(equals) CVC4::RegExp::operator==(const RegExp&) const;
-%ignore CVC4::RegExp::operator!=(const RegExp&) const;
-%rename(less) CVC4::RegExp::operator<(const RegExp&) const;
-%rename(lessEqual) CVC4::RegExp::operator<=(const RegExp&) const;
-%rename(greater) CVC4::RegExp::operator>(const RegExp&) const;
-%rename(greaterEqual) CVC4::RegExp::operator>=(const RegExp&) const;
-
%rename(apply) CVC4::strings::StringHashFunction::operator()(const ::CVC4::String&) const;
-%rename(apply) CVC4::RegExpHashFunction::operator()(const RegExp&) const;
%ignore CVC4::operator<<(std::ostream&, const String&);
-%ignore CVC4::operator<<(std::ostream&, const RegExp&);
%apply int &OUTPUT { int &c };
%include "util/regexp.h"