Skip to content

SMT2 type checking for define-fun #3421

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 2 commits into from
Nov 18, 2018
Merged

SMT2 type checking for define-fun #3421

merged 2 commits into from
Nov 18, 2018

Conversation

kroening
Copy link
Member

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • 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.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@kroening kroening force-pushed the smt2-fapp-type-checking branch 3 times, most recently from d9c7b9e to 31eb34a Compare November 15, 2018 08:50
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: 31eb34a).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91490994

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.

I'm arguably not very knowledgable in this area, but some things going on in here are very strange.


^EXIT=0$
^SIGNAL=0$
^line 5: type mismatch in function definition: expected `\(_ BitVec 16\)' but got `\(_ BitVec 8\)'$
Copy link
Collaborator

Choose a reason for hiding this comment

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

So the exit code is useless?

Copy link
Member Author

Choose a reason for hiding this comment

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

Most solvers seem to do the "continued-execution" error handling from the SMT-LIB standard; yes, the exit code is then used for SAT/UNSAT only.

@kroening kroening force-pushed the smt2-fapp-type-checking branch 3 times, most recently from 866350e to 9b0e043 Compare November 18, 2018 11:20
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.

Some questions and nit-picks below.

}

const typet type;

Copy link
Collaborator

Choose a reason for hiding this comment

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

This blank line might (should) trip up the linter.

public:
class smt2_format
{
public:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit pick: Maybe just make this a struct and remove the public as we do in some other places?

@@ -80,6 +80,20 @@ class smt2_parsert:public smt2_tokenizert

/// Apply typecast to unsignedbv to given expression
exprt cast_bv_to_unsigned(const exprt &);

public:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit pick: maybe just move this chunk of code into the earlier public section rather than having multiple ones?

rm Linking4/test.desc
rm Linking7/test.desc
rm Malloc17/test.desc
rm Malloc18/test.desc
rm Malloc19/test.desc
rm Malloc20/test.desc
rm Malloc21/test.desc
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am surprised that this is now causing more failures?

Copy link
Member Author

Choose a reason for hiding this comment

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

To be expected: the solver is now less permissive than it used to be. These two tests indicate cases in which the back-end generates invalid SMT-LIB files.

@kroening kroening force-pushed the smt2-fapp-type-checking branch from 40c0362 to be0c338 Compare November 18, 2018 13:54
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

✔️
Passed Diffblue compatibility checks (cbmc commit: be0c338).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/91783476

@kroening kroening merged commit f5eedc4 into develop Nov 18, 2018
@kroening kroening deleted the smt2-fapp-type-checking branch November 18, 2018 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants