Skip to content

add more formatters #6724

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 5 commits into from
Mar 14, 2022
Merged

add more formatters #6724

merged 5 commits into from
Mar 14, 2022

Conversation

kroening
Copy link
Member

This adds a set of additional formatters for format_expr.

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

This adds to_ternary_expr, to upcast expressions with three operands.
@codecov
Copy link

codecov bot commented Mar 13, 2022

Codecov Report

Merging #6724 (9053c5f) into develop (eb84153) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6724   +/-   ##
========================================
  Coverage    76.84%   76.85%           
========================================
  Files         1589     1589           
  Lines       183795   183846   +51     
========================================
+ Hits        141238   141289   +51     
  Misses       42557    42557           
Impacted Files Coverage Δ
src/util/format_expr.cpp 88.95% <100.00%> (+1.76%) ⬆️
src/util/std_expr.h 93.48% <100.00%> (+0.03%) ⬆️

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 5d89f25...9053c5f. Read the comment docs.

Comment on lines 118 to 122
else if(id == "expression")
{
const auto &expression_type = to_type_with_subtype(type);
return os << format(expression_type.subtype()) << " expr";
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

git grep expression_typet returns nothing. What is this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll drop it.

kroening and others added 4 commits March 14, 2022 07:23
This fixes the formatter for pointer-typed constant expressions.
This adds a formatter to format_expr for array_of_exprt expressions.
This adds a formatter to format_expr for address_of_exprt expressions.
This adds formatters to format_expr for floating-point expressions.
@kroening kroening marked this pull request as ready for review March 14, 2022 08:39
@tautschnig tautschnig merged commit 3f7f5ae into develop Mar 14, 2022
@tautschnig tautschnig deleted the more_formatters branch March 14, 2022 10:48
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.

2 participants