com.veromodo.tempo.sem.type
Class OrderType

java.lang.Object
  extended by com.veromodo.tempo.sem.type.TypeVisitor
      extended by com.veromodo.tempo.sem.type.OrderType

public class OrderType
extends TypeVisitor

encapsulates the relative distance between types based on their complexity and subtype relationship

Author:
Carleton

Constructor Summary
OrderType()
           
 
Method Summary
 void applyTypeAugmentedReal(TypeAugmentedReal n)
           
 void applyTypeBasicAutomaton(TypeBasicAutomaton n)
           
 void applyTypeBool(TypeBool n)
           
 void applyTypeChar(TypeChar n)
           
 void applyTypeCompositeAutomaton(TypeCompositeAutomaton n)
           
 void applyTypeConstructor(TypeConstructor n)
           
 void applyTypeDiscreteReal(TypeDiscreteReal n)
           
 void applyTypeEnum(TypeEnum n)
           
 void applyTypeEnumValue(TypeEnumValue n)
           
 void applyTypeError(TypeError n)
           
 void applyTypeFloat(TypeFloat n)
           
 void applyTypeFunction(TypeFunction n)
           
 void applyTypeFunctionalGeneric(TypeFunctionalGeneric n)
           
 void applyTypeGeneric(TypeGeneric n)
           
 void applyTypeId(TypeId n)
           
 void applyTypeInstance(TypeInstance n)
           
 void applyTypeInt(TypeInt n)
           
 void applyTypeInt32(TypeInt32 n)
           
 void applyTypeList(TypeList n)
           
 void applyTypeMap(TypeMap n)
           
 void applyTypeMatrix(TypeArray n)
           
 void applyTypeMeta(TypeMeta n)
           
 void applyTypeNat(TypeNat n)
           
 void applyTypeParameter(TypeParameter n)
           
 void applyTypeReal(TypeReal n)
           
 void applyTypeSum(TypeSum n)
           
 void applyTypeTuple(TypeTuple n)
           
 void applyTypeVariable(TypeVariable n)
           
 void applyTypeVoid(TypeVoid n)
           
 int order(Type t)
          Ranks each type in terms of its complexity.
 
Methods inherited from class com.veromodo.tempo.sem.type.TypeVisitor
applyTypeAutomaton, applyTypeFunctional, applyTypeIndexed, doIt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderType

public OrderType()
Method Detail

order

public int order(Type t)
Ranks each type in terms of its complexity. It Does not have signifcant meaning for composite types, but it is required for resolveing operator overloading conflicts between base types.

Parameters:
t - to be ordered
Returns:
the types order, zero if none is found

applyTypeVoid

public void applyTypeVoid(TypeVoid n)
Overrides:
applyTypeVoid in class TypeVisitor

applyTypeBool

public void applyTypeBool(TypeBool n)
Overrides:
applyTypeBool in class TypeVisitor

applyTypeNat

public void applyTypeNat(TypeNat n)
Overrides:
applyTypeNat in class TypeVisitor

applyTypeInt32

public void applyTypeInt32(TypeInt32 n)
Overrides:
applyTypeInt32 in class TypeVisitor

applyTypeInt

public void applyTypeInt(TypeInt n)
Overrides:
applyTypeInt in class TypeVisitor

applyTypeDiscreteReal

public void applyTypeDiscreteReal(TypeDiscreteReal n)
Overrides:
applyTypeDiscreteReal in class TypeVisitor

applyTypeFloat

public void applyTypeFloat(TypeFloat n)
Overrides:
applyTypeFloat in class TypeVisitor

applyTypeReal

public void applyTypeReal(TypeReal n)
Overrides:
applyTypeReal in class TypeVisitor

applyTypeAugmentedReal

public void applyTypeAugmentedReal(TypeAugmentedReal n)
Overrides:
applyTypeAugmentedReal in class TypeVisitor

applyTypeChar

public void applyTypeChar(TypeChar n)
Overrides:
applyTypeChar in class TypeVisitor

applyTypeParameter

public void applyTypeParameter(TypeParameter n)
Overrides:
applyTypeParameter in class TypeVisitor

applyTypeSum

public void applyTypeSum(TypeSum n)
Overrides:
applyTypeSum in class TypeVisitor

applyTypeTuple

public void applyTypeTuple(TypeTuple n)
Overrides:
applyTypeTuple in class TypeVisitor

applyTypeEnum

public void applyTypeEnum(TypeEnum n)
Overrides:
applyTypeEnum in class TypeVisitor

applyTypeEnumValue

public void applyTypeEnumValue(TypeEnumValue n)
Overrides:
applyTypeEnumValue in class TypeVisitor

applyTypeMatrix

public void applyTypeMatrix(TypeArray n)
Overrides:
applyTypeMatrix in class TypeVisitor

applyTypeMap

public void applyTypeMap(TypeMap n)
Overrides:
applyTypeMap in class TypeVisitor

applyTypeConstructor

public void applyTypeConstructor(TypeConstructor n)
Overrides:
applyTypeConstructor in class TypeVisitor

applyTypeList

public void applyTypeList(TypeList n)
Overrides:
applyTypeList in class TypeVisitor

applyTypeFunction

public void applyTypeFunction(TypeFunction n)
Overrides:
applyTypeFunction in class TypeVisitor

applyTypeGeneric

public void applyTypeGeneric(TypeGeneric n)
Overrides:
applyTypeGeneric in class TypeVisitor

applyTypeFunctionalGeneric

public void applyTypeFunctionalGeneric(TypeFunctionalGeneric n)
Overrides:
applyTypeFunctionalGeneric in class TypeVisitor

applyTypeId

public void applyTypeId(TypeId n)
Overrides:
applyTypeId in class TypeVisitor

applyTypeBasicAutomaton

public void applyTypeBasicAutomaton(TypeBasicAutomaton n)
Overrides:
applyTypeBasicAutomaton in class TypeVisitor

applyTypeCompositeAutomaton

public void applyTypeCompositeAutomaton(TypeCompositeAutomaton n)
Overrides:
applyTypeCompositeAutomaton in class TypeVisitor

applyTypeInstance

public void applyTypeInstance(TypeInstance n)
Overrides:
applyTypeInstance in class TypeVisitor

applyTypeVariable

public void applyTypeVariable(TypeVariable n)
Overrides:
applyTypeVariable in class TypeVisitor

applyTypeMeta

public void applyTypeMeta(TypeMeta n)
Overrides:
applyTypeMeta in class TypeVisitor

applyTypeError

public void applyTypeError(TypeError n)
Overrides:
applyTypeError in class TypeVisitor