use of com.sri.ai.grinder.rewriter.core.Recursive in project aic-expresso by aic-sri-international.
the class SymbolicShell method evaluate.
private static void evaluate(Expression input, ConsoleIterator consoleIterator, Theory theory, Context context) {
Rewriter prettyRewriter = new Exhaustive(new Recursive(new FirstOf(theory.getTopRewriter(), new PrettySimplifier())));
Expression result = theory.evaluate(input, context);
result = prettyRewriter.apply(result, context);
consoleIterator.getOutputWriter().println(result + "\n");
}
use of com.sri.ai.grinder.rewriter.core.Recursive in project aic-expresso by aic-sri-international.
the class AbstractTheory method setAllRewriters.
private void setAllRewriters(TopRewriter topRewriter) {
this.topRewriter = topRewriter;
this.rewriter = new Recursive(new Exhaustive(topRewriter));
this.completeRewriter = new CompleteRewriter(topRewriter);
}
use of com.sri.ai.grinder.rewriter.core.Recursive in project aic-expresso by aic-sri-international.
the class AssignmentsSamplingIteratorTest method setUp.
@Before
public void setUp() {
// Make tests repeatable
random = new Random(1);
conditionRewriter = new Recursive(new Exhaustive(new BruteForceCommonInterpreter()));
context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new LinearRealArithmeticTheory(false, false), new EqualityTheory(false, false), new PropositionalTheory()));
}
Aggregations