use of com.sri.ai.expresso.api.IndexExpressionsSet in project aic-expresso by aic-sri-international.
the class TupleQuantifierSimplifier method rewriteThereExists.
private static Expression rewriteThereExists(Expression quantifiedExpression, Map<Expression, Expression> indexToTypeMap, Map<Expression, Expression> indexToTupleOfVars, Context context) {
if (indexToTypeMap.size() > 1) {
throw new IllegalStateException("We have an Existential Quantifier with > 1 index : " + quantifiedExpression);
}
Pair<IndexExpressionsSet, Expression> updatePair = update(ThereExists.getBody(quantifiedExpression), indexToTypeMap, indexToTupleOfVars, context);
Expression result = ThereExists.make(updatePair.first, updatePair.second);
return result;
}
use of com.sri.ai.expresso.api.IndexExpressionsSet in project aic-expresso by aic-sri-international.
the class TupleQuantifierSimplifier method rewriteCountingFormula.
private static Expression rewriteCountingFormula(CountingFormula countingFormula, Map<Expression, Expression> indexToTypeMap, Map<Expression, Expression> indexToTupleOfVars, Context context) {
Pair<IndexExpressionsSet, Expression> updatePair = update(countingFormula.getBody(), indexToTypeMap, indexToTupleOfVars, context);
Expression result = new DefaultCountingFormula(updatePair.first, updatePair.second);
return result;
}
use of com.sri.ai.expresso.api.IndexExpressionsSet in project aic-expresso by aic-sri-international.
the class TupleQuantifierSimplifier method rewriteForAll.
private static Expression rewriteForAll(Expression quantifiedExpression, Map<Expression, Expression> indexToTypeMap, Map<Expression, Expression> indexToTupleOfVars, Context context) {
if (indexToTypeMap.size() > 1) {
throw new IllegalStateException("We have a Universal Quantifier with > 1 index : " + quantifiedExpression);
}
Pair<IndexExpressionsSet, Expression> updatePair = update(ForAll.getBody(quantifiedExpression), indexToTypeMap, indexToTupleOfVars, context);
Expression result = ForAll.make(updatePair.first, updatePair.second);
return result;
}
use of com.sri.ai.expresso.api.IndexExpressionsSet in project aic-expresso by aic-sri-international.
the class TupleQuantifierSimplifier method rewriteCountingFormula.
private static Expression rewriteCountingFormula(CountingFormula countingFormula, Map<Expression, Expression> indexToTypeMap, Map<Expression, Expression> indexToTupleOfVars, Context context) {
Pair<IndexExpressionsSet, Expression> updatePair = update(countingFormula.getBody(), indexToTypeMap, indexToTupleOfVars, context);
Expression result = new DefaultCountingFormula(updatePair.first, updatePair.second);
return result;
}
use of com.sri.ai.expresso.api.IndexExpressionsSet in project aic-expresso by aic-sri-international.
the class TupleQuantifierSimplifier method rewriteLambdaExpression.
private static Expression rewriteLambdaExpression(LambdaExpression lambdaExpression, Map<Expression, Expression> indexToTypeMap, Map<Expression, Expression> indexToTupleOfVars, Context context) {
Pair<IndexExpressionsSet, Expression> updatePair = update(lambdaExpression.getBody(), indexToTypeMap, indexToTupleOfVars, context);
Expression result = new DefaultLambdaExpression(updatePair.first, updatePair.second);
return result;
}
Aggregations