Search in sources :

Example 21 with ExpressionLiteralSplitterStepSolver

use of com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver in project aic-expresso by aic-sri-international.

the class CompoundTheory method getSingleVariableConstraintModelCountingStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleVariableConstraintModelCountingStepSolver(SingleVariableConstraint constraint, Context context) {
    Theory theory = getTheory(constraint.getVariable(), context);
    ExpressionLiteralSplitterStepSolver result;
    if (theory != null) {
        result = theory.getSingleVariableConstraintModelCountingStepSolver(constraint, context);
    } else {
        result = null;
    }
    return result;
}
Also used : Theory(com.sri.ai.grinder.api.Theory) AbstractTheory(com.sri.ai.grinder.core.constraint.AbstractTheory) ExpressionLiteralSplitterStepSolver(com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver)

Example 22 with ExpressionLiteralSplitterStepSolver

use of com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver in project aic-expresso by aic-sri-international.

the class CompoundTheory method getSingleQuantifierEliminatorStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleQuantifierEliminatorStepSolver(SingleQuantifierEliminationProblem problem, Context context) {
    Theory theory = getTheory(problem.getIndex(), context);
    ExpressionLiteralSplitterStepSolver result = theory.getSingleQuantifierEliminatorStepSolver(problem, context);
    return result;
}
Also used : Theory(com.sri.ai.grinder.api.Theory) AbstractTheory(com.sri.ai.grinder.core.constraint.AbstractTheory) ExpressionLiteralSplitterStepSolver(com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver)

Example 23 with ExpressionLiteralSplitterStepSolver

use of com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver in project aic-expresso by aic-sri-international.

the class DifferenceArithmeticTheory method getSingleQuantifierEliminatorStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleQuantifierEliminatorStepSolver(SingleQuantifierEliminationProblem problem, Context context) {
    ExpressionStepSolver formulaSplitterStepSolver;
    if (problem.getGroup() instanceof Sum) {
        formulaSplitterStepSolver = new SummationOnDifferenceArithmeticAndPolynomialStepSolver(problem);
    } else {
        formulaSplitterStepSolver = new QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(problem);
    }
    ExpressionLiteralSplitterStepSolver result = new ExpressionStepSolverToLiteralSplitterStepSolverAdapter(formulaSplitterStepSolver);
    return result;
}
Also used : ExpressionLiteralSplitterStepSolver(com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver) ExpressionStepSolver(com.sri.ai.grinder.api.ExpressionStepSolver) QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(com.sri.ai.grinder.core.solver.QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver) Sum(com.sri.ai.grinder.group.Sum) ExpressionStepSolverToLiteralSplitterStepSolverAdapter(com.sri.ai.grinder.core.solver.ExpressionStepSolverToLiteralSplitterStepSolverAdapter)

Example 24 with ExpressionLiteralSplitterStepSolver

use of com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver in project aic-expresso by aic-sri-international.

the class EqualityTheory method getSingleQuantifierEliminatorStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleQuantifierEliminatorStepSolver(SingleQuantifierEliminationProblem problem, Context context) {
    ExpressionStepSolver formulaSplitterStepSolver = new QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(problem);
    ExpressionLiteralSplitterStepSolver result = new ExpressionStepSolverToLiteralSplitterStepSolverAdapter(formulaSplitterStepSolver);
    return result;
}
Also used : ExpressionLiteralSplitterStepSolver(com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver) ExpressionStepSolver(com.sri.ai.grinder.api.ExpressionStepSolver) QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(com.sri.ai.grinder.core.solver.QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver) ExpressionStepSolverToLiteralSplitterStepSolverAdapter(com.sri.ai.grinder.core.solver.ExpressionStepSolverToLiteralSplitterStepSolverAdapter)

Example 25 with ExpressionLiteralSplitterStepSolver

use of com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver in project aic-expresso by aic-sri-international.

the class LinearRealArithmeticTheory method getSingleQuantifierEliminatorStepSolver.

@Override
public ExpressionLiteralSplitterStepSolver getSingleQuantifierEliminatorStepSolver(SingleQuantifierEliminationProblem problem, Context context) {
    ExpressionStepSolver formulaSplitterStepSolver;
    if (problem.getGroup() instanceof Sum) {
        formulaSplitterStepSolver = new SummationOnLinearRealArithmeticAndPolynomialStepSolver(problem);
    } else {
        formulaSplitterStepSolver = new QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(problem);
    }
    ExpressionLiteralSplitterStepSolver result = new ExpressionStepSolverToLiteralSplitterStepSolverAdapter(formulaSplitterStepSolver);
    return result;
}
Also used : ExpressionLiteralSplitterStepSolver(com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver) ExpressionStepSolver(com.sri.ai.grinder.api.ExpressionStepSolver) QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver(com.sri.ai.grinder.core.solver.QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver) Sum(com.sri.ai.grinder.group.Sum) ExpressionStepSolverToLiteralSplitterStepSolverAdapter(com.sri.ai.grinder.core.solver.ExpressionStepSolverToLiteralSplitterStepSolverAdapter)

Aggregations

ExpressionLiteralSplitterStepSolver (com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver)26 Expression (com.sri.ai.expresso.api.Expression)14 Context (com.sri.ai.grinder.api.Context)5 ContextSplitting (com.sri.ai.grinder.core.constraint.ContextSplitting)5 ExpressionStepSolver (com.sri.ai.grinder.api.ExpressionStepSolver)4 Theory (com.sri.ai.grinder.api.Theory)4 ExpressionStepSolverToLiteralSplitterStepSolverAdapter (com.sri.ai.grinder.core.solver.ExpressionStepSolverToLiteralSplitterStepSolverAdapter)4 QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver (com.sri.ai.grinder.core.solver.QuantifierEliminationOnBodyInWhichIndexOnlyOccursInsideLiteralsStepSolver)4 Test (org.junit.Test)4 Step (com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver.Step)3 StepSolver (com.sri.ai.grinder.api.StepSolver)3 AbstractTheory (com.sri.ai.grinder.core.constraint.AbstractTheory)3 Rewriter (com.sri.ai.grinder.rewriter.api.Rewriter)3 ConstantExpressionStepSolver (com.sri.ai.grinder.theory.base.ConstantExpressionStepSolver)3 Expressions (com.sri.ai.expresso.helper.Expressions)2 Solution (com.sri.ai.grinder.api.ExpressionLiteralSplitterStepSolver.Solution)2 TrueContext (com.sri.ai.grinder.core.TrueContext)2 Sum (com.sri.ai.grinder.group.Sum)2 TheoryTestingSupport (com.sri.ai.grinder.tester.TheoryTestingSupport)2 ConstantStepSolver (com.sri.ai.grinder.theory.base.ConstantStepSolver)2