Skip to content

Commit 50a854b

Browse files
committed
commons: address TODOs, added to refactoring suggestions in #300
1 parent b63eeb1 commit 50a854b

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

alpha-commons/src/main/java/at/ac/tuwien/kr/alpha/commons/terms/ArithmeticTermImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public Integer evaluateExpression() {
147147
return arithmeticOperator.eval(leftInt, rightInt);
148148
}
149149

150-
// FIXME it doesn't seem like this class is really needed, could be handled by an if in ArithmeticTermImpl#getInstance
150+
// Note: It doesn't seem like this class is really needed, could be handled by an if in ArithmeticTermImpl#getInstance.
151151
public static class MinusTerm extends ArithmeticTermImpl {
152152

153153
private MinusTerm(Term term) {

alpha-commons/src/main/java/at/ac/tuwien/kr/alpha/commons/terms/Terms.java

-2
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,13 @@ public static Substitution renameVariables(Set<VariableTerm> terms, String varNa
9797
return renamingSubstitution;
9898
}
9999

100-
// TODO break this into separate class to avoid cyclic dependency Terms <-> ArithmeticTermImpl
101100
public static Integer evaluateGroundTerm(Term term) {
102101
if (!term.isGround()) {
103102
throw new RuntimeException("Cannot evaluate arithmetic term since it is not ground: " + term);
104103
}
105104
return evaluateGroundTermHelper(term);
106105
}
107106

108-
// TODO break this into separate class to avoid cyclic dependency Terms <-> ArithmeticTermImpl
109107
static Integer evaluateGroundTermHelper(Term term) {
110108
if (term instanceof ConstantTerm
111109
&& ((ConstantTerm<?>) term).getObject() instanceof Integer) {

0 commit comments

Comments
 (0)