-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy pathProofDAG.java
More file actions
49 lines (41 loc) · 1.16 KB
/
ProofDAG.java
File metadata and controls
49 lines (41 loc) · 1.16 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
/*
* 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;
import java.util.Collection;
import org.sosy_lab.java_smt.api.proofs.visitors.ProofVisitor;
/**
* A DAG representing a proof. Each node in the DAG is a {@link ProofNode} and each edge is a
* directed edge from a parent node to a child node.
*/
public interface ProofDAG {
/**
* Add a node to the DAG.
*
* @param node The node to be added to the DAG.
*/
void addNode(ProofNode node);
/**
* Get a node from the DAG.
*
* @param nodeId The ID of the node.
* @return A {@link ProofNode} based on its ID.
*/
ProofNode getNode(int nodeId);
/**
* Add an edge to the DAG.
*
* @param parentNodeId Predecessor
* @param childNodeId Successor
*/
void addEdge(int parentNodeId, int childNodeId);
/** Get all nodes in the DAG. */
Collection<ProofNode> getNodes();
void accept(ProofVisitor visitor); // To allow traversal of the entire DAG
}