com.veromodo.tempo.sem.type
Class TypeDiscreteReal

java.lang.Object
  extended by com.veromodo.tempo.sem.type.Type
      extended by com.veromodo.tempo.sem.type.TypeDiscreteReal
All Implemented Interfaces:
java.lang.Comparable<Type>

public class TypeDiscreteReal
extends Type

From a typing point of view , DiscreteReal is equivalent to Real. i.e. D accept R and R accept D. Yet, neither is a subtype of the other (so compare will say Incomparable). From a TIOA standpoint DiscreteReal is a 'dynamic' type. It captures type-dependent behaviors (types) (it is a set of piecewise function of time to real.

Author:
ldm

Nested Class Summary
 
Nested classes/interfaces inherited from class com.veromodo.tempo.sem.type.Type
Type.Order, Type.TypeKind
 
Field Summary
 
Fields inherited from class com.veromodo.tempo.sem.type.Type
_name, DEFAULT_NAME
 
Method Summary
 boolean accept(Type t)
          Determines if Type t is a subtype of this.
 SetOfType acceptable(Environment env)
           
 Type.Order compare(Type t)
          Determines how Type t is realted to this.
 TypeDiscreteReal downCastDiscreteReal()
           
 int hashCode()
           
 boolean is(Type.TypeKind kind)
          Determines if the currently instance is of given TypeKind.
 Type resolve()
          Replaces any bound type parameters with thier bound types.
 java.lang.String toString()
           
 void visit(TypeVisitor v)
           
 
Methods inherited from class com.veromodo.tempo.sem.type.Type
compareTo, constructedWith, downCastArray, downCastAugmentedReal, downCastAutomaton, downCastBasicAutomaton, downCastBool, downCastChar, downCastCompositeAutomaton, downCastConstructor, downCastEnum, downCastEnumValue, downCastFloat, downCastFunction, downCastFunctional, downCastFunctionalGeneric, downCastGeneric, downCastInstance, downCastInt, downCastInt32, downCastList, downCastMap, downCastMeta, downCastNat, downCastNumeric, downCastParameter, downCastReal, downCastSum, downCastTuple, downCastVoid, equals, equals, getName, isArray, isAugmentedReal, isAutomaton, isBasicAutomaton, isBool, isChar, isCompositeAutomaton, isConstructor, isDiscreteReal, isEnum, isEnumValue, isEqualTo, isError, isFloat, isFun, isFunctional, isFunctionalGeneric, isGeneric, isId, isIndexed, isInstance, isInt, isInt32, isList, isMap, isMeta, isNat, isNumeric, isParameter, isReal, isSum, isTuple, isVariable, isVoid, lub, select
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

is

public boolean is(Type.TypeKind kind)
Description copied from class: Type
Determines if the currently instance is of given TypeKind.

Overrides:
is in class Type
Parameters:
kind - the type of class to compare to
Returns:
true if this is of given TypeKind

resolve

public Type resolve()
Description copied from class: Type
Replaces any bound type parameters with thier bound types. If all parameters are bound, the resulting type is not generic. If no parameters are bounf, the resulting type is this.

Overrides:
resolve in class Type
Returns:
a resolved type

toString

public java.lang.String toString()
Overrides:
toString in class Type

downCastDiscreteReal

public TypeDiscreteReal downCastDiscreteReal()
Overrides:
downCastDiscreteReal in class Type

compare

public Type.Order compare(Type t)
Description copied from class: Type
Determines how Type t is realted to this.

Specified by:
compare in class Type
Parameters:
t - to compare to this
Returns:

acceptable

public SetOfType acceptable(Environment env)
Overrides:
acceptable in class Type

visit

public void visit(TypeVisitor v)
Specified by:
visit in class Type

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

accept

public boolean accept(Type t)
Description copied from class: Type
Determines if Type t is a subtype of this. a.k.a. can t be assigned into this

Overrides:
accept in class Type
Parameters:
t - to compare to this
Returns:
true if t is a subtype of this