Expr
Parser::mkAnonymousFunction(const std::string& prefix, const Type& type) {
stringstream name;
- name << prefix << ':' << ++d_anonymousFunctionCount;
+ name << prefix << "_anon_" << ++d_anonymousFunctionCount;
return mkFunction(name.str(), type);
}
// no-op
break;
case kind::LAMBDA:
- op << "LAMBDA";
- opType = PREFIX;
+ out << "(LAMBDA";
+ toStream(out, n[0], depth, types, true);
+ out << ": ";
+ toStream(out, n[1], depth, types, true);
+ out << ")";
+ return;
break;
case kind::APPLY:
toStream(op, n.getOperator(), depth, types, true);
}
ufmt.setDefaultValue( m, default_v );
ufmt.simplify();
- Node val = ufmt.getFunctionValue( "$x" );
+ Node val = ufmt.getFunctionValue( "_ufmt_" );
Trace("model-builder") << " Assigning (" << n << ") to (" << val << ")" << endl;
m->d_uf_models[n] = val;
//ufmt.debugPrint( std::cout, m );
wiki.20.cvc \
wiki.21.cvc \
simplification_bug3.cvc \
- queries0.cvc
+ queries0.cvc \
+ print_lambda.cvc
# Regression tests for TPTP inputs
TPTP_TESTS = \
--- /dev/null
+; COMMAND-LINE: --produce-models
+; EXPECT: sat
+; EXPECT: f : (INT) -> INT = (LAMBDA(_ufmt_1:INT): 0);
+; EXIT: 10
+
+f : INT -> INT;
+ASSERT f(1) = 0;
+CHECKSAT;
+COUNTEREXAMPLE;
+