use of com.sri.ai.expresso.api.SubExpressionAddress in project aic-expresso by aic-sri-international.
the class AbstractExpression method replace.
@Override
public Expression replace(ExpressionAndSyntacticContext replacementAndContext) {
SubExpressionAddress address = replacementAndContext.getAddress();
Expression result = address.replace(this, replacementAndContext.getExpression());
Expression expressionReplacement = result;
return expressionReplacement;
}
use of com.sri.ai.expresso.api.SubExpressionAddress in project aic-expresso by aic-sri-international.
the class AbstractQuantifiedExpression method makeAddressForIndexType.
private ExpressionAndSyntacticContext makeAddressForIndexType(int indexExpressionIndex, Expression type) {
SubExpressionAddress address = new IndexExpressionTypeSubExpressionAddress(indexExpressionIndex);
ExpressionAndSyntacticContext expressionAndSyntacticContext = new DefaultExpressionAndSyntacticContext(type, address);
return expressionAndSyntacticContext;
}
use of com.sri.ai.expresso.api.SubExpressionAddress in project aic-expresso by aic-sri-international.
the class AbstractQuantifiedExpression method makeAddressForIndexArgument.
private ExpressionAndSyntacticContext makeAddressForIndexArgument(int indexExpressionIndex, Expression index, int argumentIndex) {
SubExpressionAddress address = new IndexExpressionArgumentSubExpressionAddress(indexExpressionIndex, argumentIndex);
ExpressionAndSyntacticContext expressionAndSyntacticContext = new DefaultExpressionAndSyntacticContext(index.get(argumentIndex), address);
return expressionAndSyntacticContext;
}
Aggregations