** \todo document this file
**/
-#include "theory/fp/theory_fp.h"
+
+#include "options/fp_options.h"
#include "theory/rewriter.h"
#include "theory/theory_model.h"
+#include "theory/fp/theory_fp.h"
+
#include <set>
#include <stack>
std::vector<TypeNode> args(1);
args[0] = t;
fun = nm->mkSkolem("floatingpoint_to_real_infinity_and_NaN_case",
- nm->mkFunctionType(args, nm->realType()),
+ nm->mkFunctionType(args, nm->realType()),
"floatingpoint_to_real_infinity_and_NaN_case",
NodeManager::SKOLEM_EXACT_NAME);
d_toRealMap.insert(t, fun);
return !(d_registeredTerms.find(node) == d_registeredTerms.end());
}
-void TheoryFp::preRegisterTerm(TNode node) {
+void TheoryFp::preRegisterTerm(TNode node)
+{
+ if (Configuration::isBuiltWithSymFPU() && !options::fpExp())
+ {
+ TypeNode tn = node.getType();
+ unsigned exp_sz = tn.getFloatingPointExponentSize();
+ unsigned sig_sz = tn.getFloatingPointSignificandSize();
+ if (!((exp_sz == 8 && sig_sz == 24) || (exp_sz == 11 && sig_sz == 53)))
+ {
+ std::stringstream ss;
+ ss << "FP types with sizes other than 8/24 or 11/53 are not supported in "
+ "default mode, try the experimental solver via --fp-exp";
+ throw LogicException(ss.str());
+ }
+ }
Trace("fp-preRegisterTerm")
<< "TheoryFp::preRegisterTerm(): " << node << std::endl;
registerTerm(node);
; REQUIRES: symfpu
+; COMMAND-LINE: --fp-exp
; EXPECT: sat
; NOTE: the (set-logic ALL) is on purpose because the problem was not triggered
; with QF_FP.
(set-logic ALL)
-(declare-const r RoundingMode)
+(declare-const r RoundingMode)
(declare-const x (_ FloatingPoint 5 11))
(declare-const y (_ FloatingPoint 5 11))
(assert (not (= (fp.isSubnormal x) false)))