Skip to content

Commit 363f5e1

Browse files
Move witness output into separate interface
Not all incremental_goto_checkert implementations can provide witnesses.
1 parent c327572 commit 363f5e1

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

src/goto-checker/incremental_goto_checker.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ 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;
75-
7670
protected:
7771
incremental_goto_checkert(const optionst &, ui_message_handlert &);
7872

src/goto-checker/witness_provider.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
class goto_tracet;
16+
17+
/// An implementation of `incremental_goto_checkert`
18+
/// may implement this interface to provide GraphML witnesses.
19+
class witness_providert
20+
{
21+
public:
22+
virtual ~witness_providert() = default;
23+
24+
// Outputs an error witness in GraphML format (see `graphml_witnesst`)
25+
virtual void output_error_witness(const goto_tracet &) = 0;
26+
27+
// Outputs a proof in GraphML format (see `graphml_witnesst`)
28+
virtual void output_proof() = 0;
29+
};
30+
31+
#endif // CPROVER_GOTO_CHECKER_WITNESS_PROVIDER_H

0 commit comments

Comments
 (0)