#ifndef __BackwardDemodulation__
#define __BackwardDemodulation__
#include "Forwards.hpp"
#include "Indexing/TermIndex.hpp"
#include "DemodulationHelper.hpp"
#include "InferenceEngine.hpp"
#include "ProofExtra.hpp"
namespace Inferences {
using namespace Indexing;
using namespace Kernel;
class BackwardDemodulation
: public BackwardSimplificationEngine
{
public:
void attach(SaturationAlgorithm* salg) override;
void detach() override;
void perform(Clause* premise, BwSimplificationRecordIterator& simplifications) override;
private:
struct RemovedIsNonzeroFn;
struct RewritableClausesFn;
struct ResultFn;
std::shared_ptr<DemodulationSubtermIndex> _index;
DemodulationHelper _helper;
};
using BackwardDemodulationExtra = RewriteInferenceExtra;
};
#endif