diff options
author | 2024-03-10 02:11:15 +0100 | |
---|---|---|
committer | 2024-04-07 14:58:40 +0200 | |
commit | a636a86accf0ed00d0700e04ac0e1ce4f8cadf64 (patch) | |
tree | c11c8df3dca1653643b3941de19e5dbb0cef85b1 /subprojects/language-semantics/src/main/java | |
parent | chore(deps): bump dependencies (diff) | |
download | refinery-a636a86accf0ed00d0700e04ac0e1ce4f8cadf64.tar.gz refinery-a636a86accf0ed00d0700e04ac0e1ce4f8cadf64.tar.zst refinery-a636a86accf0ed00d0700e04ac0e1ce4f8cadf64.zip |
refactor(logic): abstract domain interface
Require all abstract domain elements to implement the AbstractValue interface.
Diffstat (limited to 'subprojects/language-semantics/src/main/java')
2 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java index 3260ef3d..a6b55989 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/DecisionTreeValue.java | |||
@@ -25,7 +25,7 @@ public enum DecisionTreeValue { | |||
25 | } | 25 | } |
26 | 26 | ||
27 | public TruthValue merge(TruthValue other) { | 27 | public TruthValue merge(TruthValue other) { |
28 | return truthValue == null ? other : truthValue.merge(other); | 28 | return truthValue == null ? other : truthValue.meet(other); |
29 | } | 29 | } |
30 | 30 | ||
31 | public DecisionTreeValue overwrite(DecisionTreeValue other) { | 31 | public DecisionTreeValue overwrite(DecisionTreeValue other) { |
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java index 2ebaecef..75933fe4 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/internal/TerminalNode.java | |||
@@ -48,7 +48,7 @@ class TerminalNode extends DecisionTreeNode { | |||
48 | protected void mergeAllValues(int nextLevel, Tuple tuple, TruthValue value) { | 48 | protected void mergeAllValues(int nextLevel, Tuple tuple, TruthValue value) { |
49 | otherwise = DecisionTreeValue.fromTruthValue(otherwise.merge(value)); | 49 | otherwise = DecisionTreeValue.fromTruthValue(otherwise.merge(value)); |
50 | children = IntObjectMaps.mutable.from(children.keyValuesView(), IntObjectPair::getOne, | 50 | children = IntObjectMaps.mutable.from(children.keyValuesView(), IntObjectPair::getOne, |
51 | pair -> pair.getTwo().merge(value)); | 51 | pair -> pair.getTwo().meet(value)); |
52 | reduceChildren(); | 52 | reduceChildren(); |
53 | } | 53 | } |
54 | 54 | ||