Biddy
1.7.4
An academic Binary Decision Diagrams package

File biddyMain.c contains main functions for representation and manipulation of boolean functions with various types of Binary Decision Diagrams (GDD = general decision diagrams). More...
#include "biddyInt.h"
Go to the source code of this file.
Functions  
void  Biddy_InitMNG (Biddy_Manager *mng, int gddtype) 
Function Biddy_InitMNG initialize a manager. More...  
void  Biddy_ExitMNG (Biddy_Manager *mng) 
Function Biddy_ExitMNG deletes a manager. More...  
Biddy_String  Biddy_About () 
Function Biddy_About reports version of Biddy package. More...  
int  Biddy_Managed_GetManagerType (Biddy_Manager MNG) 
Function Biddy_Managed_GetManagerType reports BDD type used in the manager. More...  
Biddy_String  Biddy_Managed_GetManagerName (Biddy_Manager MNG) 
Function Biddy_Managed_GetManagerName reports the name of the BDD type used in the manager. More...  
void  Biddy_Managed_SetManagerParameters (Biddy_Manager MNG, float gcr, float gcrF, float gcrX, float rr, float rrF, float rrX, float st, float cst) 
Function Biddy_Managed_SetManagerParameters set modifiable parameters. More...  
Biddy_Edge  Biddy_GetThen (Biddy_Edge fun) 
Function Biddy_GetThen returns THEN successor. More...  
Biddy_Edge  Biddy_GetElse (Biddy_Edge fun) 
Function Biddy_GetElse returns ELSE successor. More...  
Biddy_Variable  Biddy_GetTopVariable (Biddy_Edge fun) 
Function Biddy_GetTopVariable returns the top variable. More...  
Biddy_Boolean  Biddy_Managed_IsEqv (Biddy_Manager MNG1, Biddy_Edge f1, Biddy_Manager MNG2, Biddy_Edge f2) 
Function Biddy_Managed_IsEqv returns TRUE iff two BDDs are equal. More...  
void  Biddy_Managed_SelectNode (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_SelectNode selects the top node of the given function. More...  
void  Biddy_Managed_DeselectNode (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_DeselectNode deselects the top node of the given function. More...  
Biddy_Boolean  Biddy_Managed_IsSelected (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_IsSelected returns TRUE iff the top node of the given function is selected. More...  
void  Biddy_Managed_SelectFunction (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_SelectFunction recursively selects all nodes of a given function. More...  
void  Biddy_Managed_DeselectAll (Biddy_Manager MNG) 
Function Biddy_Managed_DeselectAll deselects all nodes. More...  
Biddy_Edge  Biddy_Managed_GetTerminal (Biddy_Manager MNG) 
Function Biddy_Managed_GetTerminal returns unmarked and untagged edge pointing to terminal node 1. More...  
Biddy_Edge  Biddy_Managed_GetConstantZero (Biddy_Manager MNG) 
Function Biddy_Managed_GetConstantZero returns constant 0. More...  
Biddy_Edge  Biddy_Managed_GetConstantOne (Biddy_Manager MNG) 
Function Biddy_Managed_GetConstantOne returns constant 1. More...  
Biddy_Edge  Biddy_Managed_GetBaseSet (Biddy_Manager MNG) 
Function Biddy_Managed_GetBaseSet returns set containing only a null combination, i.e. it returns {{}}. More...  
Biddy_Variable  Biddy_Managed_GetVariable (Biddy_Manager MNG, Biddy_String x) 
Function Biddy_Managed_GetVariable returns variable with the given name. More...  
Biddy_Variable  Biddy_Managed_GetLowestVariable (Biddy_Manager MNG) 
Function Biddy_Managed_GetLowestVariable returns the lowest variable in the current ordering. More...  
Biddy_Variable  Biddy_Managed_GetIthVariable (Biddy_Manager MNG, Biddy_Variable i) 
Function Biddy_Managed_GetIthVariable returns ith variable in the current global ordering. More...  
Biddy_Variable  Biddy_Managed_GetPrevVariable (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetPrevVariable returns previous variable in the global ordering (lower, topmore). More...  
Biddy_Variable  Biddy_Managed_GetNextVariable (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetNextVariable returns next variable in the global ordering (higher, bottommore). More...  
Biddy_Edge  Biddy_Managed_GetVariableEdge (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetVariableEdge returns variable's edge. More...  
Biddy_Edge  Biddy_Managed_GetElementEdge (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetElementEdge returns element's edge. More...  
Biddy_String  Biddy_Managed_GetVariableName (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetVariableName returns the name of a variable. More...  
Biddy_Edge  Biddy_Managed_GetTopVariableEdge (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_GetTopVariableEdge returns variable's edge of top variable. More...  
Biddy_String  Biddy_Managed_GetTopVariableName (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_GetTopVariableName returns the name of top variable. More...  
char  Biddy_Managed_GetTopVariableChar (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_GetTopVariableChar returns the first character in the name of top variable. More...  
void  Biddy_Managed_ResetVariablesValue (Biddy_Manager MNG) 
Function Biddy_Managed_ResetVariablesValue sets all variable's value to biddyZero. More...  
void  Biddy_Managed_SetVariableValue (Biddy_Manager MNG, Biddy_Variable v, Biddy_Edge f) 
Function Biddy_Managed_SetVariableValue sets variable's value. More...  
Biddy_Edge  Biddy_Managed_GetVariableValue (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetVariableValue gets variable's value. More...  
void  Biddy_Managed_ClearVariablesData (Biddy_Manager MNG) 
Function Biddy_Managed_ClearVariablesData free memory used for all variable's data. More...  
void  Biddy_Managed_SetVariableData (Biddy_Manager MNG, Biddy_Variable v, void *x) 
Function Biddy_Managed_SetVariableData sets variable's data. More...  
void *  Biddy_Managed_GetVariableData (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_GetVariableData gets variable's data. More...  
Biddy_Boolean  Biddy_Managed_IsSmaller (Biddy_Manager MNG, Biddy_Variable fv, Biddy_Variable gv) 
Function Biddy_Managed_IsSmaller returns TRUE if the first variable is smaller (= lower = previous = above = topmore). More...  
Biddy_Boolean  Biddy_Managed_IsLowest (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_IsLowest returns TRUE if the variable is the lowest one (lowest == topmost). More...  
Biddy_Boolean  Biddy_Managed_IsHighest (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_IsHighest returns TRUE if the variable is the highest one if terminal node is ignored (highest == bottommost). More...  
Biddy_Variable  Biddy_Managed_FoaVariable (Biddy_Manager MNG, Biddy_String x, Biddy_Boolean varelem) 
Function Biddy_Managed_FoaVariable finds variable/element or adds new variable (i.e. Boolean function f = x) and new element (i.e. it creates set {{x}}). More...  
void  Biddy_Managed_ChangeVariableName (Biddy_Manager MNG, Biddy_Variable v, Biddy_String x) 
Function Biddy_Managed_ChangeVariableName set new name to the given variable/element. More...  
Biddy_Edge  Biddy_Managed_AddVariableByName (Biddy_Manager MNG, Biddy_String x) 
Function Biddy_Managed_AddVariableByName adds variable. More...  
Biddy_Edge  Biddy_Managed_AddElementByName (Biddy_Manager MNG, Biddy_String x) 
Function Biddy_Managed_AddElementByName adds element. More...  
Biddy_Edge  Biddy_Managed_AddVariableBelow (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_AddVariableBelow adds variable. More...  
Biddy_Edge  Biddy_Managed_AddVariableAbove (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_AddVariableAbove adds variable. More...  
Biddy_Edge  Biddy_Managed_TransferMark (Biddy_Manager MNG, Biddy_Edge f, Biddy_Boolean mark, Biddy_Boolean leftright) 
Function Biddy_Managed_TransferMark returns edge with inverted complement bit iff the second parameter is TRUE and normalization rules require this. More...  
Biddy_Edge  Biddy_Managed_IncTag (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_IncTag returns edge with an incremented tag. More...  
Biddy_Edge  Biddy_Managed_TaggedFoaNode (Biddy_Manager MNG, Biddy_Variable v, Biddy_Edge pf, Biddy_Edge pt, Biddy_Variable ptag, Biddy_Boolean garbageAllowed) 
Function Biddy_Managed_TaggedFoaNode finds or adds new node with the given variable and successors. More...  
Biddy_Boolean  Biddy_Managed_IsOK (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_IsOK returns TRUE iff given node is not obsolete. More...  
void  Biddy_Managed_GC (Biddy_Manager MNG, Biddy_Variable targetLT, Biddy_Variable targetGEQ, Biddy_Boolean purge, Biddy_Boolean total) 
Function Biddy_Managed_GC performs garbage collection. More...  
void  Biddy_Managed_Clean (Biddy_Manager MNG) 
Function Biddy_Managed_Clean performs cleaning. More...  
void  Biddy_Managed_Purge (Biddy_Manager MNG) 
Function Biddy_Managed_Purge immediately removes all nodes which were not preserved or which are not preserved anymore. More...  
void  Biddy_Managed_PurgeAndReorder (Biddy_Manager MNG, Biddy_Edge f, Biddy_Boolean converge) 
Function Biddy_Managed_PurgeAndReorder immediately removes nonpreserved nodes and triggers reordering on function. More...  
void  Biddy_Managed_Refresh (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_Refresh refreshes top node in a given function. More...  
void  Biddy_Managed_AddCache (Biddy_Manager MNG, Biddy_GCFunction gc) 
Function Biddy_Managed_AddCache adds cache to the end of Cache list. More...  
unsigned int  Biddy_Managed_AddFormula (Biddy_Manager MNG, Biddy_String x, Biddy_Edge f, int c) 
Function Biddy_Managed_AddFormula adds formula to Formula table. More...  
Biddy_Boolean  Biddy_Managed_FindFormula (Biddy_Manager MNG, Biddy_String x, unsigned int *idx, Biddy_Edge *f) 
Function Biddy_Managed_FindFormula find formula in Formula table. More...  
Biddy_Boolean  Biddy_Managed_DeleteFormula (Biddy_Manager MNG, Biddy_String x) 
Function Biddy_Managed_DeleteFormula delete formula from Formula table. More...  
Biddy_Boolean  Biddy_Managed_DeleteIthFormula (Biddy_Manager MNG, unsigned int i) 
Function Biddy_Managed_DeleteIthFormula deletes formula from the table. More...  
Biddy_Edge  Biddy_Managed_GetIthFormula (Biddy_Manager MNG, unsigned int i) 
Function Biddy_Managed_GetIthFormula returns ith formula in a Formula table. More...  
Biddy_String  Biddy_Managed_GetIthFormulaName (Biddy_Manager MNG, unsigned int i) 
Function Biddy_Managed_GetIthFormulaName returns name of the ith formula in a Formula table. More...  
Biddy_Variable  Biddy_Managed_SwapWithHigher (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_SwapWithHigher swaps two adjacent variables. More...  
Biddy_Variable  Biddy_Managed_SwapWithLower (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_SwapWithLower swaps two adjacent variables. More...  
Biddy_Boolean  Biddy_Managed_Sifting (Biddy_Manager MNG, Biddy_Edge f, Biddy_Boolean converge) 
Function Biddy_Managed_Sifting reorders variables to minimize node number for the whole system (if f = NULL) or for the given function (if f != NULL) using Rudell's sifting algorithm. More...  
void  Biddy_Managed_MinimizeBDD (Biddy_Manager MNG, Biddy_String name) 
Function Biddy_Managed_MinimizeBDD reorders variables to minimize the node number of the given formula using an exhaustive search over all possible orderings. More...  
void  Biddy_Managed_MaximizeBDD (Biddy_Manager MNG, Biddy_String name) 
Function Biddy_Managed_MaximizeBDD reorders variables to maximize the node number of the given function using an exhaustive search over all possible orderings. More...  
Biddy_Edge  Biddy_Managed_Copy (Biddy_Manager MNG1, Biddy_Manager MNG2, Biddy_Edge f) 
Function Biddy_Managed_Copy copies a graph from one manager to another manager which can use the same or different BDD type. DescriptionThe function takes a graph from one manager and creates the same graph in another manager. If the managers do not use the same BDD type then a graph is converted. The resulting graph will represent the same Boolean function assuming the domain from the target manager. If f = biddyZero then only the domain is copied.Side effectsIf source and target manager are the same then function does nothing. The variable ordering of the created BDD is trying to follow the original ordering, but if some variables already exist in the target manager then the final ordering is adapted to the target manager. Please note, that indices of variables in the target manager may not be the same as in the source manager (for example, if source managet does not use initial ordering the indices in the target manager will follow the variable's ordering and not variable's original indices)More infoMacro Biddy_Copy(MNG2,f) is defined for use with anonymous manager.  
void  Biddy_Managed_CopyFormula (Biddy_Manager MNG1, Biddy_Manager MNG2, Biddy_String x) 
Function Biddy_Managed_CopyFormula uses Biddy_Managed_Copy to copy a graph from one manager to another manager which can use the same or different BDD type. DescriptionSee Biddy_Managed_Copy.Side effectsIf source and target manager are the same then function does nothing. The variable ordering of created BDD is adapted to the target manager. The created formula is not preserved.More infoMacro Biddy_CopyFormula(MNG2,x) is defined for use with anonymous manager.  
Biddy_Boolean  Biddy_Managed_Eval (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_Eval returns the value of a Boolean function for a given variable assignment. DescriptionSide effectsVariables must have values assigned. Variable is considered to be FALSE iff variable.value == biddyZero, whilst it is considered to be TRUE, otherwise.More infoMacro Biddy_Eval(f) is defined for use with anonymous manager.  
File biddyMain.c contains main functions for representation and manipulation of boolean functions with various types of Binary Decision Diagrams (GDD = general decision diagrams).
PackageName [Biddy] Synopsis [Biddy provides data structures and algorithms for the representation and manipulation of Boolean functions with ROBDDs, 0supBDDs, and TZBDDs. A hash table is used for quick search of nodes. Complement edges decreases the number of nodes. An automatic garbage collection with a system age is implemented. Variable swapping and sifting are implemented.] FileName [biddyMain.c] Revision [$Revision: 362 $] Date [$Date: 20171217 17:01:16 +0100 (ned, 17 dec 2017) $] Authors [Robert Meolic (robert.meolic@um.si)]
Copyright (C) 2006, 2017 UM FERI, Koroska cesta 46, SI2000 Maribor, Slovenia
Biddy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Biddy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 021101301 USA.
See also: biddy.h, biddyInt.h
Definition in file biddyMain.c.
void Biddy_InitMNG  (  Biddy_Manager *  mng, 
int  gddtype  
) 
Function Biddy_InitMNG initialize a manager.
Biddy_InitMNG creates and initializes a manager. Initialization consists of creating manager structure (MNG), node table (biddyNodeTable), variable table (biddyVariableTable), formula table (biddyFormulaTable), four basic caches (biddyOPCache, biddyEACache, biddyRCCache, and biddyReplaceCache), and cache list (biddyCacheList). Biddy_InitMNG also initializes constant edges (biddyOne, biddyZero), memory management and automatic garbage collection.
Allocates a lot of memory.
Macro Biddy_InitAnonymous() will initialize anonymous manager. Macro Biddy_Init() will initialize anonymous manager for ROBDDs.
Definition at line 178 of file biddyMain.c.
void Biddy_ExitMNG  (  Biddy_Manager *  mng  ) 
Function Biddy_ExitMNG deletes a manager.
Deallocates all memory allocated by Biddy_InitMNG, Biddy_FoaVariable, Biddy_FoaNode etc.
Macro Biddy_Exit() will delete anonymous manager.
Definition at line 854 of file biddyMain.c.
Biddy_String Biddy_About  (  ) 
Function Biddy_About reports version of Biddy package.
Definition at line 1077 of file biddyMain.c.
int Biddy_Managed_GetManagerType  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetManagerType reports BDD type used in the manager.
Macro Biddy_GetManagerType() is defined for use with anonymous manager.
Definition at line 1100 of file biddyMain.c.
Biddy_String Biddy_Managed_GetManagerName  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetManagerName reports the name of the BDD type used in the manager.
Macro Biddy_GetManagerName() is defined for use with anonymous manager.
Definition at line 1126 of file biddyMain.c.
void Biddy_Managed_SetManagerParameters  (  Biddy_Manager  MNG, 
float  gcr,  
float  gcrF,  
float  gcrX,  
float  rr,  
float  rrF,  
float  rrX,  
float  st,  
float  cst  
) 
Function Biddy_Managed_SetManagerParameters set modifiable parameters.
Function expect 6 float values. If the value is < 0 then the parameter is not modified. The parameters are: biddyNodeTable.gcratio (do not delete nodes if the effect is to small), biddyNodeTable.gcratioF (do not delete nodes if the effect is to small), biddyNodeTable.gcratioX (do not delete nodes if the effect is to small), biddyNodeTable.resizeratio (resize Node table if there are to many nodes), biddyNodeTable.resizeratioF (resize Node table if there are to many nodes), biddyNodeTable.resizeratioX (resize Node table if there are to many nodes), biddyNodeTable.siftingtreshold (stop sifting if the size of the system grows to much), biddyNodeTable.fsiftingtreshold (stop sifting if the size of the function grows to much), biddyNodeTable.convergesiftingtreshold (stop one step of converging sifting if the size of the system grows to much), biddyNodeTable.fconvergesiftingtreshold (stop one step of converging sifting if the size of the function grows to much).
Initial values are given in Biddy_InitMNG.
Macro Biddy_SetManagerParameters() is defined for use with anonymous manager.
Definition at line 1169 of file biddyMain.c.
Biddy_Edge Biddy_GetThen  (  Biddy_Edge  fun  ) 
Function Biddy_GetThen returns THEN successor.
Input mark is not transfered! External use, only.
Macro BiddyT(fun) is defined for internal use.
Definition at line 1213 of file biddyMain.c.
Biddy_Edge Biddy_GetElse  (  Biddy_Edge  fun  ) 
Function Biddy_GetElse returns ELSE successor.
Input mark is not transfered! External use, only.
Macro BiddyE(fun) is defined for internal use.
Definition at line 1249 of file biddyMain.c.
Biddy_Variable Biddy_GetTopVariable  (  Biddy_Edge  fun  ) 
Function Biddy_GetTopVariable returns the top variable.
External use, only.
Macro BiddyV(fun) is defined for internal use.
Definition at line 1285 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsEqv  (  Biddy_Manager  MNG1, 
Biddy_Edge  f1,  
Biddy_Manager  MNG2,  
Biddy_Edge  f2  
) 
Function Biddy_Managed_IsEqv returns TRUE iff two BDDs are equal.
It is assumed that f1 and f2 have the same ordering.
Macro Biddy_IsEqv(f1,MNG2,f2) is defined for use with anonymous manager.
Definition at line 1309 of file biddyMain.c.
void Biddy_Managed_SelectNode  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_SelectNode selects the top node of the given function.
Macro Biddy_SelectNode(f) is defined for use with anonymous manager.
Definition at line 1344 of file biddyMain.c.
void Biddy_Managed_DeselectNode  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_DeselectNode deselects the top node of the given function.
Macro Biddy_DeselectNode(f) is defined for use with anonymous manager.
Definition at line 1370 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsSelected  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_IsSelected returns TRUE iff the top node of the given function is selected.
Macro Biddy_IsSelected(f) is defined for use with anonymous manager.
Definition at line 1396 of file biddyMain.c.
void Biddy_Managed_SelectFunction  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_SelectFunction recursively selects all nodes of a given function.
Terminal node must be selected before starting this function!
Macro Biddy_SelectFunction(f) is defined for use with anonymous manager.
Definition at line 1423 of file biddyMain.c.
void Biddy_Managed_DeselectAll  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_DeselectAll deselects all nodes.
Deselect all nodes.
Macro Biddy_DeselectAll() is defined for use with anonymous manager.
Definition at line 1480 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetTerminal  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetTerminal returns unmarked and untagged edge pointing to terminal node 1.
Terminal node depends on a manager.
Internally, use macro biddyTerminal. Macro Biddy_GetTerminal() is defined for use with anonymous manager.
Definition at line 1524 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetConstantZero  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetConstantZero returns constant 0.
Constants 0 and 1 depend on a manager. For combination sets, constant 0 coincides with empty set.
Internally, use macro biddyZero. Macro Biddy_GetConstantZero() is defined for use with anonymous manager. Macros Biddy_Managed_GetEmptySet(MNG) and Biddy_GetEmptySet() are defined for manipulation of combination sets.
Definition at line 1554 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetConstantOne  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetConstantOne returns constant 1.
Constants 0 and 1 depend on a manager. For combination sets, constant 1 coincides with universal set.
For ZBDDs and ZFDDs, you should always obtain constant 1 through the call of this function!
Internally, use macro biddyOne (also for ZBDDs and ZFDDs!). Macro Biddy_GetConstantOne() is defined for use with anonymous manager. Macros Biddy_Managed_GetUniversalSet(MNG) and Biddy_GetUniversalSet() are defined for manipulation of combination sets.
Definition at line 1586 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetBaseSet  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetBaseSet returns set containing only a null combination, i.e. it returns {{}}.
Macro Biddy_GetBaseSet() is defined for use with anonymous manager.
Definition at line 1612 of file biddyMain.c.
Biddy_Variable Biddy_Managed_GetVariable  (  Biddy_Manager  MNG, 
Biddy_String  x  
) 
Function Biddy_Managed_GetVariable returns variable with the given name.
If variable is not found function returns 0!
Macro Biddy_GetVariable(x) is defined for use with anonymous manager.
Definition at line 1677 of file biddyMain.c.
Biddy_Variable Biddy_Managed_GetLowestVariable  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetLowestVariable returns the lowest variable in the current ordering.
The lowest variable is the tompost variable.
Macro Biddy_GetLowestVariable(x) is defined for use with anonymous manager.
Definition at line 1729 of file biddyMain.c.
Biddy_Variable Biddy_Managed_GetIthVariable  (  Biddy_Manager  MNG, 
Biddy_Variable  i  
) 
Function Biddy_Managed_GetIthVariable returns ith variable in the current global ordering.
The lowest (topmost) variable has global ordering 1. The highest (bottommost) variable is '1' and has global ordering equal to numUsedVariables.
If argument is 0, function returns 0. If argument is larger than the number of variables, function returns 0.
Macro Biddy_GetIthVariable(x) is defined for use with anonymous manager.
Definition at line 1767 of file biddyMain.c.
Biddy_Variable Biddy_Managed_GetPrevVariable  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetPrevVariable returns previous variable in the global ordering (lower, topmore).
Macro Biddy_GetPrevVariable(v) is defined for use with anonymous manager.
Definition at line 1805 of file biddyMain.c.
Biddy_Variable Biddy_Managed_GetNextVariable  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetNextVariable returns next variable in the global ordering (higher, bottommore).
Macro Biddy_GetNextVariable(v) is defined for use with anonymous manager.
Definition at line 1835 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetVariableEdge  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetVariableEdge returns variable's edge.
Macro Biddy_GetVariableEdge(v) is defined for use with anonymous manager.
Definition at line 1864 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetElementEdge  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetElementEdge returns element's edge.
Macro Biddy_GetElementEdge(v) is defined for use with anonymous manager.
Definition at line 1889 of file biddyMain.c.
Biddy_String Biddy_Managed_GetVariableName  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetVariableName returns the name of a variable.
Macro Biddy_GetVariableName(v) is defined for use with anonymous manager.
Definition at line 1914 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetTopVariableEdge  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_GetTopVariableEdge returns variable's edge of top variable.
TO DO: For ZBDDs, element edge is sometimes preffered over variable edge.
Macro Biddy_GetTopVariableEdge(f) is defined for use with anonymous manager.
Definition at line 1942 of file biddyMain.c.
Biddy_String Biddy_Managed_GetTopVariableName  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_GetTopVariableName returns the name of top variable.
Macro Biddy_GetTopVariableName(f) is defined for use with anonymous manager.
Definition at line 1970 of file biddyMain.c.
char Biddy_Managed_GetTopVariableChar  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_GetTopVariableChar returns the first character in the name of top variable.
Macro Biddy_GetTopVariableChar(f) is defined for use with anonymous manager.
Definition at line 1998 of file biddyMain.c.
void Biddy_Managed_ResetVariablesValue  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_ResetVariablesValue sets all variable's value to biddyZero.
Only active (used) variables are reinitialized.
Macro Biddy_ResetVariablesValue() is defined for use with anonymous manager.
Definition at line 2027 of file biddyMain.c.
void Biddy_Managed_SetVariableValue  (  Biddy_Manager  MNG, 
Biddy_Variable  v,  
Biddy_Edge  f  
) 
Function Biddy_Managed_SetVariableValue sets variable's value.
It is not checked that the given variable is valid.
Macro Biddy_SetVariableValue(v,f) is defined for use with anonymous manager.
Definition at line 2057 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetVariableValue  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetVariableValue gets variable's value.
It is not checked that the given variable is valid.
Macro Biddy_GetVariableValue(v) is defined for use with anonymous manager.
Definition at line 2083 of file biddyMain.c.
void Biddy_Managed_ClearVariablesData  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_ClearVariablesData free memory used for all variable's data.
Only active (used) variables are considered.
Macro Biddy_ClearVariablesData() is defined for use with anonymous manager.
Definition at line 2110 of file biddyMain.c.
void Biddy_Managed_SetVariableData  (  Biddy_Manager  MNG, 
Biddy_Variable  v,  
void *  x  
) 
Function Biddy_Managed_SetVariableData sets variable's data.
It is not checked that the given variable is valid.
Macro Biddy_SetVariableData(v,x) is defined for use with anonymous manager.
Definition at line 2143 of file biddyMain.c.
void* Biddy_Managed_GetVariableData  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_GetVariableData gets variable's data.
It is not checked that the given variable is valid.
Macro Biddy_GetVariableData(v) is defined for use with anonymous manager.
Definition at line 2169 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsSmaller  (  Biddy_Manager  MNG, 
Biddy_Variable  fv,  
Biddy_Variable  gv  
) 
Function Biddy_Managed_IsSmaller returns TRUE if the first variable is smaller (= lower = previous = above = topmore).
Macro BiddyIsSmaller(fv,gv) is defined for internal use. Macro Biddy_IsSmaller(fv,gv) is defined for use with anonymous manager.
Definition at line 2196 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsLowest  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_IsLowest returns TRUE if the variable is the lowest one (lowest == topmost).
Macro BiddyIsLowest(v) is defined for internal use. Macro Biddy_IsLowest(v) is defined for use with anonymous manager.
Definition at line 2223 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsHighest  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_IsHighest returns TRUE if the variable is the highest one if terminal node is ignored (highest == bottommost).
Macro BiddyIsHighest(v) is defined for internal use. Macro Biddy_IsHighest(v) is defined for use with anonymous manager.
Definition at line 2260 of file biddyMain.c.
Biddy_Variable Biddy_Managed_FoaVariable  (  Biddy_Manager  MNG, 
Biddy_String  x,  
Biddy_Boolean  varelem  
) 
Function Biddy_Managed_FoaVariable finds variable/element or adds new variable (i.e. Boolean function f = x) and new element (i.e. it creates set {{x}}).
If variable/element already exists, function returns the existing one. If x == NULL then numbered variable/element is added. Numbered variables/elements have only digits in its name. The current number of numbered variables/elements is stored in numnum. If numbered variable/element is requested then function increments numnum and creates a new (nonexisting) variable/element. Parameter varelem is used to determine how to adapt the existing BDD base to keep the current formula valid (use varelem = TRUE if formulae represent Boolean functions and varelem = FALSE if they represent combination sets). The ordering of the new variable/element is determined in Biddy_InitMNG. Function always returns variable.
Adding new variable/element may change the meaning of the existing BDDs. Variables and elements are repaired. Moreover, formulae are repaired with regards to the parameter varelem. BDDs without external references are not repaired. For OBDDs, OFDDs, TZBDDS, and TZFDDs, it is safe to add new variables/elements if BDDs are used to represent Boolean functions. For ZBDDs and ZFDDs, it is safe to add new variables/elements if BDDs are used to represent combination sets. User should not add numbered variables/elements with some other function. TO DO: Formulae in user's formula tables are not repaired, yet!
Macro Biddy_FoaVariable(x) is defined for use with anonymous manager.
Definition at line 2318 of file biddyMain.c.
void Biddy_Managed_ChangeVariableName  (  Biddy_Manager  MNG, 
Biddy_Variable  v,  
Biddy_String  x  
) 
Function Biddy_Managed_ChangeVariableName set new name to the given variable/element.
It is not checked that the same variable/element does not already exist. The ordering of the variable is not changed.
Macro Biddy_ChangeVariableName(v,x) is defined for use with anonymous manager.
Definition at line 2586 of file biddyMain.c.
Biddy_Edge Biddy_Managed_AddVariableByName  (  Biddy_Manager  MNG, 
Biddy_String  x  
) 
Function Biddy_Managed_AddVariableByName adds variable.
Biddy_Managed_AddVariableByName uses Biddy_Managed_FoaVariable to find or add variable. Function returns variable edge. If variable already exists, function returns the existing variable edge. For more details see Biddy_Managed_FoaVariable.
See Biddy_Managed_FoaVariable.
Macro Biddy_AddVariableByName(x) is defined for use with anonymous manager. Macros Biddy_Managed_AddVariable(MNG) and Biddy_AddVariable() are defined for creating numbered variables.
Definition at line 2622 of file biddyMain.c.
Biddy_Edge Biddy_Managed_AddElementByName  (  Biddy_Manager  MNG, 
Biddy_String  x  
) 
Function Biddy_Managed_AddElementByName adds element.
Biddy_Managed_AddElementByName uses Biddy_Managed_FoaVariable to find or add element. Function returns element edge. If element already exists, function returns the existing element edge. For more details see Biddy_Managed_FoaVariable.
See Biddy_Managed_FoaVariable.
Macro Biddy_AddElementByName(x) is defined for use with anonymous manager. Macros Biddy_Managed_AddElement(MNG) and Biddy_AddElement() are defined for creating numbered elements.
Definition at line 2657 of file biddyMain.c.
Biddy_Edge Biddy_Managed_AddVariableBelow  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_AddVariableBelow adds variable.
Biddy_Managed_AddVariableBelow uses Biddy_Managed_AddVariableByName to add new variable. Then, the order of the new variable is changed to become immediately below the given variable (below = next = bottommore in BDD) Function returns variable edge.
Macro Biddy_AddVariableBelow(v) is defined for use with anonymous manager.
Definition at line 2689 of file biddyMain.c.
Biddy_Edge Biddy_Managed_AddVariableAbove  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_AddVariableAbove adds variable.
Biddy_Managed_AddVariableAbove uses Biddy_Managed_AddVariableByName to add new variable. Then, the order of the new variable is changed to become immediately above the given variable (above = previous = topmore in BDD) Function returns variable edge.
Macro Biddy_AddVariableAbove(v) is defined for use with anonymous manager.
Definition at line 2772 of file biddyMain.c.
Biddy_Edge Biddy_Managed_TransferMark  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Boolean  mark,  
Biddy_Boolean  leftright  
) 
Function Biddy_Managed_TransferMark returns edge with inverted complement bit iff the second parameter is TRUE and normalization rules require this.
Parameter leftright should be TRUE for left and FALSE for right. For OBDDC, it is better to use macro Biddy_InvCond. For OBDDC, parameter leftright is ignored.
TO DO: swap the meaning of parameter leftright (left should be FALSE)
Macro Biddy_TransferMark() is defined for use with anonymous manager.
Definition at line 2853 of file biddyMain.c.
Biddy_Edge Biddy_Managed_IncTag  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_IncTag returns edge with an incremented tag.
Used for TZBDDs and TZFDDs, only.
It is not checked, that the resulting tag is not greater than top variable. Function may return nonfresh node even if f is fresh.
Macro Biddy_IncTag() is defined for use with anonymous manager.
Definition at line 2919 of file biddyMain.c.
Biddy_Edge Biddy_Managed_TaggedFoaNode  (  Biddy_Manager  MNG, 
Biddy_Variable  v,  
Biddy_Edge  pf,  
Biddy_Edge  pt,  
Biddy_Variable  ptag,  
Biddy_Boolean  garbageAllowed  
) 
Function Biddy_Managed_TaggedFoaNode finds or adds new node with the given variable and successors.
If such node already exists, function returns it and does not create the new one. If pf = pt = NULL (and ptag = v) then new variable (for OBDD, OFDD, TZBDD, and TZFDD) or new element (for ZBDD and ZFDD) is created. For OBDD, ZBDD, OFDD, and ZFDD, parameter ptag is ignored. For TZBDD and TZFDD, the returned edge is tagged with the given ptag. This function should not be called directly to add new variables and elements, you must use Biddy_Managed_FoaVariable, Biddy_Managed_AddVariableByName, or Biddy_Managed_AddElementByName.
Using Biddy_Managed_TaggedFoaNode you can create node with an arbitrary ordering. It is much more safe to use Boolean operators, e.g. Biddy_Managed_ITE.
Macro Biddy_Managed_FoaNode(MNG,v,pf,pt,garbageAllowed) is defined for use with implicit tags or without tags. Macros Biddy_TaggedFoaNode(v,pf,pt,tag,garbageAllowed) and Biddy_FoaNode(v,pf,pt,garbageAllowed) are defined for use with anonymous manager.
Definition at line 2997 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_IsOK  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_IsOK returns TRUE iff given node is not obsolete.
This is needed for implementation of user caches.
Macro BiddyIsOK(f) is defined for debugging. It will check more properties and not only the expiry value. Macro Biddy_IsOK(f) is defined for use with anonymous manager.
Definition at line 3419 of file biddyMain.c.
void Biddy_Managed_GC  (  Biddy_Manager  MNG, 
Biddy_Variable  targetLT,  
Biddy_Variable  targetGEQ,  
Biddy_Boolean  purge,  
Biddy_Boolean  total  
) 
Function Biddy_Managed_GC performs garbage collection.
All obsolete nodes are deleted. Iff parameter purge is true then all formulae without name are deleted. Iff parameter purge is true then all nodes which are not part of any nonobsolete nondeleted formulae are removed even if they are fresh or fortified (this should not be used during automatic garbage collection!). If parameter total is true than unnecessary nodes are guaranted to be deleted, otherwise they are deleted only when there are enough of them. If (targetLT != 0) then node table resizing is disabled. If (targetLT != 0) then there should not exist obsolete formulae. If (targetLT != 0) then there should not exist obsolete nodes which are not part of any nonobsolete nondeleted formulae. If (targetLT != 0) then there should not exist obsolete nodes with variable equal or higher (bottommore) than target and smaller (topmore) than targetGEQ.
The first element of each chain in a node table should have a special value for its 'prev' element to allow tricky but efficient deleting. Moreover, 'prev' and 'next' should be the first and the second element in the structure BiddyNode, respectively. Garbage collecion is reported by biddyNodeTable.garbage only if some bad nodes are purged! Parameters targetLT and targetGEQ are used during sifting, only, in all other cases 0 is used.
Macro Biddy_GC(target,purge,total) is defined for use with anonymous manager. Macros Biddy_Managed_AutoGC(MNG) and Biddy_AutoGC() are useful variants with target = 0, purge = FALSE, and total = FALSE.
Definition at line 3468 of file biddyMain.c.
void Biddy_Managed_Clean  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_Clean performs cleaning.
Discard all nodes which are not preserved or which are not preserved anymore. Obsolete nodes are not immediately removed, they will be removed during the first garbage collection.
Field deleted is not considered and thus no fortified node and no prolonged node is discarded.
Macro Biddy_Clean() is defined for use with anonymous manager.
Definition at line 3958 of file biddyMain.c.
void Biddy_Managed_Purge  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_Purge immediately removes all nodes which were not preserved or which are not preserved anymore.
All fresh and obsolete nodes are immediatelly removed. All formulae without name are deleted. Moreover, nodes from deleted prolonged formulae and nodes from deleted fortified formulae are removed if they are not needed by other formulae. Call to Biddy_Purge does not count as clearing and thus all preserved formulae remains preserved for the same number of clearings.
Removes all fresh nodes!
Macro Biddy_Purge(f) is defined for use with anonymous manager.
Definition at line 4008 of file biddyMain.c.
void Biddy_Managed_PurgeAndReorder  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Boolean  converge  
) 
Function Biddy_Managed_PurgeAndReorder immediately removes nonpreserved nodes and triggers reordering on function.
All obsolete nodes are immediatelly removed. Moreover, nodes from deleted prolonged formulae and nodes from deleted fortified formulae are removed if they are not needed by other formulae. If BDD is given (f != NULL), reordering on function is used. Otherwise (f == NULL) global reordering is used. Call to Biddy_PurgeAndReorder does not count as clearing and thus all preserved formulae remains preserved for the same number of clearings.
Removes all fresh nodes.
Macro Biddy_PurgeAndReorder(f) is defined for use with anonymous manager.
Definition at line 4056 of file biddyMain.c.
void Biddy_Managed_Refresh  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_Refresh refreshes top node in a given function.
This is an external variant of internal macro BiddyRefresh This is needed for implementing user caches.
Macro Biddy_Refresh(f) is defined for use with anonymous manager.
Definition at line 4085 of file biddyMain.c.
void Biddy_Managed_AddCache  (  Biddy_Manager  MNG, 
Biddy_GCFunction  gc  
) 
Function Biddy_Managed_AddCache adds cache to the end of Cache list.
If Cache list does not exist, function creates it.
Macro Biddy_AddCache(gc) is defined for use with anonymous manager.
Definition at line 4111 of file biddyMain.c.
unsigned int Biddy_Managed_AddFormula  (  Biddy_Manager  MNG, 
Biddy_String  x,  
Biddy_Edge  f,  
int  c  
) 
Function Biddy_Managed_AddFormula adds formula to Formula table.
Given BDD becomes a formula. If (x != NULL) then formula is accessible by its name. If (x != NULL) then index of the formula in the Formulae Table is returned, otherwise function returns 0. Nodes of the given BDD will be preserved for the given number of clearings. If (c == 1) then formula is refreshed but not preserved. If (c == 0) then formula is persistently preserved. You have to use Biddy_DeleteFormula and Biddy_Purge to remove nodes of persistently preserved formulae. There are five macros defined to simplify formulae management: Biddy_Managed_AddTmpFormula(mng,name,bdd) := Biddy_Managed_AddFormula(mng,name,bdd,1) Biddy_Managed_AddPreservedFormula(mng,bdd,c) := Biddy_Managed_AddFormula(mng,NULL,bdd,c) Biddy_Managed_AddPersistentFormula(mng,name,bdd) := Biddy_Managed_AddFormula(mng,name,bdd,0) Biddy_Managed_KeepFormula(mng,bdd) := Biddy_Managed_AddFormula(mng,NULL,bdd,1) Biddy_Managed_KeepFormulaUntilDelete(mng,bdd) := Biddy_Managed_AddFormula(mng,NULL,bdd,0)
Function is prolonged or fortified. Formulae with name are ordered by name. If formula with the same name already exists, it will be overwritten  preserved (i.e. not obsolete and not fresh) and persistently preserved formulae will be deleted at the original index and recreated at new index!
Macros Biddy_AddFormula(x,f), Biddy_AddTmpFormula(f), Biddy_AddPreservedFormula(f,c), Biddy_AddPersistentFormula(x,f), Biddy_KeepFormula(f), and Biddy_KeepFormulaUntilDelete(f) are defined for use with anonymous manager.
Definition at line 4185 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_FindFormula  (  Biddy_Manager  MNG, 
Biddy_String  x,  
unsigned int *  idx,  
Biddy_Edge *  f  
) 
Function Biddy_Managed_FindFormula find formula in Formula table.
Return TRUE/FALSE, index, and the formula. If formula is constant or variable then idx = 0 and f != biddyNull. If formula is not found then idx is a position where the formulae should exist and f == biddyNull.
Macro Biddy_FindFormula(x,f) is defined for use with anonymous manager.
Definition at line 4441 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_DeleteFormula  (  Biddy_Manager  MNG, 
Biddy_String  x  
) 
Function Biddy_Managed_DeleteFormula delete formula from Formula table.
Formula is labelled but not immediately removed. Nodes of the given formula are not immediately removed.
Formula is not accessible by its name anymore. Formulae representing constants and variables will not be deleted.
Macro Biddy_DeleteFormula(x) is defined for use with anonymous manager.
Definition at line 4615 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_DeleteIthFormula  (  Biddy_Manager  MNG, 
unsigned int  i  
) 
Function Biddy_Managed_DeleteIthFormula deletes formula from the table.
Formula is labelled but not immediately removed. Nodes of the given formula are not immediately removed.
Formula is not accessible by its name anymore. The first two formulae ("0" and "1") will not be deleted. Formulae representing variables will not be deleted.
Macro Biddy_DeleteIthFormula(x) is defined for use with anonymous manager.
Definition at line 4679 of file biddyMain.c.
Biddy_Edge Biddy_Managed_GetIthFormula  (  Biddy_Manager  MNG, 
unsigned int  i  
) 
Function Biddy_Managed_GetIthFormula returns ith formula in a Formula table.
Return biddyNull if ith formulae does not exist.
After addding new formula the index of others may change!
Macro Biddy_GetIthFormula(i) is defined for use with anonymous manager.
Definition at line 4739 of file biddyMain.c.
Biddy_String Biddy_Managed_GetIthFormulaName  (  Biddy_Manager  MNG, 
unsigned int  i  
) 
Function Biddy_Managed_GetIthFormulaName returns name of the ith formula in a Formula table.
Return NULL if ith formulae does not exist.
After addding new formula the index of others may change!
Macro Biddy_GetIthFormulaName(i) is defined for use with anonymous manager.
Definition at line 4770 of file biddyMain.c.
Biddy_Variable Biddy_Managed_SwapWithHigher  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_SwapWithHigher swaps two adjacent variables.
Higher (greater) variable is the bottommore one! The highest variable is constant variable "1". Global ordering is number of zeros in corresponding line of orderingTable. Constant variable '1' has global ordering greater than all others.
All obsolete nodes will be removed.
Macro Biddy_SwapWithHigher(v) is defined for use with anonymous manager.
Definition at line 4811 of file biddyMain.c.
Biddy_Variable Biddy_Managed_SwapWithLower  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_SwapWithLower swaps two adjacent variables.
Lower (smaller) variable is the topmore one! The lowest (topmost) element is not fixed. Topmost variable has global ordering 1 (smaller than all except itself). Global ordering is the number of zeros in corresponding line of orderingTable.
All obsolete nodes will be removed.
Macro Biddy_SwapWithLower(v) is defined for use with anonymous manager.
Definition at line 4875 of file biddyMain.c.
Biddy_Boolean Biddy_Managed_Sifting  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Boolean  converge  
) 
Function Biddy_Managed_Sifting reorders variables to minimize node number for the whole system (if f = NULL) or for the given function (if f != NULL) using Rudell's sifting algorithm.
Variables are reordered globally. All obsolete nodes will be removed.
For TZBDD, all unreferenced nodes (not part of registered formulae) will be removed. For TZBDD, sifting may change top edge or even a top node of any function/formula  this is a problem, because functions referenced by local variables only may become wrong. Consequently, for TZBDDs, sifting is not safe to start automatically!
Macro Biddy_Sifting(f) is defined for use with anonymous manager.
Definition at line 4943 of file biddyMain.c.
void Biddy_Managed_MinimizeBDD  (  Biddy_Manager  MNG, 
Biddy_String  name  
) 
Function Biddy_Managed_MinimizeBDD reorders variables to minimize the node number of the given formula using an exhaustive search over all possible orderings.
Steinhaus–Johnson–Trotter algorithm is used to generate all possible permutations. An optimized version of Bubble Sort is used to setup the final ordering. Variables are reordered globally. All obsolete nodes will be removed.
Indeed, this function may take a lot of time! For TZBDD, all unreferenced nodes (not part of registered formulae) will be removed. For TZBDD, this function may change top edge or even a top node of any function/formula  this is a problem, because functions referenced by local variables only may become wrong. Consequently, for TZBDDs, sifting is not safe to start automatically!
Macro Biddy_MinimizeBDD(f) is defined for use with anonymous manager.
Definition at line 5127 of file biddyMain.c.
void Biddy_Managed_MaximizeBDD  (  Biddy_Manager  MNG, 
Biddy_String  name  
) 
Function Biddy_Managed_MaximizeBDD reorders variables to maximize the node number of the given function using an exhaustive search over all possible orderings.
Steinhaus–Johnson–Trotter algorithm is used to generate all possible permutations. An optimized version of Bubble Sort is used to setup the final ordering. Variables are reordered globally. All obsolete nodes will be removed.
Indeed, this function may take a lot of time! For TZBDD, all unreferenced nodes (not part of registered formulae) will be removed. For TZBDD, this function may change top edge or even a top node of any function/formula  this is a problem, because functions referenced by local variables only may become wrong. Consequently, for TZBDDs, sifting is not safe to start automatically!
Macro Biddy_MaximizeBDD(f) is defined for use with anonymous manager.
Definition at line 5222 of file biddyMain.c.