Skip to content

Commit c4304ba

Browse files
committed
JBMC: Remove C-only passes
This removes JBMC passes that only apply to C-derived GOTO programs, as a preliminary to converting those that remain to run per-function rather than whole-program so incremental loading doesn't have to deal with input that differs remarkably from its current state.
1 parent 1c227b7 commit c4304ba

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

src/jbmc/jbmc_parse_options.cpp

+1-31
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,11 @@ Author: Daniel Kroening, [email protected]
3030
#include <goto-programs/instrument_preconditions.h>
3131
#include <goto-programs/goto_convert_functions.h>
3232
#include <goto-programs/goto_inline.h>
33-
#include <goto-programs/link_to_library.h>
3433
#include <goto-programs/loop_ids.h>
35-
#include <goto-programs/remove_function_pointers.h>
3634
#include <goto-programs/remove_virtual_functions.h>
3735
#include <goto-programs/remove_instanceof.h>
3836
#include <goto-programs/remove_returns.h>
3937
#include <goto-programs/remove_exceptions.h>
40-
#include <goto-programs/remove_vector.h>
41-
#include <goto-programs/remove_complex.h>
4238
#include <goto-programs/remove_asm.h>
4339
#include <goto-programs/remove_unused_functions.h>
4440
#include <goto-programs/remove_skip.h>
@@ -48,11 +44,8 @@ Author: Daniel Kroening, [email protected]
4844
#include <goto-programs/show_goto_functions.h>
4945
#include <goto-programs/show_symbol_table.h>
5046
#include <goto-programs/show_properties.h>
51-
#include <goto-programs/string_abstraction.h>
52-
#include <goto-programs/string_instrumentation.h>
5347
#include <goto-programs/remove_java_new.h>
5448

55-
#include <goto-symex/rewrite_union.h>
5649
#include <goto-symex/adjust_float_expressions.h>
5750

5851
#include <goto-instrument/full_slicer.h>
@@ -678,18 +671,7 @@ bool jbmc_parse_optionst::process_goto_functions(
678671
{
679672
remove_java_new(goto_model, get_message_handler());
680673

681-
// add the library
682-
link_to_library(goto_model, get_message_handler());
683-
684-
if(cmdline.isset("string-abstraction"))
685-
string_instrumentation(goto_model, get_message_handler());
686-
687-
// remove function pointers
688-
status() << "Removal of function pointers and virtual functions" << eom;
689-
remove_function_pointers(
690-
get_message_handler(),
691-
goto_model,
692-
cmdline.isset("pointer-check"));
674+
status() << "Removal of virtual functions" << eom;
693675
// Java virtual functions -> explicit dispatch tables:
694676
remove_virtual_functions(goto_model);
695677
// remove catch and throw (introduces instanceof)
@@ -702,9 +684,6 @@ bool jbmc_parse_optionst::process_goto_functions(
702684

703685
// remove returns, gcc vectors, complex
704686
remove_returns(goto_model);
705-
remove_vector(goto_model);
706-
remove_complex(goto_model);
707-
rewrite_union(goto_model);
708687

709688
// Similar removal of java nondet statements:
710689
// TODO Should really get this from java_bytecode_language somehow, but we
@@ -746,14 +725,6 @@ bool jbmc_parse_optionst::process_goto_functions(
746725
nondet_static(goto_model);
747726
}
748727

749-
if(cmdline.isset("string-abstraction"))
750-
{
751-
status() << "String Abstraction" << eom;
752-
string_abstraction(
753-
goto_model,
754-
get_message_handler());
755-
}
756-
757728
// add failed symbols
758729
// needs to be done before pointer analysis
759730
add_failed_symbols(goto_model.symbol_table);
@@ -884,7 +855,6 @@ void jbmc_parse_optionst::help()
884855
" --stop-on-fail stop analysis once a failed property is detected\n" // NOLINT(*)
885856
" --trace give a counterexample trace for failed properties\n" //NOLINT(*)
886857
"\n"
887-
" --no-library disable built-in abstract Java library\n"
888858
HELP_FUNCTIONS
889859
"\n"
890860
"Program representations:\n"

src/jbmc/jbmc_parse_options.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ class optionst;
5252
"(show-properties)" \
5353
"(drop-unused-functions)" \
5454
"(property):(stop-on-fail)(trace)" \
55-
"(verbosity):(no-library)" \
55+
"(verbosity):" \
5656
"(version)" \
5757
"(cover):(symex-coverage-report):" \
5858
"(i386-linux)(i386-macos)(i386-win32)(win32)(winx64)" \
5959
"(ppc-macos)" \
6060
"(arrays-uf-always)(arrays-uf-never)" \
61-
"(string-abstraction)(no-arch)(arch):" \
61+
"(no-arch)(arch):" \
6262
"(graphml-witness):" \
6363
JAVA_BYTECODE_LANGUAGE_OPTIONS \
6464
"(java-unwind-enum-static)" \

0 commit comments

Comments
 (0)