Search in sources :

Example 16 with TupleTheory

use of com.sri.ai.grinder.theory.tuple.TupleTheory in project aic-expresso by aic-sri-international.

the class InversionPerformanceEvaluationTest method setUp.

@Before
public void setUp() {
    context = new TrueContext(new CompoundTheory(new DifferenceArithmeticTheory(false, false), new EqualityTheory(false, false), new PropositionalTheory(), new TupleTheory()));
    updateContextWithIndexAndType("R", GrinderUtil.INTEGER_TYPE);
    context.conjoin(parse("R = 1"), context);
}
Also used : EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) 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 17 with TupleTheory

use of com.sri.ai.grinder.theory.tuple.TupleTheory 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 18 with TupleTheory

use of com.sri.ai.grinder.theory.tuple.TupleTheory 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 19 with TupleTheory

use of com.sri.ai.grinder.theory.tuple.TupleTheory 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

CompoundTheory (com.sri.ai.grinder.theory.compound.CompoundTheory)19 DifferenceArithmeticTheory (com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory)19 TupleTheory (com.sri.ai.grinder.theory.tuple.TupleTheory)19 TrueContext (com.sri.ai.grinder.core.TrueContext)18 IntegerInterval (com.sri.ai.expresso.type.IntegerInterval)10 Before (org.junit.Before)10 EqualityTheory (com.sri.ai.grinder.theory.equality.EqualityTheory)9 PropositionalTheory (com.sri.ai.grinder.theory.propositional.PropositionalTheory)9 LinearRealArithmeticTheory (com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory)8 Context (com.sri.ai.grinder.api.Context)6 Expression (com.sri.ai.expresso.api.Expression)5 Theory (com.sri.ai.grinder.api.Theory)5 IndexExpressionsSet (com.sri.ai.expresso.api.IndexExpressionsSet)2 ExtensionalIndexExpressionsSet (com.sri.ai.expresso.core.ExtensionalIndexExpressionsSet)2 BruteForceFunctionTheory (com.sri.ai.grinder.theory.function.BruteForceFunctionTheory)2 Model (anytimeExactBeliefPropagation.Model.Model)1 IsingModel (anytimeExactBeliefPropagation.ModelGenerator.IsingModel)1 IntensionalSet (com.sri.ai.expresso.api.IntensionalSet)1 Type (com.sri.ai.expresso.api.Type)1 DefaultFunctionApplication (com.sri.ai.expresso.core.DefaultFunctionApplication)1