Skip to content

Commit d88ffd4

Browse files
author
kroening
committed
property_checkert interface
git-svn-id: svn+ssh://svn.cprover.org/srv/svn/cbmc/trunk@3910 6afb6bc1-c8e4-404c-8f48-9ae832c5b171
1 parent aac9da5 commit d88ffd4

File tree

3 files changed

+75
-1
lines changed

3 files changed

+75
-1
lines changed

src/goto-programs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SRC = goto_convert.cpp goto_convert_function_call.cpp \
22
goto_convert_side_effect.cpp goto_program.cpp basic_blocks.cpp \
3-
goto_convert_exceptions.cpp \
3+
goto_convert_exceptions.cpp property_checker.cpp \
44
remove_function_pointers.cpp goto_functions.cpp goto_inline.cpp \
55
remove_skip.cpp goto_convert_functions.cpp string_instrumentation.cpp \
66
builtin_functions.cpp show_properties.cpp set_properties.cpp \
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*******************************************************************\
2+
3+
Module: Property Checker Interface
4+
5+
Author: Daniel Kroening, [email protected]
6+
7+
\*******************************************************************/
8+
9+
#include "property_checker.h"
10+
11+
/*******************************************************************\
12+
13+
Function: property_checkert::property_checkert
14+
15+
Inputs:
16+
17+
Outputs:
18+
19+
Purpose:
20+
21+
\*******************************************************************/
22+
23+
property_checkert::property_checkert(
24+
message_handlert &_message_handler):
25+
messaget(_message_handler)
26+
{
27+
}
28+

src/goto-programs/property_checker.h

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*******************************************************************\
2+
3+
Module: Property Checker Interface
4+
5+
Author: Daniel Kroening, [email protected]
6+
7+
\*******************************************************************/
8+
9+
#ifndef CPROVER_PROPERTY_CHECKER_H
10+
#define CPROVER_PROPERTY_CHECKER_H
11+
12+
// this is just an interface -- it won't actually do any checking!
13+
14+
#include <util/message.h>
15+
16+
#include "goto_trace.h"
17+
#include "goto_model.h"
18+
19+
class property_checkert:public messaget
20+
{
21+
public:
22+
property_checkert();
23+
24+
explicit property_checkert(
25+
message_handlert &_message_handler);
26+
27+
typedef enum { PASS, FAIL, ERROR } resultt;
28+
29+
// Check whether all properties in goto_functions hold.
30+
31+
virtual resultt operator()(
32+
const goto_modelt &goto_model)=0;
33+
34+
struct property_statust
35+
{
36+
// this is the counterexample
37+
goto_tracet error_trace;
38+
resultt result;
39+
};
40+
41+
typedef goto_programt::const_targett loct;
42+
typedef std::map<loct, property_statust> property_mapt;
43+
property_mapt property_map;
44+
};
45+
46+
#endif

0 commit comments

Comments
 (0)