use of com.sri.ai.grinder.sgdpllt.theory.base.ExpressionWrapperStepSolver in project aic-expresso by aic-sri-international.
the class SelectExpressionsSatisfyingComparisonStepSolverTest method runTest.
private void runTest(List<String> expressions, Expression bound, Expression expected, Context context) {
StepSolver<List<Expression>> stepSolver = new SelectExpressionsSatisfyingComparisonStepSolver(mapIntoArrayList(expressions, Expressions::parse), LESS_THAN, bound);
ExpressionWrapperStepSolver<List<Expression>> wrapInList = new ExpressionWrapperStepSolver<>(stepSolver, selection -> apply("list", selection));
Expression solution = ContextDependentExpressionProblemSolver.staticSolve(wrapInList, context);
System.out.println("Elements in " + expressions + " which are less than " + bound + ": " + solution);
assertEquals(expected, solution);
}
Aggregations