replace our own String constants with methods from Princess.
@@ -108,8 +108,7 @@ class PrincessModel extends CachingAbstractModel<IExpression, Sort, PrincessEnvi
} else if (key instanceof IFunApp) {
IFunApp cKey = (IFunApp) key;
- switch (cKey.fun().name()) {
- case "select":
+ if (ExtArray.Select$.MODULE$.unapply(cKey.fun()).isDefined()) {
// array-access, for explanation see #getArrayAddresses
ITerm arrayId = cKey.args().apply(Integer.valueOf(0));
ITerm arrayIndex = cKey.args().apply(Integer.valueOf(1));
@@ -122,8 +121,8 @@ class PrincessModel extends CachingAbstractModel<IExpression, Sort, PrincessEnvi
fKey = creator.getEnv().makeSelect(arrayF, arrayIndex);
name = arrayF.toString();
argumentInterpretations = ImmutableList.of(creator.convertValue(arrayIndex));
- break;
- case "store":
+
+ } else if (ExtArray.Store$.MODULE$.unapply(cKey.fun()).isDefined()) {
// array-access, for explanation see #getArrayAddresses
// IdealInt sourceArray = cKey.args().apply(0);
ITerm arrayIndex2 = cKey.args().apply(Integer.valueOf(1));
@@ -138,8 +137,8 @@ class PrincessModel extends CachingAbstractModel<IExpression, Sort, PrincessEnvi
fValue = arrayContent;
name = arrayF2.toString();
argumentInterpretations = ImmutableList.of(creator.convertValue(arrayIndex2));
- break;
- default:
+
+ } else {
// normal variable or UF
argumentInterpretations = new ArrayList<>();
for (ITerm arg : asJava(cKey.args())) {
