Search in sources :

Example 21 with PropositionalTheory

use of com.sri.ai.grinder.theory.propositional.PropositionalTheory in project aic-praise by aic-sri-international.

the class RandomConditionalPotentialExpressionGenerator method newTheoryTestingSupport.

private TheoryTestingSupport newTheoryTestingSupport(Random random, RandomHOGMv1Generator.TheoryTypePropositionalArgs[] propositionTheoryArgs, RandomHOGMv1Generator.TheoryTypeEqualityArgs[] equalityTheoryArgs, RandomHOGMv1Generator.TheoryTypeInequalityArgs[] inequalityTheoryArgs) {
    List<Theory> theories = new ArrayList<>();
    if (propositionTheoryArgs.length > 0) {
        theories.add(new PropositionalTheory());
    }
    if (equalityTheoryArgs.length > 0) {
        EqualityTheory equalityTheory;
        if (inequalityTheoryArgs.length == 0) {
            // first flag is 'true' because all equalities are atoms in the final theory; there is no need to check arguments type
            equalityTheory = new EqualityTheory(true, true);
        } else {
            // 'false' because not all equalities are atoms in this final theory; need to check arguments type
            equalityTheory = new EqualityTheory(false, true);
        }
        theories.add(equalityTheory);
    }
    if (inequalityTheoryArgs.length > 0) {
        DifferenceArithmeticTheory differenceArithmeticTheory;
        if (equalityTheoryArgs.length == 0) {
            // first flag is 'true' because all equalities are atoms in the final theory; there is no need to check arguments type
            differenceArithmeticTheory = new DifferenceArithmeticTheory(true, true);
        } else {
            // 'false' because not all equalities are atoms in this final theory; need to check arguments type
            differenceArithmeticTheory = new DifferenceArithmeticTheory(false, true);
        }
        theories.add(differenceArithmeticTheory);
    }
    Theory finalTheory;
    if (theories.size() > 1) {
        finalTheory = new CompoundTheory(theories.toArray(new Theory[theories.size()]));
    } else {
        finalTheory = theories.get(0);
    }
    TheoryTestingSupport result = TheoryTestingSupport.make(random, finalTheory);
    return result;
}
Also used : EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) Theory(com.sri.ai.grinder.api.Theory) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) TheoryTestingSupport(com.sri.ai.grinder.tester.TheoryTestingSupport) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) ArrayList(java.util.ArrayList) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory)

Example 22 with PropositionalTheory

use of com.sri.ai.grinder.theory.propositional.PropositionalTheory in project aic-praise by aic-sri-international.

the class UAIMARSolver method main.

public static void main(String[] args) throws IOException {
    if (args.length != 4) {
        throw new IllegalArgumentException("Usage: UAIMARSolver <file or directory with UAI-format files> <solution directory> <timeout in ms> equalities|difference_arithmetic");
    }
    File uaiInput = new File(args[0]);
    if (!uaiInput.exists()) {
        throw new IllegalArgumentException("File or directory specified does not exist: " + uaiInput.getAbsolutePath());
    }
    File solutionDir = new File(args[1]);
    if (!solutionDir.exists() || !solutionDir.isDirectory()) {
        throw new IllegalArgumentException("Solution directory is invalid: " + solutionDir.getAbsolutePath());
    }
    int maxSolverTimeInSeconds = Integer.parseInt(args[2]);
    Theory theory;
    if (args[3].equals("equalities")) {
        theory = new CompoundTheory(new PropositionalTheory(), new EqualityTheory(true, true));
    } else if (args[3].equals("difference_arithmetic")) {
        theory = new CompoundTheory(new PropositionalTheory(), new DifferenceArithmeticTheory(true, true));
    } else {
        throw new IllegalArgumentException("4-th argument must be either 'equalities' or 'difference_arithmetic'");
    }
    List<UAIModel> models = new ArrayList<>();
    Map<UAIModel, File> modelToFile = new HashMap<>();
    if (uaiInput.isDirectory()) {
        for (File uaiFile : uaiInput.listFiles((dir, name) -> name.endsWith(".uai"))) {
            UAIModel model = read(uaiFile, solutionDir);
            models.add(model);
            modelToFile.put(model, uaiFile);
        }
    } else {
        UAIModel model = read(uaiInput, solutionDir);
        models.add(model);
        modelToFile.put(model, uaiInput);
    }
    // Sort based on what we consider to be the simplest to hardest
    // Collections.sort(models, (model1, model2) -> Double.compare(model1.ratioUniqueTablesToTables(), model2.ratioUniqueTablesToTables()));
    // Collections.sort(models, (model1, model2) -> Integer.compare(model1.largestNumberOfFunctionTableEntries(), model2.largestNumberOfFunctionTableEntries()));
    Collections.sort(models, (model1, model2) -> Integer.compare(model1.totalNumberEntriesForAllFunctionTables(), model2.totalNumberEntriesForAllFunctionTables()));
    // Collections.sort(models, (model1, model2) -> Integer.compare(model1.numberTables(), model2.numberTables()));
    Map<String, Boolean> modelSolvedStatus = new LinkedHashMap<>();
    Map<String, Long> modelSolvedTime = new LinkedHashMap<>();
    System.out.println("#models read=" + models.size());
    final AtomicInteger cnt = new AtomicInteger(1);
    models.stream().forEach(model -> {
        System.out.println("Starting to Solve: " + modelToFile.get(model).getName() + " (" + cnt.getAndAdd(1) + " of " + models.size() + ")");
        long start = System.currentTimeMillis();
        boolean solved = solve(model, model.getEvidence(), model.getMARSolution(), maxSolverTimeInSeconds, theory);
        long took = (System.currentTimeMillis() - start);
        System.out.println("---- Took " + took + "ms. solved=" + solved);
        modelSolvedStatus.put(modelToFile.get(model).getName(), solved);
        modelSolvedTime.put(modelToFile.get(model).getName(), took);
    });
    System.out.println("MODELS SOLVE STATUS");
    modelSolvedStatus.entrySet().stream().forEach(e -> System.out.printf("%-25s %-5b %12sms.\n", e.getKey(), e.getValue(), modelSolvedTime.get(e.getKey())));
    System.out.println("SUMMARY");
    System.out.println("#models   solved=" + modelSolvedStatus.values().stream().filter(status -> status == true).count());
    System.out.println("#models unsolved=" + modelSolvedStatus.values().stream().filter(status -> status == false).count());
}
Also used : IntStream(java.util.stream.IntStream) Arrays(java.util.Arrays) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) AtomicDouble(com.google.common.util.concurrent.AtomicDouble) Expressions(com.sri.ai.expresso.helper.Expressions) ExpressionBasedSolver(com.sri.ai.praise.core.inference.byinputrepresentation.classbased.expressionbased.api.ExpressionBasedSolver) TimeoutException(java.util.concurrent.TimeoutException) HashMap(java.util.HashMap) Callable(java.util.concurrent.Callable) Expression(com.sri.ai.expresso.api.Expression) EvaluationExpressionBasedSolver(com.sri.ai.praise.core.inference.byinputrepresentation.classbased.expressionbased.core.byalgorithm.evaluation.EvaluationExpressionBasedSolver) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) And(com.sri.ai.grinder.library.boole.And) UAIModel(com.sri.ai.praise.core.representation.classbased.table.core.uai.UAIModel) Future(java.util.concurrent.Future) Division(com.sri.ai.grinder.library.number.Division) UAI_to_ExpressionBased_Translator(com.sri.ai.praise.core.representation.translation.ciaranframework.core.uai.UAI_to_ExpressionBased_Translator) Equality(com.sri.ai.grinder.library.Equality) Not(com.sri.ai.grinder.library.boole.Not) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) UAIUtil.constructGenericTableExpressionUsingEqualities(com.sri.ai.praise.core.representation.classbased.table.core.uai.UAIUtil.constructGenericTableExpressionUsingEqualities) ExecutorService(java.util.concurrent.ExecutorService) UAIUtil(com.sri.ai.praise.core.representation.classbased.table.core.uai.UAIUtil) MultiQuantifierEliminator(com.sri.ai.grinder.api.MultiQuantifierEliminator) UAIUtil.convertGenericTableToInstance(com.sri.ai.praise.core.representation.classbased.table.core.uai.UAIUtil.convertGenericTableToInstance) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) UAIEvidenceReading(com.sri.ai.praise.core.representation.classbased.table.core.uai.parsing.UAIEvidenceReading) IOException(java.io.IOException) IfThenElse(com.sri.ai.grinder.library.controlflow.IfThenElse) Collectors(java.util.stream.Collectors) File(java.io.File) Executors(java.util.concurrent.Executors) Beta(com.google.common.annotations.Beta) TimeUnit(java.util.concurrent.TimeUnit) List(java.util.List) Theory(com.sri.ai.grinder.api.Theory) GraphicalNetwork(com.sri.ai.praise.core.representation.classbased.table.api.GraphicalNetwork) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) UAIModelReader(com.sri.ai.praise.core.representation.classbased.table.core.uai.parsing.UAIModelReader) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) FunctorConstants(com.sri.ai.grinder.library.FunctorConstants) FunctionTable(com.sri.ai.praise.core.representation.classbased.table.core.data.FunctionTable) Collections(java.util.Collections) ExpressionBasedModel(com.sri.ai.praise.core.representation.classbased.expressionbased.api.ExpressionBasedModel) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) Theory(com.sri.ai.grinder.api.Theory) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) ArrayList(java.util.ArrayList) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) LinkedHashMap(java.util.LinkedHashMap) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) UAIModel(com.sri.ai.praise.core.representation.classbased.table.core.uai.UAIModel) File(java.io.File)

Example 23 with PropositionalTheory

use of com.sri.ai.grinder.theory.propositional.PropositionalTheory in project aic-praise by aic-sri-international.

the class UAIModelToExpressionFactorNetwork method convert.

public static ExpressionFactorNetwork convert(UAIModel uaiModel, Theory theory) {
    List<Expression> factorsRepresentedAsExpressions = createListOfExpressionsrepresentingTheFactorsFromAUAIModel(uaiModel);
    if (theory == null) {
        theory = new CompoundTheory(new EqualityTheory(false, true), new DifferenceArithmeticTheory(false, true), new LinearRealArithmeticTheory(false, true), new PropositionalTheory());
    }
    // Add variables in the factors to the context...
    ExpressionBasedModel factorsAndTypes = new UAI_to_ExpressionBased_Translator(factorsRepresentedAsExpressions, uaiModel);
    // Context
    Context context = fillingContext(theory, factorsAndTypes);
    ExpressionFactorNetwork result = expressionFactorNetwork(factorsRepresentedAsExpressions, context);
    return result;
}
Also used : Context(com.sri.ai.grinder.api.Context) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) Expression(com.sri.ai.expresso.api.Expression) ExpressionBasedModel(com.sri.ai.praise.core.representation.classbased.expressionbased.api.ExpressionBasedModel) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) LinearRealArithmeticTheory(com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) UAI_to_ExpressionBased_Translator(com.sri.ai.praise.core.representation.translation.ciaranframework.core.uai.UAI_to_ExpressionBased_Translator)

Example 24 with PropositionalTheory

use of com.sri.ai.grinder.theory.propositional.PropositionalTheory 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()));
}
Also used : BruteForceCommonInterpreter(com.sri.ai.grinder.interpreter.BruteForceCommonInterpreter) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) Random(java.util.Random) Exhaustive(com.sri.ai.grinder.rewriter.core.Exhaustive) DifferenceArithmeticTheory(com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory) LinearRealArithmeticTheory(com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) Recursive(com.sri.ai.grinder.rewriter.core.Recursive) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) TrueContext(com.sri.ai.grinder.core.TrueContext) Before(org.junit.Before)

Example 25 with PropositionalTheory

use of com.sri.ai.grinder.theory.propositional.PropositionalTheory in project aic-expresso by aic-sri-international.

the class CompilationTest method test.

@Test
public void test() {
    Expression input;
    Expression expected;
    Theory theory = new CompoundTheory(new EqualityTheory(true, true), new PropositionalTheory());
    Map<String, String> mapFromCategoricalTypeNameToSizeString;
    Map<String, String> mapFromVariableNameToTypeName;
    Map<String, String> mapFromUniquelyNamedConstantToTypeName;
    input = Expressions.parse("if X = a then if X = b then 1 else 2 else 3");
    expected = parse("if X = a then 2 else 3");
    mapFromCategoricalTypeNameToSizeString = Util.map("Everything", "2");
    mapFromVariableNameToTypeName = Util.map("X", "Everything");
    mapFromUniquelyNamedConstantToTypeName = Util.map("a", "Everything", "b", "Everything");
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
    input = Expressions.parse("" + "if X = a and Y = a then 0.1 else " + "if X = a and Y = b then 0.1 else " + "if X = b and Y = a then 0.2 else " + // + "if X = b and Y = b then 0.2" // no need to test because it is the last case
    "0.2");
    expected = parse("if X = a then 0.1 else 0.2");
    mapFromCategoricalTypeNameToSizeString = Util.map("Everything", "2");
    mapFromVariableNameToTypeName = Util.map("X", "Everything", "Y", "Everything");
    mapFromUniquelyNamedConstantToTypeName = Util.map("a", "Everything", "b", "Everything");
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
    input = Expressions.parse("" + "if X = a and Y = a and Z = a then 0.1 else " + "if X = a and Y = a and Z = b then 0.1 else " + "if X = a and Y = a and Z = c then 0.1 else " + "if X = a and Y = b and Z = a then 0.1 else " + "if X = a and Y = b and Z = b then 0.1 else " + "if X = a and Y = b and Z = c then 0.1 else " + "if X = a and Y = c and Z = a then 0.1 else " + "if X = a and Y = c and Z = b then 0.1 else " + "if X = a and Y = c and Z = c then 0.1 else " + "if X = b and Y = a and Z = a then 0.2 else " + "if X = b and Y = a and Z = b then 0.2 else " + "if X = b and Y = a and Z = c then 0.2 else " + "if X = b and Y = b and Z = a then 0.2 else " + "if X = b and Y = b and Z = b then 0.2 else " + "if X = b and Y = b and Z = c then 0.2 else " + "if X = b and Y = c and Z = a then 0.2 else " + "if X = b and Y = c and Z = b then 0.2 else " + "if X = b and Y = c and Z = c then 0.2 else " + "if X = c and Y = a and Z = a then 0.3 else " + "if X = c and Y = a and Z = b then 0.3 else " + "if X = c and Y = a and Z = c then 0.3 else " + "if X = c and Y = b and Z = a then 0.3 else " + "if X = c and Y = b and Z = b then 0.3 else " + "if X = c and Y = b and Z = c then 0.3 else " + "if X = c and Y = c and Z = a then 0.3 else " + "if X = c and Y = c and Z = b then 0.3 else " + /* X = c and Y = c and Z = c ; no need as it is implied by domain definition */
    "0.3");
    expected = parse("if X = a then 0.1 else if X = b then 0.2 else 0.3");
    mapFromCategoricalTypeNameToSizeString = Util.map("Everything", "3");
    mapFromVariableNameToTypeName = Util.map("X", "Everything", "Y", "Everything", "Z", "Everything");
    mapFromUniquelyNamedConstantToTypeName = Util.map("a", "Everything", "b", "Everything", "c", "Everything");
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
    // Same thing, but with non-capitalized variables that should still be recognized as variables
    input = Expressions.parse("" + "if x = a and y = a and z = a then 0.1 else " + "if x = a and y = a and z = b then 0.1 else " + "if x = a and y = a and z = c then 0.1 else " + "if x = a and y = b and z = a then 0.1 else " + "if x = a and y = b and z = b then 0.1 else " + "if x = a and y = b and z = c then 0.1 else " + "if x = a and y = c and z = a then 0.1 else " + "if x = a and y = c and z = b then 0.1 else " + "if x = a and y = c and z = c then 0.1 else " + "if x = b and y = a and z = a then 0.2 else " + "if x = b and y = a and z = b then 0.2 else " + "if x = b and y = a and z = c then 0.2 else " + "if x = b and y = b and z = a then 0.2 else " + "if x = b and y = b and z = b then 0.2 else " + "if x = b and y = b and z = c then 0.2 else " + "if x = b and y = c and z = a then 0.2 else " + "if x = b and y = c and z = b then 0.2 else " + "if x = b and y = c and z = c then 0.2 else " + "if x = c and y = a and z = a then 0.3 else " + "if x = c and y = a and z = b then 0.3 else " + "if x = c and y = a and z = c then 0.3 else " + "if x = c and y = b and z = a then 0.3 else " + "if x = c and y = b and z = b then 0.3 else " + "if x = c and y = b and z = c then 0.3 else " + "if x = c and y = c and z = a then 0.3 else " + "if x = c and y = c and z = b then 0.3 else " + /* x = c and y = c and z = c ; no need as it is implied by domain definition */
    "0.3");
    expected = parse("if x = a then 0.1 else if x = b then 0.2 else 0.3");
    mapFromCategoricalTypeNameToSizeString = Util.map("Everything", "3");
    mapFromVariableNameToTypeName = Util.map("x", "Everything", "y", "Everything", "z", "Everything");
    mapFromUniquelyNamedConstantToTypeName = Util.map("a", "Everything", "b", "Everything", "c", "Everything");
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
    input = Expressions.parse("" + "if not g0 and (g1 = consg1_0)\r\n" + "then 0.0001\r\n" + "else if not g0 and (g1 = consg1_1)\r\n" + "     then 1\r\n" + "     else if not g0 and (g1 = consg1_2)\r\n" + "          then 0.0001\r\n" + "          else if not g0 and (g1 = consg1_3)\r\n" + "               then 1\r\n" + "               else if g0 and (g1 = consg1_0)\r\n" + "                    then 1\r\n" + "                    else if g0 and (g1 = consg1_1)\r\n" + "                         then 1\r\n" + "                         else if g0 and (g1 = consg1_2)\r\n" + "                              then 1\r\n" + "                              else 1\r\n" + "");
    expected = parse("if not g0 then if g1 = consg1_0 then 0.0001 else if g1 = consg1_1 then 1 else if g1 = consg1_2 then 0.0001 else 1 else 1");
    mapFromCategoricalTypeNameToSizeString = Util.map("G1Type", "4", "Boolean", "2");
    mapFromVariableNameToTypeName = Util.map("g0", "Boolean", "g1", "G1Type");
    mapFromUniquelyNamedConstantToTypeName = Util.map("consg1_0", "G1Type", "consg1_1", "G1Type", "consg1_2", "G1Type", "consg1_3", "G1Type");
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
    input = Expressions.parse("if not g0 then 1 else 1");
    expected = parse("1");
    mapFromCategoricalTypeNameToSizeString = Util.map("G1Type", "4", "Boolean", "2");
    mapFromVariableNameToTypeName = Util.map("g0", "Boolean", "g1", "G1Type");
    mapFromUniquelyNamedConstantToTypeName = Util.map();
    runTest(input, expected, theory, mapFromCategoricalTypeNameToSizeString, mapFromVariableNameToTypeName, mapFromUniquelyNamedConstantToTypeName);
}
Also used : EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) Expression(com.sri.ai.expresso.api.Expression) EqualityTheory(com.sri.ai.grinder.theory.equality.EqualityTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) Theory(com.sri.ai.grinder.api.Theory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) PropositionalTheory(com.sri.ai.grinder.theory.propositional.PropositionalTheory) CompoundTheory(com.sri.ai.grinder.theory.compound.CompoundTheory) Test(org.junit.Test)

Aggregations

PropositionalTheory (com.sri.ai.grinder.theory.propositional.PropositionalTheory)39 CompoundTheory (com.sri.ai.grinder.theory.compound.CompoundTheory)33 DifferenceArithmeticTheory (com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory)32 EqualityTheory (com.sri.ai.grinder.theory.equality.EqualityTheory)30 Context (com.sri.ai.grinder.api.Context)25 Expression (com.sri.ai.expresso.api.Expression)23 TrueContext (com.sri.ai.grinder.core.TrueContext)19 TheoryTestingSupport (com.sri.ai.grinder.tester.TheoryTestingSupport)18 Test (org.junit.Test)17 LinearRealArithmeticTheory (com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory)16 Theory (com.sri.ai.grinder.api.Theory)11 TupleTheory (com.sri.ai.grinder.theory.tuple.TupleTheory)11 Type (com.sri.ai.expresso.api.Type)8 LinkedHashMap (java.util.LinkedHashMap)6 FunctionType (com.sri.ai.expresso.type.FunctionType)4 StepSolver (com.sri.ai.grinder.api.StepSolver)4 AbstractTheoryTestingSupport (com.sri.ai.grinder.core.constraint.AbstractTheoryTestingSupport)4 Rewriter (com.sri.ai.grinder.rewriter.api.Rewriter)4 UnificationStepSolver (com.sri.ai.grinder.theory.base.UnificationStepSolver)4 Before (org.junit.Before)4