Skip to content

Commit e6f06c3

Browse files
Move witness output into separate interface
Not all incremental_goto_checkert implementations can provide witnesses.
1 parent 970cbc1 commit e6f06c3

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

src/goto-checker/incremental_goto_checker.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ class incremental_goto_checkert
6767
/// Builds and returns the counterexample
6868
virtual goto_tracet build_error_trace() const = 0;
6969

70-
// Outputs an error witness in GraphML format (see `graphml_witnesst`)
71-
virtual void output_error_witness(const goto_tracet &) = 0;
72-
73-
// Outputs a proof in GraphML format (see `graphml_witnesst`)
74-
virtual void output_proof() = 0;
70+
virtual const namespacet &get_namespace() const = 0;
7571

7672
protected:
7773
incremental_goto_checkert(const optionst &, ui_message_handlert &);

src/goto-checker/witness_provider.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*******************************************************************\
2+
3+
Module: Interface for outputting GraphML Witnesses for Goto Checkers
4+
5+
Author: Daniel Kroening, Peter Schrammel
6+
7+
\*******************************************************************/
8+
9+
/// \file
10+
/// Interface for outputting GraphML Witnesses for Goto Checkers
11+
12+
#ifndef CPROVER_GOTO_CHECKER_WITNESS_PROVIDER_H
13+
#define CPROVER_GOTO_CHECKER_WITNESS_PROVIDER_H
14+
15+
/// An implementation of `incremental_goto_checkert`
16+
/// may implement this interface to provide GraphML witnesses.
17+
class witness_providert
18+
{
19+
public:
20+
// Outputs an error witness in GraphML format (see `graphml_witnesst`)
21+
virtual void output_error_witness(const goto_tracet &) = 0;
22+
23+
// Outputs a proof in GraphML format (see `graphml_witnesst`)
24+
virtual void output_proof() = 0;
25+
};
26+
27+
#endif // CPROVER_GOTO_CHECKER_WITNESS_PROVIDER_H

0 commit comments

Comments
 (0)