Search in sources :

Example 56 with IntegerInterval

use of com.sri.ai.expresso.type.IntegerInterval in project aic-expresso by aic-sri-international.

the class DistributeIntersectionOverUnionSimplifierTest 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 DistributeIntersectionOverUnionSimplifier();
}
Also used : DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) IntegerInterval(com.sri.ai.expresso.type.IntegerInterval) DistributeIntersectionOverUnionSimplifier(com.sri.ai.grinder.library.set.invsupport.DistributeIntersectionOverUnionSimplifier) 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 57 with IntegerInterval

use of com.sri.ai.expresso.type.IntegerInterval 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 58 with IntegerInterval

use of com.sri.ai.expresso.type.IntegerInterval 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 59 with IntegerInterval

use of com.sri.ai.expresso.type.IntegerInterval 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)

Example 60 with IntegerInterval

use of com.sri.ai.expresso.type.IntegerInterval in project aic-expresso by aic-sri-international.

the class SetOfArgumentTuplesForFunctionOccurringInExpressionTest method setUp.

@Before
public void setUp() {
    fName = parse("f");
    fType = new FunctionType(new IntegerInterval("1..5"), new IntegerInterval("1..10"), new IntegerInterval("11..20"));
}
Also used : FunctionType(com.sri.ai.expresso.type.FunctionType) IntegerInterval(com.sri.ai.expresso.type.IntegerInterval) Before(org.junit.Before)

Aggregations

IntegerInterval (com.sri.ai.expresso.type.IntegerInterval)60 Expression (com.sri.ai.expresso.api.Expression)22 Before (org.junit.Before)20 FunctionType (com.sri.ai.expresso.type.FunctionType)18 Test (org.junit.Test)18 Type (com.sri.ai.expresso.api.Type)16 DifferenceArithmeticTheory (com.sri.ai.grinder.sgdpllt.theory.differencearithmetic.DifferenceArithmeticTheory)15 DifferenceArithmeticTheory (com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory)15 RealInterval (com.sri.ai.expresso.type.RealInterval)14 IntegerExpressoType (com.sri.ai.expresso.type.IntegerExpressoType)13 TrueContext (com.sri.ai.grinder.core.TrueContext)13 CompoundTheory (com.sri.ai.grinder.sgdpllt.theory.compound.CompoundTheory)13 Categorical (com.sri.ai.expresso.type.Categorical)12 TupleType (com.sri.ai.expresso.type.TupleType)12 TrueContext (com.sri.ai.grinder.sgdpllt.core.TrueContext)12 CompoundTheory (com.sri.ai.grinder.theory.compound.CompoundTheory)12 RealExpressoType (com.sri.ai.expresso.type.RealExpressoType)10 TupleTheory (com.sri.ai.grinder.theory.tuple.TupleTheory)10 TupleTheory (com.sri.ai.grinder.sgdpllt.theory.tuple.TupleTheory)8 Context (com.sri.ai.grinder.api.Context)6