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
/*
* 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
*/
#ifndef FORWARDSUBSUMPTIONDEMODULATION_HPP
#define FORWARDSUBSUMPTIONDEMODULATION_HPP
#include "InferenceEngine.hpp"
#include "Indexing/LiteralIndex.hpp"
namespace Inferences {
using namespace Kernel;
using namespace Indexing;
using namespace Saturation;
/**
* Subsumption Demodulation is a simplification rule that generalizes
* demodulation by combining subsumption and demodulation.
* The rule is defined as follows:
*
* l = r \/ C L[lΘ] \/ CΘ \/ D
* ------------------------------------
* L[rΘ] \/ CΘ \/ D
*
* where
* - C, D are clauses and Θ is a substitution,
* - lΘ > rΘ, and
* - L[lΘ] \/ D > (l = r)Θ.
*
* For a detailed description, see the paper
*
* Bernhard Gleiss, Laura Kovács, Jakob Rath:
* Subsumption Demodulation in First-Order Theorem Proving.
* Accepted for IJCAR 2020.
*
* This class implements the forward direction.
*/
class ForwardSubsumptionDemodulation
: public ForwardSimplificationEngine
{
public:
ForwardSubsumptionDemodulation(bool doSubsumption, bool enableOrderingOptimizations)
: _doSubsumption(doSubsumption)
, _enableOrderingOptimizations(enableOrderingOptimizations)
{ }
void attach(SaturationAlgorithm* salg) override;
void detach() override;
bool perform(Clause* cl, Clause*& replacement, ClauseIterator& premises) override;
private:
std::shared_ptr<UnitClauseLiteralIndex> _unitIndex;
std::shared_ptr<FSDLiteralIndex> _index;
bool _preorderedOnly;
bool _allowIncompleteness;
bool _doSubsumption;
const bool _enableOrderingOptimizations;
};
}
#endif /* !FORWARDSUBSUMPTIONDEMODULATION_HPP */