DRAFT: Control Flow Retrace feature #8636
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a feature to retrace and verify a single control flow path. The path can be given using
--retrace
as a string of 0s and 1s. From a very brief evaluation test, it seems to be faster than bounded loop unwinding. Only that it might be challenging to find a path to retrace. The 0s and 1s in the input retrace string follow the goto decisions in cbmc's internal goto program representation. During symbolic execution, files and line numbers for each decision are logged to the console, so the interactive use should be intuitive.Some examples and evaluations are here: examples_and_evaluation.zip
Use Cases
Open problems/questions
--unwind
and--paths
. We tried to implement this also in cbmc, but we faced several problems, like where to store the intermediate tracing decisions, as multiple branches are explored and states are sometimes copied, sometimes reused. Furthermore, the methodsymex_goto()
is very complicated so that it is not trivial, when and which tracing decisions were taken.Technical remarks
The implementation is mainly in the new method
goto_retrace()
insymex_goto.cpp
.