Search in sources :

Example 1 with BruteForceMultiIndexQuantifierEliminator

use of com.sri.ai.grinder.sgdpllt.interpreter.BruteForceMultiIndexQuantifierEliminator in project aic-expresso by aic-sri-international.

the class BruteForceFunctionTheory method getSingleVariableConstraintQuantifierEliminatorStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleVariableConstraintQuantifierEliminatorStepSolver(AssociativeCommutativeGroup group, SingleVariableConstraint constraint, Expression body, Context context) {
    Expression variable = constraint.getVariable();
    Expression type = GrinderUtil.getTypeExpression(variable, context);
    Expression indexExpression = IndexExpressions.makeIndexExpression(variable, type);
    ExtensionalIndexExpressionsSet indexExpressionsSet = new ExtensionalIndexExpressionsSet(indexExpression);
    MultiIndexQuantifierEliminator quantifierEliminator = new BruteForceMultiIndexQuantifierEliminator(context.getTheory().getTopRewriter());
    Expression solution = quantifierEliminator.solve(group, indexExpressionsSet, constraint, body, context);
    return new ConstantExpressionStepSolver(solution);
}
Also used : ExtensionalIndexExpressionsSet(com.sri.ai.expresso.core.ExtensionalIndexExpressionsSet) MultiIndexQuantifierEliminator(com.sri.ai.grinder.sgdpllt.api.MultiIndexQuantifierEliminator) BruteForceMultiIndexQuantifierEliminator(com.sri.ai.grinder.sgdpllt.interpreter.BruteForceMultiIndexQuantifierEliminator) Expression(com.sri.ai.expresso.api.Expression) BruteForceMultiIndexQuantifierEliminator(com.sri.ai.grinder.sgdpllt.interpreter.BruteForceMultiIndexQuantifierEliminator) ConstantExpressionStepSolver(com.sri.ai.grinder.sgdpllt.theory.base.ConstantExpressionStepSolver)

Aggregations

Expression (com.sri.ai.expresso.api.Expression)1 ExtensionalIndexExpressionsSet (com.sri.ai.expresso.core.ExtensionalIndexExpressionsSet)1 MultiIndexQuantifierEliminator (com.sri.ai.grinder.sgdpllt.api.MultiIndexQuantifierEliminator)1 BruteForceMultiIndexQuantifierEliminator (com.sri.ai.grinder.sgdpllt.interpreter.BruteForceMultiIndexQuantifierEliminator)1 ConstantExpressionStepSolver (com.sri.ai.grinder.sgdpllt.theory.base.ConstantExpressionStepSolver)1