use of com.sri.ai.grinder.interpreter.BruteForceInterpreter in project aic-expresso by aic-sri-international.
the class BasicTest method debug.
private void debug(Expression problem) {
Theory theory = new DifferenceArithmeticTheory(true, true);
Context context = new TrueContext(theory);
context = context.putGlobalObject(BRUTE_FORCE_CHECKING_OF_NON_CONDITIONAL_PROBLEMS, "Yes");
Expression symbolicSolution = theory.evaluate(problem, context);
println(symbolicSolution);
BruteForceInterpreter bruteForceInterpreter = new BruteForceCommonInterpreter();
Expression bruteForceSolution = bruteForceInterpreter.apply(problem, context);
println(bruteForceSolution);
Assert.assertEquals(bruteForceSolution, symbolicSolution);
}
Aggregations