Skip to content

Commit ada2ec5

Browse files
committed
Move rewrite_union to goto-programs
There is nothing symex-specific about it, and it is safely usable by code that does not depend on symex. Resolves some known-inappropriate module dependencies.
1 parent 95fe44b commit ada2ec5

File tree

12 files changed

+17
-25
lines changed

12 files changed

+17
-25
lines changed

jbmc/src/jdiff/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ target_link_libraries(jdiff-lib
1515
goto-diff-lib
1616
goto-instrument-lib
1717
goto-programs
18-
goto-symex
1918
analyses
2019
java_bytecode
2120
langapi

jbmc/src/jdiff/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ OBJ += ../$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
2424
../$(CPROVER_DIR)/src/goto-instrument/cover_instrument_mcdc$(OBJEXT) \
2525
../$(CPROVER_DIR)/src/goto-instrument/cover_instrument_other$(OBJEXT) \
2626
../$(CPROVER_DIR)/src/goto-instrument/cover_util$(OBJEXT) \
27-
../$(CPROVER_DIR)/src/goto-symex/rewrite_union$(OBJEXT) \
2827
../$(CPROVER_DIR)/src/analyses/analyses$(LIBEXT) \
2928
../$(CPROVER_DIR)/src/langapi/langapi$(LIBEXT) \
3029
../$(CPROVER_DIR)/src/xmllang/xmllang$(LIBEXT) \

jbmc/src/jdiff/jdiff_parse_options.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ Author: Peter Schrammel
3939
#include <goto-programs/remove_unused_functions.h>
4040
#include <goto-programs/remove_vector.h>
4141
#include <goto-programs/remove_virtual_functions.h>
42+
#include <goto-programs/rewrite_union.h>
4243
#include <goto-programs/set_properties.h>
4344
#include <goto-programs/show_properties.h>
4445
#include <goto-programs/string_abstraction.h>
4546
#include <goto-programs/string_instrumentation.h>
4647

47-
#include <goto-symex/rewrite_union.h>
48-
4948
#include <goto-instrument/cover.h>
5049

5150
#include <pointer-analysis/add_failed_symbols.h>

jbmc/src/jdiff/module_dependencies.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jdiff
44
goto-diff
55
goto-instrument
66
goto-programs
7-
goto-symex # dubious - rewrite_union
87
langapi # should go away
98
pointer-analysis
109
util

src/cbmc/cbmc_parse_options.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,14 @@ Author: Daniel Kroening, [email protected]
4646
#include <goto-programs/remove_asm.h>
4747
#include <goto-programs/remove_unused_functions.h>
4848
#include <goto-programs/remove_skip.h>
49+
#include <goto-programs/rewrite_union.h>
4950
#include <goto-programs/set_properties.h>
5051
#include <goto-programs/show_goto_functions.h>
5152
#include <goto-programs/show_symbol_table.h>
5253
#include <goto-programs/show_properties.h>
5354
#include <goto-programs/string_abstraction.h>
5455
#include <goto-programs/string_instrumentation.h>
5556

56-
#include <goto-symex/rewrite_union.h>
57-
5857
#include <goto-instrument/reachability_slicer.h>
5958
#include <goto-instrument/full_slicer.h>
6059
#include <goto-instrument/nondet_static.h>

src/goto-diff/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
2424
../goto-instrument/cover_instrument_mcdc$(OBJEXT) \
2525
../goto-instrument/cover_instrument_other$(OBJEXT) \
2626
../goto-instrument/cover_util$(OBJEXT) \
27-
../goto-symex/rewrite_union$(OBJEXT) \
2827
../analyses/analyses$(LIBEXT) \
2928
../langapi/langapi$(LIBEXT) \
3029
../xmllang/xmllang$(LIBEXT) \

src/goto-diff/goto_diff_parse_options.cpp

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,25 @@ Author: Peter Schrammel
2626

2727
#include <goto-programs/adjust_float_expressions.h>
2828
#include <goto-programs/goto_convert_functions.h>
29+
#include <goto-programs/goto_inline.h>
2930
#include <goto-programs/instrument_preconditions.h>
31+
#include <goto-programs/link_to_library.h>
32+
#include <goto-programs/loop_ids.h>
3033
#include <goto-programs/mm_io.h>
34+
#include <goto-programs/read_goto_binary.h>
35+
#include <goto-programs/remove_asm.h>
36+
#include <goto-programs/remove_complex.h>
3137
#include <goto-programs/remove_function_pointers.h>
32-
#include <goto-programs/remove_virtual_functions.h>
3338
#include <goto-programs/remove_returns.h>
34-
#include <goto-programs/remove_vector.h>
35-
#include <goto-programs/remove_complex.h>
36-
#include <goto-programs/remove_asm.h>
37-
#include <goto-programs/remove_unused_functions.h>
3839
#include <goto-programs/remove_skip.h>
39-
#include <goto-programs/goto_inline.h>
40-
#include <goto-programs/show_properties.h>
40+
#include <goto-programs/remove_unused_functions.h>
41+
#include <goto-programs/remove_vector.h>
42+
#include <goto-programs/remove_virtual_functions.h>
43+
#include <goto-programs/rewrite_union.h>
4144
#include <goto-programs/set_properties.h>
42-
#include <goto-programs/read_goto_binary.h>
45+
#include <goto-programs/show_properties.h>
4346
#include <goto-programs/string_abstraction.h>
4447
#include <goto-programs/string_instrumentation.h>
45-
#include <goto-programs/loop_ids.h>
46-
#include <goto-programs/link_to_library.h>
47-
48-
#include <goto-symex/rewrite_union.h>
4948

5049
#include <goto-instrument/cover.h>
5150

src/goto-diff/module_dependencies.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cpp
44
goto-diff
55
goto-instrument
66
goto-programs
7-
goto-symex # dubious - rewrite_union and adjust_float should be moved to goto-programs
87
java_bytecode # will go away
98
langapi # should go away
109
pointer-analysis

src/goto-programs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ SRC = adjust_float_expressions.cpp \
5050
remove_unused_functions.cpp \
5151
remove_vector.cpp \
5252
remove_virtual_functions.cpp \
53+
rewrite_union.cpp \
5354
replace_calls.cpp \
5455
resolve_inherited_component.cpp \
5556
safety_checker.cpp \

src/goto-symex/rewrite_union.h renamed to src/goto-programs/rewrite_union.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Symbolic Execution
1111

12-
#ifndef CPROVER_GOTO_SYMEX_REWRITE_UNION_H
13-
#define CPROVER_GOTO_SYMEX_REWRITE_UNION_H
12+
#ifndef CPROVER_GOTO_PROGRAMS_REWRITE_UNION_H
13+
#define CPROVER_GOTO_PROGRAMS_REWRITE_UNION_H
1414

1515
#include <goto-programs/goto_functions.h>
1616

@@ -24,4 +24,4 @@ void rewrite_union(goto_functionst::goto_functiont &);
2424
void rewrite_union(goto_functionst &);
2525
void rewrite_union(goto_modelt &);
2626

27-
#endif // CPROVER_GOTO_SYMEX_REWRITE_UNION_H
27+
#endif // CPROVER_GOTO_PROGRAMS_REWRITE_UNION_H

src/goto-symex/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ SRC = auto_objects.cpp \
1010
path_storage.cpp \
1111
postcondition.cpp \
1212
precondition.cpp \
13-
rewrite_union.cpp \
1413
show_program.cpp \
1514
show_vcc.cpp \
1615
slice.cpp \

0 commit comments

Comments
 (0)