Skip to content

Conversation

@thomasspriggs
Copy link
Contributor

This test is intended to cover incremental SMT decision procedure support expressions of the form address_of(array[0]). These occur as part of the conversion from array to pointer, which may be implicitly introduced by applying __CPROVER_OBJECT_SIZE to an array. The existing test is not actually checking this conversion due to it being simplified away during constant propagation. The introduction of non-determinism in this commit prevents constant propagation from removing expressions of this form, so that their conversion will actually be tested.

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

This test is intended to cover incremental SMT decision procedure
support expressions of the form `address_of(array[0])`. These occur as
part of the conversion from array to pointer, which may be implicitly
introduced by applying `__CPROVER_OBJECT_SIZE` to an array. The existing
test is not actually checking this conversion due to it being simplified
away during constant propagation. The introduction of non-determinism in
this commit prevents constant propagation from removing expressions of
this form, so that their conversion will actually be tested.
@thomasspriggs thomasspriggs force-pushed the tas/fix_address_of_zero_test branch from 226cee2 to 443d4f0 Compare September 7, 2022 17:34
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #7108 (e35425e) into develop (e6fc280) will increase coverage by 0.04%.
The diff coverage is 94.91%.

❗ Current head e35425e differs from pull request most recent head 1b5fa34. Consider uploading reports for the commit 1b5fa34 to get more accurate results

@@             Coverage Diff             @@
##           develop    #7108      +/-   ##
===========================================
+ Coverage    77.87%   77.91%   +0.04%     
===========================================
  Files         1576     1576              
  Lines       181587   181611      +24     
===========================================
+ Hits        141412   141511      +99     
+ Misses       40175    40100      -75     
Impacted Files Coverage Δ
src/cpp/cpp_template_type.h 52.94% <0.00%> (-11.35%) ⬇️
src/goto-instrument/dump_c.cpp 80.86% <0.00%> (ø)
src/goto-instrument/function.cpp 0.00% <0.00%> (ø)
src/ansi-c/c_typecheck_type.cpp 77.16% <86.66%> (+0.05%) ⬆️
.../src/java_bytecode/java_bytecode_convert_class.cpp 94.18% <100.00%> (+0.01%) ⬆️
...src/java_bytecode/java_bytecode_typecheck_type.cpp 96.00% <100.00%> (ø)
jbmc/src/java_bytecode/java_object_factory.cpp 94.40% <100.00%> (+0.02%) ⬆️
jbmc/src/java_bytecode/java_pointer_casts.cpp 92.50% <100.00%> (ø)
jbmc/src/java_bytecode/java_types.cpp 95.13% <100.00%> (+0.02%) ⬆️
src/ansi-c/c_typecast.cpp 80.65% <100.00%> (ø)
... and 27 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@thomasspriggs thomasspriggs force-pushed the tas/fix_address_of_zero_test branch from e35425e to 1b5fa34 Compare September 8, 2022 13:54
@thomasspriggs thomasspriggs merged commit 21fa6a0 into diffblue:develop Sep 8, 2022
@thomasspriggs thomasspriggs deleted the tas/fix_address_of_zero_test branch September 8, 2022 14:56
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