model-checkingbinary-decision-diagramcudd

How can I replace some variables in a BDD by CUDD package?


Suppose DdManager has four variables: x, y, x', y' and I have a BDD built by x and y. Now I want to change x to x', y to y', namely, get an identical BDD built by x' and y'.

How can I get this using the CUDD package? I encountered this problem when I wanted to implement a model checking algorithm. I want to know how to implement this operation or whether I misunderstand the symbolic model checking algorithm? Thank you very much!


Solution

  • You do this with the function Cudd_bddSwapVariables. It gets the following parameters:

    1. A BDD Manager
    2. The BDD where you want to replace variables by others.
    3. The first array of variables (represented by the BDD nodes that also Cudd_bddNewVar would return)
    4. The second array of variables
    5. The number of variables being swapped.

    You will need to allocate and free the arrays yourself.