From 51726016b8733d2cd50a1834e841253e69a0b27a Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Tue, 17 Jun 2014 21:24:26 -0400 Subject: [PATCH] Java bindings fixes. --- src/cvc4.i | 3 ++- src/expr/kind.i | 3 +++ src/util/Makefile.am | 1 + src/util/emptyset.i | 17 +++++++++++++++++ src/util/predicate.h | 2 +- src/util/predicate.i | 2 +- 6 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/util/emptyset.i diff --git a/src/cvc4.i b/src/cvc4.i index cd5896ff3..a84d69cf7 100644 --- a/src/cvc4.i +++ b/src/cvc4.i @@ -283,9 +283,9 @@ std::set CVC4::JavaInputStreamAdapter::s_adapters; #endif /* SWIGJAVA */ +%include "util/exception.i" %include "util/integer.i" %include "util/rational.i" -%include "util/exception.i" %include "util/language.i" %include "util/cardinality.i" %include "util/bool.i" @@ -303,6 +303,7 @@ std::set CVC4::JavaInputStreamAdapter::s_adapters; %include "expr/type.i" %include "util/ascription_type.i" +%include "util/emptyset.i" %include "util/datatype.i" %include "util/tuple.i" %include "util/record.i" diff --git a/src/expr/kind.i b/src/expr/kind.i index 95c350cf3..189c94f1f 100644 --- a/src/expr/kind.i +++ b/src/expr/kind.i @@ -8,6 +8,9 @@ %ignore CVC4::theory::operator++(TheoryId&); +%rename(apply) CVC4::kind::KindHashFunction::operator()(::CVC4::Kind) const; +%rename(apply) CVC4::TypeConstantHashFunction::operator()(TypeConstant) const; + %rename(Kind) CVC4::kind::Kind_t; %include "expr/kind.h" diff --git a/src/util/Makefile.am b/src/util/Makefile.am index 9122f9ddb..5cf5da1e0 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -148,6 +148,7 @@ EXTRA_DIST = \ language.i \ array.i \ array_store_all.i \ + emptyset.i \ ascription_type.i \ rational.i \ hash.i \ diff --git a/src/util/emptyset.i b/src/util/emptyset.i new file mode 100644 index 000000000..ce4f3a4b7 --- /dev/null +++ b/src/util/emptyset.i @@ -0,0 +1,17 @@ +%{ +#include "util/emptyset.h" +%} + +%rename(equals) CVC4::EmptySet::operator==(const EmptySet&) const; +%ignore CVC4::EmptySet::operator!=(const EmptySet&) const; + +%rename(less) CVC4::EmptySet::operator<(const EmptySet&) const; +%rename(lessEqual) CVC4::EmptySet::operator<=(const EmptySet&) const; +%rename(greater) CVC4::EmptySet::operator>(const EmptySet&) const; +%rename(greaterEqual) CVC4::EmptySet::operator>=(const EmptySet&) const; + +%rename(apply) CVC4::EmptySetHashFunction::operator()(const EmptySet&) const; + +%ignore CVC4::operator<<(std::ostream& out, const EmptySet& es); + +%include "util/emptyset.h" diff --git a/src/util/predicate.h b/src/util/predicate.h index 686e92dc8..5fb3f806a 100644 --- a/src/util/predicate.h +++ b/src/util/predicate.h @@ -52,7 +52,7 @@ public: bool operator==(const Predicate& p) const; - friend std::ostream& operator<<(std::ostream& out, const Predicate& p); + friend std::ostream& CVC4::operator<<(std::ostream& out, const Predicate& p); friend size_t PredicateHashFunction::operator()(const Predicate& p) const; };/* class Predicate */ diff --git a/src/util/predicate.i b/src/util/predicate.i index f29cd16d5..eedbb2e83 100644 --- a/src/util/predicate.i +++ b/src/util/predicate.i @@ -7,6 +7,6 @@ %rename(apply) CVC4::PredicateHashFunction::operator()(const Predicate&) const; -%ignore CVC4::operator<<(std::ostream& out, const Predicate& p); +%ignore CVC4::operator<<(std::ostream&, const Predicate&); %include "util/predicate.h" -- 2.30.2