Search in sources :

Example 51 with DifferenceArithmeticTheory

use of com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory in project aic-expresso by aic-sri-international.

the class InversionSimplifierTest method setUp.

@Before
public void setUp() {
    context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new TupleTheory()));
    FunctionType gFunctionType = new FunctionType(new IntegerInterval("1..10"), new IntegerInterval("1..10"));
    context = (Context) GrinderUtil.extendRegistryWith(map("g", gFunctionType.toString()), Arrays.asList(gFunctionType), context);
    simplifier = new InversionSimplifier();
}
Also used : InversionSimplifier(com.sri.ai.grinder.library.set.invsupport.InversionSimplifier) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) FunctionType(com.sri.ai.expresso.type.FunctionType) IntegerInterval(com.sri.ai.expresso.type.IntegerInterval) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) TrueContext(com.sri.ai.grinder.core.TrueContext) TupleTheory(com.sri.ai.grinder.theory.tuple.TupleTheory) Before(org.junit.Before)

Example 52 with DifferenceArithmeticTheory

use of com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory in project aic-expresso by aic-sri-international.

the class SetDNFRewriterTest 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);
    rewriter = new SetDNFRewriter();
}
Also used : DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) IntegerInterval(com.sri.ai.expresso.type.IntegerInterval) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) TrueContext(com.sri.ai.grinder.core.TrueContext) TupleTheory(com.sri.ai.grinder.theory.tuple.TupleTheory) SetDNFRewriter(com.sri.ai.grinder.library.set.invsupport.SetDNFRewriter) Before(org.junit.Before)

Example 53 with DifferenceArithmeticTheory

use of com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory in project aic-expresso by aic-sri-international.

the class SetExpressionIsEqualToEmptySetTest 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(), "X'", intType.toString(), "X''", intType.toString(), "Y", intType.toString()), Arrays.asList(intType), context);
    rewriter = new SetExpressionIsEqualToEmptySet();
}
Also used : SetExpressionIsEqualToEmptySet(com.sri.ai.grinder.library.set.invsupport.SetExpressionIsEqualToEmptySet) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) IntegerInterval(com.sri.ai.expresso.type.IntegerInterval) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) TrueContext(com.sri.ai.grinder.core.TrueContext) TupleTheory(com.sri.ai.grinder.theory.tuple.TupleTheory) Before(org.junit.Before)

Aggregations

DifferenceArithmeticTheory (com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory)53 CompoundTheory (com.sri.ai.grinder.theory.compound.CompoundTheory)36 Context (com.sri.ai.grinder.api.Context)31 TrueContext (com.sri.ai.grinder.core.TrueContext)28 Expression (com.sri.ai.expresso.api.Expression)27 PropositionalTheory (com.sri.ai.grinder.theory.propositional.PropositionalTheory)26 Test (org.junit.Test)23 TheoryTestingSupport (com.sri.ai.grinder.tester.TheoryTestingSupport)22 EqualityTheory (com.sri.ai.grinder.theory.equality.EqualityTheory)22 TupleTheory (com.sri.ai.grinder.theory.tuple.TupleTheory)19 IntegerInterval (com.sri.ai.expresso.type.IntegerInterval)15 LinearRealArithmeticTheory (com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory)13 Before (org.junit.Before)12 Type (com.sri.ai.expresso.api.Type)10 Theory (com.sri.ai.grinder.api.Theory)7 FunctionType (com.sri.ai.expresso.type.FunctionType)6 Rewriter (com.sri.ai.grinder.rewriter.api.Rewriter)5 LinkedHashMap (java.util.LinkedHashMap)5 StepSolver (com.sri.ai.grinder.api.StepSolver)4 UnificationStepSolver (com.sri.ai.grinder.theory.base.UnificationStepSolver)4