Skip to content

Cover (and others) for reachable functions only #671

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 3 commits into from
Mar 23, 2017

Conversation

peterschrammel
Copy link
Member

@peterschrammel peterschrammel commented Mar 22, 2017

The default behaviour of CBMC for the options --show-goto-functions,
--show-properties and --cover is to consider all functions. This
is particularly annoying for --cover where coverage goals are
reported from functions that are not reachable from the entry point.
Also, --show-reachable-properties has been introduced in the past
to hide such properties.

We could change the default behaviour to slicing away everything
that is not reachable from the entry point. However, this would
require an extra option to be able to view functions and properties
that are not reachable.

This PR preserves the default behaviour and enables focussing
the output of --show-goto-functions --show-properties and --cover
on reachable functions using --reachable-functions.

The option --show-reachable-properties could be removed (including cbmc_parse_options.cpp:543-556).

@tautschnig
Copy link
Collaborator

Shouldn't it be --used-functions rather than "reachable"? Indeed only --cover would give some information about reachability.

@kroening
Copy link
Member

I'd also prefer the terminology 'used'. The word 'reachable' really usually means 'a path exists'. Another option could be '--drop-unused-functions', which may be clearer.

@peterschrammel
Copy link
Member Author

Agreed. What do we do with --show-reachable-properties then?

@tautschnig
Copy link
Collaborator

I'd say it should never have been there in the first place... I very much like your suggestion of getting rid of it.

@martin-cs
Copy link
Collaborator

martin-cs commented Mar 23, 2017 via email

@tautschnig
Copy link
Collaborator

The commit message of 22df547 doesn't answer the "why?" Just sayin'.

@peterschrammel peterschrammel force-pushed the cover-for-reachable-fun-only branch from 1c29586 to 242af47 Compare March 23, 2017 18:52
The default behaviour of CBMC for the options --show-goto-functions,
--show-properties and --cover is to consider all functions. This
is particularly annoying for --cover where coverage goals are
reported from functions that are trivially unreachable from the entry point.
Also, --show-reachable-properties has been introduced in the past
to hide such properties.
We could change the default behaviour to slicing away everything
that is trivially unreachable from the entry point. However, this would
require an extra option to be able to view all functions and properties.
This commit preserves the default behaviour and enables focussing
the output of --show-goto-functions --show-properties and --cover
on functions that are not trivially unreachable using --drop-unused-functions.
The same effect can now be achieved by
--show-properties --drop-unused-functions
@peterschrammel peterschrammel force-pushed the cover-for-reachable-fun-only branch from 242af47 to 5e5bbca Compare March 23, 2017 18:56
@kroening kroening merged commit 5ecb15e into diffblue:master Mar 23, 2017
@peterschrammel peterschrammel deleted the cover-for-reachable-fun-only branch March 23, 2017 20:20
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.

4 participants