@@ -291,26 +291,22 @@ exprt smt2_parsert::quantifier_expression(irep_idt id)
291291}
292292
293293exprt smt2_parsert::function_application (
294- const irep_idt & ,
295- const exprt::operandst &)
294+ const symbol_exprt &function ,
295+ const exprt::operandst &op )
296296{
297- #if 0
298- const auto &f = id_map[identifier];
297+ const auto &function_type = to_mathematical_function_type (function.type ());
299298
300299 // check the arguments
301- if(op.size()!=f.type.variables ().size())
300+ if (op.size () != function_type. domain ().size ())
302301 throw error (" wrong number of arguments for function" );
303302
304303 for (std::size_t i=0 ; i<op.size (); i++)
305304 {
306- if(op[i].type() != f.type.variables ()[i].type() )
305+ if (op[i].type () != function_type. domain ()[i])
307306 throw error (" wrong type for arguments for function" );
308307 }
309308
310- return function_application_exprt(
311- symbol_exprt(identifier, f.type), op, f.type.range());
312- #endif
313- return nil_exprt ();
309+ return function_application_exprt (function, op);
314310}
315311
316312exprt::operandst smt2_parsert::cast_bv_to_signed (const exprt::operandst &op)
@@ -826,7 +822,7 @@ exprt smt2_parsert::function_application()
826822 {
827823 if (id_it->second .type .id ()==ID_mathematical_function)
828824 {
829- return function_application_exprt (
825+ return function_application (
830826 symbol_exprt (final_id, id_it->second .type ), op);
831827 }
832828 else
0 commit comments