Biddy
1.7.1
An academic Binary Decision Diagrams package

File biddyMainGDD.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...  
void  Biddy_Managed_SetManagerParameters (Biddy_Manager MNG, float gcr, float gcrF, float gcrX, float rr, float rrF, float rrX, float st, float fst, float cst, float fcst) 
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 the constant 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_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_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_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...  
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 a numbered variable. More...  
Biddy_Edge  Biddy_Managed_AddVariableAbove (Biddy_Manager MNG, Biddy_Variable v) 
Function Biddy_Managed_AddVariableAbove adds a numbered 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_Edge  Biddy_Managed_Not (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_Not calculates Boolean function NOT. More...  
Biddy_Edge  Biddy_Managed_ITE (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g, Biddy_Edge h) 
Function Biddy_Managed_ITE calculates ITE operation of three Boolean functions. More...  
Biddy_Edge  Biddy_Managed_And (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_And calculates Boolean function AND (conjunction). More...  
Biddy_Edge  Biddy_Managed_Or (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Or calculates Boolean function OR (disjunction). More...  
Biddy_Edge  Biddy_Managed_Nand (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Nand calculates Boolean function NAND (Sheffer). More...  
Biddy_Edge  Biddy_Managed_Nor (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Nor calculates Boolean function NOR (Peirce). More...  
Biddy_Edge  Biddy_Managed_Xor (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Xor calculates Boolean function XOR. More...  
Biddy_Edge  Biddy_Managed_Xnor (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Xnor calculates Boolean function XNOR. More...  
Biddy_Edge  Biddy_Managed_Leq (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Leq calculates Boolean implication. More...  
Biddy_Edge  Biddy_Managed_Gt (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_Gt calculates the negation of Boolean implication. More...  
Biddy_Boolean  Biddy_Managed_IsLeq (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g) 
Function Biddy_Managed_IsLeq returns TRUE iff function f is included in function g. More...  
Biddy_Edge  Biddy_Managed_Restrict (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v, Biddy_Boolean value) 
Function Biddy_Managed_Restrict calculates a restriction of Boolean function. More...  
Biddy_Edge  Biddy_Managed_Compose (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g, Biddy_Variable v) 
Function Biddy_Managed_Compose calculates a composition of two Boolean functions. More...  
Biddy_Edge  Biddy_Managed_E (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v) 
Function Biddy_Managed_E calculates an existential quantification of Boolean function. More...  
Biddy_Edge  Biddy_Managed_A (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v) 
Function Biddy_Managed_A calculates an universal quantification of Boolean function. More...  
Biddy_Boolean  Biddy_Managed_IsVariableDependent (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v) 
Function Biddy_Managed_IsVariableDependent returns TRUE iff variable is dependent on others in a function. More...  
Biddy_Edge  Biddy_Managed_ExistAbstract (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge cube) 
Function Biddy_Managed_ExistAbstract existentially abstracts all the variables in cube from f. More...  
Biddy_Edge  Biddy_Managed_UnivAbstract (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge cube) 
Function Biddy_Managed_UnivAbstract universally abstracts all the variables in cube from f. More...  
Biddy_Edge  Biddy_Managed_AndAbstract (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge g, Biddy_Edge cube) 
Function Biddy_Managed_AndAbstract calculates the AND of two BDDs and simultaneously (existentially) abstracts the variables in cube. More...  
Biddy_Edge  Biddy_Managed_Constrain (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge c) 
Function Biddy_Managed_Constrain calculates Coudert and Madre's constrain function. More...  
Biddy_Edge  Biddy_Managed_Simplify (Biddy_Manager MNG, Biddy_Edge f, Biddy_Edge c) 
Function Biddy_Managed_Simplify calculates Coudert and Madre's restrict function. More...  
Biddy_Edge  Biddy_Managed_Support (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_Support calculates a product of all dependent variables (OBDD and TZBDD) or the combination set containing a subset which includes all dependent variables (ZBDD). More...  
Biddy_Edge  Biddy_Managed_Replace (Biddy_Manager MNG, Biddy_Edge f) 
Function Biddy_Managed_Replace calculates Boolean function with one or more variables replaced. More...  
Biddy_Edge  Biddy_Managed_Change (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v) 
Function Biddy_Managed_Change change the form of the given variable (positive literal becomes negative and vice versa). More...  
Biddy_Edge  Biddy_Managed_Subset (Biddy_Manager MNG, Biddy_Edge f, Biddy_Variable v, Biddy_Boolean value) 
Function Biddy_Managed_Subset calculates a division of Boolean function with a literal. 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 target, 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, 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...  
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 created BDD is adapted to the target manager.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 effectsMore infoMacro Biddy_Eval(f) is defined for use with anonymous manager.  
Biddy_Edge  Biddy_Managed_Random (Biddy_Manager MNG, Biddy_Edge support, double r) 
Function Biddy_Managed_Random generates a random BDD. More...  
Biddy_Edge  Biddy_Managed_RandomSet (Biddy_Manager MNG, Biddy_Edge unit, double r) 
Function Biddy_Managed_RandomSet generates a random BDD. More...  
File biddyMainGDD.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 [biddyMainGDD.c] Revision [$Revision: 254 $] Date [$Date: 20170320 15:03:19 +0100 (pon, 20 mar 2017) $] Authors [Robert Meolic (robert.meolic@um.si)]
Copyright (C) 2006, 2017 UMFERI, Smetanova ulica 17, 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 biddyMainGDD.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), three basic caches (biddyOPCache, biddyEACache and biddyRCCache), 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 217 of file biddyMainGDD.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 758 of file biddyMainGDD.c.
Biddy_String Biddy_About  (  ) 
Function Biddy_About reports version of Biddy package.
Definition at line 955 of file biddyMainGDD.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 978 of file biddyMainGDD.c.
void Biddy_Managed_SetManagerParameters  (  Biddy_Manager  MNG, 
float  gcr,  
float  gcrF,  
float  gcrX,  
float  rr,  
float  rrF,  
float  rrX,  
float  st,  
float  fst,  
float  cst,  
float  fcst  
) 
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 1021 of file biddyMainGDD.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 1068 of file biddyMainGDD.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 1104 of file biddyMainGDD.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 1140 of file biddyMainGDD.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 1164 of file biddyMainGDD.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 1199 of file biddyMainGDD.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 1225 of file biddyMainGDD.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 1251 of file biddyMainGDD.c.
void Biddy_Managed_SelectFunction  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_SelectFunction recursively selects all nodes of a given function.
Constant node must be selected before starting this function!
Macro Biddy_SelectFunction(f) is defined for use with anonymous manager.
Definition at line 1278 of file biddyMainGDD.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 1335 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_GetTerminal  (  Biddy_Manager  MNG  ) 
Function Biddy_Managed_GetTerminal returns unmarked and untagged edge pointing to the constant 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 1369 of file biddyMainGDD.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 1399 of file biddyMainGDD.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 1431 of file biddyMainGDD.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 1457 of file biddyMainGDD.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 1515 of file biddyMainGDD.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 1598 of file biddyMainGDD.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 1628 of file biddyMainGDD.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 1657 of file biddyMainGDD.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 1682 of file biddyMainGDD.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 1707 of file biddyMainGDD.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 1735 of file biddyMainGDD.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 1763 of file biddyMainGDD.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 1791 of file biddyMainGDD.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 1820 of file biddyMainGDD.c.
void Biddy_Managed_SetVariableValue  (  Biddy_Manager  MNG, 
Biddy_Variable  v,  
Biddy_Edge  f  
) 
Function Biddy_Managed_SetVariableValue sets variable's value.
Macro Biddy_SetVariableValue(v,f) is defined for use with anonymous manager.
Definition at line 1849 of file biddyMainGDD.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 Biddy_IsSmaller(fv,gv) is defined for use with anonymous manager.
Definition at line 1875 of file biddyMainGDD.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 1923 of file biddyMainGDD.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 2202 of file biddyMainGDD.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 2237 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_AddVariableBelow  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_AddVariableBelow adds a numbered variable.
Biddy_Managed_AddVariableBelow uses Biddy_Managed_AddVariableByName to add numbered 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 2269 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_AddVariableAbove  (  Biddy_Manager  MNG, 
Biddy_Variable  v  
) 
Function Biddy_Managed_AddVariableAbove adds a numbered variable.
Biddy_Managed_AddVariableAbove uses Biddy_Managed_AddVariableByName to add numbered 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 2354 of file biddyMainGDD.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 OBDD, it is better to use macro Biddy_InvCond. For OBDD, parameter leftrigh 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 2437 of file biddyMainGDD.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 2479 of file biddyMainGDD.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 2541 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Not  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_Not calculates Boolean function NOT.
Implemented for OBDD, ZBDD, and TZBDD. For OBDD and OFDD, it is better to use macro Biddy_Inv. For OBDD, cache table is not needed. For ZBDD, recursive calls are via Xor and thus its cache table is used. For TZBDD, results are cached as (biddyOne,f,biddyZero)  see Biddy_Xor.
Macro Biddy_Not() is defined for use with anonymous manager.
Definition at line 2887 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_ITE  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g,  
Biddy_Edge  h  
) 
Function Biddy_Managed_ITE calculates ITE operation of three Boolean functions.
Implemented for OBDDs, ZBDDs, and TZBDDs. For OBDDs, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are cached as (f,g,h) where f,g,h != 0, f != g, f != h, and g != h.
Macro Biddy_ITE(f,g,h) is defined for use with anonymous manager.
Definition at line 3092 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_And  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_And calculates Boolean function AND (conjunction).
For combination sets, this function coincides with Intersection.
Used by ITE (for OBDDs). Implemented for OBDDs, ZBDDs, and TZBDDs. For OBDDs, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are cached as (f,biddyZero,g).
Macro Biddy_And(f,g) is defined for use with anonymous manager. Macros Biddy_Managed_Intersect(MNG,f,g) and Biddy_Intersect(f,g) are defined for manipulation of combination sets.
Definition at line 3658 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Or  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Or calculates Boolean function OR (disjunction).
For combination sets, this function coincides with Union.
Implemented for OBDDs, ZBDDs, and TZBDDs. For OBDDs, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results will be cached as (biddyZero,f,g).
Macro Biddy_Or(f,g) is defined for use with anonymous manager. Macros Biddy_Managed_Union(MNG,f,g) and Biddy_Union(f,g) are defined for manipulation of combination sets.
Definition at line 4119 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Nand  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Nand calculates Boolean function NAND (Sheffer).
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs (via andnot). For OBDDs, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are not cached.
Macro Biddy_Nand(f,g) is defined for use with anonymous manager.
Definition at line 4544 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Nor  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Nor calculates Boolean function NOR (Peirce).
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs (via andnot). For OBDDs, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are not cached.
Macro Biddy_Nor(f,g) is defined for use with anonymous manager.
Definition at line 4624 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Xor  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Xor calculates Boolean function XOR.
Used by ITE (for OBDDs). Implemented for OBDDs, ZBDDs, and TZBDDs. For OBDD, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are cached as (f,g,biddyZero).
Macro Biddy_Xor(f,g) is defined for use with anonymous manager.
Definition at line 4703 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Xnor  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Xnor calculates Boolean function XNOR.
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs (via xornot). For OBDD, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are not cached.
Macro Biddy_Xnor(f,g) is defined for use with anonymous manager.
Definition at line 5169 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Leq  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Leq calculates Boolean implication.
Boolean function leq(f,g) = or(not(f),g) = not(gt(f,g)). This function coincides with implication f>g.
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs (via andnot). For OBDD, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are cached as (f,f,g).
Macro Biddy_Leq(f,g) is defined for use with anonymous manager.
Definition at line 5250 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Gt  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_Gt calculates the negation of Boolean implication.
Boolean function gt(f,g) = and(f,not(g)). For combination sets, this function coincides with Diff.
Implemented for OBDDs, ZBDDs, and TZBDDs. For OBDD, results are cached as parameters to ITE(F,G,H)= F*G XOR F'*H. For ZBDDs and TZBDDs, results are cached as (f,g,g).
Macro Biddy_Gt(f,g) is defined for use with anonymous manager. Macros Biddy_Managed_Diff(MNG,f,g) and Biddy_Diff(f,g) are defined for manipulation of combination sets.
Definition at line 5333 of file biddyMainGDD.c.
Biddy_Boolean Biddy_Managed_IsLeq  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g  
) 
Function Biddy_Managed_IsLeq returns TRUE iff function f is included in function g.
Prototyped for OBDDs, ZBDDs, and TZBDDs (via calculating full implication, this is less efficient as implementation in CUDD).
Macro Biddy_IsLeq(f,g) is defined for use with anonymous manager.
Definition at line 5640 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Restrict  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v,  
Biddy_Boolean  value  
) 
Function Biddy_Managed_Restrict calculates a restriction of Boolean function.
Original BDD is not changed. This is not Coudert and Madre's restrict function (use Biddy_Simplify if you need that one).
For OBDDs, recursive calls use optimization: F(a=x) == NOT((NOT F)(a=x)).
Macro Biddy_Restrict(f,v,value) is defined for use with anonymous manager.
Definition at line 5693 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Compose  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g,  
Biddy_Variable  v  
) 
Function Biddy_Managed_Compose calculates a composition of two Boolean functions.
Original BDD is not changed.
For OBDDs, recursive calls use optimization: F(a=G) == NOT((NOT F)(a=G)).
Macro Biddy_Compose(f,g,v) is defined for use with anonymous manager.
Definition at line 5886 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_E  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v  
) 
Function Biddy_Managed_E calculates an existential quantification of Boolean function.
Original BDD is not changed.
Be careful: ExA F != NOT(ExA (NOT F)). Counterexample: Exb (AND (NOT a) b c).
Macro Biddy_E(f,v) is defined for use with anonymous manager.
Definition at line 6089 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_A  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v  
) 
Function Biddy_Managed_A calculates an universal quantification of Boolean function.
Original BDD is not changed.
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs. Be careful: AxA F != NOT(AxA (NOT F)). Counterexample: Axb (AND (NOT a) b c).
Macro Biddy_A(f,v) is defined for use with anonymous manager.
Definition at line 6270 of file biddyMainGDD.c.
Biddy_Boolean Biddy_Managed_IsVariableDependent  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v  
) 
Function Biddy_Managed_IsVariableDependent returns TRUE iff variable is dependent on others in a function.
A variable is dependent on others in a function iff universal quantification of this variable returns constant FALSE.
Prototyped for OBDDs (via xA, calculating full universal quantification is less efficient as direct implementation in CUDD).
Macro Biddy_IsVariableDependent(f,v) is defined for use with anonymous manager.
Definition at line 6347 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_ExistAbstract  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  cube  
) 
Function Biddy_Managed_ExistAbstract existentially abstracts all the variables in cube from f.
Original BDD is not changed.
Macro Biddy_ExistAbstract(f,cube) is defined for use with anonymous manager.
Definition at line 6389 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_UnivAbstract  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  cube  
) 
Function Biddy_Managed_UnivAbstract universally abstracts all the variables in cube from f.
Original BDD is not changed.
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs.
Macro Biddy_UnivAbstract(f,cube) is defined for use with anonymous manager.
Definition at line 6619 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_AndAbstract  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  g,  
Biddy_Edge  cube  
) 
Function Biddy_Managed_AndAbstract calculates the AND of two BDDs and simultaneously (existentially) abstracts the variables in cube.
Macro Biddy_AndAbstract(f,g,cube) is defined for use with anonymous manager.
Definition at line 6694 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Constrain  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  c  
) 
Function Biddy_Managed_Constrain calculates Coudert and Madre's constrain function.
Coudert and Madre's constrain function is also called a generalized cofactor of function f with respect to function c.
Implemented for OBDDs. Cache table is not implemented, yet.
Macro Biddy_Constrain(f,c) is defined for use with anonymous manager.
Definition at line 7103 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Simplify  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Edge  c  
) 
Function Biddy_Managed_Simplify calculates Coudert and Madre's restrict function.
Coudert and Madre's restrict function tries to simplify function f by restricting it to the domain covered by function c. No checks are done to see if the result is actually smaller than the input.
Implemented for OBDDs. Cache table is not implemented, yet.
Macro Biddy_Simplify(f,c) is defined for use with anonymous manager.
Definition at line 7208 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Support  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_Support calculates a product of all dependent variables (OBDD and TZBDD) or the combination set containing a subset which includes all dependent variables (ZBDD).
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs. For OBDD, dependent variables are all variables existing in the graph. For ZBDD and TZBDD, this is not true.
Macro Biddy_Support(f) is defined for use with anonymous manager.
Definition at line 7317 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Replace  (  Biddy_Manager  MNG, 
Biddy_Edge  f  
) 
Function Biddy_Managed_Replace calculates Boolean function with one or more variables replaced.
Implemented for OBDDs. Prototyped for ZBDDs and TZBDDs (via AndXorNotRestrict). Original BDD is not changed. The sets of current and new variables should be disjoint. Replacing is controlled by variable's values (which are edges!). Use Biddy_Managed_ResetVariablesValue and Biddy_Managed_SetVariableValue to prepare replacing.
Cache table is not implemented, yet.
Macro Biddy_Replace(f) is defined for use with anonymous manager.
Definition at line 7421 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Change  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v  
) 
Function Biddy_Managed_Change change the form of the given variable (positive literal becomes negative and vice versa).
Macro Biddy_Change() is defined for use with anonymous manager.
Definition at line 7528 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Subset  (  Biddy_Manager  MNG, 
Biddy_Edge  f,  
Biddy_Variable  v,  
Biddy_Boolean  value  
) 
Function Biddy_Managed_Subset calculates a division of Boolean function with a literal.
Original BDD is not changed. For combination sets, this function coincides with Subset0 and Subset1.
Cache table for AND is used.
Macro Biddy_Subset(f,v,value) is defined for use with anonymous manager. Macros Biddy_Managed_Subset0(MNG,f,v), Biddy_Subset0(f,v), Biddy_Managed_Subset1(MNG,f,v), and Biddy_Subset1(f,v) are defined for manipulation of combination sets.
Definition at line 7670 of file biddyMainGDD.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 7907 of file biddyMainGDD.c.
void Biddy_Managed_GC  (  Biddy_Manager  MNG, 
Biddy_Variable  target,  
Biddy_Boolean  purge,  
Biddy_Boolean  total  
) 
Function Biddy_Managed_GC performs garbage collection.
All obsolete nodes are deleted. Parameter target is used during sifting. If parameter total is true than all obsolete nodes are deleted, otherwise nodes are deleted only if there are enough obsolete nodes. Nodes from deleted nonobsolete formulae are immediately removed only if parameter purge is true (this should not be used during the automatic garbage collection), otherwise these nodes only become fresh.
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!
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 7947 of file biddyMainGDD.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.
Tag 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 8346 of file biddyMainGDD.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. 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 8393 of file biddyMainGDD.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 8429 of file biddyMainGDD.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 8458 of file biddyMainGDD.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 8484 of file biddyMainGDD.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.
Nodes of the given BDD will be preserved for the given number of clearings. If (x != NULL) then formula is accessible by its name. If (c == 1) then formula is not preserved. If (c == 0) then formula is persistently preserved and you have to use Biddy_DeleteFormula to remove its nodes. There are two macros defined to simplify formulae management. Macro Biddy_Managed_AddTmpFormula(mng,bdd,c) is defined as Biddy_Managed_AddFormula(mng,NULL,bdd,c) and macro Biddy_Managed_AddPersistentFormula(mng,name,bdd) is defined as Biddy_Managed_AddFormula(mng,name,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 and persistently preserved formulae, too)!
Macros Biddy_AddFormula(x,f), Biddy_AddTmpFormula(f,c), and Biddy_AddPersistentFormula(x,f) are defined for use with anonymous manager.
Definition at line 8545 of file biddyMainGDD.c.
Biddy_Boolean Biddy_Managed_FindFormula  (  Biddy_Manager  MNG, 
Biddy_String  x,  
Biddy_Edge *  f  
) 
Function Biddy_Managed_FindFormula find formula in Formula table.
Macro Biddy_FindFormula(x,f) is defined for use with anonymous manager.
Definition at line 8738 of file biddyMainGDD.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 8839 of file biddyMainGDD.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 8902 of file biddyMainGDD.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 8962 of file biddyMainGDD.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 8993 of file biddyMainGDD.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 element is constant "1". Constant '1' has global ordering numUsedVariables (not smaller than anyone). Global ordering is the number of zeros in corresponding line of orderingTable.
All obsolete nodes will be removed.
Macro Biddy_SwapWithHigher(v) is defined for use with anonymous manager.
Definition at line 9034 of file biddyMainGDD.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 9079 of file biddyMainGDD.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.
Macro Biddy_Sifting(f) is defined for use with anonymous manager.
Definition at line 9123 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_Random  (  Biddy_Manager  MNG, 
Biddy_Edge  support,  
double  r  
) 
Function Biddy_Managed_Random generates a random BDD.
The represented Boolean function depends on the variables given with parameter support whilst the parameter r determines the ratio between the number of function's minterms and the number of all possible minterms. Parameter support is a product of positive varaiables.
Parameter r must be a number from [0,1]. Otherwise, function returns biddyNull.
Macro Biddy_Random(support,r) is defined for use with anonymous manager.
Definition at line 10446 of file biddyMainGDD.c.
Biddy_Edge Biddy_Managed_RandomSet  (  Biddy_Manager  MNG, 
Biddy_Edge  unit,  
double  r  
) 
Function Biddy_Managed_RandomSet generates a random BDD.
The represented set is a random combination set determined by the parameter unit whilst the parameter r determines the ratio between the number of set's subsets and the number of all possible subsets. Parameter set is a set containing only one subset which consist of all elements, i.e. it is a set {{x1,x2,...,xn}}.
Parameter r must be a number from [0,1]. Otherwise, function returns biddyNull.
Macro Biddy_RandomSet(unit,r) is defined for use with anonymous manager.
Definition at line 10575 of file biddyMainGDD.c.