Debug("model-getvalue-debug") << "[model-getvalue] getValue : substitute " << n << " to " << nn << std::endl;
//get value in model
nn = getModelValue(nn);
- if (nn.isNull()) return nn;
- if(options::condenseFunctionValues() || nn.getKind() != kind::LAMBDA) {
+ if (nn.isNull())
+ {
+ return nn;
+ }
+ else if (nn.getKind() == kind::LAMBDA)
+ {
+ if (options::condenseFunctionValues())
+ {
+ // normalize the body. Do not normalize the entire node, which
+ // involves array normalization.
+ NodeManager* nm = NodeManager::currentNM();
+ nn = nm->mkNode(kind::LAMBDA, nn[0], Rewriter::rewrite(nn[1]));
+ }
+ }
+ else
+ {
//normalize
nn = Rewriter::rewrite(nn);
}
-; SCRUBBER: sed -e 's/BOUND_VARIABLE_[0-9]*/BOUND_VARIABLE/'
+; SCRUBBER: sed -e 's/BOUND_VARIABLE_[0-9]*/V/; s/_arg_[0-9]*/V/'
; EXPECT: sat
; EXPECT: (((f 4) 7))
-; EXPECT: ((g (lambda ((BOUND_VARIABLE Int)) 7)))
-; EXPECT: ((f (lambda ((BOUND_VARIABLE Int)) 7)))
+; EXPECT: ((g (lambda ((V Int)) 7)))
+; EXPECT: ((f (lambda ((V Int)) 7)))
(set-logic UFLIA)
(set-option :produce-models true)
(define-fun f ((x Int)) Int 7)