Skip to content

check type invariant of type_with_subtypet #6596

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 4 commits into from
Jan 19, 2022
Merged

Conversation

kroening
Copy link
Member

This commit does two things:

  1. The type invariant of type_with_subtypet (that there is one subtype) is
    now checked when casting to it.

  2. The check in .subtype() that there is a subtype is removed.

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

@kroening kroening marked this pull request as ready for review January 19, 2022 16:16
The gcc vector type attribute that comes out of the C parser is not yet a
full vector_typet -- thus use ID_frontend_vector to avoid the ambiguity.
The front-end generates ireps with multiple sub-ireps for gcc's __asm__
aliases.  This changes the use of .has_subtype() to checking whether there
is more than one.
@kroening kroening force-pushed the type_with_subtype branch 2 times, most recently from 26a1c93 to 0b4d1cc Compare January 19, 2022 18:40
c_bit_field_typet types have an underlying type, which should be preserved
by the adjustments that the byte operator lowering does.
This commit does two things:

1) The type invariant of type_with_subtypet (that there is one subtype) is
now checked when casting to it.

2) The check in .subtype() that there is a subtype is removed.
@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #6596 (87fef52) into develop (d9463a1) will increase coverage by 0.01%.
The diff coverage is 78.07%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6596      +/-   ##
===========================================
+ Coverage    76.48%   76.49%   +0.01%     
===========================================
  Files         1578     1578              
  Lines       181385   181464      +79     
===========================================
+ Hits        138736   138816      +80     
+ Misses       42649    42648       -1     
Impacted Files Coverage Δ
...s/variable-sensitivity/abstract_aggregate_object.h 75.00% <ø> (ø)
src/cpp/cpp_typecheck_initializer.cpp 29.26% <0.00%> (ø)
src/cpp/template_map.cpp 57.37% <0.00%> (ø)
src/goto-programs/goto_trace.cpp 80.73% <ø> (ø)
src/goto-programs/graphml_witness.cpp 53.37% <0.00%> (ø)
src/goto-programs/interpreter.cpp 52.29% <0.00%> (ø)
src/goto-programs/interpreter_evaluate.cpp 33.82% <0.00%> (+0.05%) ⬆️
src/solvers/flattening/boolbv_array_of.cpp 80.00% <0.00%> (ø)
src/solvers/flattening/boolbv_update.cpp 0.00% <0.00%> (ø)
...solvers/strings/string_format_builtin_function.cpp 73.05% <ø> (ø)
... and 58 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 cedd5ea...87fef52. Read the comment docs.

@kroening kroening merged commit d59e8f8 into develop Jan 19, 2022
@kroening kroening deleted the type_with_subtype branch January 19, 2022 20:15
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