Search in sources :

Example 1 with SummationOnLinearRealArithmeticAndPolynomialStepSolver

use of com.sri.ai.grinder.theory.linearrealarithmetic.SummationOnLinearRealArithmeticAndPolynomialStepSolver in project aic-expresso by aic-sri-international.

the class LinearRealArithmeticTheoryTest method runSummationTest.

private void runSummationTest(Expression variable, String constraintString, String bodyString, Expression expected, Simplifier simplifier, Context context) {
    Expression typeExpression = context.getTypeExpressionOfRegisteredSymbol(variable);
    runQuantifierTest(variable, constraintString, bodyString, expected, "summation for " + bodyString, (SingleVariableConstraint c, Expression b) -> new SummationOnLinearRealArithmeticAndPolynomialStepSolver(new DefaultSingleQuantifierEliminationProblem(new Sum(), variable, typeExpression, c, b)), context);
}
Also used : SingleVariableConstraint(com.sri.ai.grinder.api.SingleVariableConstraint) Expression(com.sri.ai.expresso.api.Expression) SummationOnLinearRealArithmeticAndPolynomialStepSolver(com.sri.ai.grinder.theory.linearrealarithmetic.SummationOnLinearRealArithmeticAndPolynomialStepSolver) DefaultSingleQuantifierEliminationProblem(com.sri.ai.grinder.core.solver.DefaultSingleQuantifierEliminationProblem) Sum(com.sri.ai.grinder.group.Sum)

Aggregations

Expression (com.sri.ai.expresso.api.Expression)1 SingleVariableConstraint (com.sri.ai.grinder.api.SingleVariableConstraint)1 DefaultSingleQuantifierEliminationProblem (com.sri.ai.grinder.core.solver.DefaultSingleQuantifierEliminationProblem)1 Sum (com.sri.ai.grinder.group.Sum)1 SummationOnLinearRealArithmeticAndPolynomialStepSolver (com.sri.ai.grinder.theory.linearrealarithmetic.SummationOnLinearRealArithmeticAndPolynomialStepSolver)1