Skip to content

Move BMC options and help text to bmc_util [depends: 3565] #3581

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 1 commit into from
Jan 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jbmc/src/jbmc/jbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ Author: Daniel Kroening, [email protected]

#include <langapi/mode.h>

#include <cbmc/bmc.h> // will go away
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would you mind adding an issue or are you tracking this in some way?

Copy link
Member Author

@peterschrammel peterschrammel Dec 17, 2018

Choose a reason for hiding this comment

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

That will be the result as soon as I reach the top of this DAG of PRs.


#include <java_bytecode/convert_java_nondet.h>
#include <java_bytecode/java_bytecode_language.h>
#include <java_bytecode/java_enum_static_init_unwind_handler.h>
Expand Down
3 changes: 1 addition & 2 deletions jbmc/src/jbmc/jbmc_parse_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Author: Daniel Kroening, [email protected]

#include <analyses/goto_check.h>

#include <cbmc/bmc.h>
#include <goto-checker/bmc_util.h>

#include <goto-programs/class_hierarchy.h>
#include <goto-programs/goto_trace.h>
Expand All @@ -33,7 +33,6 @@ Author: Daniel Kroening, [email protected]

#include <java_bytecode/java_bytecode_language.h>

class bmct;
class goto_functionst;
class optionst;

Expand Down
38 changes: 0 additions & 38 deletions src/cbmc/bmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,42 +264,4 @@ class path_explorert : public bmct
goto_symext::get_goto_functiont get_goto_function) override;
};

#define OPT_BMC \
"(program-only)" \
"(show-loops)" \
"(show-vcc)" \
"(slice-formula)" \
"(unwinding-assertions)" \
"(no-unwinding-assertions)" \
"(no-pretty-names)" \
"(no-self-loops-to-assumptions)" \
"(partial-loops)" \
"(paths):" \
"(show-symex-strategies)" \
"(depth):" \
"(unwind):" \
"(unwindset):" \
"(graphml-witness):" \
"(unwindset):"

#define HELP_BMC \
" --paths [strategy] explore paths one at a time\n" \
" --show-symex-strategies list strategies for use with --paths\n" \
" --program-only only show program expression\n" \
" --show-loops show the loops in the program\n" \
" --depth nr limit search depth\n" \
" --unwind nr unwind nr times\n" \
" --unwindset L:B,... unwind loop L with a bound of B\n" \
" (use --show-loops to get the loop IDs)\n" \
" --show-vcc show the verification conditions\n" \
" --slice-formula remove assignments unrelated to property\n" \
" --unwinding-assertions generate unwinding assertions (cannot be\n" \
" used with --cover or --partial-loops)\n" \
" --partial-loops permit paths with partial loops\n" \
" --no-self-loops-to-assumptions\n" \
" do not simplify while(1){} to assume(0)\n" \
" --no-pretty-names do not simplify identifiers\n" \
" --graphml-witness filename write the witness in GraphML format to " \
"filename\n" // NOLINT(*)

#endif // CPROVER_CBMC_BMC_H
2 changes: 2 additions & 0 deletions src/cbmc/cbmc_parse_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Author: Daniel Kroening, [email protected]

#include <cpp/cprover_library.h>

#include <goto-checker/bmc_util.h>

#include <goto-programs/adjust_float_expressions.h>
#include <goto-programs/initialize_goto_model.h>
#include <goto-programs/instrument_preconditions.h>
Expand Down
2 changes: 1 addition & 1 deletion src/cbmc/cbmc_parse_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Author: Daniel Kroening, [email protected]

#include <analyses/goto_check.h>

#include <goto-checker/bmc_util.h>
#include <goto-checker/solver_factory.h>

#include <goto-programs/goto_trace.h>
Expand All @@ -33,7 +34,6 @@ Author: Daniel Kroening, [email protected]
#include "bmc.h"
#include "xml_interface.h"

class bmct;
class goto_functionst;
class optionst;

Expand Down
39 changes: 39 additions & 0 deletions src/goto-checker/bmc_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,43 @@ void slice(
const optionst &,
ui_message_handlert &);

// clang-format off
#define OPT_BMC \
"(program-only)" \
"(show-loops)" \
"(show-vcc)" \
"(slice-formula)" \
"(unwinding-assertions)" \
"(no-unwinding-assertions)" \
"(no-pretty-names)" \
"(no-self-loops-to-assumptions)" \
"(partial-loops)" \
"(paths):" \
"(show-symex-strategies)" \
"(depth):" \
"(unwind):" \
"(unwindset):" \
"(graphml-witness):" \
"(unwindset):"

#define HELP_BMC \
" --paths [strategy] explore paths one at a time\n" \
" --show-symex-strategies list strategies for use with --paths\n" \
" --program-only only show program expression\n" \
" --show-loops show the loops in the program\n" \
" --depth nr limit search depth\n" \
" --unwind nr unwind nr times\n" \
" --unwindset L:B,... unwind loop L with a bound of B\n" \
" (use --show-loops to get the loop IDs)\n" \
" --show-vcc show the verification conditions\n" \
" --slice-formula remove assignments unrelated to property\n" \
" --unwinding-assertions generate unwinding assertions (cannot be\n" \
" used with --cover or --partial-loops)\n" \
" --partial-loops permit paths with partial loops\n" \
" --no-self-loops-to-assumptions\n" \
" do not simplify while(1){} to assume(0)\n" \
" --no-pretty-names do not simplify identifiers\n" \
" --graphml-witness filename write the witness in GraphML format to filename\n" // NOLINT(*)
// clang-format on

#endif // CPROVER_GOTO_CHECKER_BMC_UTIL_H