Skip to content

Commit 77a015b

Browse files
Move property_checker and safety_checker into goto-checker dir
These will be transformed in subsequent PRs to form the basic interfaces for any algorithms that can check assertions so that they can be used interchangeably in driver programs.
1 parent 946abb8 commit 77a015b

23 files changed

+57
-15
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ set_target_properties(
5858
goto-analyzer-lib
5959
goto-cc
6060
goto-cc-lib
61+
goto-checker
6162
goto-diff
6263
goto-diff-lib
6364
goto-instrument

jbmc/src/jbmc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ target_link_libraries(jbmc-lib
1212
ansi-c
1313
big-int
1414
cbmc-lib
15+
goto-checker
1516
goto-instrument-lib
1617
goto-programs
1718
goto-symex

jbmc/src/jbmc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ OBJ += ../$(CPROVER_DIR)/src/ansi-c/ansi-c$(LIBEXT) \
66
../java_bytecode/java_bytecode$(LIBEXT) \
77
../$(CPROVER_DIR)/src/linking/linking$(LIBEXT) \
88
../$(CPROVER_DIR)/src/big-int/big-int$(LIBEXT) \
9+
../$(CPROVER_DIR)/src/goto-checker/goto-checker$(LIBEXT) \
910
../$(CPROVER_DIR)/src/goto-programs/goto-programs$(LIBEXT) \
1011
../$(CPROVER_DIR)/src/goto-symex/goto-symex$(LIBEXT) \
1112
../$(CPROVER_DIR)/src/pointer-analysis/value_set$(OBJEXT) \

jbmc/unit/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ target_link_libraries(java-unit
2323
testing-utils
2424
ansi-c
2525
solvers
26+
goto-checker
2627
goto-programs
2728
goto-instrument-lib
2829
cbmc-lib

jbmc/unit/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ CPROVER_LIBS =../src/java_bytecode/java_bytecode$(LIBEXT) \
9292
$(CPROVER_DIR)/src/linking/linking$(LIBEXT) \
9393
$(CPROVER_DIR)/src/util/util$(LIBEXT) \
9494
$(CPROVER_DIR)/src/big-int/big-int$(LIBEXT) \
95+
$(CPROVER_DIR)/src/goto-checker/goto-checker$(LIBEXT) \
9596
$(CPROVER_DIR)/src/goto-programs/goto-programs$(LIBEXT) \
9697
$(CPROVER_DIR)/src/goto-instrument/goto-instrument$(LIBEXT) \
9798
$(CPROVER_DIR)/src/pointer-analysis/pointer-analysis$(LIBEXT) \

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ add_subdirectory(ansi-c)
8585
add_subdirectory(assembler)
8686
add_subdirectory(big-int)
8787
add_subdirectory(cpp)
88+
add_subdirectory(goto-checker)
8889
add_subdirectory(goto-programs)
8990
add_subdirectory(goto-symex)
9091
add_subdirectory(jsil)

src/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ DIRS = analyses \
66
cpp \
77
goto-analyzer \
88
goto-cc \
9+
goto-checker \
910
goto-diff \
1011
goto-instrument \
1112
goto-programs \
@@ -49,9 +50,11 @@ goto-instrument.dir: languages goto-programs.dir pointer-analysis.dir \
4950
goto-symex.dir linking.dir analyses.dir solvers.dir \
5051
json.dir
5152

53+
goto-checker.dir: solvers.dir goto-symex.dir goto-programs.dir
54+
5255
cbmc.dir: languages solvers.dir goto-symex.dir analyses.dir \
5356
pointer-analysis.dir goto-programs.dir linking.dir \
54-
goto-instrument.dir
57+
goto-instrument.dir goto-checker.dir
5558

5659
goto-analyzer.dir: languages analyses.dir goto-programs.dir linking.dir \
5760
json.dir goto-instrument.dir

src/cbmc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ target_link_libraries(cbmc-lib
1313
assembler
1414
big-int
1515
cpp
16+
goto-checker
1617
goto-instrument-lib
1718
goto-programs
1819
goto-symex

src/cbmc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ OBJ += ../ansi-c/ansi-c$(LIBEXT) \
1919
../cpp/cpp$(LIBEXT) \
2020
../linking/linking$(LIBEXT) \
2121
../big-int/big-int$(LIBEXT) \
22+
../goto-checker/goto-checker$(LIBEXT) \
2223
../goto-programs/goto-programs$(LIBEXT) \
2324
../goto-symex/goto-symex$(LIBEXT) \
2425
../pointer-analysis/value_set$(OBJEXT) \

src/cbmc/bmc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Author: Daniel Kroening, [email protected]
2525
#include <goto-symex/symex_target_equation.h>
2626
#include <goto-symex/path_storage.h>
2727

28+
#include <goto-checker/safety_checker.h>
2829
#include <goto-programs/goto_model.h>
29-
#include <goto-programs/safety_checker.h>
3030
#include <goto-symex/memory_model.h>
3131

3232
#include "symex_bmc.h"

src/cbmc/module_dependencies.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
analyses
22
ansi-c
33
cpp
4+
goto-checker
45
goto-instrument
56
goto-programs
67
goto-symex

src/goto-checker/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
file(GLOB_RECURSE sources "*.cpp" "*.h")
2+
add_library(goto-checker ${sources})
3+
4+
generic_includes(goto-checker)
5+
6+
target_link_libraries(goto-checker goto-programs goto-symex solvers util)

src/goto-checker/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
SRC = property_checker.cpp \
2+
safety_checker.cpp \
3+
# Empty last line
4+
5+
INCLUDES= -I ..
6+
7+
include ../config.inc
8+
include ../common
9+
10+
CLEANFILES = goto-checker$(LIBEXT)
11+
12+
all: goto-checker$(LIBEXT)
13+
14+
###############################################################################
15+
16+
goto-checker$(LIBEXT): $(OBJ)
17+
$(LINKLIB)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
goto-checker
2+
goto-programs
3+
goto-symex
4+
solvers
5+
util

src/goto-programs/property_checker.h renamed to src/goto-checker/property_checker.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Property Checker Interface
1111

12-
#ifndef CPROVER_GOTO_PROGRAMS_PROPERTY_CHECKER_H
13-
#define CPROVER_GOTO_PROGRAMS_PROPERTY_CHECKER_H
12+
#ifndef CPROVER_GOTO_CHECKER_PROPERTY_CHECKER_H
13+
#define CPROVER_GOTO_CHECKER_PROPERTY_CHECKER_H
1414

1515
// this is just an interface -- it won't actually do any checking!
1616

1717
#include <util/message.h>
1818

19-
#include "goto_trace.h"
20-
#include "goto_model.h"
19+
#include <goto-programs/goto_model.h>
20+
#include <goto-programs/goto_trace.h>
2121

2222
class property_checkert:public messaget
2323
{
@@ -52,4 +52,4 @@ class property_checkert:public messaget
5252
void initialize_property_map(const goto_functionst &);
5353
};
5454

55-
#endif // CPROVER_GOTO_PROGRAMS_PROPERTY_CHECKER_H
55+
#endif // CPROVER_GOTO_CHECKER_PROPERTY_CHECKER_H

src/goto-programs/safety_checker.h renamed to src/goto-checker/safety_checker.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Author: Daniel Kroening, [email protected]
99
/// \file
1010
/// Safety Checker Interface
1111

12-
#ifndef CPROVER_GOTO_PROGRAMS_SAFETY_CHECKER_H
13-
#define CPROVER_GOTO_PROGRAMS_SAFETY_CHECKER_H
12+
#ifndef CPROVER_GOTO_CHECKER_SAFETY_CHECKER_H
13+
#define CPROVER_GOTO_CHECKER_SAFETY_CHECKER_H
1414

1515
// this is just an interface -- it won't actually do any checking!
1616

1717
#include <util/invariant.h>
1818
#include <util/message.h>
1919

20-
#include "goto_trace.h"
21-
#include "goto_functions.h"
20+
#include <goto-programs/goto_model.h>
21+
#include <goto-programs/goto_trace.h>
2222

2323
class safety_checkert:public messaget
2424
{
@@ -123,4 +123,4 @@ operator|=(safety_checkert::resultt &a, safety_checkert::resultt const &b)
123123
}
124124
UNREACHABLE;
125125
}
126-
#endif // CPROVER_GOTO_PROGRAMS_SAFETY_CHECKER_H
126+
#endif // CPROVER_GOTO_CHECKER_SAFETY_CHECKER_H

src/goto-programs/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ SRC = adjust_float_expressions.cpp \
3636
parameter_assignments.cpp \
3737
pointer_arithmetic.cpp \
3838
printf_formatter.cpp \
39-
property_checker.cpp \
4039
read_bin_goto_object.cpp \
4140
read_goto_binary.cpp \
4241
rebuild_goto_start_function.cpp \
@@ -53,7 +52,6 @@ SRC = adjust_float_expressions.cpp \
5352
remove_virtual_functions.cpp \
5453
replace_calls.cpp \
5554
resolve_inherited_component.cpp \
56-
safety_checker.cpp \
5755
set_properties.cpp \
5856
show_goto_functions.cpp \
5957
show_goto_functions_json.cpp \

unit/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ target_link_libraries(
3737
testing-utils
3838
ansi-c
3939
solvers
40+
goto-checker
4041
goto-programs
4142
goto-instrument-lib
4243
cbmc-lib

unit/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ CPROVER_LIBS =../src/ansi-c/ansi-c$(LIBEXT) \
8484
../src/linking/linking$(LIBEXT) \
8585
../src/util/util$(LIBEXT) \
8686
../src/big-int/big-int$(LIBEXT) \
87+
../src/goto-checker/goto-checker$(LIBEXT) \
8788
../src/goto-programs/goto-programs$(LIBEXT) \
8889
../src/goto-instrument/goto-instrument$(LIBEXT) \
8990
../src/pointer-analysis/pointer-analysis$(LIBEXT) \

unit/module_dependencies.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ansi-c
22
cbmc
33
cpp
4+
goto-checker
45
goto-programs
56
goto-symex
67
json

unit/path_strategies.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
#ifndef CPROVER_PATH_STRATEGIES_H
66
#define CPROVER_PATH_STRATEGIES_H
77

8+
#include <goto-checker/safety_checker.h>
9+
810
#include <goto-programs/goto_model.h>
9-
#include <goto-programs/safety_checker.h>
1011

1112
#include <goto-symex/goto_symex_state.h>
1213

0 commit comments

Comments
 (0)