-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathProofFrame.java
More file actions
53 lines (45 loc) · 1.2 KB
/
ProofFrame.java
File metadata and controls
53 lines (45 loc) · 1.2 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
/*
* 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.api.proofs;
/**
* Stores proof related information and gets stored in a stack when processing proofs. Each frame
* contains a proof object and the number of arguments it has.
*
* @param <T> The type of the proof object.
*/
public abstract class ProofFrame<T> {
final T proof;
int numArgs = 0;
boolean visited;
protected ProofFrame(T proof) {
this.proof = proof;
this.visited = false;
}
/** Get the proof object. */
public T getProof() {
return proof;
}
/** Get the number of arguments the proof object has. */
public int getNumArgs() {
return numArgs;
}
/** Check if the frame has been visited. */
public boolean isVisited() {
return visited;
}
/** Set the frame as visited. */
public void setAsVisited(boolean isVisited) {
this.visited = isVisited;
}
/** Set the number of arguments the proof object has. */
public void setNumArgs(int numArgs) {
this.numArgs = numArgs;
}
}