public class Abstraction extends Scope
VOID_ASSIGNMENTS| Constructor and Description |
|---|
Abstraction(java.util.AbstractList parameters,
Expression body) |
Abstraction(Expression body) |
Abstraction(Parameter[] parameters,
Expression body)
Creates a new
Abstraction instance. |
Abstraction(Parameter parameter,
Expression body) |
Abstraction(java.lang.String name,
Expression body) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToFrame(Local local) |
Expression |
copy()
Returns a deep copy of this expression.
|
boolean |
isExitable() |
void |
sanitizeSorts(Enclosure enclosure)
|
Scope |
setIsExitable(boolean flag) |
Scope |
setNonExitable() |
Expression |
shiftOffsets(int intShift,
int realShift,
int objectShift,
int intDepth,
int realDepth,
int objectDepth)
This methods visits this expression shifting the offset of all the Locals it encounters by the specified amount (per
sort) as long as the offset it sees is referencing a parameter within the specified
scope depth (per sort); This method is used when the compiler needs to
synthesize an scope from an already typechecked expression (i.e., for
currying or un/boxing - e.g., see the pad method below).
|
java.lang.String |
toString() |
void |
typeCheck(TypeChecker typeChecker)
This method type-checks this expression in the context of the specified
TypeChecker.
|
Expression |
typedCopy()
Returns a deep copy of this expression this and all its subexpressions share the
same type as their copy's counterparts.
|
arity, body, compile, containsFreeName, enclosingScope, intArity, numberOfSubexpressions, objectArity, parameter, parameters, realArity, sanitizeNames, setBody, setCheckedType, setCheckedType, setSortedArities, setSubexpression, subexpression, substitute, voidAritycheckedType, setType, type, typeRefaddType, addTypes, boxSort, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, otherTypes, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, shiftOffsets, sort, typeCheck, typeCheck, typeCheckLockedpublic Abstraction(Parameter[] parameters, Expression body)
Abstraction instance.parameters - a Parameter[] valuebody - an Expression valuepublic Abstraction(Parameter parameter, Expression body)
public Abstraction(java.lang.String name,
Expression body)
public Abstraction(Expression body)
public Abstraction(java.util.AbstractList parameters,
Expression body)
public final Expression copy()
Expressionpublic final Expression typedCopy()
Expressionpublic final boolean isExitable()
public final Scope setIsExitable(boolean flag)
public final Scope setNonExitable()
public final void addToFrame(Local local)
public final void sanitizeSorts(Enclosure enclosure)
ExpressionsanitizeSorts in class Scopepublic final Expression shiftOffsets(int intShift, int realShift, int objectShift, int intDepth, int realDepth, int objectDepth)
ExpressionshiftOffsets in class Scopepublic final void typeCheck(TypeChecker typeChecker) throws TypingErrorException
ExpressiontypeCheck in class ScopeTypingErrorException