public abstract class ProgramVariable extends AbstractSortedOperator implements SourceElement, ProgramElement, Expression, ReferencePrefix, IProgramVariable, ParsableVariable, ReferenceSuffix, ProgramInLogic
| Modifier and Type | Field and Description |
|---|---|
private KeYJavaType |
containingType |
private boolean |
isFinal |
private boolean |
isGhost |
private boolean |
isModel |
private boolean |
isStatic |
private KeYJavaType |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
ProgramVariable(ProgramElementName name,
Sort s,
KeYJavaType t,
KeYJavaType containingType,
boolean isStatic,
boolean isModel,
boolean isGhost) |
protected |
ProgramVariable(ProgramElementName name,
Sort s,
KeYJavaType t,
KeYJavaType containingType,
boolean isStatic,
boolean isModel,
boolean isGhost,
boolean isFinal) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
convertToProgram(Term t,
ExtList l) |
boolean |
equalsModRenaming(SourceElement se,
NameAbstractionTable nat)
equals modulo renaming is described in the corresponding
comment in class SourceElement.
|
Comment[] |
getComments()
Get comments.
|
KeYJavaType |
getContainerType()
returns the KeYJavaType where the program variable is declared or
null if the program variable denotes not a field
|
Position |
getEndPosition()
Returns the end position of the primary token of this element.
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
SourceElement |
getFirstElementIncludingBlocks()
Finds the source element that occurs first in the source.
|
KeYJavaType |
getKeYJavaType() |
KeYJavaType |
getKeYJavaType(Services javaServ) |
KeYJavaType |
getKeYJavaType(Services javaServ,
ExecutionContext ec)
returns the
KeYJavaType of an expression |
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
PositionInfo |
getPositionInfo()
complete position information
|
ProgramElementName |
getProgramElementName() |
ReferencePrefix |
getReferencePrefix()
We do not have a prefix, so fake it!
|
Position |
getRelativePosition()
Returns the relative position (number of blank heading lines and
columns) of the primary token of this element.
|
Position |
getStartPosition()
Returns the start position of the primary token of this element.
|
boolean |
isFinal()
returns true iff the program variable has been declared as final
|
boolean |
isGhost()
returns true if the program variable has been declared as ghost
|
boolean |
isImplicit() |
boolean |
isMember()
returns true iff the program variable is a member
|
boolean |
isModel()
returns true iff the program variable has been declared as model
|
boolean |
isStatic()
returns true iff the program variable has been declared as static
|
MatchConditions |
match(SourceData source,
MatchConditions matchCond)
matches the source "text" (@link SourceData#getSource()) against the pattern represented
by this object.
|
void |
prettyPrint(PrettyPrinter w)
Pretty print.
|
java.lang.String |
proofToString() |
abstract Operator |
rename(Name name)
Returns an equivalent variable with the new name.
|
void |
visit(Visitor v)
calls the corresponding method of a visitor in order to
perform some action/transformation on this element
|
additionalValidTopLevel, additionalValidTopLevel2, argSort, argSorts, sort, sortarity, bindVarsAt, isRigid, name, toString, validTopLevel, whereToBindclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitargSort, argSorts, sortarity, bindVarsAt, isRigid, sort, validTopLevelprivate final KeYJavaType type
private final boolean isStatic
private final boolean isModel
private final boolean isGhost
private final boolean isFinal
private final KeYJavaType containingType
protected ProgramVariable(ProgramElementName name, Sort s, KeYJavaType t, KeYJavaType containingType, boolean isStatic, boolean isModel, boolean isGhost, boolean isFinal)
protected ProgramVariable(ProgramElementName name, Sort s, KeYJavaType t, KeYJavaType containingType, boolean isStatic, boolean isModel, boolean isGhost)
public ProgramElementName getProgramElementName()
public boolean isStatic()
public boolean isModel()
public boolean isGhost()
public boolean isFinal()
public boolean isMember()
public KeYJavaType getContainerType()
public SourceElement getFirstElement()
SourceElementgetFirstElement in interface SourceElementSourceElement.getStartPosition()public SourceElement getFirstElementIncludingBlocks()
SourceElementgetFirstElementIncludingBlocks in interface SourceElementSourceElement.getStartPosition()public SourceElement getLastElement()
SourceElementgetLastElement in interface SourceElementSourceElement.getEndPosition()public Comment[] getComments()
ProgramElementgetComments in interface ProgramElementpublic void visit(Visitor v)
SourceElementvisit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter w) throws java.io.IOException
SourceElementprettyPrint in interface SourceElementw - a pretty printer.java.io.IOException - occasionally thrown.public Position getStartPosition()
SourceElementgetFirstElement().getStartPosition in interface SourceElementpublic Position getEndPosition()
SourceElementgetLastElement().getEndPosition in interface SourceElementpublic Position getRelativePosition()
SourceElementgetFirstElement().getRelativePosition in interface SourceElementpublic PositionInfo getPositionInfo()
SourceElementgetPositionInfo in interface SourceElementpublic KeYJavaType getKeYJavaType()
getKeYJavaType in interface IProgramVariablepublic KeYJavaType getKeYJavaType(Services javaServ)
getKeYJavaType in interface IProgramVariablepublic KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec)
ExpressionKeYJavaType of an expressiongetKeYJavaType in interface ExpressiongetKeYJavaType in interface IProgramVariablepublic ReferencePrefix getReferencePrefix()
getReferencePrefix in interface ReferencePrefixpublic boolean equalsModRenaming(SourceElement se, NameAbstractionTable nat)
equalsModRenaming in interface SourceElementpublic Expression convertToProgram(Term t, ExtList l)
convertToProgram in interface ProgramInLogicpublic java.lang.String proofToString()
public boolean isImplicit()
public MatchConditions match(SourceData source, MatchConditions matchCond)
ProgramElementMatchConditions with
the found instantiations of the schemavariables. If the match
failed, null is returned instead.match in interface ProgramElementsource - the SourceData with the program element to matchmatchCond - the MatchConditions found up to this point