Search in sources :

Example 1 with UAI_to_ExpressionBased_Translator

use of com.sri.ai.praise.core.representation.translation.ciaranframework.core.uai.UAI_to_ExpressionBased_Translator 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)

Aggregations

Expression (com.sri.ai.expresso.api.Expression)1 Context (com.sri.ai.grinder.api.Context)1 CompoundTheory (com.sri.ai.grinder.theory.compound.CompoundTheory)1 DifferenceArithmeticTheory (com.sri.ai.grinder.theory.differencearithmetic.DifferenceArithmeticTheory)1 EqualityTheory (com.sri.ai.grinder.theory.equality.EqualityTheory)1 LinearRealArithmeticTheory (com.sri.ai.grinder.theory.linearrealarithmetic.LinearRealArithmeticTheory)1 PropositionalTheory (com.sri.ai.grinder.theory.propositional.PropositionalTheory)1 ExpressionBasedModel (com.sri.ai.praise.core.representation.classbased.expressionbased.api.ExpressionBasedModel)1 UAI_to_ExpressionBased_Translator (com.sri.ai.praise.core.representation.translation.ciaranframework.core.uai.UAI_to_ExpressionBased_Translator)1