blob: a01d7d55c449f3e2694361124bdaab4a8eb490e4 (
plain) (
blame)
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
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.query.dnf;
import tools.refinery.store.query.equality.LiteralEqualityHelper;
import tools.refinery.store.query.literal.Literal;
import tools.refinery.store.query.term.Variable;
import java.util.List;
import java.util.Set;
public record DnfClause(Set<Variable> boundVariables, List<Literal> literals) {
public boolean equalsWithSubstitution(LiteralEqualityHelper helper, DnfClause other) {
int size = literals.size();
if (size != other.literals.size()) {
return false;
}
for (int i = 0; i < size; i++) {
if (!literals.get(i).equalsWithSubstitution(helper, other.literals.get(i))) {
return false;
}
}
return true;
}
}
|