| java.lang.Object de.uka.ilkd.key.ocl.gf.LinPosition
LinPosition | class LinPosition (Code) | | represents a position in the AST in Haskell notation together
with a flag that indicates whether at least one constraint does not hold or
if all hold (correct/incorrect).
Class is immutable.
|
correctPosition | final public boolean correctPosition(Code) | | true means green, false means red (janna guesses)
|
position | final public String position(Code) | | a position in the AST in Haskell notation
|
LinPosition | LinPosition(String p, boolean cor)(Code) | | creates a LinPosition
Parameters: p - the position in the AST in Haskell notation like [0,1,2] Parameters: cor - false iff there are violated constraints |
calculateBrethrenPosition | protected static String calculateBrethrenPosition(String pos, int nr)(Code) | | Creates a position string in Haskell notation for the argument
number nr for the position pos' parent, i.e. brethren number nr.
Example: calculateBrethrenPosition("[0,0,1]", 3).equals("[0,0,3]")
Parameters: pos - The position of a brethren of the wanted Parameters: nr - The number of the wanted brethren the position string for the nrth brother of pos |
calculateChildPosition | protected static String calculateChildPosition(String pos, int nr)(Code) | | Creates a position string in Haskell notation for the argument
number nr for the position pos
Parameters: pos - The position of the to be parent Parameters: nr - The number of the wanted argument the position string for the nrth child of pos |
childPosition | public String childPosition(int nr)(Code) | | Creates a position string in Haskell notation for the argument
number nr of this node.
Parameters: nr - The number of the wanted argument the position string for the nrth child |
isSubtreePosition | public static boolean isSubtreePosition(LinPosition superPosition, LinPosition subPosition)(Code) | | compares two position strings and returns true, if superPosition is
a prefix of subPosition, that is, if subPosition is in a subtree of
superPosition
Parameters: superPosition - the position String in Haskell notation ([0,1,0,4]) of the to-be super-branch of subPosition Parameters: subPosition - the position String in Haskell notation ([0,1,0,4]) of the to-be (grand-)child-branch of superPosition true iff superPosition denotes an ancestor of subPosition |
maxPosition | public static String maxPosition(String first, String second)(Code) | | Returns the biggest position of first and second.
Each word in the linearization area has the corresponding
position in the tree. The position-notion is taken from
GF-Haskell, where empty position ("[]")
represents tree-root, "[0]" represents first child of the root,
"[0,0]" represents the first grandchild of the root etc.
So comparePositions("[0]","[0,0]")="[0]"
|
parentPosition | public String parentPosition()(Code) | | The Haskell position string for the parent of this position.If self is already the top node, [] is returned. |
|
|