de.rwth.dfa.jvm.samples
Class CFPLattice
java.lang.Object
|
+--de.rwth.domains.templates.TupleSet
|
+--de.rwth.domains.templates.TuplePOSet
|
+--de.rwth.domains.templates.TupleLattice
|
+--de.rwth.domains.templates.TupleCompleteLattice
|
+--de.rwth.dfa.jvm.samples.CFPLattice
- All Implemented Interfaces:
- CompleteLattice, CompletePOSet, Lattice, LowerSemiLattice, POSet, PreLattice, PreLowerSemiLattice, PreUpperSemiLattice, Set, UpperSemiLattice
- public class CFPLattice
- extends TupleCompleteLattice
The lattice used for constant folding propagation. It is the Cartesian product of
a CFPLocalsLattice
and a CFPStackLattice
.
- Version:
- $Id: CFPLattice.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
Constructor Summary |
CFPLattice(int maxLocals,
int maxStack)
Creates a new CFPLattice instance. |
Method Summary |
java.lang.Object[] |
getLocals(java.lang.Object o)
Extracts the information for local variable slots from an element of this
lattice. |
java.lang.Object |
getStack(java.lang.Object o)
Extracts the information for the stack from an element of this lattice. |
static void |
main(java.lang.String[] args)
Mini test environment. |
java.lang.Object |
makeElement(java.lang.Object[] locals,
java.lang.Object stack)
Creates an element of this lattice from valid components. |
Methods inherited from class de.rwth.domains.templates.TuplePOSet |
le, lt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.rwth.domains.POSet |
le, lt |
llattice
protected CFPLocalsLattice llattice
- The lattice for the local variable slots in this lattice.
slattice
protected CFPStackLattice slattice
- The lattice for the stacks in this lattice.
CFPLattice
public CFPLattice(int maxLocals,
int maxStack)
- Creates a new
CFPLattice
instance.
- Parameters:
maxLocals
- an int
valuemaxStack
- an int
value
getLocals
public java.lang.Object[] getLocals(java.lang.Object o)
- Extracts the information for local variable slots from an element of this
lattice.
- Parameters:
o
- an Object
value- Returns:
- an
Object[]
value
getStack
public java.lang.Object getStack(java.lang.Object o)
- Extracts the information for the stack from an element of this lattice.
- Parameters:
o
- an Object
value- Returns:
- an
Object[]
value
makeElement
public java.lang.Object makeElement(java.lang.Object[] locals,
java.lang.Object stack)
- Creates an element of this lattice from valid components.
- Parameters:
locals
- an Object[]
valuestack
- an Object
value- Returns:
- an
Object
value
main
public static void main(java.lang.String[] args)
- Mini test environment.
- Parameters:
args
- a String[]
value