de.rwth.dfa.jvm.samples
Class CFPStackLattice
java.lang.Object
|
+--de.rwth.domains.templates.LiftedPOSet
|
+--de.rwth.domains.templates.LiftedCompleteLattice
|
+--de.rwth.dfa.jvm.samples.CFPStackLattice
- All Implemented Interfaces:
- CompleteLattice, CompletePOSet, Lattice, LowerSemiLattice, POSet, PreLattice, PreLowerSemiLattice, PreUpperSemiLattice, Set, UpperSemiLattice
- public class CFPStackLattice
- extends LiftedCompleteLattice
The lattice used by the constant folding propagation lattice to describe the state
of the operand stack. The Hasse diagram looks like this:
unknown stack
/ \
... stacks ...
\ /
invalid stack
Each proper stack element is a stack with the maximal height of the operand stack
of the method. Each entry is an element of CFPComponentLattice
.
- Version:
- $Id: CFPStackLattice.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
Field Summary |
protected static java.lang.Object |
INVALIDSTACK
The top element for invalid stacks of all these lattices. |
protected static java.lang.Object |
UNKNOWNSTACK
The top element for unknown stacks of all these lattices. |
Constructor Summary |
CFPStackLattice(int maxStack)
Creates a new CFPStackLattice instance. |
Method Summary |
java.lang.Object |
getStack(java.lang.Object o)
Returns the contained stack for all elements except top and bottom. |
static void |
main(java.lang.String[] args)
Mini test environment. |
java.lang.Object |
makeElement(java.lang.Object stack)
Checks if the argument is an element and returns it. |
Methods inherited from class de.rwth.domains.templates.LiftedCompleteLattice |
bottom, equals, isElement, iterator, iteratorSkel, join, le, lt, meet, size, sizeSkel, top |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWNSTACK
protected static final java.lang.Object UNKNOWNSTACK
- The top element for unknown stacks of all these lattices.
INVALIDSTACK
protected static final java.lang.Object INVALIDSTACK
- The top element for invalid stacks of all these lattices.
CFPStackLattice
public CFPStackLattice(int maxStack)
- Creates a new
CFPStackLattice
instance.
- Parameters:
maxStack
- an int
value
getStack
public java.lang.Object getStack(java.lang.Object o)
- Returns the contained stack for all elements except top and bottom. Otherwise,
returns its argument.
- Parameters:
o
- an Object
value- Returns:
- an
Object
value
makeElement
public java.lang.Object makeElement(java.lang.Object stack)
- Checks if the argument is an element and returns it.
- Parameters:
stack
- an Object
value- Returns:
- an
Object
value
main
public static void main(java.lang.String[] args)
- Mini test environment.
- Parameters:
args
- a String[]
value