Required to decouple options from NodeManager.
This option is now always enabled in debug, and disabled in production.
{
/* force an immediate type check, if early type checking is
enabled and the current node isn't a variable or constant */
- if( d_nm->getOptions()[options::earlyTypeChecking] ) {
- kind::MetaKind mk = n.getMetaKind();
- if( mk != kind::metakind::VARIABLE
- && mk != kind::metakind::NULLARY_OPERATOR
- && mk != kind::metakind::CONSTANT ) {
- d_nm->getType(n, true);
- }
+ kind::MetaKind mk = n.getMetaKind();
+ if (mk != kind::metakind::VARIABLE && mk != kind::metakind::NULLARY_OPERATOR
+ && mk != kind::metakind::CONSTANT)
+ {
+ d_nm->getType(n, true);
}
}
#endif /* CVC4_DEBUG */
Debug("getType") << this << " getting type for " << &n << " " << n << ", check=" << check << ", needsCheck = " << needsCheck << ", hasType = " << hasType << endl;
-
- if(needsCheck && !(*d_options)[options::earlyTypeChecking]) {
+
+#ifdef CVC4_DEBUG
+ // already did type check eagerly upon creation in node builder
+ bool doTypeCheck = false;
+#else
+ bool doTypeCheck = true;
+#endif
+ if (needsCheck && doTypeCheck)
+ {
/* Iterate and compute the children bottom up. This avoids stack
overflows in computeType() when the Node graph is really deep,
which should only affect us when we're type checking lazily. */
read_only = true
help = "print types with variables when printing exprs"
-[[option]]
- name = "earlyTypeChecking"
- category = "regular"
- long = "eager-type-checking"
- type = "bool"
- default = "USE_EARLY_TYPE_CHECKING_BY_DEFAULT"
- read_only = true
- help = "type check expressions immediately on creation (debug builds only)"
-
[[option]]
name = "typeChecking"
category = "regular"