Skip to content

adding a convert_function_application in the flattening that will be … #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions src/solvers/flattening/boolbv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,7 @@ bvt boolbvt::convert_bitvector(const exprt &expr)
}
else if(expr.id()==ID_function_application)
{
// record
functions.record(to_function_application_expr(expr));

// make it free bits
return prop.new_variables(boolbv_width(expr.type()));
return convert_function_application(to_function_application_expr(expr));
}
else if(expr.id()==ID_reduction_or || expr.id()==ID_reduction_and ||
expr.id()==ID_reduction_nor || expr.id()==ID_reduction_nand ||
Expand Down Expand Up @@ -502,6 +498,30 @@ bvt boolbvt::convert_symbol(const exprt &expr)

return bv;
}


/*******************************************************************\

Function: boolbvt::convert_function_application

Inputs:

Outputs:

Purpose:

\*******************************************************************/

bvt boolbvt::convert_function_application(
const function_application_exprt &expr)
{
// record
functions.record(expr);

// make it free bits
return prop.new_variables(boolbv_width(expr.type()));
}


/*******************************************************************\

Expand Down
1 change: 1 addition & 0 deletions src/solvers/flattening/boolbv.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class boolbvt:public arrayst
virtual bvt convert_bv_reduction(const unary_exprt &expr);
virtual bvt convert_not(const not_exprt &expr);
virtual bvt convert_power(const binary_exprt &expr);
virtual bvt convert_function_application(const function_application_exprt &expr);

virtual void make_bv_expr(const typet &type, const bvt &bv, exprt &dest);
virtual void make_free_bv_expr(const typet &type, exprt &dest);
Expand Down