Skip to content

Conversation

kroening
Copy link
Member

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

The grammar for the SMT-LIB 2 command declare-fun does not expect a
parameter identifier.
Uninterpreted functions don't have a definition, which has previously caused
a crash.
This adds a test for an uninterpreted function, added using declare-fun.
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #5791 (2019acb) into develop (a6a0729) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #5791      +/-   ##
===========================================
+ Coverage    69.67%   69.68%   +0.01%     
===========================================
  Files         1242     1242              
  Lines       100885   100882       -3     
===========================================
+ Hits         70290    70299       +9     
+ Misses       30595    30583      -12     
Flag Coverage Δ
cproversmt2 43.37% <66.66%> (+<0.01%) ⬆️
regression 66.64% <100.00%> (+0.01%) ⬆️
unit 32.29% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/solvers/smt2/smt2_parser.cpp 69.19% <ø> (+1.55%) ⬆️
src/solvers/flattening/boolbv.cpp 69.66% <100.00%> (+0.27%) ⬆️
src/solvers/smt2/smt2_solver.cpp 83.01% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6a0729...2019acb. Read the comment docs.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, but I can't claim particular knowledge with the SMT2 back-end or solver.

Comment on lines +568 to +572
else if(expr.id() == ID_function_application)
{
functions.record(to_function_application_expr(expr));
return prop.new_variable();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also have implications outside SMT2, i.e., were uninterpreted functions previously broken in some way?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; I agree with @tautschnig this seems like it should have a visible / testable effect on the usual back-end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this also have implications outside SMT2, i.e., were uninterpreted functions previously broken in some way?

I've added a further test that uses the C front-end.

Copy link
Collaborator

@martin-cs martin-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve modulo @tautschnig 's concern.

Comment on lines +568 to +572
else if(expr.id() == ID_function_application)
{
functions.record(to_function_application_expr(expr));
return prop.new_variable();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah; I agree with @tautschnig this seems like it should have a visible / testable effect on the usual back-end.

This adds support for uninterpreted functions that have a Boolean codomain.
@kroening kroening merged commit 76f37ce into develop Jan 30, 2021
@kroening kroening deleted the smt2-uf branch January 30, 2021 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants