edu.toronto.cs.tlq
Class UpSetAlgebra

java.lang.Object
  extended by edu.toronto.cs.tlq.UpSetAlgebra
All Implemented Interfaces:
DeMorganAlgebra, IAlgebra

public class UpSetAlgebra
extends java.lang.Object
implements DeMorganAlgebra

class UpSetAlgebra represents a large lattice of upsets Each element is encoded as an ordered list of integers, each integer corresponding to a minimal element of some lattice.

Version:
1.0
Author:
Arie Gurfinkel

Constructor Summary
UpSetAlgebra()
          UpSetAlgebra Constructs an UpSet lattice with _mintermSize minterm elements
 
Method Summary
 AlgebraValue bot()
           
 java.util.Collection carrierSet()
           
 IntIterator carrierSetId()
           
 AlgebraValue eq(AlgebraValue v1, AlgebraValue v2)
           
 AlgebraValue geq(AlgebraValue v1, AlgebraValue v2)
           
 java.util.Set getJoinIrredundant(java.util.BitSet values)
           
 java.util.Set getMeetIrredundant(java.util.BitSet values)
           
 edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue getUpMinTerm(int a)
           
 edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue getUpSetElement(int a)
           
 AlgebraValue getValue(int id)
           
 AlgebraValue getValue(java.lang.String name)
           
 AlgebraValue impl(AlgebraValue v1, AlgebraValue v2)
           
 AlgebraValue join(AlgebraValue _v1, AlgebraValue _v2)
           
 AlgebraValue[] joinDecomposition(AlgebraValue v)
           
 AlgebraValue leq(AlgebraValue _v1, AlgebraValue _v2)
           
 edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue leq(int[] a, int[] b)
          if a[i] | b[j] == a [i] then every bit that a has off, b has off as well thus if b has a bit on, then a has the same bit on that means that (a | b = a) -> a >= b and so if a < b -> (a | b != a)
static void main(java.lang.String[] args)
          Some tester methods
 AlgebraValue meet(AlgebraValue _v1, AlgebraValue _v2)
           
 AlgebraValue neg(AlgebraValue v)
           
 AlgebraValue noValue()
          DeMorganAlgebra interface
 void renew()
           
 int size()
           
 AlgebraValue top()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpSetAlgebra

public UpSetAlgebra()
UpSetAlgebra Constructs an UpSet lattice with _mintermSize minterm elements

Method Detail

noValue

public AlgebraValue noValue()
DeMorganAlgebra interface

Specified by:
noValue in interface IAlgebra

getValue

public AlgebraValue getValue(java.lang.String name)
Specified by:
getValue in interface IAlgebra

getValue

public AlgebraValue getValue(int id)
Specified by:
getValue in interface IAlgebra

meet

public AlgebraValue meet(AlgebraValue _v1,
                         AlgebraValue _v2)
Specified by:
meet in interface IAlgebra

join

public AlgebraValue join(AlgebraValue _v1,
                         AlgebraValue _v2)
Specified by:
join in interface IAlgebra

neg

public AlgebraValue neg(AlgebraValue v)
Specified by:
neg in interface IAlgebra

impl

public AlgebraValue impl(AlgebraValue v1,
                         AlgebraValue v2)
Specified by:
impl in interface IAlgebra

top

public AlgebraValue top()
Specified by:
top in interface IAlgebra

bot

public AlgebraValue bot()
Specified by:
bot in interface IAlgebra

eq

public AlgebraValue eq(AlgebraValue v1,
                       AlgebraValue v2)
Specified by:
eq in interface IAlgebra

leq

public AlgebraValue leq(AlgebraValue _v1,
                        AlgebraValue _v2)
Specified by:
leq in interface IAlgebra

geq

public AlgebraValue geq(AlgebraValue v1,
                        AlgebraValue v2)
Specified by:
geq in interface IAlgebra

size

public int size()
Specified by:
size in interface IAlgebra

carrierSetId

public IntIterator carrierSetId()
Specified by:
carrierSetId in interface IAlgebra

carrierSet

public java.util.Collection carrierSet()
Specified by:
carrierSet in interface IAlgebra

joinDecomposition

public AlgebraValue[] joinDecomposition(AlgebraValue v)
Specified by:
joinDecomposition in interface IAlgebra

renew

public void renew()

getUpMinTerm

public edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue getUpMinTerm(int a)

getUpSetElement

public edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue getUpSetElement(int a)

leq

public edu.toronto.cs.tlq.UpSetAlgebra.UpSetValue leq(int[] a,
                                                      int[] b)
if a[i] | b[j] == a [i] then every bit that a has off, b has off as well thus if b has a bit on, then a has the same bit on that means that (a | b = a) -> a >= b and so if a < b -> (a | b != a)


getJoinIrredundant

public java.util.Set getJoinIrredundant(java.util.BitSet values)
Specified by:
getJoinIrredundant in interface IAlgebra

getMeetIrredundant

public java.util.Set getMeetIrredundant(java.util.BitSet values)
Specified by:
getMeetIrredundant in interface IAlgebra

main

public static void main(java.lang.String[] args)
Some tester methods