return *d_node > *e.d_node;
}
-unsigned Expr::getId() const {
+unsigned long Expr::getId() const {
ExprManagerScope ems(*this);
Assert(d_node != NULL, "Unexpected NULL expression pointer!");
return d_node->getId();
* @return an identifier uniquely identifying the value this
* expression holds.
*/
- unsigned getId() const;
+ unsigned long getId() const;
/**
* Returns the kind of the expression (AND, PLUS ...).
namespace metakind {
/* these are #defines so their sum can be #if-checked in node_value.h */
-#define __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT 8
-#define __CVC4__EXPR__NODE_VALUE__NBITS__KIND 8
-#define __CVC4__EXPR__NODE_VALUE__NBITS__ID 32
-#define __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN 16
+#define __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT 20
+#define __CVC4__EXPR__NODE_VALUE__NBITS__KIND 10
+#define __CVC4__EXPR__NODE_VALUE__NBITS__ID 40
+#define __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN 26
static const unsigned MAX_CHILDREN =
(1u << __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN) - 1;
* Returns the unique id of this node
* @return the ud
*/
- unsigned getId() const {
+ unsigned long getId() const {
assertTNodeNotExpired();
return d_nv->getId();
}
/**
* The number of children allocated in d_nv.
*/
- uint16_t d_nvMaxChildren;
+ uint32_t d_nvMaxChildren;
template <unsigned N>
void internalCopy(const NodeBuilder<N>& nb);
#if __CVC4__EXPR__NODE_VALUE__NBITS__REFCOUNT + \
__CVC4__EXPR__NODE_VALUE__NBITS__KIND + \
__CVC4__EXPR__NODE_VALUE__NBITS__ID + \
- __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN != 64
-# error NodeValue header bit assignment does not sum to 64 !
-#endif /* sum != 64 */
+ __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN != 96
+# error NodeValue header bit assignment does not sum to 96 !
+#endif /* sum != 96 */
/**
* This is a NodeValue.
// this header fits into one 64-bit word
/** The ID (0 is reserved for the null value) */
- unsigned d_id : NBITS_ID;
+ unsigned long d_id : NBITS_ID;
/** The expression's reference count. @see cvc4::Node. */
unsigned d_rc : NBITS_REFCOUNT;
return hash;
}
- unsigned getId() const { return d_id; }
+ unsigned long getId() const { return d_id; }
Kind getKind() const { return dKindToKind(d_kind); }
kind::MetaKind getMetaKind() const { return kind::metaKindOf(getKind()); }
unsigned getNumChildren() const {
namespace expr {
namespace pickle {
-const unsigned NBITS_BLOCK = 32;
+const unsigned NBITS_BLOCK = 64;
const unsigned NBITS_KIND = __CVC4__EXPR__NODE_VALUE__NBITS__KIND;
const unsigned NBITS_NCHILDREN = __CVC4__EXPR__NODE_VALUE__NBITS__NCHILDREN;
const unsigned NBITS_CONSTBLOCKS = 32;
struct BlockHeaderOperator {
unsigned d_kind : NBITS_KIND;
unsigned d_nchildren : NBITS_NCHILDREN;
- unsigned : NBITS_BLOCK - (NBITS_KIND + NBITS_NCHILDREN);
+ unsigned long : NBITS_BLOCK - (NBITS_KIND + NBITS_NCHILDREN);
};/* struct BlockHeaderOperator */
struct BlockHeaderConstant {
unsigned d_kind : NBITS_KIND;
- unsigned d_constblocks : NBITS_BLOCK - NBITS_KIND;
+ unsigned long d_constblocks : NBITS_BLOCK - NBITS_KIND;
};/* struct BlockHeaderConstant */
struct BlockHeaderVariable {
unsigned d_kind : NBITS_KIND;
- unsigned : NBITS_BLOCK - NBITS_KIND;
+ unsigned long : NBITS_BLOCK - NBITS_KIND;
};/* struct BlockHeaderVariable */
struct BlockBody {
- unsigned d_data : NBITS_BLOCK;
+ unsigned long d_data : NBITS_BLOCK;
};/* struct BlockBody */
union Block {
*
* @return the id
*/
- inline unsigned getId() const {
+ inline unsigned long getId() const {
return d_nv->getId();
}
// trace nodes back to their assertions using CircuitPropagator's BackEdgesMap
void traceBackToAssertions(const std::vector<Node>& nodes, std::vector<TNode>& assertions);
// remove conjuncts in toRemove from conjunction n; return # of removed conjuncts
- size_t removeFromConjunction(Node& n, const std::hash_set<unsigned>& toRemove);
+ size_t removeFromConjunction(Node& n, const std::hash_set<unsigned long>& toRemove);
// scrub miplib encodings
void doMiplibTrick();
{
d_smt.d_nodeManager->subscribeEvents(this);
d_true = NodeManager::currentNM()->mkConst(true);
+
+ Chat() << "NodeValue width" << sizeof(expr::NodeValue) << std::endl;
}
~SmtEnginePrivate() {
}
}
-size_t SmtEnginePrivate::removeFromConjunction(Node& n, const std::hash_set<unsigned>& toRemove) {
+size_t SmtEnginePrivate::removeFromConjunction(Node& n, const std::hash_set<unsigned long>& toRemove) {
Assert(n.getKind() == kind::AND);
size_t removals = 0;
for(Node::iterator j = n.begin(); j != n.end(); ++j) {
Assert(!options::incrementalSolving());
const booleans::CircuitPropagator::BackEdgesMap& backEdges = d_propagator.getBackEdges();
- hash_set<unsigned> removeAssertions;
+ hash_set<unsigned long> removeAssertions;
NodeManager* nm = NodeManager::currentNM();
Node zero = nm->mkConst(Rational(0)), one = nm->mkConst(Rational(1));
void testMkAssociative3() {
try {
- unsigned int numVars = d_exprManager->maxArity(AND) + 1;
+ //unsigned int numVars = d_exprManager->maxArity(AND) + 1;
+ unsigned int numVars = (1<<16) + 1;
std::vector<Expr> vars = mkVars(d_exprManager->booleanType(), numVars);
Expr n = d_exprManager->mkAssociative(AND,vars);
checkAssociative(n,AND,numVars);
std::vector<Node> vars;
const unsigned int max = metakind::getUpperBoundForKind(AND);
TypeNode boolType = d_nodeManager->booleanType();
+ Node skolem = d_nodeManager->mkSkolem("i", boolType);
for( unsigned int i = 0; i <= max; ++i ) {
- vars.push_back( d_nodeManager->mkSkolem("i", boolType) );
+ vars.push_back( skolem );
}
TS_ASSERT_THROWS( d_nodeManager->mkNode(AND, vars), AssertionException );
#endif
TS_ASSERT_THROWS_NOTHING(nb.realloc(20000));
TS_ASSERT_THROWS_NOTHING(nb.realloc(60000));
TS_ASSERT_THROWS_NOTHING(nb.realloc(65535));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(65536));
+ TS_ASSERT_THROWS_NOTHING(nb.realloc(67108863));
#ifdef CVC4_ASSERTIONS
- TS_ASSERT_THROWS(nb.realloc(65536), AssertionException);
+ TS_ASSERT_THROWS(nb.realloc(67108863), AssertionException);
#endif /* CVC4_ASSERTIONS */
}
};