@@ -1028,26 +1028,27 @@ typet smt2_parsert::function_signature_definition()
10281028 return sort ();
10291029 }
10301030
1031- mathematical_function_typet result ;
1031+ mathematical_function_typet::domaint domain ;
10321032
10331033 while (peek ()!=CLOSE)
10341034 {
10351035 if (next_token ()!=OPEN)
10361036 {
10371037 error () << " expected '(' at beginning of parameter" << eom;
1038- return result ;
1038+ return nil_typet () ;
10391039 }
10401040
10411041 if (next_token ()!=SYMBOL)
10421042 {
10431043 error () << " expected symbol in parameter" << eom;
1044- return result ;
1044+ return nil_typet () ;
10451045 }
10461046
1047- auto & var=result. add_variable () ;
1047+ mathematical_function_typet::variablet var;
10481048 std::string id=buffer;
10491049 var.set_identifier (id);
10501050 var.type ()=sort ();
1051+ domain.push_back (var);
10511052
10521053 auto &entry=id_map[id];
10531054 entry.type =var.type ();
@@ -1056,15 +1057,15 @@ typet smt2_parsert::function_signature_definition()
10561057 if (next_token ()!=CLOSE)
10571058 {
10581059 error () << " expected ')' at end of parameter" << eom;
1059- return result ;
1060+ return nil_typet () ;
10601061 }
10611062 }
10621063
10631064 next_token (); // eat the ')'
10641065
1065- result. codomain ()= sort ();
1066+ typet codomain = sort ();
10661067
1067- return result ;
1068+ return mathematical_function_typet (domain, codomain) ;
10681069}
10691070
10701071typet smt2_parsert::function_signature_declaration ()
@@ -1081,37 +1082,38 @@ typet smt2_parsert::function_signature_declaration()
10811082 return sort ();
10821083 }
10831084
1084- mathematical_function_typet result ;
1085+ mathematical_function_typet::domaint domain ;
10851086
10861087 while (peek ()!=CLOSE)
10871088 {
10881089 if (next_token ()!=OPEN)
10891090 {
10901091 error () << " expected '(' at beginning of parameter" << eom;
1091- return result ;
1092+ return nil_typet () ;
10921093 }
10931094
10941095 if (next_token ()!=SYMBOL)
10951096 {
10961097 error () << " expected symbol in parameter" << eom;
1097- return result ;
1098+ return nil_typet () ;
10981099 }
10991100
1100- auto & var=result. add_variable () ;
1101+ mathematical_function_typet::variablet var;
11011102 var.type ()=sort ();
1103+ domain.push_back (var);
11021104
11031105 if (next_token ()!=CLOSE)
11041106 {
11051107 error () << " expected ')' at end of parameter" << eom;
1106- return result ;
1108+ return nil_typet () ;
11071109 }
11081110 }
11091111
11101112 next_token (); // eat the ')'
11111113
1112- result. codomain ()= sort ();
1114+ typet codomain = sort ();
11131115
1114- return result ;
1116+ return mathematical_function_typet (domain, codomain) ;
11151117}
11161118
11171119void smt2_parsert::command (const std::string &c)
0 commit comments