use of com.sri.ai.grinder.theory.bruteforce.BruteForceFallbackTheory in project aic-expresso by aic-sri-international.
the class SymbolicShell method makeTheory.
private static Theory makeTheory() {
Theory theory = new CompoundTheory(new EqualityTheory(false, true), new DifferenceArithmeticTheory(false, false), new LinearRealArithmeticTheory(false, false), new TupleTheory(), new PropositionalTheory(), new BruteForceFunctionTheory());
theory = new BruteForceFallbackTheory(theory);
return theory;
}
use of com.sri.ai.grinder.theory.bruteforce.BruteForceFallbackTheory in project aic-expresso by aic-sri-international.
the class BruteForceFallbackTheoryTest method runTest.
private static void runTest(String expressionString, String expectedString, String... symbolsAndTypes) {
Theory theory = new BruteForceFallbackTheory(new DifferenceArithmeticTheory(false, true));
Context context = new TrueContext(theory);
context = context.extendWithSymbolsAndTypes(symbolsAndTypes);
Expression expression = parse(expressionString);
Expression expected = parse(expectedString);
Expression actual = theory.evaluate(expression, context);
println(actual);
assertEquals(expected, actual);
}
Aggregations