Mtbdd
Class Mtbdd

java.lang.Object
  extended by Mtbdd.Mtbdd

public class Mtbdd
extends java.lang.Object

Mtbdd

This class will be used to import functions from the CUDD library onto the JAVA program.

Copyright(c) 2005 Université Laval, LSFM research group.

Version:
1.0
Author:
Simon Paquet

Constructor Summary
Mtbdd()
          Constructor without parameter... initialize a new manager.
 
Method Summary
 void dessine(int man, java.lang.String str, int t)
          Creates a file named Mtbdd.txt for reading with DaVinci.
 int estNulle(int manager, int transition)
          Check wether or not a transition of the MTBDD has a null value
 int eval(int manager, int transitions, int[] tab)
          Evaluate the MTBDD, returns the repartition function's number
 int existeAct(int manager, int transitions, int action)
          Determines if there is an transition with the specified action attached.
 int existeTransition(int manager, int transitions, int tt)
          Determines wether or not the transition is part of the transition array.
 int faireET(int manager, int transitions, int tt)
          Apply a logical AND to two MTBDDs.
 int faireMtbdd(int man, int[] tab, int taille, int valeurFeuille)
          Build the MTBDD from the corresponding parameters
 int faireNON(int manager, int tt)
          Returns the negation of the MTBDD.
 int faireOU(int manager, int transitions, int tt)
          Apply a logical OR of two MTBBDs.
 void gcOff(int manager)
          Desactivates the garbage collector for the specified manager.
 void gcOn(int manager)
          Activates the garbage collector for the specified manager.
 int getComplementVar(int manager, int n)
          Returns the complement of a variable.
 int getManager()
          Returns the integer representing the manager.
 int initialise()
          Initialize the MTBDD structures
 void libere(int man, int trans)
          Release the memory used by the system
 int nbGc(int manager)
          Returns the number of calls made to the garbage collector.
 void quit(int manager)
          Terminates the manager.
 void quitter()
          Terminates the manager associated with the system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mtbdd

public Mtbdd()
Constructor without parameter... initialize a new manager.

Method Detail

initialise

public int initialise()
Initialize the MTBDD structures

Returns:
int

dessine

public void dessine(int man,
                    java.lang.String str,
                    int t)
Creates a file named Mtbdd.txt for reading with DaVinci.

Parameters:
man - represents the manager.
str - String
t - int

faireMtbdd

public int faireMtbdd(int man,
                      int[] tab,
                      int taille,
                      int valeurFeuille)
Build the MTBDD from the corresponding parameters

Parameters:
man - int
tab - int[]
taille - int
valeurFeuille - value representing the leaves.
Returns:
int

faireOU

public int faireOU(int manager,
                   int transitions,
                   int tt)
Apply a logical OR of two MTBBDs. In fact, it is an addition.

Parameters:
manager - int
transitions - int
tt - int
Returns:
int

libere

public void libere(int man,
                   int trans)
Release the memory used by the system

Parameters:
man - int
trans - int

estNulle

public int estNulle(int manager,
                    int transition)
Check wether or not a transition of the MTBDD has a null value

Parameters:
manager - int
transition - int
Returns:
int

eval

public int eval(int manager,
                int transitions,
                int[] tab)
Evaluate the MTBDD, returns the repartition function's number

Parameters:
manager - int
transitions - int
tab - int[]
Returns:
the repartition function's number

existeAct

public int existeAct(int manager,
                     int transitions,
                     int action)
Determines if there is an transition with the specified action attached.

Parameters:
manager - int
transitions - int
action - int
Returns:
int

existeTransition

public int existeTransition(int manager,
                            int transitions,
                            int tt)
Determines wether or not the transition is part of the transition array.

Parameters:
manager - int
transitions - int
tt - int
Returns:
int

faireET

public int faireET(int manager,
                   int transitions,
                   int tt)
Apply a logical AND to two MTBDDs. It is a multiplication.

Parameters:
manager - int
transitions - int
tt - int
Returns:
int

faireNON

public int faireNON(int manager,
                    int tt)
Returns the negation of the MTBDD. Every zero is replaced by a one, and every one by a zero.

Parameters:
manager - int
tt - int
Returns:
int

getComplementVar

public int getComplementVar(int manager,
                            int n)
Returns the complement of a variable.

Parameters:
manager - int
n - int
Returns:
int

quit

public void quit(int manager)
Terminates the manager.

Parameters:
manager - int

gcOn

public void gcOn(int manager)
Activates the garbage collector for the specified manager.

Parameters:
manager - the manager for which to activate the garbage collector.

gcOff

public void gcOff(int manager)
Desactivates the garbage collector for the specified manager.

Parameters:
manager - the manager for which to desactivate the garbage collector.

nbGc

public int nbGc(int manager)
Returns the number of calls made to the garbage collector. Useful for forcing garbage collection.

Parameters:
manager - int
Returns:
int

getManager

public int getManager()
Returns the integer representing the manager.

Returns:
an integer representing the manager.

quitter

public void quitter()
Terminates the manager associated with the system.