use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.
the class IntensionalSetFalseConditionToEmptySetSimplifierTest method setUp.
@Before
public void setUp() {
context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new TupleTheory()));
IntegerInterval nType = new IntegerInterval(1, 10);
context = (Context) GrinderUtil.extendRegistryWith(map("N", nType.toString()), Arrays.asList(nType), context);
simplifier = new IntensionalSetFalseConditionToEmptySetSimplifier();
}
use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.
the class IntensionalSetToConditionalSimplifierTest method setUp.
@Before
public void setUp() {
context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new TupleTheory()));
IntegerInterval nType = new IntegerInterval(1, 10);
context = (Context) GrinderUtil.extendRegistryWith(map("N", nType.toString()), Arrays.asList(nType), context);
simplifier = new IntensionalSetToConditionalSimplifier();
}
use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.
the class IntersectionExtensionalSetSimplifierTest method setUp.
@Before
public void setUp() {
context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new TupleTheory()));
IntegerInterval intType = new IntegerInterval(1, 10);
context = (Context) GrinderUtil.extendRegistryWith(map("M", intType.toString(), "N", intType.toString()), Arrays.asList(intType), context);
simplifier = new IntersectionExtensionalSetSimplifier();
}
use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.
the class IntersectionIntensionalSetsSimplifierTest method setUp.
@Before
public void setUp() {
context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new TupleTheory()));
IntegerInterval nType = new IntegerInterval(1, 10);
context = (Context) GrinderUtil.extendRegistryWith(map("N", nType.toString()), Arrays.asList(nType), context);
simplifier = new IntersectionIntensionalSetsSimplifier();
}
use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.
the class BasicTest method debug.
public void debug(Expression problem, Expression expectedSolution) {
CompoundTheory theory = new CompoundTheory(new EqualityTheory(false, true), new DifferenceArithmeticTheory(false, false), new LinearRealArithmeticTheory(false, false), new TupleTheory(), new PropositionalTheory(), new BruteForceFunctionTheory());
Context context = new TrueContext(theory);
context = context.makeNewContextWithAddedType(BOOLEAN_TYPE);
context = context.makeCloneWithAdditionalRegisteredSymbolsAndTypes(map(makeSymbol("P"), makeSymbol("Boolean")));
Expression symbolicSolution = theory.evaluate(problem, context);
println(symbolicSolution);
Assert.assertEquals(expectedSolution, symbolicSolution);
}
Aggregations