Skip to content

Crangler: support semicolon in post-declarator expressions #6986

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

Conversation

tautschnig
Copy link
Collaborator

assigns clauses used in contracts use semicolons to delimit expressions.
Make sure crangler just accepts whatever occurs between matching pairs
of parentheses.

  • 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.

@codecov
Copy link

codecov bot commented Jul 1, 2022

Codecov Report

Merging #6986 (150a826) into develop (09e1041) will increase coverage by 0.00%.
The diff coverage is 81.63%.

@@            Coverage Diff            @@
##           develop    #6986    +/-   ##
=========================================
  Coverage    77.81%   77.82%            
=========================================
  Files         1570     1569     -1     
  Lines       180682   180554   -128     
=========================================
- Hits        140601   140512    -89     
+ Misses       40081    40042    -39     
Impacted Files Coverage Δ
src/linking/linking.cpp 59.36% <68.96%> (+0.65%) ⬆️
src/analyses/does_remove_const.cpp 100.00% <100.00%> (ø)
src/crangler/mini_c_parser.cpp 72.58% <100.00%> (+1.55%) ⬆️
src/goto-instrument/replace_calls.cpp 89.70% <100.00%> (-0.15%) ⬇️
src/goto-programs/goto_program.cpp 81.80% <100.00%> (ø)
src/goto-programs/remove_function_pointers.cpp 92.79% <100.00%> (ø)
...nalyses/does_remove_const/does_expr_lose_const.cpp 100.00% <100.00%> (ø)
...ove_const/does_type_preserve_const_correctness.cpp 100.00% <100.00%> (ø)
...does_remove_const/is_type_at_least_as_const_as.cpp 100.00% <100.00%> (ø)
... and 2 more

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 6d5ddf5...150a826. Read the comment docs.

@kroening
Copy link
Member

kroening commented Jul 1, 2022

We may wish to generalise this to a "matched parentheses consumer", which could then also eat [ ], { }.

@tautschnig
Copy link
Collaborator Author

We may wish to generalise this to a "matched parentheses consumer", which could then also eat [ ], { }.

I can see that this might make sense in a more general context, if that's what you want me to implement? In the specific case, curly braces should not play that role (for they are the start of the body), and square brackets don't seem to be necessary at the moment.

assigns clauses used in contracts use semicolons to delimit expressions.
Make sure crangler just accepts whatever occurs between matching pairs
of parentheses.
@tautschnig tautschnig force-pushed the bugfixes/crangler-assigns-clauses branch from c66cf19 to 150a826 Compare July 5, 2022 13:29
@tautschnig tautschnig merged commit 365871d into diffblue:develop Jul 5, 2022
@tautschnig tautschnig deleted the bugfixes/crangler-assigns-clauses branch July 5, 2022 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants