1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* This file is part of the source code of the software program
* Vampire. It is protected by applicable
* copyright laws.
*
* This source code is distributed under the licence found here
* https://vprover.github.io/license.html
* and in the source directory
*/
/**
* @file SymElOutput.hpp
* Defines class SymElOutput.
*/
#ifndef __SymElOutput__
#define __SymElOutput__
#include "Forwards.hpp"
#include "Lib/DHMap.hpp"
#include "Shell/TPTPPrinter.hpp"
namespace Saturation {
using namespace Lib;
using namespace Kernel;
using namespace Shell;
/**
* The @b SymElOutput object takes care of the output of
* the consequences of symbol eliminating inferences
*/
class SymElOutput {
public:
SymElOutput();
void init(SaturationAlgorithm* sa);
void onAllProcessed();
void onInputClause(Clause* c);
void onNonRedundantClause(Clause* c);
void onParenthood(Clause* cl, Clause* parent);
private:
void onSymbolElimination(Color eliminated, Clause* c, bool nonRedundant=false);
void outputSymbolElimination(Color eliminated, Clause* c);
void checkForPreprocessorSymbolElimination(Clause* cl);
/** Number that would be used for the next symbol-eliminating
* inference conclusion that is output */
unsigned _symElNextClauseNumber;
/**
* Contains record of rewrites on symbol-eliminating clauses
*
* Is reset in the call to the @b onAllProcessed method.
*
* It is used so that we output symbol eliminating clauses
* after they are simplified and shown to be non-redundant.
*/
DHMap<Clause*,Clause*> _symElRewrites;
/**
* Contains record of colors that were aliminated in
* symbol-eliminating clauses
*
* Is reset in the call to the @b onAllProcessed method.
*/
DHMap<Clause*,Color> _symElColors;
SaturationAlgorithm* _sa;
TPTPPrinter _printer;
};
}
#endif // __SymElOutput__