Search in sources :

Example 6 with NamedType

use of jkind.lustre.NamedType in project AGREE by loonwerks.

the class AGREESimulationStateElementFactory method resolveType.

/**
 * Attempts to resolve a specified named type with a RecordType if applicable.
 * @param typeIdToTypeMap
 * @param type
 * @return
 */
private static jkind.lustre.Type resolveType(jkind.lustre.Type type, final Map<String, jkind.lustre.Type> typeIdToTypeMap) {
    // Try to resolve named types based on any typedefs
    while (type instanceof NamedType) {
        final jkind.lustre.Type newType = typeIdToTypeMap.get(((NamedType) type).name);
        if (newType == null) {
            break;
        }
        type = newType;
    }
    return type;
}
Also used : NamedType(jkind.lustre.NamedType) Type(jkind.lustre.Type)

Aggregations

NamedType (jkind.lustre.NamedType)6 Type (jkind.lustre.Type)6 Expr (jkind.lustre.Expr)3 RecordType (jkind.lustre.RecordType)3 IntExpr (jkind.lustre.IntExpr)2 RecordAccessExpr (jkind.lustre.RecordAccessExpr)2 RecordExpr (jkind.lustre.RecordExpr)2 AgreeVar (com.rockwellcollins.atc.agree.analysis.ast.AgreeVar)1 MATLABAssignment (com.rockwellcollins.atc.agree.codegen.ast.MATLABAssignment)1 MATLABAssumption (com.rockwellcollins.atc.agree.codegen.ast.MATLABAssumption)1 MATLABFunction (com.rockwellcollins.atc.agree.codegen.ast.MATLABFunction)1 MATLABLocalBusVarInit (com.rockwellcollins.atc.agree.codegen.ast.MATLABLocalBusVarInit)1 MATLABPersistentVarDecl (com.rockwellcollins.atc.agree.codegen.ast.MATLABPersistentVarDecl)1 MATLABPersistentVarInit (com.rockwellcollins.atc.agree.codegen.ast.MATLABPersistentVarInit)1 MATLABPort (com.rockwellcollins.atc.agree.codegen.ast.MATLABPort)1 MATLABPrimaryFunction (com.rockwellcollins.atc.agree.codegen.ast.MATLABPrimaryFunction)1 MATLABProperty (com.rockwellcollins.atc.agree.codegen.ast.MATLABProperty)1 MATLABStatement (com.rockwellcollins.atc.agree.codegen.ast.MATLABStatement)1 MATLABType (com.rockwellcollins.atc.agree.codegen.ast.MATLABType)1 MATLABExpr (com.rockwellcollins.atc.agree.codegen.ast.expr.MATLABExpr)1