Skip to content

split test suite generation out of cbmc/jbmc #2144

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

Closed
wants to merge 3 commits into from
Closed

Conversation

kroening
Copy link
Member

@kroening kroening commented May 2, 2018

No description provided.

src/Makefile Outdated
assembler analyses java_bytecode \
DIRS = ansi-c big-int cbmc ccover jbmc cpp goto-cc goto-instrument \
goto-programs goto-symex langapi pointer-analysis solvers util \
linking xmllang assembler analyses java_bytecode \
Copy link
Collaborator

Choose a reason for hiding this comment

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

To avoid future changes of this kind (reformatting of several lines just because one word changed), could each entry please be put on a separate line like other Makefiles now do?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

#include "ccover_bmc.h"

#include <chrono>
#include <iostream>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that actually required?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

#include <util/invariant.h>
#include <util/options.h>
#include <util/ui_message.h>
#include <util/decision_procedure.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Required?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

#include <map>

#include <util/invariant.h>
#include <util/options.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

A forward declaration of class optionst; would suffice. invariant.h seems unused here.

#include <goto-symex/symex_target_equation.h>
#include <goto-programs/goto_model.h>
#include <goto-programs/safety_checker.h>
#include <goto-symex/memory_model.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure all of the above are needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

done


#include <util/ui_message.h>
#include <util/parse_options.h>
//#include <util/timestamper.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

?


#include <langapi/language.h>

//#include <analyses/goto_check.h>
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

@@ -1,6 +1,5 @@
SRC = all_properties.cpp \
bmc.cpp \
bmc_cover.cpp \
Copy link
Collaborator

Choose a reason for hiding this comment

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

This has already been moved in the previous commit, hence the prior commit yields an inconsistent state.

// generate unwinding assumptions otherwise
options.set_option(
"partial-loops",
cmdline.isset("partial-loops"));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems unrelated and unnecessary?

Copy link
Member Author

Choose a reason for hiding this comment

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

reverted

@@ -30,6 +27,9 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
../goto-instrument/cover_instrument_mcdc$(OBJEXT) \
../goto-instrument/cover_instrument_other$(OBJEXT) \
../goto-instrument/cover_util$(OBJEXT) \
../goto-instrument/full_slicer$(OBJEXT) \
../goto-instrument/reachability_slicer$(OBJEXT) \
../goto-instrument/nondet_static$(OBJEXT) \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, but unrelated?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, simply sorting


#include <linking/static_lifetime_init.h>

void ccover_bmct::do_conversion()
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, there should be a generic BMC class that provides these building block to avoid duplication.

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 don't see how this can be done in <2 years

" cccover file.c ... source file names\n"
"\n"
"Test suite generation options:\n"
" --cover CC create test-suite with coverage criterion CC\n" // NOLINT(*)
Copy link
Member

Choose a reason for hiding this comment

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

What is the default behaviour if this option is not given?

Copy link
Member Author

Choose a reason for hiding this comment

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

now documented

::slice(equation);
statistics() << "slicing removed "
<< equation.count_ignored_SSA_steps()
<< " assignments"<<eom;
Copy link
Member

Choose a reason for hiding this comment

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

spaces missing around <<

Copy link
Member Author

Choose a reason for hiding this comment

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

done

ui_message_handler.set_verbosity(v);
}

void ccover_parse_optionst::get_command_line_options(optionst &options)
Copy link
Member

Choose a reason for hiding this comment

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

Just as a note: Most of this code is duplicated in at least 8 different tools, which is not ideal. I'm not saying that needs to be fixed in this PR, but it has become difficult to distinguish intended from spurious differences between the command line interfaces.

@tautschnig
Copy link
Collaborator

I think this PR is right in setting a long-term direction, but as @peterschrammel also said: there should be de-duplication. In my opinion there should first be one or more PRs to implement de-duplication, and then this one should follow.

@kroening kroening force-pushed the ccover branch 2 times, most recently from 95b4929 to bb93957 Compare May 3, 2018 12:26
@smowton
Copy link
Contributor

smowton commented May 4, 2018

I note that all-properties (not-stop-on-fail) mode and cover mode have a lot in common, can they be factored?

@tautschnig tautschnig assigned kroening and unassigned tautschnig May 5, 2018
@kroening
Copy link
Member Author

kroening commented May 8, 2018

I factored out the unwindset parsing.

@kroening kroening force-pushed the ccover branch 4 times, most recently from 1e6f7a6 to 4b2a1a2 Compare May 12, 2018 17:36
@kroening kroening force-pushed the ccover branch 4 times, most recently from 5173042 to 1c950d9 Compare May 18, 2018 16:55
@kroening kroening force-pushed the ccover branch 2 times, most recently from 5119d43 to 3247fb9 Compare May 26, 2018 08:52
@martin-cs
Copy link
Collaborator

I'm listed as a code owner but I think that's for about 4 lines of the change so I'm probably not the best person to review this. Splitting out coverage and BMC may be an idea but this PR seems to cover a bunch of other things as well.

@NlightNFotis
Copy link
Contributor

I am closing this PR as it seems to be very stale in terms of the current state of the branch it aims to merge to, and in terms of CI checks.

If you would like to see this revived, please feel free to reopen the PR, and continue working on this after it has been rebased on top of develop.

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.

6 participants