Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
InferenceItem.hpp
1/*
2
3Copyright © 2023-24 Sean Holden. All rights reserved.
4
5*/
6/*
7
8This file is part of Connect++.
9
10Connect++ is free software: you can redistribute it and/or modify it
11under the terms of the GNU General Public License as published by the
12Free Software Foundation, either version 3 of the License, or (at your
13option) any later version.
14
15Connect++ is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18more details.
19
20You should have received a copy of the GNU General Public License along
21with Connect++. If not, see <https://www.gnu.org/licenses/>.
22
23*/
24
25#ifndef INFERENCEITEM_HPP
26#define INFERENCEITEM_HPP
27
28#include <iostream>
29
30#include "Literal.hpp"
31#include "Substitution.hpp"
32
33using std::ostream;
34using std::endl;
35
39enum class InferenceItemType {
40 None,
41 Start,
42 Reduction,
43 Extension,
44 Axiom,
45 Lemma
46};
47
48ostream& operator<<(ostream&, const InferenceItemType&);
49
65 InferenceItemType T;
73 LitNum Lindex;
78 ClauseNum C_2;
82 LitNum Lprime;
97
105 InferenceItem(InferenceItemType);
109 InferenceItem(InferenceItemType, ClauseNum);
113 InferenceItem(InferenceItemType, const Literal&, LitNum);
119 InferenceItem(InferenceItemType, const Literal&, LitNum, size_t);
123 InferenceItem(InferenceItemType, const Literal&, LitNum,
124 ClauseNum, LitNum, const Substitution&);
128 InferenceItem(InferenceItemType, const Literal&, LitNum,
129 ClauseNum, LitNum, const Substitution&, size_t);
130};
131
132ostream& operator<<(ostream&, const InferenceItem&);
133
134#endif
Basic representation of literals, bundling together (pointers to) a Predicate, a collection of argume...
Definition Literal.hpp:50
General representation of a substitution.
Full representation of inferences, beyond just the name.
LitNum Lindex
The index of the literal within the clause being used.
size_t index_in_lemmata
For certification, you want to know which element of the lemmata list was used when the Lemma rule wa...
size_t index_in_path
The index in the path of the literal being usedd.
LitNum Lprime
The index of the literal in C_2 being used.
Substitution sigma
A copy of the substitution that makes the rule applicable.
Literal L
The Literal that is used to make the inference.
ClauseNum C_2
For extensions, the number of the clause for which a fresh copy is being made.
InferenceItemType T
What kind of inference is this?
InferenceItem()
Constructor - probably unused.