Revision 9
Added by Willibald K. over 8 years ago
Expression.java | ||
---|---|---|
40 | 40 |
import org.momut.ooas.ast.types.FloatType; |
41 | 41 |
import org.momut.ooas.ast.types.IntType; |
42 | 42 |
import org.momut.ooas.ast.types.TypeKind; |
43 |
import org.momut.ooas.ast.types.UlyssesType;
|
|
43 |
import org.momut.ooas.ast.types.Type; |
|
44 | 44 |
import org.momut.ooas.ast.types.ValuedEnumType; |
45 | 45 |
import org.momut.ooas.math.AbstractOperations; |
46 | 46 |
import org.momut.ooas.math.AbstractRange; |
... | ... | |
81 | 81 |
public abstract class Expression extends AstNode implements IAst |
82 | 82 |
{ |
83 | 83 |
protected ExpressionKind m_kind; |
84 |
protected UlyssesType m_type;
|
|
84 |
protected Type m_type; |
|
85 | 85 |
protected int m_line; |
86 | 86 |
protected int m_pos; |
87 | 87 |
protected SymbolTable m_freeVariables; |
88 | 88 |
protected ArrayList<FunctionIdentifier> m_callTargets; |
89 | 89 |
|
90 | 90 |
public ExpressionKind kind() { return m_kind; } |
91 |
public UlyssesType type() { return m_type; }
|
|
91 |
public Type type() { return m_type; } |
|
92 | 92 |
public int line() { return m_line; } |
93 | 93 |
public int pos() { return m_pos; } |
94 | 94 |
public SymbolTable freeVariables() { return m_freeVariables; } |
... | ... | |
117 | 117 |
throw new NotImplementedException(); |
118 | 118 |
} |
119 | 119 |
|
120 |
public void SetType(UlyssesType aType)
|
|
120 |
public void SetType(Type aType) |
|
121 | 121 |
{ |
122 | 122 |
if (aType == null) |
123 | 123 |
throw new ArgumentException(); |
... | ... | |
158 | 158 |
/// This is different from the cover-method defined at the type level. |
159 | 159 |
/// Note: We do saturating operations on the type boundaries. |
160 | 160 |
/// </summary> |
161 |
public static UlyssesType ArithmeticCover(UlyssesType type1, UlyssesType type2, ExpressionKind op)
|
|
161 |
public static Type ArithmeticCover(Type type1, Type type2, ExpressionKind op)
|
|
162 | 162 |
{ |
163 | 163 |
if (!type1.IsNumeric() || (type2 != null && !type2.IsNumeric())) |
164 | 164 |
throw new ArgumentException(); |
Also available in: Unified diff
remove support for Qualitative Action Systems, rename UlyssesType to Type