$(AM_V_CXX)$(LTCXXCOMPILE) -c $(PYTHON_CPPFLAGS) -o $@ $<
python.cpp:
ocaml.cpp:
-python.lo: ruby.cpp
+ruby.lo: ruby.cpp
$(AM_V_CXX)$(LTCXXCOMPILE) -c $(RUBY_CPPFLAGS) -o $@ $<
ruby.cpp:
tcl.cpp:
{ cmd = new SetOptionCommand(s, sexpr); }
/* push / pop */
- | PUSH_TOK k=numeral?
- { cmd = REPEAT_COMMAND(k, PushCommand()); }
- | POP_TOK k=numeral?
- { cmd = REPEAT_COMMAND(k, PopCommand()); }
+ | PUSH_TOK ( k=numeral { cmd = REPEAT_COMMAND(k, PushCommand()); }
+ | { cmd = new PushCommand(); } )
+ | POP_TOK ( k=numeral { cmd = REPEAT_COMMAND(k, PopCommand()); }
+ | { cmd = new PopCommand(); } )
| POPTO_TOK k=numeral?
{ UNSUPPORTED("POPTO command"); }
class ParserExprStream : public CVC4::ExprStream {
Parser* d_parser;
public:
- ExprStream(Parser* parser) : d_parser(parser) {}
- ~ExprStream() { delete d_parser; }
+ ParserExprStream(Parser* parser) : d_parser(parser) {}
+ ~ParserExprStream() { delete d_parser; }
Expr nextExpr() { return d_parser->nextExpression(); }
};/* class Parser::ExprStream */
%ignore CVC4::operator<<(std::ostream&, const Cardinality&);
%ignore CVC4::operator<<(std::ostream&, Cardinality::Beth);
+ class Beth {
+ Integer d_index;
+
+ public:
+ Beth(const Integer& beth) : d_index(beth) {
+ CheckArgument(beth >= 0, beth,
+ "Beth index must be a nonnegative integer, not %s.",
+ beth.toString().c_str());
+ }
+
+ const Integer& getNumber() const throw() {
+ return d_index;
+ }
+ };/* class Cardinality::Beth */
+
+ class Unknown {
+ public:
+ Unknown() throw() {}
+ ~Unknown() throw() {}
+ };/* class Cardinality::Unknown */
+
%include "util/cardinality.h"
+
+%{
+namespace CVC4 {
+ typedef CVC4::Cardinality::Beth Beth;
+ typedef CVC4::Cardinality::Unknown Unknown;
+}
+%}
%{
#include "util/datatype.h"
-namespace CVC4 {
-//typedef CVC4::Datatype::Constructor DatatypeConstructor;
-}
%}
namespace CVC4 {
%rename(apply) CVC4::DatatypeHashFunction::operator()(const Datatype::Constructor&) const;
%ignore CVC4::DatatypeHashFunction::operator()(const Datatype::Constructor*) const;
+%rename(beginConst) CVC4::Constructor::begin() const;
+%rename(endConst) CVC4::Constructor::end() const;
+
+%rename(getArg) CVC4::Constructor::operator[](size_t) const;
+
%ignore CVC4::operator<<(std::ostream&, const Datatype&);
%ignore CVC4::operator<<(std::ostream&, const Datatype::Constructor&);
%ignore CVC4::operator<<(std::ostream&, const Datatype::Constructor::Arg&);
const Arg& operator[](size_t index) const;
};/* class Datatype::Constructor */
-}
class SelfType {
};/* class Datatype::SelfType */
inline UnresolvedType(std::string name);
inline std::string getName() const throw();
};/* class Datatype::UnresolvedType */
+}
%{
namespace CVC4 {
%ignore CVC4::Integer::Integer(int);
%ignore CVC4::Integer::Integer(unsigned int);
+%ignore CVC4::Integer::Integer(const std::string&);
%rename(assign) CVC4::Integer::operator=(const Integer&);
%rename(equals) CVC4::Integer::operator==(const Integer&) const;
%ignore CVC4::null_os;
%ignore CVC4::DumpC::dump_cout;
+%ignore operator<<;
+%ignore on(std::string);
+%ignore isOn(std::string);
+%ignore off(std::string);
+%ignore printf(std::string, const char*, ...);
+%ignore operator()(std::string);
+
+%ignore CVC4::ScopedDebug::ScopedDebug(std::string);
+%ignore CVC4::ScopedDebug::ScopedDebug(std::string, bool);
+
+%ignore CVC4::ScopedTrace::ScopedTrace(std::string);
+%ignore CVC4::ScopedTrace::ScopedTrace(std::string, bool);
+
+%rename(getostream) operator std::ostream&;
+%rename(getCVC4ostream) operator CVC4ostream;
+%rename(get) operator();
+%rename(ok) operator bool;
+
%include "util/output.h"
%ignore CVC4::Rational::Rational(unsigned int);
%ignore CVC4::Rational::Rational(int, int);
%ignore CVC4::Rational::Rational(unsigned int, unsigned int);
+%ignore CVC4::Rational::Rational(const std::string&);
%rename(assign) CVC4::Rational::operator=(const Rational&);
%rename(equals) CVC4::Rational::operator==(const Rational&) const;
class CVC4_PUBLIC Stat;
-inline std::ostream& operator<<(std::ostream& os, const timespec& t);
-
/**
* The main statistics registry. This registry maintains the list of
* currently active statistics and is able to "flush" them all.
}
/** Output a timespec on an output stream. */
+inline std::ostream& operator<<(std::ostream& os, const timespec& t) CVC4_PUBLIC;
inline std::ostream& operator<<(std::ostream& os, const timespec& t) {
// assumes t.tv_nsec is in range
return os << t.tv_sec << "."
<< std::setfill('0') << std::setw(8) << std::right << t.tv_nsec;
}
+class CVC4_PUBLIC CodeTimer;
/**
* A timer statistic. The timer can be started and stopped
public:
- /**
- * Utility class to make it easier to call stop() at the end of a
- * code block. When constructed, it starts the timer. When
- * destructed, it stops the timer.
- */
- class CodeTimer {
- TimerStat& d_timer;
-
- /** Private copy constructor undefined (no copy permitted). */
- CodeTimer(const CodeTimer& timer) CVC4_UNDEFINED;
- /** Private assignment operator undefined (no copy permitted). */
- CodeTimer& operator=(const CodeTimer& timer) CVC4_UNDEFINED;
-
- public:
- CodeTimer(TimerStat& timer) : d_timer(timer) {
- d_timer.start();
- }
- ~CodeTimer() {
- d_timer.stop();
- }
- };/* class TimerStat::CodeTimer */
+ typedef CVC4::CodeTimer CodeTimer;
/**
* Construct a timer statistic with the given name. Newly-constructed
};/* class TimerStat */
+/**
+ * Utility class to make it easier to call stop() at the end of a
+ * code block. When constructed, it starts the timer. When
+ * destructed, it stops the timer.
+ */
+class CVC4_PUBLIC CodeTimer {
+ TimerStat& d_timer;
+
+ /** Private copy constructor undefined (no copy permitted). */
+ CodeTimer(const CodeTimer& timer) CVC4_UNDEFINED;
+ /** Private assignment operator undefined (no copy permitted). */
+ CodeTimer& operator=(const CodeTimer& timer) CVC4_UNDEFINED;
+
+public:
+ CodeTimer(TimerStat& timer) : d_timer(timer) {
+ d_timer.start();
+ }
+ ~CodeTimer() {
+ d_timer.stop();
+ }
+};/* class CodeTimer */
+
+
/**
* To use a statistic, you need to declare it, initialize it in your
* constructor, register it in your constructor, and deregister it in
#include "util/stats.h"
%}
-%ignore CVC4::operator<<(std::ostream&, const ::timespec&);
+%ignore CVC4::operator<<(std::ostream&, const timespec&);
%rename(increment) CVC4::IntStat::operator++();
%rename(plusAssign) CVC4::IntStat::operator+=(int64_t);
-%rename(plusAssign) CVC4::operator+=(::timespec&, const ::timespec&);
-%rename(minusAssign) CVC4::operator-=(::timespec&, const ::timespec&);
-%rename(plus) CVC4::operator+(const ::timespec&, const ::timespec&);
-%rename(minus) CVC4::operator-(const ::timespec&, const ::timespec&);
-%rename(equals) CVC4::operator==(const ::timespec&, const ::timespec&);
-%ignore CVC4::operator!=(const ::timespec&, const ::timespec&);
-%rename(less) CVC4::operator<(const ::timespec&, const ::timespec&);
-%rename(lessEqual) CVC4::operator<=(const ::timespec&, const ::timespec&);
-%rename(greater) CVC4::operator>(const ::timespec&, const ::timespec&);
-%rename(greaterEqual) CVC4::operator>=(const ::timespec&, const ::timespec&);
+%rename(plusAssign) CVC4::operator+=(timespec&, const timespec&);
+%rename(minusAssign) CVC4::operator-=(timespec&, const timespec&);
+%rename(plus) CVC4::operator+(const timespec&, const timespec&);
+%rename(minus) CVC4::operator-(const timespec&, const timespec&);
+%rename(equals) CVC4::operator==(const timespec&, const timespec&);
+%ignore CVC4::operator!=(const timespec&, const timespec&);
+%rename(less) CVC4::operator<(const timespec&, const timespec&);
+%rename(lessEqual) CVC4::operator<=(const timespec&, const timespec&);
+%rename(greater) CVC4::operator>(const timespec&, const timespec&);
+%rename(greaterEqual) CVC4::operator>=(const timespec&, const timespec&);
%include "util/stats.h"