Search in sources :

Example 1 with HOGMSortDeclaration

use of com.sri.ai.praise.model.v1.HOGMSortDeclaration in project aic-praise by aic-sri-international.

the class ParsedHOGModel method extractSorts.

private static List<HOGMSortDeclaration> extractSorts(Expression modelTupleExpr) {
    List<HOGMSortDeclaration> result = new ArrayList<>();
    if (isLegalModelTuple(modelTupleExpr)) {
        Expression sortsTuple = modelTupleExpr.get(0);
        sortsTuple.getArguments().forEach(sortExpr -> result.add(HOGMSortDeclaration.makeSortDeclaration(sortExpr)));
    }
    return result;
}
Also used : Expression(com.sri.ai.expresso.api.Expression) ArrayList(java.util.ArrayList) HOGMSortDeclaration(com.sri.ai.praise.model.v1.HOGMSortDeclaration)

Aggregations

Expression (com.sri.ai.expresso.api.Expression)1 HOGMSortDeclaration (com.sri.ai.praise.model.v1.HOGMSortDeclaration)1 ArrayList (java.util.ArrayList)1