use of com.sri.ai.expresso.core.DefaultUniversallyQuantifiedFormula in project aic-expresso by aic-sri-international.
the class GrinderUtil method universallyQuantifyFreeVariables.
/**
* Returns a universal quantification of given expression over its free variables,
* with types as registered in registry.
* @param expression
* @param registry
* @return
*/
public static Expression universallyQuantifyFreeVariables(Expression expression, Registry registry) {
IndexExpressionsSet indexExpressions = getIndexExpressionsOfFreeVariablesIn(expression, registry);
Expression universallyQuantified = new DefaultUniversallyQuantifiedFormula(indexExpressions, expression);
return universallyQuantified;
}
use of com.sri.ai.expresso.core.DefaultUniversallyQuantifiedFormula in project aic-expresso by aic-sri-international.
the class Expressions method makeDefaultUniversallyQuantifiedFormulaFromLabelAndSubTrees.
private static Expression makeDefaultUniversallyQuantifiedFormulaFromLabelAndSubTrees(Object label, Object[] subTreeObjects) {
ArrayList<Expression> subTreeExpressions = Util.mapIntoArrayList(subTreeObjects, Expressions::makeFromObject);
Expression indexExpressionsKleeneList = subTreeExpressions.get(0);
IndexExpressionsSet indexExpressions = new ExtensionalIndexExpressionsSet(ensureListFromKleeneList(indexExpressionsKleeneList));
Expression body = subTreeExpressions.get(1);
Expression result = new DefaultUniversallyQuantifiedFormula(indexExpressions, body);
return result;
}
Aggregations