diff options
Diffstat (limited to 'subprojects/language-semantics/src')
-rw-r--r-- | subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java index 233cc156..557e9752 100644 --- a/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java +++ b/subprojects/language-semantics/src/main/java/tools/refinery/language/semantics/model/ModelInitializer.java | |||
@@ -75,8 +75,6 @@ public class ModelInitializer { | |||
75 | var argument = arguments.get(i); | 75 | var argument = arguments.get(i); |
76 | if (argument instanceof NodeAssertionArgument nodeArgument) { | 76 | if (argument instanceof NodeAssertionArgument nodeArgument) { |
77 | nodes[i] = nodeTrace.getOrThrow(nodeArgument.getNode()); | 77 | nodes[i] = nodeTrace.getOrThrow(nodeArgument.getNode()); |
78 | } else if (argument instanceof ConstantAssertionArgument constantArgument) { | ||
79 | nodes[i] = nodeTrace.getOrThrow(constantArgument.getNode()); | ||
80 | } else if (argument instanceof WildcardAssertionArgument) { | 78 | } else if (argument instanceof WildcardAssertionArgument) { |
81 | nodes[i] = -1; | 79 | nodes[i] = -1; |
82 | } else { | 80 | } else { |
@@ -86,8 +84,11 @@ public class ModelInitializer { | |||
86 | return Tuple.of(nodes); | 84 | return Tuple.of(nodes); |
87 | } | 85 | } |
88 | 86 | ||
89 | private static TruthValue getTruthValue(LogicValue value) { | 87 | private static TruthValue getTruthValue(AssertionValue value) { |
90 | return switch (value) { | 88 | if (!(value instanceof LogicAssertionValue logicAssertionValue)) { |
89 | return TruthValue.ERROR; | ||
90 | } | ||
91 | return switch (logicAssertionValue.getLogicValue()) { | ||
91 | case TRUE -> TruthValue.TRUE; | 92 | case TRUE -> TruthValue.TRUE; |
92 | case FALSE -> TruthValue.FALSE; | 93 | case FALSE -> TruthValue.FALSE; |
93 | case UNKNOWN -> TruthValue.UNKNOWN; | 94 | case UNKNOWN -> TruthValue.UNKNOWN; |