-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathResolutionProofDAG.java
More file actions
59 lines (49 loc) · 1.87 KB
/
ResolutionProofDAG.java
File metadata and controls
59 lines (49 loc) · 1.87 KB
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
/*
* This file is part of JavaSMT,
* an API wrapper for a collection of SMT solvers:
* https://github.com/sosy-lab/java-smt
*
* SPDX-FileCopyrightText: 2024 Dirk Beyer <https://www.sosy-lab.org>
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.sosy_lab.java_smt;
import java.util.Objects;
import org.sosy_lab.java_smt.ResProofRule.ResAxiom;
import org.sosy_lab.java_smt.api.Formula;
import org.sosy_lab.java_smt.api.proofs.ProofNode;
import org.sosy_lab.java_smt.api.proofs.ProofRule;
import org.sosy_lab.java_smt.basicimpl.AbstractProofDAG;
/**
* This class represents a resolution proof DAG. Its nodes might be of the type {@link
* AxiomProofNode} or {@link ResolutionProofNode}. It is used to represent proofs based on the
* RESOLUTE proof format from SMTInterpol.
*
* @see ResProofRule
*/
@SuppressWarnings("all")
public class ResolutionProofDAG extends AbstractProofDAG {
// Work in progress. The functionality of producing just nodes should be provided first.
// The idea is to provide extended functionality (by providng a set of edges for example).
public static class ResolutionProofNode extends AbstractProofNode implements ProofNode {
private final Formula pivot;
public ResolutionProofNode(Formula formula, Formula pivot) {
super(ResAxiom.RESOLUTION, Objects.requireNonNull(formula, "Formula must not be null"));
this.pivot = Objects.requireNonNull(pivot, "Pivot must not be null");
}
public Formula getPivot() {
return pivot;
}
@Override
public ProofRule getRule() {
return super.getRule();
}
}
public static class AxiomProofNode extends AbstractProofNode implements ProofNode {
public AxiomProofNode(ResAxiom rule, Formula formula) {
super(
Objects.requireNonNull(rule, "Rule must not be null"),
Objects.requireNonNull(formula, "Formula must not be null"));
}
}
}