de.rwth.domains.templates
Class StackPreLattice

java.lang.Object
  |
  +--de.rwth.domains.templates.StackSet
        |
        +--de.rwth.domains.templates.StackPOSet
              |
              +--de.rwth.domains.templates.StackPreLattice
All Implemented Interfaces:
POSet, PreLattice, PreLowerSemiLattice, PreUpperSemiLattice, Set

public class StackPreLattice
extends StackPOSet
implements PreLattice

Class for (maybe infinite) pre lattices which consists of stacks of elements from a lattice. These are pre lattices, because join and meet are defined only for elements with the same stack height.

Version:
$Id: StackPreLattice.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Inner classes inherited from class de.rwth.domains.Set
Set.Default
 
Fields inherited from class de.rwth.domains.templates.StackSet
maxSize, set, size, sizeSkel, skelMaxSize, SKELMAXSIZE
 
Constructor Summary
StackPreLattice(Lattice lattice)
          Creates a new StackPreLattice instance with unlimited stack size and skeleton stack size StackSet.SKELMAXSIZE.
StackPreLattice(Lattice lattice, int maxSize)
          Creates a new StackPOSet instance with maximal stack size.
 
Method Summary
 java.lang.Object join(java.lang.Object e1, java.lang.Object e2)
          Computes the meet of two elements.
static void main(java.lang.String[] args)
          Mini test environment.
 java.lang.Object meet(java.lang.Object e1, java.lang.Object e2)
          Computes the meet of two elements.
 
Methods inherited from class de.rwth.domains.templates.StackPOSet
le, lt
 
Methods inherited from class de.rwth.domains.templates.StackSet
computeSize, equals, isElement, iterator, iteratorSkel, size, sizeSkel
 
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
 
Methods inherited from interface de.rwth.domains.Set
equals, isElement, iterator, iteratorSkel, size, sizeSkel
 

Constructor Detail

StackPreLattice

public StackPreLattice(Lattice lattice)
Creates a new StackPreLattice instance with unlimited stack size and skeleton stack size StackSet.SKELMAXSIZE.
Parameters:
lattice - a Lattice value

StackPreLattice

public StackPreLattice(Lattice lattice,
                       int maxSize)
Creates a new StackPOSet instance with maximal stack size.
Parameters:
lattice - a Lattice value
maxSize - an int value
Method Detail

meet

public java.lang.Object meet(java.lang.Object e1,
                             java.lang.Object e2)
Computes the meet of two elements. This is done in the following way:
  1. If the stack sizes differ, the result is null
  2. Otherwise, the result has the same size and each element is the meet of the corresponding components in the underlying lattice.
Specified by:
meet in interface PreLattice
Parameters:
e1 - an Object value
e2 - an Object value
Returns:
an Object value

join

public java.lang.Object join(java.lang.Object e1,
                             java.lang.Object e2)
Computes the meet of two elements. This is done in the following way:
  1. If the stack sizes differ, the result is null
  2. Otherwise, the result has the same size and each element is the join of the corresponding components in the underlying lattice.
Specified by:
join in interface PreLattice
Parameters:
e1 - an Object value
e2 - an Object value
Returns:
an Object value

main

public static void main(java.lang.String[] args)
Mini test environment.
Parameters:
args - a String[] value